diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-03-23 17:07:49 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-03-23 17:07:49 +0100 |
commit | 55f5a827a7abc2f248c2405e1977222062b88e6b (patch) | |
tree | 9c49e8fa9b96072ee8c8e4b7ff0e82cd322be1f0 /src/webengine/webengineprofile.h | |
parent | poi-config saving config (diff) | |
download | smolbote-55f5a827a7abc2f248c2405e1977222062b88e6b.tar.xz |
Cookie filter
- Requires Qt 5.11 (now required)
- New settings: filter.cookies: block.all, block.thirdParty, path
Diffstat (limited to 'src/webengine/webengineprofile.h')
-rw-r--r-- | src/webengine/webengineprofile.h | 27 |
1 files changed, 9 insertions, 18 deletions
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 <QUrl> #include <QWebEngineProfile> -#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 |