aboutsummaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-05-28 14:57:18 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-05-28 14:57:18 +0200
commitc0632b62cfb62794ae858f0da2bff5850dbac070 (patch)
tree1a11aaa978636999847d46c287fb5e26aa3f02b1 /src/browser.cpp
parentShow view profile instead of window profile in title (diff)
downloadsmolbote-c0632b62cfb62794ae858f0da2bff5850dbac070.tar.xz
Profile properties
Diffstat (limited to 'src/browser.cpp')
-rw-r--r--src/browser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 05d9a0b..525f02c 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -59,7 +59,9 @@ inline QHash<QString, WebProfile *> loadProfiles(const QString &location)
if(profilesDir.exists()) {
const QFileInfoList entries = profilesDir.entryInfoList({ "*.profile" }, QDir::Files | QDir::Readable);
for(const auto &entry : entries) {
- list.insert(entry.baseName(), new WebProfile(entry.baseName()));
+ auto *profile = new WebProfile(entry.baseName());
+ loadProfile(profile, entry.absoluteFilePath());
+ list.insert(entry.baseName(), profile);
}
}
@@ -99,7 +101,7 @@ void Browser::setup(const QString &defaultProfile)
// load profiles
{
- auto *otr = new WebProfile(this);
+ auto *otr = new WebProfile(m_config->section("profile"), this);
m_profiles.insert(tr("Off-the-record"), otr);
m_profiles.unite(loadProfiles(QString::fromStdString(m_config->value<std::string>("profile.path").value())));