Skip to content

Commit cec59c0

Browse files
committed
Shutup more annoying Qt warnings
1 parent 0449874 commit cec59c0

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/core/symbology/qgssymbollayerutils.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,6 +3655,9 @@ QStringList QgsSymbolLayerUtils::listSvgFilesAt( const QString &directory )
36553655

36563656
QString QgsSymbolLayerUtils::svgSymbolNameToPath( QString name, const QgsPathResolver &pathResolver )
36573657
{
3658+
if ( name.isEmpty() )
3659+
return QString();
3660+
36583661
// we might have a full path...
36593662
if ( QFileInfo::exists( name ) )
36603663
return QFileInfo( name ).canonicalFilePath();

‎tests/src/core/testqgsproject.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ void TestQgsProject::testPathResolverSvg()
212212
QString dataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
213213
QString layerPath = dataDir + "/points.shp";
214214

215+
QVERIFY( QgsSymbolLayerUtils::svgSymbolNameToPath( QString(), QgsPathResolver() ).isEmpty() );
216+
215217
// build a project with 3 layers, each having a simple renderer with SVG marker
216218
// - existing SVG file in project dir
217219
// - existing SVG file in QGIS dir

0 commit comments

Comments
 (0)