Skip to content
Permalink
Browse files

Trying to fix mac test for QgsProject

  • Loading branch information
wonder-sk committed May 13, 2017
1 parent a4717e2 commit 40f683d64f4e9ddc6b6353ef152e8d4e38e5c489
Showing with 6 additions and 1 deletion.
  1. +4 −1 src/core/symbology-ng/qgssymbollayerutils.cpp
  2. +2 −0 tests/src/core/testqgsproject.cpp
@@ -3640,6 +3640,9 @@ QString QgsSymbolLayerUtils::svgSymbolPathToName( QString path, const QgsPathRes
if ( !QFileInfo::exists( path ) )
return path;

// keep original path for path resolver as its path does not have to be cannonical either
QString origPath = path;

path = QFileInfo( path ).canonicalFilePath();

QStringList svgPaths = QgsApplication::svgPaths();
@@ -3660,7 +3663,7 @@ QString QgsSymbolLayerUtils::svgSymbolPathToName( QString path, const QgsPathRes
if ( isInSvgPaths )
return path;

return pathResolver.writePath( path );
return pathResolver.writePath( origPath );
}


@@ -196,6 +196,8 @@ void TestQgsProject::testPathResolverSvg()
svgFile.write( "<svg/>" ); // not a proper SVG, but good enough for this case
svgFile.close();

QVERIFY( QFileInfo::exists( ourSvgPath ) ); // should exist now

QString librarySvgPath = QgsSymbolLayerUtils::svgSymbolNameToPath( "transport/transport_airport.svg", QgsPathResolver() );

QgsVectorLayer *layer1 = new QgsVectorLayer( layerPath, "points 1", "ogr" );

0 comments on commit 40f683d

Please sign in to comment.
You can’t perform that action at this time.