diff options
| author | 2023-07-22 15:07:34 -0400 | |
|---|---|---|
| committer | 2023-07-22 15:07:34 -0400 | |
| commit | fc1bb93b01cea583bfae3743f973796a37cdeb6b (patch) | |
| tree | fbc063a58f6030862d59cfbd0a6dc11266250392 | |
| parent | config: Read the Network category (diff) | |
| download | yuzu-fc1bb93b01cea583bfae3743f973796a37cdeb6b.tar.gz yuzu-fc1bb93b01cea583bfae3743f973796a37cdeb6b.tar.xz yuzu-fc1bb93b01cea583bfae3743f973796a37cdeb6b.zip | |
shared_widget: Use QRegularExpression
| -rw-r--r-- | src/yuzu/configuration/shared_widget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index cf33bce2b..74985129b 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include <QLineEdit> | 23 | #include <QLineEdit> |
| 24 | #include <QObject> | 24 | #include <QObject> |
| 25 | #include <QPushButton> | 25 | #include <QPushButton> |
| 26 | #include <QRegExp> | 26 | #include <QRegularExpression> |
| 27 | #include <QSizePolicy> | 27 | #include <QSizePolicy> |
| 28 | #include <QSlider> | 28 | #include <QSlider> |
| 29 | #include <QSpinBox> | 29 | #include <QSpinBox> |
| @@ -295,8 +295,8 @@ QWidget* Widget::CreateHexEdit(std::function<std::string()>& serializer, | |||
| 295 | return QString::fromStdString(fmt::format("{:08x}", std::stoul(input))); | 295 | return QString::fromStdString(fmt::format("{:08x}", std::stoul(input))); |
| 296 | }; | 296 | }; |
| 297 | 297 | ||
| 298 | QRegExpValidator* regex = | 298 | QRegularExpressionValidator* regex = new QRegularExpressionValidator( |
| 299 | new QRegExpValidator{QRegExp{QStringLiteral("^[0-9a-fA-F]{0,8}$")}, line_edit}; | 299 | QRegularExpression{QStringLiteral("^[0-9a-fA-F]{0,8}$")}, line_edit); |
| 300 | 300 | ||
| 301 | const QString default_val = to_hex(setting.ToString()); | 301 | const QString default_val = to_hex(setting.ToString()); |
| 302 | 302 | ||