summaryrefslogtreecommitdiff
path: root/src/webtab/webpage.cpp
diff options
context:
space:
mode:
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?