[Qgis-developer] configpath vs optionspath

Nathan Woodrow madmanwoo at gmail.com
Mon May 21 14:45:45 PDT 2012

Hi all,

I'm trying to understand when one would use --configpath vs --optionspath.
I understand that --configpath can be set the path to look for things
like python
plugins etc but optionspath seems to do nothing.  Even when set the settings
are still stored in the registry in windows.   In the code they both seem to
be doing the same thing in two different places (lines, 318, 421, 484
in main.cpp) :

QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, argv[++i] );

which doesn't seem to do anything unless you also use:

QSettings::setDefaultFormat( QSettings::IniFormat );

so that you have:

QSettings::setDefaultFormat( QSettings::IniFormat );
QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, argv[++i] );

I added the setDefaultFormat line for all three cases
but now if you supply configpath it will create the ini in the config
path rather then the

I'm just wondering what the correct behaviour is meant to be.

Is configpath meant to just set the location for the python plugins,
etc, and optionspath
meant to set the path to the ini file?  If this is the case I have a
patch ready to commit
to fix this.


More information about the Qgis-developer mailing list