forked from qt-creator/qt-creator
QmlJS: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098 Change-Id: I70157bcbee67cf493e28b5bad97248877a25e5c6 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLatin1String>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@@ -273,8 +273,8 @@ bool JsonCheck::visit(StringLiteral *ast)
|
||||
|
||||
const QString &pattern = m_schema->pattern();
|
||||
if (!pattern.isEmpty()) {
|
||||
QRegExp regExp(pattern);
|
||||
if (regExp.indexIn(literal.toString()) == -1) {
|
||||
const QRegularExpression regExp(pattern);
|
||||
if (regExp.match(literal.toString()).hasMatch()) {
|
||||
analysis()->m_messages.append(Message(ErrInvalidStringValuePattern,
|
||||
ast->firstSourceLocation(),
|
||||
QString(), QString(), false));
|
||||
|
||||
Reference in New Issue
Block a user