Skip to content

Commit e97afe0

Browse files
committedNov 28, 2012
Fix #6764
1 parent 02a26ca commit e97afe0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/app/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ int main( int argc, char *argv[] )
507507

508508
if ( !optionpath.isEmpty() || !configpath.isEmpty() )
509509
{
510+
#ifdef Q_WS_WIN
511+
//replace backslashes with forward slashes
512+
configpath.replace( "\\", "/" );
513+
optionpath.replace( "\\", "/" );
514+
#endif
510515
// tell QSettings to use INI format and save the file in custom config path
511516
QSettings::setDefaultFormat( QSettings::IniFormat );
512517
QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, optionpath.isEmpty() ? configpath : optionpath );
@@ -532,6 +537,11 @@ int main( int argc, char *argv[] )
532537
QSettings* customizationsettings;
533538
if ( !optionpath.isEmpty() || !configpath.isEmpty() )
534539
{
540+
#ifdef Q_WS_WIN
541+
//replace backslashes with forward slashes
542+
configpath.replace( "\\", "/" );
543+
optionpath.replace( "\\", "/" );
544+
#endif
535545
// tell QSettings to use INI format and save the file in custom config path
536546
QSettings::setDefaultFormat( QSettings::IniFormat );
537547
QString path = optionpath.isEmpty() ? configpath : optionpath;

0 commit comments

Comments
 (0)
Please sign in to comment.