From ef3ab866bc2d1c215eea90fba0651db7a6e87c43 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 27 Sep 2017 11:44:05 +0200 Subject: Code cleanup --- src/webengine/webengineprofile.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/webengine') diff --git a/src/webengine/webengineprofile.cpp b/src/webengine/webengineprofile.cpp index 9745949..62f744e 100644 --- a/src/webengine/webengineprofile.cpp +++ b/src/webengine/webengineprofile.cpp @@ -31,25 +31,25 @@ WebEngineProfile::WebEngineProfile(QObject *parent) : // Off-the-record profiles have no persistent path - m_homepage = sSettings->value("browser.profile.new.homepage").toUrl(); - m_newtab = sSettings->value("browser.profile.new.newtab").toUrl(); + m_homepage = browser->settings()->value("browser.profile.new.homepage").toUrl(); + m_newtab = browser->settings()->value("browser.profile.new.newtab").toUrl(); } WebEngineProfile::WebEngineProfile(const QString &name, QObject *parent) : QWebEngineProfile(name, parent) { m_name = name; - setPersistentStoragePath(sSettings->value("browser.profile.storagePath").toString() + name); - setCachePath(sSettings->value("browser.profile.cachePath").toString() + name); + setPersistentStoragePath(browser->settings()->value("browser.profile.storagePath").toString() + name); + setCachePath(browser->settings()->value("browser.profile.cachePath").toString() + name); // Read profile settings - QString profileIniPath = sSettings->value("browser.profile.path").toString() + name + "/profile.ini"; + QString profileIniPath = browser->settings()->value("browser.profile.path").toString() + name + "/profile.ini"; // If none exist, use the defaults if(!QFile::exists(profileIniPath)) { qDebug("Creating new profile..."); - m_homepage = sSettings->value("browser.profile.new.homepage").toUrl(); - m_newtab = sSettings->value("browser.profile.new.newtab").toUrl(); + m_homepage = browser->settings()->value("browser.profile.new.homepage").toUrl(); + m_newtab = browser->settings()->value("browser.profile.new.newtab").toUrl(); // Else read them } else { -- cgit v1.2.1