File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 18
18
#include " qgsalgorithmsplitvectorlayer.h"
19
19
#include " qgsvectorfilewriter.h"
20
20
#include " qgsvariantutils.h"
21
+ #include " qgsfileutils.h"
21
22
22
23
// /@cond PRIVATE
23
24
@@ -139,9 +140,7 @@ QVariantMap QgsSplitVectorLayerAlgorithm::processAlgorithm( const QVariantMap &p
139
140
}
140
141
else
141
142
{
142
- QString value = ( *it ).toString ();
143
- value.replace ( QRegularExpression ( " <|>|\\ :|\\\\ |\\ /|\\ ||\\ ?|\\ *|\" " ), QStringLiteral ( " _" ) );
144
- fileName = QStringLiteral ( " %1%2.%3" ).arg ( baseName ).arg ( value ).arg ( outputFormat );
143
+ fileName = QStringLiteral ( " %1%2.%3" ).arg ( baseName ).arg ( QgsFileUtils::stringToSafeFilename ( ( *it ).toString () ) ).arg ( outputFormat );
145
144
}
146
145
feedback->pushInfo ( QObject::tr ( " Creating layer: %1" ).arg ( fileName ) );
147
146
You can’t perform that action at this time.
0 commit comments