aboutsummaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/browser.cpp')
-rw-r--r--src/browser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 4f3f3d7..2985dd3 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -51,7 +51,7 @@ inline QVector<Plugin> loadPlugins(const QString &location)
return list;
}
-inline QHash<QString, WebProfile *> loadProfiles(const QString &location)
+inline QHash<QString, WebProfile *> loadProfiles(const QHash<QString, QString> &defaults, const QString &location)
{
QDir profilesDir(location);
QHash<QString, WebProfile *> list;
@@ -60,7 +60,7 @@ inline QHash<QString, WebProfile *> loadProfiles(const QString &location)
const QFileInfoList entries = profilesDir.entryInfoList({ "*.profile" }, QDir::Files | QDir::Readable);
for(const auto &entry : entries) {
auto *profile = new WebProfile(entry.baseName());
- loadProfile(profile, entry.absoluteFilePath());
+ loadProfile(profile, defaults, entry.absoluteFilePath());
list.insert(entry.baseName(), profile);
}
}
@@ -101,10 +101,10 @@ void Browser::setup(const QString &defaultProfile)
// load profiles
{
- auto *otr = new WebProfile(m_config->section("profile"), this);
- loadProfile(otr, QString::fromStdString(m_config->value<std::string>("profile.path").value()) + "/otr.ini");
+ auto *otr = new WebProfile(this);
+ loadProfile(otr, m_config->section("profile"), QString::fromStdString(m_config->value<std::string>("profile.path").value()) + "/otr.ini");
m_profiles.insert(tr("Off-the-record"), otr);
- m_profiles.unite(loadProfiles(QString::fromStdString(m_config->value<std::string>("profile.path").value())));
+ m_profiles.unite(loadProfiles(m_config->section("profile"), QString::fromStdString(m_config->value<std::string>("profile.path").value())));
if(defaultProfile == "") {
WebProfile::setDefaultProfile(otr);