diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-10-21 23:28:53 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-10-21 23:28:53 +0200 |
commit | 8d8f29078b2e7fd07e8b21fe238a76f9eb134492 (patch) | |
tree | 25c88c6e67541010d147a06fad2e3785102e171b /src/webtab.cpp | |
parent | add comment to string (diff) | |
download | rekonq-8d8f29078b2e7fd07e8b21fe238a76f9eb134492.tar.xz |
This commit fixes icons handling for "rekonq pages" (eg: about urls).
It also contains a cleaned version of the WebTab::url() method (the previous one was
not working on loading pages. And also immediately after the loadFinished signal)
This should also fix some "bad" handling on back/forward buttons.
Finally, it contains some unrelated QLatin1String --> QL1S changes.
Benjamin, I spoke too early about those.
I squashed merged my work and removed previous branch :(
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r-- | src/webtab.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp index 2289726c..9ed43d45 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -84,29 +84,12 @@ WebTab::~WebTab() } -// TODO: -// Import the "about" check and the one in protocolhandler -// in some (static?) methods in NewTabPage KUrl WebTab::url() { - KUrl u = KUrl(view()->url()); - if (u.scheme() == QL1S("about")) - { - QWebElement rootElement = page()->mainFrame()->documentElement(); - if (rootElement.document().findAll("#rekonq-newtabpage").count() == 0) - return u; - if (rootElement.findAll(".favorites").count() > 0) - return KUrl("about:favorites"); - if (rootElement.findAll(".closedTabs").count() > 0) - return KUrl("about:closedTabs"); - if (rootElement.findAll(".history").count() > 0) - return KUrl("about:history"); - if (rootElement.findAll(".bookmarks").count() > 0) - return KUrl("about:bookmarks"); - if (rootElement.findAll(".downloads").count() > 0) - return KUrl("about:downloads"); - } - return u; + if(page()->isOnRekonqPage()) + return page()->loadingUrl(); + + return view()->url(); } |