From 55f5a827a7abc2f248c2405e1977222062b88e6b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 23 Mar 2018 17:07:49 +0100 Subject: Cookie filter - Requires Qt 5.11 (now required) - New settings: filter.cookies: block.all, block.thirdParty, path --- src/webengine/webengineprofile.h | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'src/webengine/webengineprofile.h') diff --git a/src/webengine/webengineprofile.h b/src/webengine/webengineprofile.h index d93e079..6a0d4e2 100644 --- a/src/webengine/webengineprofile.h +++ b/src/webengine/webengineprofile.h @@ -6,44 +6,35 @@ * SPDX-License-Identifier: GPL-3.0 */ -#ifndef WEBENGINEPROFILE_H -#define WEBENGINEPROFILE_H +#ifndef SMOLBOTE_WEBENGINEPROFILE_H +#define SMOLBOTE_WEBENGINEPROFILE_H #include #include -#include "cookieinterceptor.h" +#include "cookiefilter.h" class WebEngineProfile : public QWebEngineProfile { Q_OBJECT public: explicit WebEngineProfile(QObject *parent = nullptr); - explicit WebEngineProfile(const QString &name, const QString &path, QObject *parent = nullptr); + explicit WebEngineProfile(const QString &name, QObject *parent = nullptr); - ~WebEngineProfile(); + ~WebEngineProfile() override; QString name() const; - QUrl homepage() const; - void setHomepage(const QUrl &url); - QUrl newtab() const; - void setNewtab(const QUrl &url); - - void setCookieInterceptor(CookieInterceptor *interceptor); - -signals: public slots: - void saveProfile(); + void loadProfile(const QString &path); + void saveProfile(const QString &path = QString()); private: + QString m_configPath; QString m_name; - bool shouldSaveProfile = false; QUrl m_homepage = QUrl("about:blank"); QUrl m_newtab = QUrl("about:blank"); }; -[[nodiscard]] WebEngineProfile *createProfile(const QString &name, const QString &path, QObject *parent); - -#endif // WEBENGINEPROFILE_H +#endif // SMOLBOTE_WEBENGINEPROFILE_H -- cgit v1.2.1