From f3a4607d6a722a862af0eb9747a15dcdf624b6fb Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 3 Nov 2019 00:18:10 +0200 Subject: Drop boost dependency - wrote not-invented-here config file parser and conf class - spent obscene amount of time plugging in said conf class --- lib/webprofile/webprofilemanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/webprofile/webprofilemanager.cpp') diff --git a/lib/webprofile/webprofilemanager.cpp b/lib/webprofile/webprofilemanager.cpp index b0eff93..05808ab 100644 --- a/lib/webprofile/webprofilemanager.cpp +++ b/lib/webprofile/webprofilemanager.cpp @@ -11,7 +11,7 @@ #include #include -WebProfileManager::WebProfileManager(const QHash &profileSection, QObject *parent) +WebProfileManager::WebProfileManager(const ProfileDefault_t &profileSection, QObject *parent) : QObject(parent) , defaults(profileSection) { @@ -62,17 +62,17 @@ WebProfile *WebProfileManager::profile(const QString &id, const QString &path, b profile.settings->setValue("name", name); }); - profile.ptr->setSearch(profile.value("search", defaults.value("profile.search")).toString()); + profile.ptr->setSearch(profile.value("search", defaults.search).toString()); connect(profile.ptr, &WebProfile::searchChanged, profile.settings, [profile](const QString &url) { profile.settings->setValue("search", url); }); - profile.ptr->setHomepage(profile.value("homepage", defaults.value("profile.homepage")).toUrl()); + profile.ptr->setHomepage(profile.value("homepage", defaults.homepage).toUrl()); connect(profile.ptr, &WebProfile::homepageChanged, profile.settings, [profile](const QUrl &url) { profile.settings->setValue("homepage", url); }); - profile.ptr->setNewtab(profile.value("newtab", defaults.value("profile.newtab")).toUrl()); + profile.ptr->setNewtab(profile.value("newtab", defaults.newtab).toUrl()); connect(profile.ptr, &WebProfile::newtabChanged, profile.settings, [profile](const QUrl &url) { profile.settings->setValue("newtab", url); }); -- cgit v1.2.1