From f5d3aa574af43eea408163da02100e5e24305de1 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Tue, 24 Aug 2010 23:40:35 +0530 Subject: Replace with QByteArray for faster searches modified: src/newtabpage.cpp --- src/newtabpage.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/newtabpage.cpp') diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp index 44b76e11..51081816 100644 --- a/src/newtabpage.cpp +++ b/src/newtabpage.cpp @@ -134,27 +134,28 @@ void NewTabPage::generate(const KUrl &url) browsingMenu(url); QString title; - if (url == KUrl("about:favorites")) + QByteArray encodedUrl = url.toEncoded(); + if (encodedUrl == QByteArray("about:favorites")) { favoritesPage(); title = i18n("Favorites"); } - else if (url == KUrl("about:closedTabs")) + else if (encodedUrl == QByteArray("about:closedTabs")) { closedTabsPage(); title = i18n("Closed Tabs"); } - else if (url == KUrl("about:history")) + else if (encodedUrl == QByteArray("about:history")) { historyPage(); title = i18n("History"); } - else if (url == KUrl("about:bookmarks")) + else if (encodedUrl == QByteArray("about:bookmarks")) { bookmarksPage(); title = i18n("Bookmarks"); } - else if (url == KUrl("about:downloads")) + else if (encodedUrl == QByteArray("about:downloads")) { downloadsPage(); title = i18n("Downloads"); -- cgit v1.2.1