Editor: Fix build for Qt < 5.15.2

Change-Id: I06d1ec50159f3370fde05633de8e14f599140369
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2021-10-20 06:36:31 +02:00
parent 0e5d632e5b
commit a95ee64fed

View File

@@ -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