summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-11-20 15:50:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-23 23:31:18 +0100
commit3d89b10db979cb501c21bfb2052210dbbb127dbb (patch)
tree9c72ba3bbb1dbf1556cfb852e8381e8edc073484
parentd4c548ce5c0bd8a70c82ed082bc69fd41e9c47ed (diff)
fix handling of \\ in replacement string in s/// cmd of built-in sed
QString::replace() has no way of escaping capture group references, so simply disarm double backslashes. of course this is broken, but we'd need to reimplement it from scratch to fix it properly. "corner case" ... Change-Id: I357fbfd22c9c4a68809e5af6efad1de3a95706b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--qmake/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 340567a27d..79e3739f56 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -133,6 +133,7 @@ static int doSed(int argc, char **argv)
SedSubst subst;
subst.from = QRegExp(phases.at(0));
subst.to = phases.at(1);
+ subst.to.replace("\\\\", "\\"); // QString::replace(rx, sub) groks \1, but not \\.
substs << subst;
}
} else if (argv[i][0] == '-' && argv[i][1] != 0) {