From e473d62586b7d31c281d5fa15a7cd98f9024190a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 1 Aug 2012 12:24:32 +0200 Subject: Remove a lot of application calls by refactoring code --- src/webtab/webpage.cpp | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'src/webtab/webpage.cpp') diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp index d87c2119..c2b6bdde 100644 --- a/src/webtab/webpage.cpp +++ b/src/webtab/webpage.cpp @@ -41,15 +41,16 @@ #include "downloadmanager.h" #include "historymanager.h" #include "iconmanager.h" -#include "tabwindow.h" + #include "networkaccessmanager.h" #include "webpluginfactory.h" #include "websnap.h" #include "webtab.h" -#include "searchengine.h" -// #include "sslwidget.h" #include "sslinfodialog.h" +#include "searchengine.h" +#include "webwindow.h" + // KDE Includes #include #include @@ -125,6 +126,11 @@ WebPage::WebPage(QWidget *parent) , _networkAnalyzer(false) , _isOnRekonqPage(false) { + WebView *view = qobject_cast(parent); + WebTab *tab = qobject_cast(view->parent()); + WebWindow *w = tab->webWindow(); + _protHandler.setWindow(w); + // handling unsupported content... setForwardUnsupportedContent(true); connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(handleUnsupportedContent(QNetworkReply*))); @@ -691,23 +697,6 @@ void WebPage::downloadAllContentsWithKGet() } -void WebPage::showSSLInfo(QPoint pos) -{ - if (mainFrame()->url().scheme() == QL1S("https")) - { -// SSLWidget *widget = new SSLWidget(mainFrame()->url(), _sslInfo, view()); -// widget->showAt(pos); - } - else - { - KMessageBox::information(view(), - i18n("This site does not contain SSL information."), - i18nc("Secure Sockets Layer", "SSL") - ); - } -} - - void WebPage::copyToTempFileResult(KJob* job) { if (job->error()) -- cgit v1.2.1