File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -830,17 +830,16 @@ int main( int argc, char *argv[] )
830
830
}
831
831
}
832
832
833
- QSettings *globalSettings = new QSettings ( globalsettingsfile, QSettings::IniFormat );
834
- globalSettings->setIniCodec ( " UTF-8" );
835
833
if ( configLocalStorageLocation.isEmpty () )
836
834
{
835
+ QSettings globalSettings ( globalsettingsfile, QSettings::IniFormat );
837
836
if ( getenv ( " QGIS_CUSTOM_CONFIG_PATH" ) )
838
837
{
839
838
configLocalStorageLocation = getenv ( " QGIS_CUSTOM_CONFIG_PATH" );
840
839
}
841
- else if ( globalSettings-> contains ( QStringLiteral ( " core/profilesPath" ) ) )
840
+ else if ( globalSettings. contains ( QStringLiteral ( " core/profilesPath" ) ) )
842
841
{
843
- configLocalStorageLocation = globalSettings-> value ( QStringLiteral ( " core/profilesPath" ), " " ).toString ();
842
+ configLocalStorageLocation = globalSettings. value ( QStringLiteral ( " core/profilesPath" ), " " ).toString ();
844
843
QgsDebugMsg ( QString ( " Loading profiles path from global config at %1" ).arg ( configLocalStorageLocation ) );
845
844
}
846
845
@@ -850,7 +849,6 @@ int main( int argc, char *argv[] )
850
849
configLocalStorageLocation = QStandardPaths::standardLocations ( QStandardPaths::AppDataLocation ).value ( 0 );
851
850
}
852
851
}
853
- delete globalSettings;
854
852
855
853
QString rootProfileFolder = QgsUserProfileManager::resolveProfilesFolder ( configLocalStorageLocation );
856
854
QgsUserProfileManager manager ( rootProfileFolder );
You can’t perform that action at this time.
0 commit comments