ClearCase: Compile fix for Qt 5.15

Amends 9efa934ae0.

Change-Id: I4ef9caf61f708f94ad2bda6ea826be4567238282
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-06-24 09:49:26 +02:00
parent a98c254c59
commit bb772ad97c

View File

@@ -92,10 +92,15 @@ void ClearCaseSync::processCleartoolLsLine(const QDir &viewRootDir, const QStrin
QTC_CHECK(QFileInfo::exists(absFile)); QTC_CHECK(QFileInfo::exists(absFile));
QTC_CHECK(!absFile.isEmpty()); QTC_CHECK(!absFile.isEmpty());
const QRegularExpression reState("^\\s*\\[[^\\]]*\\]"); // [hijacked]; [loaded but missing] const QRegularExpression reState("\\s*\\[[^\\]]*\\]"); // [hijacked]; [loaded but missing]
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const QRegularExpression::MatchOption mo = QRegularExpression::AnchoredMatchOption;
#else
const QRegularExpression::MatchOption mo = QRegularExpression::AnchorAtOffsetMatchOption;
#endif
const QRegularExpressionMatch match = reState.match(buffer, wspos + 1, const QRegularExpressionMatch match = reState.match(buffer, wspos + 1,
QRegularExpression::NormalMatch, QRegularExpression::NormalMatch,
QRegularExpression::AnchorAtOffsetMatchOption); mo);
if (match.hasMatch()) { if (match.hasMatch()) {
const QString ccState = match.captured(); const QString ccState = match.captured();
if (ccState.indexOf(QLatin1String("hijacked")) != -1) if (ccState.indexOf(QLatin1String("hijacked")) != -1)