summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-05-21 09:28:45 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-06-06 23:48:27 +0200
commit3d0017226abe2f2b42787de12fea2ba7cdc668be (patch)
treea7bfdf7fd156f127945a8b491d47aa38c0e3c75f /src/webtab
parentUse webkit general font to render rekonq pages (diff)
downloadrekonq-3d0017226abe2f2b42787de12fea2ba7cdc668be.tar.xz
Move from about: to rekonq: protocol for our special links
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/previewselectorbar.cpp4
-rw-r--r--src/webtab/protocolhandler.cpp24
-rw-r--r--src/webtab/webpage.cpp2
-rw-r--r--src/webtab/webtab.cpp2
4 files changed, 13 insertions, 19 deletions
diff --git a/src/webtab/previewselectorbar.cpp b/src/webtab/previewselectorbar.cpp
index b37b000c..f0fe50ee 100644
--- a/src/webtab/previewselectorbar.cpp
+++ b/src/webtab/previewselectorbar.cpp
@@ -69,7 +69,7 @@ PreviewSelectorBar::PreviewSelectorBar(int index, QWidget* parent)
void PreviewSelectorBar::verifyUrl()
{
WebTab *tab = qobject_cast<WebTab *>(parent());
- if (tab->url().scheme() != "about")
+ if (tab->url().scheme() != QL1S("rekonq"))
{
m_insertAction->setEnabled(true);
m_insertAction->setToolTip("");
@@ -122,7 +122,7 @@ void PreviewSelectorBar::clicked()
ReKonfig::self()->writeConfig();
- tab->page()->mainFrame()->load(KUrl("about:favorites"));
+ tab->page()->mainFrame()->load(KUrl("rekonq:favorites"));
}
animatedHide();
diff --git a/src/webtab/protocolhandler.cpp b/src/webtab/protocolhandler.cpp
index 886bec1e..138f297d 100644
--- a/src/webtab/protocolhandler.cpp
+++ b/src/webtab/protocolhandler.cpp
@@ -134,17 +134,11 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
return true;
}
- // "about" handling
- if (_url.protocol() == QL1S("about"))
+ // "rekonq" handling
+ if (_url.protocol() == QL1S("rekonq"))
{
QByteArray encodedUrl = _url.toEncoded();
- // let webkit manage the about:blank url...
- if (encodedUrl.startsWith(QByteArray("about:blank")))
- {
- return false;
- }
-
if (_url.directory() == QL1S("webapp"))
{
if (_url.fileName() == QL1S("launch"))
@@ -162,28 +156,28 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
}
}
- if (encodedUrl == QByteArray("about:home"))
+ if (encodedUrl == QByteArray("rekonq:home"))
{
switch (ReKonfig::newTabStartPage())
{
case 0: // favorites
- _url = KUrl("about:favorites");
+ _url = KUrl("rekonq:favorites");
break;
case 1: // bookmarks
- _url = KUrl("about:bookmarks");
+ _url = KUrl("rekonq:bookmarks");
break;
case 2: // history
- _url = KUrl("about:history");
+ _url = KUrl("rekonq:history");
break;
case 3: // downloads
- _url = KUrl("about:downloads");
+ _url = KUrl("rekonq:downloads");
break;
case 4: // closed tabs
- _url = KUrl("about:closedTabs");
+ _url = KUrl("rekonq:closedtabs");
break;
default: // unuseful
kDebug() << "oops... this should NOT happen...";
- _url = KUrl("about:favorites");
+ _url = KUrl("rekonq:favorites");
break;
}
}
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index 82c5cf60..6042cf32 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -709,7 +709,7 @@ QString WebPage::errorPage(QNetworkReply *reply)
msg += QL1S("<p>");
- msg += i18n("Maybe you are having problems with your network settings.<br />Try checking your <a href=\"%1\">network connections</a>, your <a href=\"%2\">proxy settings</a> and your <a href=\"%3\">firewall</a>.<br /><br />Then <a href=\"%4\">try again</a>.<br />", QL1S("about:settings/network"), QL1S("about:settings/proxy"), QL1S("about:settings/firewall"), urlString);
+ msg += i18n("Maybe you are having problems with your network settings.<br />Try checking your <a href=\"%1\">network connections</a>, your <a href=\"%2\">proxy settings</a> and your <a href=\"%3\">firewall</a>.<br /><br />Then <a href=\"%4\">try again</a>.<br />", QL1S("rekonq:settings/network"), QL1S("rekonq:settings/proxy"), QL1S("rekonq:settings/firewall"), urlString);
msg += QL1S("</p>");
diff --git a/src/webtab/webtab.cpp b/src/webtab/webtab.cpp
index 7743677c..fba824a1 100644
--- a/src/webtab/webtab.cpp
+++ b/src/webtab/webtab.cpp
@@ -197,7 +197,7 @@ KUrl WebTab::url()
QString WebTab::title()
{
- if (view() && url().protocol() == QL1S("about"))
+ if (view() && url().protocol() == QL1S("rekonq"))
return view()->title();
if (page() && page()->isOnRekonqPage())