Skip to content

Commit 94f8db3

Browse files
committed
Shutup more annoying Qt warnings
(cherry-picked from cec59c0)
1 parent 4395b8e commit 94f8db3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/core/symbology/qgssymbollayerutils.cpp

+3
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

+2
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ void TestQgsProject::testPathResolverSvg()
211211
QString dataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
212212
QString layerPath = dataDir + "/points.shp";
213213

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

0 commit comments

Comments
 (0)