diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-06-04 16:59:06 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-06-04 16:59:06 +0200 |
commit | f5c858d477db5fc9d725b502e7f59d622fab380d (patch) | |
tree | 18f09b3931c9c2abc14c5fd00ac9d2c58e72bfb7 /src/webengine | |
parent | Browser class refactoring (diff) | |
download | smolbote-f5c858d477db5fc9d725b502e7f59d622fab380d.tar.xz |
Proper Profile loading
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/webengineprofile.cpp | 12 | ||||
-rw-r--r-- | src/webengine/webengineprofile.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/webengine/webengineprofile.cpp b/src/webengine/webengineprofile.cpp index 2fed937..ddf62a8 100644 --- a/src/webengine/webengineprofile.cpp +++ b/src/webengine/webengineprofile.cpp @@ -30,14 +30,14 @@ WebEngineProfile::WebEngineProfile(QObject *parent) : m_name = tr("Off-the-record"); } -WebEngineProfile::WebEngineProfile(const QString &storageName, QObject *parent) : - QWebEngineProfile(storageName, parent) +WebEngineProfile::WebEngineProfile(const QString &name, const QString &path, QObject *parent) : + QWebEngineProfile(name, parent) { - m_name = storageName; - setPersistentStoragePath(sSettings->value("browser.profile.path").toString() + storageName); - setCachePath(sSettings->value("browser.profile.path").toString() + storageName); + m_name = name; + setPersistentStoragePath(path + name); + setCachePath(path + name); - QString profilePath = persistentStoragePath() + "/profile.ini"; + QString profilePath = path + "/profile.ini"; qDebug("Reading profile from [%s]", qUtf8Printable(profilePath)); QSettings config(profilePath, QSettings::IniFormat); diff --git a/src/webengine/webengineprofile.h b/src/webengine/webengineprofile.h index 9a7be22..f13b266 100644 --- a/src/webengine/webengineprofile.h +++ b/src/webengine/webengineprofile.h @@ -29,7 +29,7 @@ class WebEngineProfile : public QWebEngineProfile Q_OBJECT public: explicit WebEngineProfile(QObject *parent = Q_NULLPTR); - WebEngineProfile(const QString &storageName, QObject *parent = Q_NULLPTR); + explicit WebEngineProfile(const QString &name, const QString &path, QObject *parent = Q_NULLPTR); ~WebEngineProfile(); |