diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-11-03 00:18:10 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-11-03 00:20:41 +0200 |
commit | f3a4607d6a722a862af0eb9747a15dcdf624b6fb (patch) | |
tree | 9885709cdff55a865be6c03c591a9757680b0396 /lib/webprofile/webprofilemanager.cpp | |
parent | Change spdlog from makedepends to depends (diff) | |
download | smolbote-f3a4607d6a722a862af0eb9747a15dcdf624b6fb.tar.xz |
Drop boost dependency
- wrote not-invented-here config file parser and conf class
- spent obscene amount of time plugging in said conf class
Diffstat (limited to 'lib/webprofile/webprofilemanager.cpp')
-rw-r--r-- | lib/webprofile/webprofilemanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 <QFileInfo> #include <QWebEngineSettings> -WebProfileManager::WebProfileManager(const QHash<QString, QString> &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); }); |