summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-09-13 20:35:41 +0400
committerDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-09-13 20:35:41 +0400
commit2c3d919e8202aa23a9a04a1bed4dde21aed76bdb (patch)
treec5730af1b825660612eb98344f41a5e1f2dcdacd
parentchange sessionRestored to isSessionRestored (diff)
downloadrekonq-2c3d919e8202aa23a9a04a1bed4dde21aed76bdb.tar.xz
Bugfix: when trying to open link in new tab & network request fails (no
connection, etc) error page opened not only on new tab, but on tab with that link.
-rw-r--r--src/webpage.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 274f8d60..b33d2cce 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -90,14 +90,6 @@ WebPage::~WebPage()
bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
{
- m_requestedUrl = request.url();
-
- if (m_requestedUrl.scheme() == QLatin1String("mailto"))
- {
- KToolInvocation::invokeMailer(m_requestedUrl);
- return false;
- }
-
if (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton)
{
Application::instance()->loadUrl(request.url(), Rekonq::SettingOpenTab);
@@ -106,6 +98,14 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
return false;
}
+ if (request.url().scheme() == QLatin1String("mailto"))
+ {
+ KToolInvocation::invokeMailer(request.url());
+ return false;
+ }
+
+ m_requestedUrl = request.url();
+
return QWebPage::acceptNavigationRequest(frame, request, type);
}
@@ -178,7 +178,8 @@ void WebPage::manageNetworkErrors(QNetworkReply* reply)
{
if( reply->error() == QNetworkReply::NoError )
return;
-
+
+
if( reply->url() != m_requestedUrl ) // prevent favicon loading
return;