Search also in root dirs of svg search paths

git-svn-id: http://svn.osgeo.org/qgis/trunk@11845 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2009-10-26 05:46:01 +00:00
parent 3ade3944e3
commit 6dd1b5e90b

View File

@ -77,9 +77,20 @@ void QgsMarkerCatalogue::refreshList()
// TODO recursive ?
QDir dir( svgPaths[i] );
//
// First check the root dir of this path for svgs
//
QStringList dl1 = dir.entryList( QStringList( "*.svg" ), QDir::Files );
for ( QStringList::iterator it1 = dl1.begin(); it1 != dl1.end(); ++it1 )
{
// TODO test if it is correct SVG
mList.append( "svg:" + dir.path() + "/" + *it1 );
}
//
// Now check in any nested dirs for svgs
//
QStringList dl = dir.entryList( QDir::Dirs );
for ( QStringList::iterator it = dl.begin(); it != dl.end(); ++it )
{
QgsDebugMsg( QString( "Looking for svgs in %1" ).arg( svgPaths[i] + *it ) );