This commit is contained in:
Nathan Woodrow 2012-11-28 20:41:20 +10:00
parent 02a26cabe8
commit e97afe0997

View File

@ -507,6 +507,11 @@ int main( int argc, char *argv[] )
if ( !optionpath.isEmpty() || !configpath.isEmpty() )
{
#ifdef Q_WS_WIN
//replace backslashes with forward slashes
configpath.replace( "\\", "/" );
optionpath.replace( "\\", "/" );
#endif
// tell QSettings to use INI format and save the file in custom config path
QSettings::setDefaultFormat( QSettings::IniFormat );
QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, optionpath.isEmpty() ? configpath : optionpath );
@ -532,6 +537,11 @@ int main( int argc, char *argv[] )
QSettings* customizationsettings;
if ( !optionpath.isEmpty() || !configpath.isEmpty() )
{
#ifdef Q_WS_WIN
//replace backslashes with forward slashes
configpath.replace( "\\", "/" );
optionpath.replace( "\\", "/" );
#endif
// tell QSettings to use INI format and save the file in custom config path
QSettings::setDefaultFormat( QSettings::IniFormat );
QString path = optionpath.isEmpty() ? configpath : optionpath;