Skip to content
Permalink
Browse files

Store QGISCUSTOMIZATION3.ini next to QGIS3.ini in the profile directo…

…ry. Fixes #17794. (#5999)
  • Loading branch information
borysiasty authored and NathanW2 committed Jan 8, 2018
1 parent 617459d commit 8dfb17d5d5f1af043d9c90903ddd1b2f9ef3dfb4
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/app/main.cpp
@@ -995,17 +995,19 @@ int main( int argc, char *argv[] )
// TODO: use QgsSettings
QSettings *customizationsettings = nullptr;

// Using the customizationfile option always overrides the option and config path options.
if ( !customizationfile.isEmpty() )
{
customizationsettings = new QSettings( customizationfile, QSettings::IniFormat );
// Using the customizationfile option always overrides the option and config path options.
QgsCustomization::instance()->setEnabled( true );
}
else
{
customizationsettings = new QSettings( QStringLiteral( "QGIS" ), QStringLiteral( "QGISCUSTOMIZATION2" ) );
// Use the default file location
customizationfile = profileFolder + QDir::separator() + QStringLiteral( "QGIS" ) + QDir::separator() + QStringLiteral( "QGISCUSTOMIZATION3.ini" ) ;
}

customizationsettings = new QSettings( customizationfile, QSettings::IniFormat );

// Load and set possible default customization, must be done after QgsApplication init and QgsSettings ( QCoreApplication ) init
QgsCustomization::instance()->setSettings( customizationsettings );
QgsCustomization::instance()->loadDefault();

0 comments on commit 8dfb17d

Please sign in to comment.
You can’t perform that action at this time.