summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-06-19 13:09:33 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-06-19 13:09:33 +0200
commit7fd44b92554588240a5dd953ce1734891b147271 (patch)
treeb662043a83c44a9207e5f022dd5d83382dd22a22
parentSpeed up construction of the history page (diff)
downloadrekonq-7fd44b92554588240a5dd953ce1734891b147271.tar.xz
Let fixed behavior when site is NOT loaded
work also when you don't have connection from the beginning. CCBUG:319924 CCBUG:312928
-rw-r--r--src/webtab/webpage.cpp5
-rw-r--r--src/webtab/webpage.h3
-rw-r--r--src/webtab/webtab.cpp2
3 files changed, 9 insertions, 1 deletions
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;