summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRohan Garg <rohangarg@ubuntu.com>2010-08-24 23:12:38 +0530
committerRohan Garg <rohangarg@ubuntu.com>2010-08-24 23:12:38 +0530
commit751103f77e64e1562de1b291d99ee1e262d0d5b4 (patch)
tree8fa044be1b4e8d18bafd4205848d0a3dc5be1c40 /src
parentRestore mr #174. (diff)
downloadrekonq-751103f77e64e1562de1b291d99ee1e262d0d5b4.tar.xz
Switch to faster comparisons of about: URL's with QByteArray, thanks to Harald Sitter
modified: src/application.cpp
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/application.cpp b/src/application.cpp
index e5677a0d..6bc512ca 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -341,20 +341,22 @@ KIcon Application::icon(const KUrl &url)
if (url.isEmpty())
return KIcon("text-html");
+ QByteArray encodedUrl = url.toEncoded();
// rekonq icons..
- if (url == KUrl("about:home"))
+ if (encodedUrl == QByteArray("about:home"))
return KIcon("go-home");
- if (url == KUrl("about:closedTabs"))
+ if (encodedUrl == QByteArray("about:closedTabs"))
return KIcon("tab-close");
- if (url == KUrl("about:history"))
+ if (encodedUrl == QByteArray("about:history"))
return KIcon("view-history");
- if (url == KUrl("about:bookmarks"))
+ if (encodedUrl == QByteArray("about:bookmarks"))
return KIcon("bookmarks");
- if (url == KUrl("about:favorites"))
+ if (encodedUrl == QByteArray("about:favorites"))
return KIcon("emblem-favorite");
- if (url == KUrl("about:downloads"))
+ if (encodedUrl == QByteArray("about:downloads"))
return KIcon("download");
+
KIcon icon = KIcon(QWebSettings::iconForUrl(url));
if (icon.isNull())
{