From 7fd44b92554588240a5dd953ce1734891b147271 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 19 Jun 2013 13:09:33 +0200 Subject: Let fixed behavior when site is NOT loaded work also when you don't have connection from the beginning. CCBUG:319924 CCBUG:312928 --- src/webtab/webpage.cpp | 5 +++++ src/webtab/webpage.h | 3 ++- src/webtab/webtab.cpp | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/webtab') diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp index 3e580dbe..6c36b5df 100644 --- a/src/webtab/webpage.cpp +++ b/src/webtab/webpage.cpp @@ -321,6 +321,11 @@ 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); } diff --git a/src/webtab/webpage.h b/src/webtab/webpage.h index a141d38c..43073d58 100644 --- a/src/webtab/webpage.h +++ b/src/webtab/webpage.h @@ -77,7 +77,8 @@ protected: NavigationType type); Q_SIGNALS: void pageCreated(WebPage *); - + void initialUrl(const QUrl &); + private Q_SLOTS: void handleUnsupportedContent(QNetworkReply *reply); void manageNetworkErrors(QNetworkReply *reply); diff --git a/src/webtab/webtab.cpp b/src/webtab/webtab.cpp index f501c8fd..a304a68c 100644 --- a/src/webtab/webtab.cpp +++ b/src/webtab/webtab.cpp @@ -118,6 +118,8 @@ WebTab::WebTab(QWidget *parent, bool isPrivateBrowsing) connect(view(), SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString))); connect(view(), SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); + connect(page(), SIGNAL(initialUrl(QUrl)), this, SIGNAL(urlChanged(QUrl))); + if (!parent) { m_isWebApp = true; -- cgit v1.2.1