Double escaping backslashes for regular expression

The first parameter of qmake's replace function is a regular
expression. So it needs to be escaped once for the qmake parser,
and then for the regular expression.
This commit is contained in:
Alessandro Portale
2011-03-30 18:32:22 +02:00
parent 3b9438f7d5
commit a6213ba901

View File

@@ -57,13 +57,13 @@ symbian {
copyCommand = copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) { for(deploymentfolder, DEPLOYMENTFOLDERS) {
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
source = $$replace(source, \\, /) source = $$replace(source, \\\\, /)
macx { macx {
target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
} else { } else {
target = $$OUT_PWD/$$eval($${deploymentfolder}.target) target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
} }
target = $$replace(target, \\, /) target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /) sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments) targetFullPath = $$target/$$last(sourcePathSegments)
!isEqual(source,$$targetFullPath) { !isEqual(source,$$targetFullPath) {