From 70f50a655ba5e2c2d4876c6f3535c0442923306c Mon Sep 17 00:00:00 2001 From: Jamie Newbon Date: Fri, 28 Feb 2020 11:33:30 +0000 Subject: [PATCH] #6538 Moved System scope to ini format and saved to application folder --- src/gui/src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/src/main.cpp b/src/gui/src/main.cpp index 1c6d3761f..5e036be81 100644 --- a/src/gui/src/main.cpp +++ b/src/gui/src/main.cpp @@ -88,10 +88,16 @@ int main(int argc, char* argv[]) #ifndef Q_OS_WIN QApplication::setQuitOnLastWindowClosed(false); #endif + //Set the path of the system settings to the programs local folder + //as the default system settings path has problems writing without Admin/root permission + QSettings::setPath(QSettings::Format::IniFormat, + QSettings::Scope::SystemScope, + QString("SystemSettings")); //Config will default to User settings if they exist, // otherwise it will load System setting and save them to User settings - QSettings systemSettings(QSettings::Scope::SystemScope, + QSettings systemSettings(QSettings::Format::IniFormat, + QSettings::Scope::SystemScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());