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:
Mathew Sutcliffe
2017-05-05 22:35:25 +01:00
parent 94fbfeefdb
commit d5ab73e1bc
17 changed files with 55 additions and 54 deletions

View File

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