From f45b2d05aa10410ce6c602907a58d574d7bd7e07 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 14 Jan 2017 21:44:56 +0100 Subject: Configuration by default is read from default location instead of current folder --- src/browser.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/browser.cpp') diff --git a/src/browser.cpp b/src/browser.cpp index 2b35e21..e6be694 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -5,7 +5,13 @@ Browser::Browser(QString configPath, QObject *parent) : QObject(parent) { - Settings::setFilepath(configPath); + if(configPath.isEmpty()) { + // set default config path + Settings::setFilepath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini"); + } else { + // set custom config path + Settings::setFilepath(configPath); + } // TODO Restore previous session -- cgit v1.2.1