From 22b5c6334f710ec333e1e461c99c8eb763a50db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 19 Jun 2022 00:24:28 +0200 Subject: [PATCH] Fix 'gb.qt4.webview' compilation. [GB.QT4.WEBVIEW] * BUG: Fix 'gb.qt4.webview' compilation. --- gb.qt4/src/webview/c_webview.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gb.qt4/src/webview/c_webview.cpp b/gb.qt4/src/webview/c_webview.cpp index df46af87c..c478fa6bd 100644 --- a/gb.qt4/src/webview/c_webview.cpp +++ b/gb.qt4/src/webview/c_webview.cpp @@ -423,10 +423,25 @@ END_PROPERTY //------------------------------------------------------------------------- +class MyCookieJar : public QNetworkCookieJar +{ + Q_OBJECT + +public: + + MyCookieJar(QObject *parent = 0); + + QList allCookies () const { return QNetworkCookieJar::allCookies(); } + void setAllCookies(const QList &cookieList) { QNetworkCookieJar::setAllCookies(cookieList); } + + //virtual QList cookiesForUrl(const QUrl & url) const; + //virtual bool setCookiesFromUrl(const QList &cookieList, const QUrl &url); +}; + BEGIN_METHOD_VOID(WebView_Cookies_Clear) QList list; - WIDGET->page()->networkAccessManager()->cookieJar()->setAllCookies(list); + qstatic_cast(WIDGET->page()->networkAccessManager()->cookieJar())->setAllCookies(list); END_METHOD