From 0f41f33263b7d09b1cac3b66beb4b3c5931f68ce Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Tue, 5 Jun 2018 18:07:27 +0200 Subject: Fix clazy warnings in WebProfile - add missing notify signals - add more properties - apply defaults to all profiles - update manpage --- src/browser.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/browser.cpp') 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 loadPlugins(const QString &location) return list; } -inline QHash loadProfiles(const QString &location) +inline QHash loadProfiles(const QHash &defaults, const QString &location) { QDir profilesDir(location); QHash list; @@ -60,7 +60,7 @@ inline QHash 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("profile.path").value()) + "/otr.ini"); + auto *otr = new WebProfile(this); + loadProfile(otr, m_config->section("profile"), QString::fromStdString(m_config->value("profile.path").value()) + "/otr.ini"); m_profiles.insert(tr("Off-the-record"), otr); - m_profiles.unite(loadProfiles(QString::fromStdString(m_config->value("profile.path").value()))); + m_profiles.unite(loadProfiles(m_config->section("profile"), QString::fromStdString(m_config->value("profile.path").value()))); if(defaultProfile == "") { WebProfile::setDefaultProfile(otr); -- cgit v1.2.1