summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-09-29 22:11:37 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-09-29 22:11:37 +0200
commit5f0e4fe5fabd7ca49cb7d6cb54dc6e903fffbf74 (patch)
tree52c3f6c744d1b71f8bd65ced265b4ce7633fabd0 /src/webpage.cpp
parentsearch --> opensearch dir (diff)
downloadrekonq-5f0e4fe5fabd7ca49cb7d6cb54dc6e903fffbf74.tar.xz
Clean up urlbar use. This fix an urlbar bug opening plugins
in next tabs and remove some Application::instance() calls from the Web* classes.
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 9be0d3c9..d481567f 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -459,7 +459,12 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
mainFrame()->setHtml(html);
_isOnRekonqPage = true;
- Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(replyUrl);
+
+ WebView *view = qobject_cast<WebView *>(parent());
+ WebTab *tab = qobject_cast<WebTab *>(view->parent());
+ UrlBar *bar = tab->urlBar();
+ bar->setQUrl(replyUrl);
+
Application::instance()->mainWindow()->updateActions();
}
else
@@ -561,9 +566,14 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
frame->setHtml(errorPage(reply));
if(isMainFrameRequest)
{
- _isOnRekonqPage = true;
- Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(_loadingUrl);
- Application::instance()->mainWindow()->updateActions();
+ _isOnRekonqPage = true;
+
+ WebView *view = qobject_cast<WebView *>(parent());
+ WebTab *tab = qobject_cast<WebTab *>(view->parent());
+ UrlBar *bar = tab->urlBar();
+ bar->setQUrl(_loadingUrl);
+
+ Application::instance()->mainWindow()->updateActions();
}
}
break;