From af1eff03c9e839914aab4109970c4a9f6fac8a99 Mon Sep 17 00:00:00 2001 From: aqua Date: Thu, 8 Sep 2022 10:27:30 +0300 Subject: RekonqSettings: add resetValue and remove value's defaultValue parameter - generate default rekonqrc and include it in libsettings - Settings uses :/settings/rekonqrc to provide default values - Add Settings::path() to get the default settings location --- src/application.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 295d2708..c3858a4a 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -29,17 +29,13 @@ Application::Application(int &argc, char *argv[]) : SingleApplication(argc, argv connect(this, &SingleApplication::receivedMessage, this, &Application::parseCommandLine); // updating rekonq configuration - const auto settingsPath = - QDir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)).filePath("rekonqrc"); + const auto settingsPath = Settings::path(); spdlog::info("Loading rekonq configuration: {}", qUtf8Printable(settingsPath)); m_settings = new Settings(settingsPath, this); - if (m_settings->value("FirstRun", true).toBool()) { + if (m_settings->value("FirstRun").toBool()) { spdlog::info("First run"); - if ((new SettingsDialog(m_settings, nullptr))->exec()) { - spdlog::info("new settings saved"); - m_settings->setValue("FirstRun", false); - } + if ((new SettingsDialog(m_settings, nullptr))->exec()) spdlog::info("Settings saved"); } // load default plugins -- cgit v1.2.1