summaryrefslogtreecommitdiffstats
path: root/qmake/main.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:59:33 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:59:33 +0100
commit3f3be55835427ea9f1bbcc046e05ee538ca214d7 (patch)
tree09d1f54d114855c2b06cc505dfbf74c5890c8419 /qmake/main.cpp
parentae293c1cb220847194fba6dcebdbb9194837bb56 (diff)
parent9764f8602719676d1fa15e6fd1e7980af16bfc63 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
Diffstat (limited to 'qmake/main.cpp')
-rw-r--r--qmake/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 79e3739f56..f5116ba752 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -85,6 +85,7 @@ static int doSed(int argc, char **argv)
return 3;
}
QChar sep = ++j < cmd.length() ? cmd.at(j) : QChar();
+ Qt::CaseSensitivity matchcase = Qt::CaseSensitive;
bool escaped = false;
int phase = 1;
QStringList phases;
@@ -126,12 +127,16 @@ static int doSed(int argc, char **argv)
fprintf(stderr, "Error: sed s command requires three arguments (%d, %c, %s)\n", phase, sep.toLatin1(), qPrintable(curr));
return 3;
}
+ if (curr.contains(QLatin1Char('i'))) {
+ curr.remove(QLatin1Char('i'));
+ matchcase = Qt::CaseInsensitive;
+ }
if (curr != QLatin1String("g")) {
- fprintf(stderr, "Error: sed s command must be used with the g option (only)\n");
+ fprintf(stderr, "Error: sed s command supports only g & i options; g is required\n");
return 3;
}
SedSubst subst;
- subst.from = QRegExp(phases.at(0));
+ subst.from = QRegExp(phases.at(0), matchcase);
subst.to = phases.at(1);
subst.to.replace("\\\\", "\\"); // QString::replace(rx, sub) groks \1, but not \\.
substs << subst;