summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp13
-rw-r--r--src/newtabpage.cpp11
-rw-r--r--src/protocolhandler.cpp5
-rw-r--r--src/urlbar/urlresolver.cpp2
4 files changed, 17 insertions, 14 deletions
diff --git a/src/application.cpp b/src/application.cpp
index e5677a0d..df4c3d51 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -341,18 +341,19 @@ 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));
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");
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 1f84b420..5cc09f44 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -145,13 +145,14 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
// "about" handling
if (_url.protocol() == QL1S("about"))
{
+ QByteArray encodedUrl = _url.toEncoded();
// let webkit manage the about:blank url...
- if (_url == KUrl("about:blank"))
+ if (encodedUrl == QByteArray("about:blank"))
{
return false;
}
- if (_url == KUrl("about:home"))
+ if (encodedUrl == QByteArray("about:home"))
{
switch (ReKonfig::newTabStartPage())
{
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index d60dc563..84c9e20b 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -71,7 +71,7 @@ UrlResolver::UrlResolver(const QString &typedUrl)
{
kDebug() << "browse regexp empty. Setting value..";
- QString protocol = "^(http://|https://|file://|ftp://|man:|info:|apt:)";
+ QString protocol = "^(http://|https://|file://|ftp://|man:|info:|apt:|about:)";
QString localhost = "^localhost";