mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
shared_widget: Use QRegularExpression
This commit is contained in:
parent
fb7da1fa11
commit
fc1bb93b01
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
|||
#include <QLineEdit>
|
||||
#include <QObject>
|
||||
#include <QPushButton>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QSizePolicy>
|
||||
#include <QSlider>
|
||||
#include <QSpinBox>
|
||||
|
@ -295,8 +295,8 @@ QWidget* Widget::CreateHexEdit(std::function<std::string()>& serializer,
|
|||
return QString::fromStdString(fmt::format("{:08x}", std::stoul(input)));
|
||||
};
|
||||
|
||||
QRegExpValidator* regex =
|
||||
new QRegExpValidator{QRegExp{QStringLiteral("^[0-9a-fA-F]{0,8}$")}, line_edit};
|
||||
QRegularExpressionValidator* regex = new QRegularExpressionValidator(
|
||||
QRegularExpression{QStringLiteral("^[0-9a-fA-F]{0,8}$")}, line_edit);
|
||||
|
||||
const QString default_val = to_hex(setting.ToString());
|
||||
|
||||
|
|
Loading…
Reference in a new issue