diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-06-26 19:11:40 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-06-26 19:11:40 +0200 |
commit | 83f36acaf95bdd106665d55ceb8deee794a9d2cf (patch) | |
tree | 801a0b6c6e1b659e6a1994e688de7992521faae9 | |
parent | Ignore Close Event Filtering Altogether when Saving Session (diff) | |
download | rekonq-83f36acaf95bdd106665d55ceb8deee794a9d2cf.tar.xz |
Set URL on initial load just when it comes from main frame
Stupid me, I tested one week this patch and then pushed the wrong
version.
Sorry guys, things happen :(
BUG: 321583
-rw-r--r-- | src/webtab/webpage.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp index 6c36b5df..fae67ce6 100644 --- a/src/webtab/webpage.cpp +++ b/src/webtab/webpage.cpp @@ -243,12 +243,19 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r tab->setPart(0, KUrl()); // re-enable the view page } - // reset webpage values - _suggestedFileName.clear(); - _loadingUrl = request.url(); - const bool isMainFrameRequest = (frame == mainFrame()); - + if (isMainFrameRequest) + { + // reset webpage values + _suggestedFileName.clear(); + _loadingUrl = request.url(); + + // Set Page URL: This is needed for 2 reasons. + // 1) WebKit is slot setting url in some case. Having an initial URL set seems snappier ;) + // 2) When WebKit cannot set URL (eg: network down), urlbar URL is NOT set + emit initialUrl(_loadingUrl); + } + if (frame) { if (_protHandler.preHandling(request, frame)) @@ -321,11 +328,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r } } - // Set Page URL: This is needed for 2 reasons. - // 1) WebKit is slot setting url in some case. Having an initial URL set seems snappier ;) - // 2) When WebKit cannot set URL (eg: network down), urlbar URL is NOT set - emit initialUrl(_loadingUrl); - return KWebPage::acceptNavigationRequest(frame, request, type); } |