Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Trying to fix mac test for QgsProject
- Loading branch information
|
@@ -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" ); |
|
|