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 40f683d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
@@ -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.