@@ -47,11 +47,12 @@ QString QgsSplitVectorLayerAlgorithm::groupId() const
47
47
48
48
QString QgsSplitVectorLayerAlgorithm::shortHelpString () const
49
49
{
50
- return QObject::tr ( " Splits input vector layer into multiple layers by specified unique ID field."
51
- " Each of the layers created in the output folder contains all features from "
52
- " the input layer with the same value for the specified attribute. The number "
53
- " :of files generated is equal to the number of different values found for the "
54
- " specified attribute." );
50
+ return QObject::tr ( " Splits input vector layer into multiple layers by specified unique ID field." )
51
+ + QStringLiteral ( " \n\n " )
52
+ + QObject::tr ( " Each of the layers created in the output folder contains all features from "
53
+ " the input layer with the same value for the specified attribute. The number "
54
+ " of files generated is equal to the number of different values found for the "
55
+ " specified attribute." );
55
56
}
56
57
57
58
QgsSplitVectorLayerAlgorithm *QgsSplitVectorLayerAlgorithm::createInstance () const
@@ -107,7 +108,7 @@ QVariantMap QgsSplitVectorLayerAlgorithm::processAlgorithm( const QVariantMap &p
107
108
feedback->pushInfo ( QObject::tr ( " Creating layer: %1" ).arg ( fileName ) );
108
109
109
110
sink.reset ( QgsProcessingUtils::createFeatureSink ( fileName, context, fields, geometryType, crs ) );
110
- QString expr = QStringLiteral ( " %1 = %2 " ). arg ( QgsExpression::quotedColumnRef ( fieldName ), QgsExpression::quotedValue ( *it ) );
111
+ QString expr = QgsExpression::createFieldEqualityExpression ( fieldName, *it );
111
112
QgsFeatureIterator features = source->getFeatures ( QgsFeatureRequest ().setFilterExpression ( expr ) );
112
113
while ( features.nextFeature ( feat ) )
113
114
{
0 commit comments