Merge remote-tracking branch 'origin/master'

This commit is contained in:
Dorian Zedler 2020-07-11 11:17:26 +02:00
commit ba8d786ca2
Signed by: dorian
GPG key ID: D3B255CB8BC7CD37
2 changed files with 4 additions and 4 deletions

View file

@ -19,7 +19,6 @@ INCLUDEPATH += $$PWD/headers $$PWD
SOURCES += \
$$PWD/sources/ScStw.cpp \
$$PWD/sources/client/scstwremotesettings.cpp \
$$PWD/sources/scstwsettings.cpp \
$$PWD/sources/scstwsoundplayer.cpp \
$$PWD/sources/scstwlibraries.cpp \
@ -29,7 +28,6 @@ SOURCES += \
HEADERS += \
$$PWD/headers/ScStw.hpp \
$$PWD/headers/ScStwLibraries_global.h \
$$PWD/headers/client/scstwremotesettings.h \
$$PWD/headers/scstwlibraries.h \
$$PWD/headers/scstwrace.h \
$$PWD/headers/scstwsettings.h \
@ -40,11 +38,13 @@ ScStwLibraries_ClientLibs {
SOURCES += \
$$PWD/sources/client/scstwqmlsetting.cpp \
$$PWD/sources/client/scstwclient.cpp \
$$PWD/sources/client/scstwremotesettings.cpp \
$$PWD/sources/client/scstwremotemonitorrace.cpp
HEADERS += \
$$PWD/headers/client/scstwqmlsetting.h \
$$PWD/headers/client/scstwclient.h \
$$PWD/headers/client/scstwremotesettings.h \
$$PWD/headers/client/scstwremotemonitorrace.h
INCLUDEPATH += $$PWD/headers/client

View file

@ -4,7 +4,7 @@ ScStwSettings::ScStwSettings(QObject *parent) : QObject(parent)
{
QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QDir dir(path);
this->settingsFile = new QFile(path+ "/settings.json");
this->settingsFile = new QFile(path + "/settings.json");
if(!this->settingsFile->exists())
if(!dir.mkpath(path))
qFatal("[FATAL] Couldn't create settings dir %s", qPrintable(path));
@ -13,7 +13,7 @@ ScStwSettings::ScStwSettings(QObject *parent) : QObject(parent)
qFatal("[FATAL] Couldn't open settings file %s", qPrintable(path + "/settings.json"));
if(!this->loadSettingsFromFile() && this->settingsFile->size() != 0)
qFatal("[FATAL] Settings file (%s) is of invalid format!", qPrintable(path));
qFatal("[FATAL] Settings file (%s) is of invalid format!", qPrintable(path + "/settings.json"));
connect(this, &ScStwSettings::settingChanged, this, &ScStwSettings::writeSettingsToFile);
}