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.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;