From f56f60ff3503001550feb28d8cd592f51ef0062b Mon Sep 17 00:00:00 2001 From: Bernhard Beschow Date: Sun, 13 Dec 2009 20:47:44 +0100 Subject: move KWallet integration into WebPage --- src/mainview.cpp | 8 -------- src/webpage.cpp | 12 ++++++++++++ src/webpage.h | 3 +++ 3 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mainview.cpp b/src/mainview.cpp index 3285c630..b5f47679 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -48,7 +48,6 @@ #include #include #include -#include // Qt Includes #include @@ -562,13 +561,6 @@ void MainView::webViewLoadFinished(bool ok) webViewIconChanged(); emit browserTabLoading(false); - // KWallet Integration - // TODO: Add check for sites exempt from automatic form filling... - if (webView && webView->page() && webView->page()->wallet()) - { - webView->page()->wallet()->fillFormData(webView->page()->mainFrame()); - } - // don't display messages for background tabs if (index != currentIndex()) { diff --git a/src/webpage.cpp b/src/webpage.cpp index a6c37906..8d605a81 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -81,6 +81,7 @@ WebPage::WebPage(QObject *parent) connect(networkAccessManager(), SIGNAL(finished(QNetworkReply*)), this, SLOT(manageNetworkErrors(QNetworkReply*))); connect(this, SIGNAL(unsupportedContent(QNetworkReply *)), this, SLOT(handleUnsupportedContent(QNetworkReply *))); + connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); } @@ -182,6 +183,17 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) } +void WebPage::loadFinished(bool) +{ + // KWallet Integration + // TODO: Add check for sites exempt from automatic form filling... + if (wallet()) + { + wallet()->fillFormData(mainFrame()); + } +} + + void WebPage::manageNetworkErrors(QNetworkReply* reply) { if( reply->error() == QNetworkReply::NoError ) diff --git a/src/webpage.h b/src/webpage.h index 824736c1..887a4309 100644 --- a/src/webpage.h +++ b/src/webpage.h @@ -64,6 +64,9 @@ protected: protected Q_SLOTS: virtual void handleUnsupportedContent(QNetworkReply *reply); +private slots: + void loadFinished(bool); + private: friend class WebView; QString errorPage(QNetworkReply *); -- cgit v1.2.1