Skip to content

Commit f65e91a

Browse files
committed
#3403 refactor: fix more Qt6 build errors below Qt 6.5
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent 8a04e1e commit f65e91a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/helpers/codetohtmlconverter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,11 @@ QString CodeToHtmlConverter::xmlHighlighter(StringView input) const {
546546
StringView tag = input.mid(i, found - i);
547547

548548
static const QRegularExpression re(R"(([a-zA-Z0-9]+(\s*=\s*"[^"]*")?))");
549-
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
549+
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
550+
// Qt 6.5+: use globalMatchView with StringView
550551
QRegularExpressionMatchIterator matchIt = re.globalMatchView(tag);
551552
#else
553+
// Qt 5.x and Qt 6.0-6.4: use globalMatch with QString
552554
QRegularExpressionMatchIterator matchIt = re.globalMatch(TO_QSTRING(tag));
553555
#endif
554556

0 commit comments

Comments
 (0)