aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/syntax-highlighting/src
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2021-10-20 06:36:31 +0200
committerDavid Schulz <david.schulz@qt.io>2021-10-20 08:07:17 +0000
commita95ee64feda9d7f138c7983d4b8d9e78cfca27a8 (patch)
tree53233430aaba7dd6b289f12a2fefe6d68a38ae1a /src/libs/3rdparty/syntax-highlighting/src
parent0e5d632e5b43fbf218b82d9bf6d694d1fbb82361 (diff)
Editor: Fix build for Qt < 5.15.2
Change-Id: I06d1ec50159f3370fde05633de8e14f599140369 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/src')
-rw-r--r--src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp b/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp
index 3e1160b0db..f4e88b719a 100644
--- a/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp
+++ b/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp
@@ -728,7 +728,11 @@ MatchResult RegExpr::doMatch(QStringView text, int offset, const QStringList &ca
/**
* match the pattern
*/
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 2)
+ const auto result = regexp.match(text.toString(), offset, QRegularExpression::NormalMatch, QRegularExpression::DontCheckSubjectStringMatchOption);
+#else
const auto result = regexp.match(text, offset, QRegularExpression::NormalMatch, QRegularExpression::DontCheckSubjectStringMatchOption);
+#endif
if (result.capturedStart() == offset) {
/**
* we only need to compute the captured texts if we have real capture groups