diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-03-31 22:02:59 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-03-31 22:02:59 +0200 |
commit | 549741018ef5a18d9ad7a51092438d764149b758 (patch) | |
tree | 0fbe74b8569004c0a4ddb24d25cedaabeab36f82 /src/webengine/webengineprofile.cpp | |
parent | Rewrote the pre-commit hook into Ruby (diff) | |
download | smolbote-549741018ef5a18d9ad7a51092438d764149b758.tar.xz |
Added cookie widget
Diffstat (limited to 'src/webengine/webengineprofile.cpp')
-rw-r--r-- | src/webengine/webengineprofile.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/webengine/webengineprofile.cpp b/src/webengine/webengineprofile.cpp index cd6291f..a72f3cf 100644 --- a/src/webengine/webengineprofile.cpp +++ b/src/webengine/webengineprofile.cpp @@ -27,6 +27,8 @@ WebEngineProfile::WebEngineProfile(QObject *parent) : QWebEngineProfile(parent) { // Off-the-record constructor + + m_cookiesForm = new CookiesWidget(cookieStore()); } WebEngineProfile::WebEngineProfile(const QString &storageName, QObject *parent) : @@ -35,6 +37,8 @@ WebEngineProfile::WebEngineProfile(const QString &storageName, QObject *parent) setPersistentStoragePath(sSettings->value("browser.profile.path").toString() + storageName); setCachePath(sSettings->value("browser.profile.path").toString() + storageName); + m_cookiesForm = new CookiesWidget(cookieStore()); + QString profilePath = persistentStoragePath() + "/profile.ini"; qDebug("Reading profile from [%s]", qUtf8Printable(profilePath)); QSettings config(profilePath, QSettings::IniFormat); @@ -106,6 +110,13 @@ WebEngineProfile::~WebEngineProfile() if(!isOffTheRecord()) { saveProfile(); } + + m_cookiesForm->deleteLater(); +} + +CookiesWidget *WebEngineProfile::cookieUI() +{ + return m_cookiesForm; } void WebEngineProfile::saveProfile() |