summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2009-12-13 20:47:44 +0100
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2009-12-14 03:01:06 +0100
commitf56f60ff3503001550feb28d8cd592f51ef0062b (patch)
tree46bf504cd08de9938a133aaa247dae6500b18237
parentrekonq 0.3.20 (diff)
downloadrekonq-f56f60ff3503001550feb28d8cd592f51ef0062b.tar.xz
move KWallet integration into WebPage
-rw-r--r--src/mainview.cpp8
-rw-r--r--src/webpage.cpp12
-rw-r--r--src/webpage.h3
3 files changed, 15 insertions, 8 deletions
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 <KStandardDirs>
#include <KPassivePopup>
#include <KLocalizedString>
-#include <kwebwallet.h>
// Qt Includes
#include <QtCore/QTimer>
@@ -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 *);