Skip to content

Commit

Permalink
Fix #6764
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Nov 28, 2012
1 parent 02a26ca commit e97afe0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/main.cpp
Expand Up @@ -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 );
Expand All @@ -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;
Expand Down

0 comments on commit e97afe0

Please sign in to comment.