Port from QRegExpValidator to QRegularExpressionValidator

QRegExpValidator is going away in Qt6, so port over to the
version using QRegularExpression.

Change-Id: Iecd1ba1f0e5e01009ae43b79c1ccc73f0fc046b2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Lars Knoll
2020-03-18 13:32:28 +01:00
parent 2e4915bdb9
commit 99a81e78d5
14 changed files with 40 additions and 40 deletions

View File

@@ -42,7 +42,7 @@
#include <QMessageBox>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QRegExpValidator>
#include <QRegularExpressionValidator>
#include <QToolBar>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -363,7 +363,7 @@ public:
setWidget(widget);
m_file = new BinEditorDocument(widget);
m_addressEdit = new QLineEdit;
auto addressValidator = new QRegExpValidator(QRegExp("[0-9a-fA-F]{1,16}"), m_addressEdit);
auto addressValidator = new QRegularExpressionValidator(QRegularExpression("[0-9a-fA-F]{1,16}"), m_addressEdit);
m_addressEdit->setValidator(addressValidator);
auto l = new QHBoxLayout;