[QGIS Commit] r15613 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Mar 27 10:09:00 EDT 2011


Author: wonder
Date: 2011-03-27 07:09:00 -0700 (Sun, 27 Mar 2011)
New Revision: 15613

Modified:
   trunk/qgis/src/core/qgsapplication.cpp
Log:
Avoid duplicate SVG paths


Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp	2011-03-27 09:08:58 UTC (rev 15612)
+++ trunk/qgis/src/core/qgsapplication.cpp	2011-03-27 14:09:00 UTC (rev 15613)
@@ -74,7 +74,6 @@
     mConfigPath = customConfigPath + "/"; // make sure trailing slash is included
   }
 
-  mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
   mDefaultSvgPaths << qgisSettingsDirPath() + QString( "svg/" );
 }
 
@@ -174,7 +173,10 @@
 void QgsApplication::setPkgDataPath( const QString thePkgDataPath )
 {
   mPkgDataPath = thePkgDataPath;
-  mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
+  QString svgPath = mPkgDataPath + QString( "/svg/" );
+  // avoid duplicate entries
+  if ( !mDefaultSvgPaths.contains( svgPath ) )
+    mDefaultSvgPaths << svgPath;
 }
 
 void QgsApplication::setDefaultSvgPaths( const QStringList& pathList )



More information about the QGIS-commit mailing list