diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-05-21 09:28:45 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-06-06 23:48:27 +0200 |
commit | 3d0017226abe2f2b42787de12fea2ba7cdc668be (patch) | |
tree | a7bfdf7fd156f127945a8b491d47aa38c0e3c75f /src/urlbar | |
parent | Use webkit general font to render rekonq pages (diff) | |
download | rekonq-3d0017226abe2f2b42787de12fea2ba7cdc668be.tar.xz |
Move from about: to rekonq: protocol for our special links
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/urlbar.cpp | 16 | ||||
-rw-r--r-- | src/urlbar/urlsuggester.cpp | 24 |
2 files changed, 15 insertions, 25 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 6f4a09fc..0c582c42 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -176,7 +176,7 @@ UrlBar::~UrlBar() void UrlBar::setQUrl(const QUrl& url) { - if (url.scheme() == QL1S("about")) + if (url.scheme() == QL1S("rekonq")) return; clearFocus(); @@ -344,7 +344,7 @@ void UrlBar::keyPressEvent(QKeyEvent *event) if (event->key() == Qt::Key_Escape) { clearFocus(); - if (!(_tab->url().protocol() == QL1S("about"))) + if (!(_tab->url().protocol() == QL1S("rekonq"))) setText(_tab->url().prettyUrl()); event->accept(); } @@ -402,7 +402,7 @@ void UrlBar::updateRightIcons() clearRightIcons(); - if (_tab->url().scheme() == QL1S("about")) + if (_tab->url().scheme() == QL1S("rekonq")) { update(); return; @@ -666,7 +666,7 @@ void UrlBar::refreshFavicon() return; } - if (scheme == QL1S("about")) + if (scheme == QL1S("rekonq")) { _icon->setIcon(KIcon("arrow-right")); return; @@ -698,7 +698,7 @@ void UrlBar::delSlot() void UrlBar::manageBookmarks() { - if (_tab->url().scheme() == QL1S("about")) + if (_tab->url().scheme() == QL1S("rekonq")) return; KBookmark bookmark = BookmarkManager::self()->bookmarkForUrl(_tab->url()); @@ -730,7 +730,7 @@ void UrlBar::manageAdBlock(QPoint pos) if (!bt) return; - if (_tab->url().scheme() == QL1S("about")) + if (_tab->url().scheme() == QL1S("rekonq")) return; AdBlockWidget *widget = new AdBlockWidget(_tab->url(), this); @@ -825,7 +825,7 @@ void UrlBar::manageStarred(QPoint pos) void UrlBar::addToFavorites() { - if (_tab->url().scheme() == QL1S("about")) + if (_tab->url().scheme() == QL1S("rekonq")) return; // else, add as favorite @@ -847,7 +847,7 @@ void UrlBar::addToFavorites() void UrlBar::removeFromFavorites() { - if (_tab->url().scheme() == QL1S("about")) + if (_tab->url().scheme() == QL1S("rekonq")) return; QStringList urls = ReKonfig::previewUrls(); diff --git a/src/urlbar/urlsuggester.cpp b/src/urlbar/urlsuggester.cpp index 0a775d85..897b1eb0 100644 --- a/src/urlbar/urlsuggester.cpp +++ b/src/urlbar/urlsuggester.cpp @@ -127,32 +127,22 @@ UrlSuggester::UrlSuggester(const QString &typedUrl) UrlSuggestionList UrlSuggester::orderedSearchItems() { - if (_typedString.startsWith(QL1S("about:"))) + if (_typedString.startsWith(QL1S("rekonq:"))) { QStringList aboutUrlList; aboutUrlList - << QL1S("about:home") - << QL1S("about:favorites") -// << QL1S("about:closedTabs") - << QL1S("about:bookmarks") - << QL1S("about:history") - << QL1S("about:downloads") -// << QL1S("about:tabs") -// << QL1S("about:info") + << QL1S("rekonq:home") + << QL1S("rekonq:favorites") + << QL1S("rekonq:bookmarks") + << QL1S("rekonq:history") + << QL1S("rekonq:downloads") + << QL1S("rekonq:closedtabs") ; QStringList aboutUrlResults = aboutUrlList.filter(_typedString, Qt::CaseInsensitive); UrlSuggestionList list; - if (aboutUrlResults.isEmpty()) - { - UrlSuggestionItem info(UrlSuggestionItem::Browse, QL1S("about:info"), QL1S("info")); - list << info; - - return list; - } - Q_FOREACH(const QString & urlResult, aboutUrlResults) { QString name = urlResult; |