#6538 Moved System scope to ini format and saved to application folder
This commit is contained in:
parent
d4ecffd1f0
commit
70f50a655b
1 changed files with 7 additions and 1 deletions
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue