#6538 Moved System scope to ini format and saved to application folder

This commit is contained in:
Jamie Newbon 2020-02-28 11:33:30 +00:00
parent d4ecffd1f0
commit 70f50a655b

View file

@ -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());