summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-08-14 01:59:52 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-14 01:59:52 +0200
commite5fe2754b45dc6e21911c6ea277fa0d9e7059653 (patch)
tree6f2cbf44e9e97a3bf5a9a5d1338c0a9d2a4b2db6
parentrekonq 0.1.98 (diff)
downloadrekonq-e5fe2754b45dc6e21911c6ea277fa0d9e7059653.tar.xz
Inserting webview winId metadata in cookiejar
-rw-r--r--src/networkaccessmanager.cpp6
-rw-r--r--src/networkaccessmanager.h3
-rw-r--r--src/webview.cpp4
3 files changed, 12 insertions, 1 deletions
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 32bc15b5..159a30a2 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -202,3 +202,9 @@ void NetworkAccessManager::slotSSLErrors(QNetworkReply *reply, const QList<QSslE
reply->ignoreSslErrors();
}
#endif
+
+
+KIO::MetaData& NetworkAccessManager::metaData()
+{
+ return m_metaData;
+};
diff --git a/src/networkaccessmanager.h b/src/networkaccessmanager.h
index 1eea9a0d..e04df15c 100644
--- a/src/networkaccessmanager.h
+++ b/src/networkaccessmanager.h
@@ -48,7 +48,7 @@ class NetworkAccessManager : public RekonqAccessManager
public:
NetworkAccessManager(QObject *parent = 0);
-
+ KIO::MetaData& metaData();
void resetDiskCache();
public slots:
@@ -64,6 +64,7 @@ private slots:
private:
QNetworkDiskCache *m_diskCache;
+ KIO::MetaData m_metaData;
};
#endif // NETWORKACCESSMANAGER_H
diff --git a/src/webview.cpp b/src/webview.cpp
index dca8b6fb..1bf04885 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -66,6 +66,10 @@ WebView::WebView(QWidget* parent)
setPage(m_page);
connect(page(), SIGNAL(statusBarMessage(const QString&)), this, SLOT(setStatusBarText(const QString&)));
+
+ const qlonglong winId = window()->winId();
+ Application::cookieJar()->setWindowId(winId);
+ Application::networkAccessManager()->metaData().insert("window-id", QString::number(winId));
}