From e5fe2754b45dc6e21911c6ea277fa0d9e7059653 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 14 Aug 2009 01:59:52 +0200 Subject: Inserting webview winId metadata in cookiejar --- src/networkaccessmanager.cpp | 6 ++++++ src/networkaccessmanager.h | 3 ++- src/webview.cpp | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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 QListignoreSslErrors(); } #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)); } -- cgit v1.2.1