mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +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:
@@ -37,7 +37,7 @@
|
||||
#include <QPlainTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QRadioButton>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QTabBar>
|
||||
#include <QCompleter>
|
||||
#include <Qt>
|
||||
@@ -270,9 +270,9 @@ namespace BlackGui
|
||||
flightPlan.setTakeoffTimePlanned(v);
|
||||
}
|
||||
|
||||
static const QRegExp withUnit("\\D+");
|
||||
thread_local const QRegularExpression withUnit("\\D+");
|
||||
v = ui->le_CrusingAltitude->text().trimmed();
|
||||
if (!v.isEmpty() && withUnit.indexIn(v) < 0)
|
||||
if (!v.isEmpty() && !withUnit.match(v).hasMatch())
|
||||
{
|
||||
v += "ft";
|
||||
ui->le_CrusingAltitude->setText(v);
|
||||
|
||||
Reference in New Issue
Block a user