diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-03 17:11:36 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-05-05 18:41:27 +0200 |
commit | a1947aeffe158a0ea7de3ced1bf8d6a4719a27ef (patch) | |
tree | c1b249b7d8bd9b3079df3ad5fe468f7ff4df861b /qmake/library/ioutils.cpp | |
parent | 412dd857b81471277e1014b6329f46a389a42cb3 (diff) |
Port qmake over to user QRegularExpression
Use the DotMatchesEverythingOption for all places
where we interpret .pro files, to increase compatibility
with QRegExp.
Change-Id: I347d6b17858069f3c9cedcedd04df58358d83f27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/library/ioutils.cpp')
-rw-r--r-- | qmake/library/ioutils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp index d2171274d8..fac0541779 100644 --- a/qmake/library/ioutils.cpp +++ b/qmake/library/ioutils.cpp @@ -30,7 +30,7 @@ #include <qdir.h> #include <qfile.h> -#include <qregexp.h> +#include <qregularexpression.h> #ifdef Q_OS_WIN # include <windows.h> @@ -178,9 +178,9 @@ QString IoUtils::shellQuoteWin(const QString &arg) // The process-level standard quoting allows escaping quotes with backslashes (note // that backslashes don't escape themselves, unless they are followed by a quote). // Consequently, quotes are escaped and their preceding backslashes are doubled. - ret.replace(QRegExp(QLatin1String("(\\\\*)\"")), QLatin1String("\\1\\1\\\"")); + ret.replace(QRegularExpression(QLatin1String("(\\\\*)\"")), QLatin1String("\\1\\1\\\"")); // Trailing backslashes must be doubled as well, as they are followed by a quote. - ret.replace(QRegExp(QLatin1String("(\\\\+)$")), QLatin1String("\\1\\1")); + ret.replace(QRegularExpression(QLatin1String("(\\\\+)$")), QLatin1String("\\1\\1")); // However, the shell also interprets the command, and no backslash-escaping exists // there - a quote always toggles the quoting state, but is nonetheless passed down // to the called process verbatim. In the unquoted state, the circumflex escapes |