[processing] Don't replace " with ' when handling layer paths

Since netcdf, and possibly other gdal drivers, use layer uris
of the format NETCDF:"/tmp/test.nc":var1 we can't safely
remove or reformat these quotations.
This commit is contained in:
Nyall Dawson 2018-02-15 16:43:21 +10:00
parent bc23f1d677
commit 5c40975fe7
2 changed files with 1 additions and 2 deletions

View File

@ -295,7 +295,6 @@ QString QgsProcessingUtils::normalizeLayerSource( const QString &source )
{
QString normalized = source;
normalized.replace( '\\', '/' );
normalized.replace( '"', QLatin1String( "'" ) );
return normalized.trimmed();
}

View File

@ -682,7 +682,7 @@ void TestQgsProcessing::compatibleLayers()
void TestQgsProcessing::normalizeLayerSource()
{
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers\\test.shp" ), QString( "data/layers/test.shp" ) );
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers \"new\"\\test.shp" ), QString( "data/layers 'new'/test.shp" ) );
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers \"new\"\\test.shp" ), QString( "data/layers \"new\"/test.shp" ) );
}
void TestQgsProcessing::context()