summaryrefslogtreecommitdiff
path: root/src/webtab/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-08-01 12:01:16 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:04 +0100
commitb07462a84c686136ab893ab55b6c4669a9fe74bc (patch)
tree21bcad87e4202a3350947549023bb45dcfda656d /src/webtab/webview.cpp
parentClean out WebTab methods not really related. (diff)
downloadrekonq-b07462a84c686136ab893ab55b6c4669a9fe74bc.tar.xz
Fix use of webpage
Diffstat (limited to 'src/webtab/webview.cpp')
-rw-r--r--src/webtab/webview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index 5c83ab84..43f62866 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -70,7 +70,6 @@
WebView::WebView(QWidget* parent)
: KWebView(parent, false)
- , m_page(0)
, m_autoScrollTimer(new QTimer(this))
, m_verticalAutoScrollSpeed(0)
, m_horizontalAutoScrollSpeed(0)
@@ -132,12 +131,13 @@ void WebView::loadStarted()
WebPage *WebView::page()
{
- if (!m_page)
+ WebPage *p = qobject_cast<WebPage *>(KWebView::page());
+ if (!p)
{
- m_page = new WebPage(this);
- setPage(m_page);
+ p = new WebPage(this);
+ setPage(p);
}
- return m_page;
+ return p;
}