From 95c3dbf890d813ab3867ef798054d2741cfc6ad4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 29 Nov 2012 11:33:13 +0100 Subject: Use view parent tab to get use calling tab exists --- src/webtab/webpage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/webtab/webpage.cpp') 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(parent()); - WebTab *tab = qobject_cast(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(parent()); - WebTab *tab = qobject_cast(view->parent()); + WebTab *tab = view->parentTab(); tab->setPart(pa, replyUrl); // WARNING: Is this enough? -- cgit v1.2.1