summaryrefslogtreecommitdiff
path: root/src/webtab/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-10-21 12:06:52 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commit0f9594f7c43f0b86c634e6f4e92b14fc9783bfee (patch)
tree8caf0c827fc9933edb3be56e790b9355f3014f70 /src/webtab/webpage.cpp
parentenable webapp mode by calling "rekonq --webapp URL" :D (diff)
downloadrekonq-0f9594f7c43f0b86c634e6f4e92b14fc9783bfee.tar.xz
Fix new page creation on blank target url click
Diffstat (limited to 'src/webtab/webpage.cpp')
-rw-r--r--src/webtab/webpage.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index 93d59d90..a30ca804 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -129,11 +129,6 @@ WebPage::WebPage(QWidget *parent)
, _networkAnalyzer(false)
, _isOnRekonqPage(false)
{
- WebView *view = qobject_cast<WebView *>(parent);
- WebTab *tab = qobject_cast<WebTab *>(view->parent());
- WebWindow *w = tab->webWindow();
- _protHandler.setWindow(w);
-
// handling unsupported content...
setForwardUnsupportedContent(true);
connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(handleUnsupportedContent(QNetworkReply*)));
@@ -147,10 +142,6 @@ WebPage::WebPage(QWidget *parent)
// disable QtWebKit cache to just use KIO one..
manager->setCache(0);
- // set cookieJar window..
- if (parent && parent->window())
- manager->setWindow(parent->window());
-
setNetworkAccessManager(manager);
// activate ssl warnings
@@ -184,6 +175,16 @@ WebPage::~WebPage()
}
+void WebPage::setWindow(QWidget *w)
+{
+ // set cookieJar window..
+ NetworkAccessManager *manager = qobject_cast<NetworkAccessManager *>(networkAccessManager());
+ manager->setWindow(w);
+
+ _protHandler.setWindow(w);
+}
+
+
bool WebPage::isOnRekonqPage() const
{
return _isOnRekonqPage;