diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/commandline.cpp | 16 | 
1 files changed, 2 insertions, 14 deletions
| diff --git a/src/commandline.cpp b/src/commandline.cpp index 2a0de69..6f227c0 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -8,7 +8,7 @@  #include "commandline.h"  #include "version.h" -#include <QStandardPaths> +#include <configuration.h>  #include <iomanip>  #include <iostream> @@ -21,18 +21,6 @@ void printOption(const QCommandLineOption &option)                << std::endl;  } -QString defaultUserConfigLocation() -{ -    // try to locate an existing config -    QString path = QStandardPaths::locate(QStandardPaths::AppConfigLocation, "smolbote.cfg"); - -    // it's possible there is no config, so set the path properly -    if(path.isEmpty()) -        path = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/smolbote.cfg"; - -    return path; -} -  constexpr const char *socketPath()  {  #ifdef Q_OS_UNIX @@ -49,7 +37,7 @@ CommandLine::CommandLine()      , helpOption(addHelpOption())      , versionOption(addVersionOption())      , buildOption("build", "Show build information.") -    , configOption({ "c", "config" }, "Set configuration file.", "path", defaultUserConfigLocation()) +    , configOption({ "c", "config" }, "Set configuration file.", "path", Configuration::defaultUserConfigLocation())      , profileOption({ "p", "profile" }, "Use this profile.", "profile", "")      , socketOption("socket", "Local server socket", "name", socketPath())      , newWindowOption("in-new-window", "Open URL in new window") | 
