Avoid duplicate SVG paths

git-svn-id: http://svn.osgeo.org/qgis/trunk@15613 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2011-03-27 14:09:00 +00:00
parent b4fc660174
commit ace914d903

View File

@ -74,7 +74,6 @@ QgsApplication::QgsApplication( int & argc, char ** argv, bool GUIenabled, QStri
mConfigPath = customConfigPath + "/"; // make sure trailing slash is included
}
mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
mDefaultSvgPaths << qgisSettingsDirPath() + QString( "svg/" );
}
@ -174,7 +173,10 @@ void QgsApplication::setPluginPath( const QString thePluginPath )
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 )