From 1de59e72087dc982ea8421060402ebec70cea823 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 20 Jan 2019 17:46:15 +0100 Subject: Fix all profiles being created off-the-record --- lib/webprofile/webprofilemanager.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/webprofile/webprofilemanager.cpp') diff --git a/lib/webprofile/webprofilemanager.cpp b/lib/webprofile/webprofilemanager.cpp index 2fca224..b0eff93 100644 --- a/lib/webprofile/webprofilemanager.cpp +++ b/lib/webprofile/webprofilemanager.cpp @@ -31,9 +31,6 @@ WebProfileManager::~WebProfileManager() delete p.settings; QFile::remove(filename); } else if(p.settings != nullptr) { -#ifdef QT_DEBUG - qDebug("sync %s", qUtf8Printable(p.settings->fileName())); -#endif p.settings->sync(); delete p.settings; } @@ -53,7 +50,7 @@ WebProfile *WebProfileManager::profile(const QString &id, const QString &path, b // QWebEngineCore cleans up profiles automatically, so no need to set parent profile.ptr = [id, isOffTheRecord, profile]() { - if(isOffTheRecord) + if(profile.value("otr", isOffTheRecord).toBool()) return new WebProfile(/* name */ profile.value("name", id).toString(), /* parent */ nullptr); else return new WebProfile(/* storageName */ id, /* name */ profile.value("name", id).toString(), /* parent */ nullptr); -- cgit v1.2.1