From a95ee64feda9d7f138c7983d4b8d9e78cfca27a8 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 20 Oct 2021 06:36:31 +0200 Subject: [PATCH] Editor: Fix build for Qt < 5.15.2 Change-Id: I06d1ec50159f3370fde05633de8e14f599140369 Reviewed-by: Eike Ziller --- src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp b/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp index 3e1160b0db3..f4e88b719a7 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