Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix escaping of quotes of map layer source in processing
- Loading branch information
Showing
with
1 addition
and
1 deletion.
-
+1
−1
src/core/processing/qgsprocessingparameters.cpp
|
@@ -3155,7 +3155,7 @@ QString QgsProcessingParameterFeatureSource::valueAsPythonString( const QVariant |
|
|
// prefer to use layer source instead of id if possible (since it's persistent) |
|
|
if ( QgsVectorLayer *layer = qobject_cast< QgsVectorLayer * >( QgsProcessingUtils::mapLayerFromString( layerString, context ) ) ) |
|
|
layerString = layer->source(); |
|
|
return layerString.prepend( '\'' ).append( '\'' ); |
|
|
return QgsProcessingUtils::stringToPythonLiteral( layerString ); |
|
|
} |
|
|
} |
|
|
else |
|
|