summaryrefslogtreecommitdiff
path: root/src/webtab/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-11-29 11:33:13 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:06 +0100
commit95c3dbf890d813ab3867ef798054d2741cfc6ad4 (patch)
tree2770923b7ee665ce0f15db10bbfe47302452805e /src/webtab/webpage.cpp
parentRestoring inspector, part 3 (diff)
downloadrekonq-95c3dbf890d813ab3867ef798054d2741cfc6ad4.tar.xz
Use view parent tab to get use calling tab exists
Diffstat (limited to 'src/webtab/webpage.cpp')
-rw-r--r--src/webtab/webpage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index 7f681ee3..866733d0 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -214,7 +214,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
if (_isOnRekonqPage)
{
WebView *view = qobject_cast<WebView *>(parent());
- WebTab *tab = qobject_cast<WebTab *>(view->parent());
+ WebTab *tab = view->parentTab();
_isOnRekonqPage = false;
tab->setPart(0, KUrl()); // re-enable the view page
}
@@ -455,7 +455,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
_isOnRekonqPage = true;
WebView *view = qobject_cast<WebView *>(parent());
- WebTab *tab = qobject_cast<WebTab *>(view->parent());
+ WebTab *tab = view->parentTab();
tab->setPart(pa, replyUrl);
// WARNING: Is this enough?