From 94a3ac37a0892f2d51c0eeb19124e07632c7a23b Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Tue, 28 Feb 2023 09:24:56 +0100 Subject: [PATCH] Fix handling of searchPathsForPlugins in qgisapp --- src/app/qgisapp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index ea03bdb3ba6..39b6ffa9618 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -1604,10 +1604,10 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipBadLayers QgsPluginRegistry::instance()->restoreSessionPlugins( QgsApplication::pluginPath() ); // Also restore plugins from user specified plugin directories - QString myPaths = settings.value( QStringLiteral( "plugins/searchPathsForPlugins" ), "" ).toString(); - if ( !myPaths.isEmpty() ) + QStringList myPathList = settings.value( QStringLiteral( "plugins/searchPathsForPlugins" ) ).toStringList(); + if ( !myPathList.isEmpty() ) { - QStringList myPathList = myPaths.split( '|' ); + myPathList.removeDuplicates(); QgsPluginRegistry::instance()->restoreSessionPlugins( myPathList ); } }