Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 4da574283857472dccf5f614fada4c62bcefe580
- Author: Nathan Woodrow <woodrow.nathan@gmail.com>
- Date: Tue May 22 00:00:10 2012 +1000
- Set the default format as INI when using custom settings path
- diff --git a/src/app/main.cpp b/src/app/main.cpp
- index 3253a34..b202b46 100644
- --- a/src/app/main.cpp
- +++ b/src/app/main.cpp
- @@ -315,6 +315,7 @@ int main( int argc, char *argv[] )
- }
- else if ( i + 1 < argc && ( arg == "--optionspath" || arg == "-o" ) )
- {
- + QSettings::setDefaultFormat( QSettings::IniFormat );
- QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, argv[++i] );
- }
- else if ( i + 1 < argc && ( arg == "--configpath" || arg == "-c" ) )
- @@ -417,6 +418,7 @@ int main( int argc, char *argv[] )
- break;
- case 'o':
- + QSettings::setDefaultFormat( QSettings::IniFormat );
- QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, optarg );
- break;
- @@ -479,6 +481,7 @@ int main( int argc, char *argv[] )
- if ( !configpath.isEmpty() )
- {
- // tell QSettings to use INI format and save the file in custom config path
- + QSettings::setDefaultFormat( QSettings::IniFormat );
- QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, configpath );
- }
Add Comment
Please, Sign In to add comment