mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Replace QRegExp with QRegularExpression
Reviewers: kbasan, msutcliffe Reviewed By: kbasan, msutcliffe Subscribers: jenkins Differential Revision: https://dev.swift-project.org/D11
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/variant.h"
|
||||
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <Qt>
|
||||
#include <QtDebug>
|
||||
|
||||
@@ -131,8 +131,8 @@ namespace BlackMisc
|
||||
qint32 tc = transponderCode.toInt(&number);
|
||||
if (!number) return false;
|
||||
if (tc < 0 || tc > 7777) return false;
|
||||
QRegExp rx("[0-7]{1,4}");
|
||||
return rx.exactMatch(transponderCode);
|
||||
thread_local const QRegularExpression rx("^[0-7]{1,4}$");
|
||||
return rx.match(transponderCode).hasMatch();
|
||||
}
|
||||
|
||||
bool CTransponder::isValidTransponderCode(qint32 transponderCode)
|
||||
|
||||
Reference in New Issue
Block a user