diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-03-13 00:23:00 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-03-13 11:00:27 +0100 |
commit | 707c0b1761e2823e4253bcb441a1a54478e5b76d (patch) | |
tree | f6fb2b89ca049c11edd4dd3bb1c9acc42564676c /src/webview.cpp | |
parent | Fix toolbars rekonfig... (diff) | |
download | rekonq-707c0b1761e2823e4253bcb441a1a54478e5b76d.tar.xz |
Get sure urlbar(s) are deleted when related webtab is
Heinz, Paul. Please test actual master before backporting this to
0.9 series. Many thanks for your help and for this bug report.
I'm crossing fingers to hear good news from your tests ;)
CCBUG:295301
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index a581664a..688816e6 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -65,6 +65,7 @@ WebView::WebView(QWidget* parent) : KWebView(parent, false) + , m_page(0) , m_autoScrollTimer(new QTimer(this)) , m_verticalAutoScrollSpeed(0) , m_horizontalAutoScrollSpeed(0) @@ -77,11 +78,8 @@ WebView::WebView(QWidget* parent) , m_accessKeysPressed(false) , m_accessKeysActive(false) { - WebPage *page = new WebPage(this); - setPage(page); - // download system - connect(this, SIGNAL(linkShiftClicked(KUrl)), page, SLOT(downloadUrl(KUrl))); + connect(this, SIGNAL(linkShiftClicked(KUrl)), page(), SLOT(downloadUrl(KUrl))); // middle click || ctrl + click signal connect(this, SIGNAL(linkMiddleOrCtrlClicked(KUrl)), this, SLOT(loadUrlInNewTab(KUrl))); @@ -132,9 +130,12 @@ void WebView::changeWindowIcon() WebPage *WebView::page() { - WebPage *const page = qobject_cast<WebPage *>(KWebView::page()); - Q_ASSERT(page); - return page; + if (!m_page) + { + m_page = new WebPage(this); + setPage(m_page); + } + return m_page; } |