Skip to content

Commit 8dfb17d

Browse files
borysiastyNathanW2
authored andcommittedJan 8, 2018
Store QGISCUSTOMIZATION3.ini next to QGIS3.ini in the profile directory. Fixes #17794. (#5999)
1 parent 617459d commit 8dfb17d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎src/app/main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,17 +995,19 @@ int main( int argc, char *argv[] )
995995
// TODO: use QgsSettings
996996
QSettings *customizationsettings = nullptr;
997997

998-
// Using the customizationfile option always overrides the option and config path options.
999998
if ( !customizationfile.isEmpty() )
1000999
{
1001-
customizationsettings = new QSettings( customizationfile, QSettings::IniFormat );
1000+
// Using the customizationfile option always overrides the option and config path options.
10021001
QgsCustomization::instance()->setEnabled( true );
10031002
}
10041003
else
10051004
{
1006-
customizationsettings = new QSettings( QStringLiteral( "QGIS" ), QStringLiteral( "QGISCUSTOMIZATION2" ) );
1005+
// Use the default file location
1006+
customizationfile = profileFolder + QDir::separator() + QStringLiteral( "QGIS" ) + QDir::separator() + QStringLiteral( "QGISCUSTOMIZATION3.ini" ) ;
10071007
}
10081008

1009+
customizationsettings = new QSettings( customizationfile, QSettings::IniFormat );
1010+
10091011
// Load and set possible default customization, must be done after QgsApplication init and QgsSettings ( QCoreApplication ) init
10101012
QgsCustomization::instance()->setSettings( customizationsettings );
10111013
QgsCustomization::instance()->loadDefault();

0 commit comments

Comments
 (0)
Please sign in to comment.