diff options
Diffstat (limited to 'lib/web/webprofile.cpp')
-rw-r--r-- | lib/web/webprofile.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/web/webprofile.cpp b/lib/web/webprofile.cpp index 37338b9..1124261 100644 --- a/lib/web/webprofile.cpp +++ b/lib/web/webprofile.cpp @@ -79,6 +79,13 @@ WebProfile::WebProfile(const QString &name, const QString &configPath, QObject * #ifdef QT_DEBUG qDebug("Creating otr profile %s", qUtf8Printable(m_name)); #endif + + connect(this->cookieStore(), &QWebEngineCookieStore::cookieAdded, this, [this](const QNetworkCookie &cookie) { + m_cookies.append(cookie); + }); + connect(this->cookieStore(), &QWebEngineCookieStore::cookieRemoved, this, [this](const QNetworkCookie &cookie) { + m_cookies.removeAll(cookie); + }); } WebProfile::WebProfile(const QString &storageName, const QString &name, const QString &configPath, QObject *parent) @@ -90,6 +97,13 @@ WebProfile::WebProfile(const QString &storageName, const QString &name, const QS #ifdef QT_DEBUG qDebug("Creating profile %s", qUtf8Printable(m_name)); #endif + + connect(this->cookieStore(), &QWebEngineCookieStore::cookieAdded, this, [this](const QNetworkCookie &cookie) { + m_cookies.append(cookie); + }); + connect(this->cookieStore(), &QWebEngineCookieStore::cookieRemoved, this, [this](const QNetworkCookie &cookie) { + m_cookies.removeAll(cookie); + }); } QString WebProfile::search() const |