aboutsummaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/browser.cpp')
-rw-r--r--src/browser.cpp8
1 files changed, 7 insertions, 1 deletions
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