Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Shutup more annoying Qt warnings
  • Loading branch information
nyalldawson committed May 1, 2018
1 parent 0449874 commit cec59c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/symbology/qgssymbollayerutils.cpp
Expand Up @@ -3655,6 +3655,9 @@ QStringList QgsSymbolLayerUtils::listSvgFilesAt( const QString &directory )

QString QgsSymbolLayerUtils::svgSymbolNameToPath( QString name, const QgsPathResolver &pathResolver )
{
if ( name.isEmpty() )
return QString();

// we might have a full path...
if ( QFileInfo::exists( name ) )
return QFileInfo( name ).canonicalFilePath();
Expand Down
2 changes: 2 additions & 0 deletions tests/src/core/testqgsproject.cpp
Expand Up @@ -212,6 +212,8 @@ void TestQgsProject::testPathResolverSvg()
QString dataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
QString layerPath = dataDir + "/points.shp";

QVERIFY( QgsSymbolLayerUtils::svgSymbolNameToPath( QString(), QgsPathResolver() ).isEmpty() );

// build a project with 3 layers, each having a simple renderer with SVG marker
// - existing SVG file in project dir
// - existing SVG file in QGIS dir
Expand Down

0 comments on commit cec59c0

Please sign in to comment.