diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-27 17:56:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-27 17:56:22 -0500 |
| commit | 6b64557ad62141d1ac5d42e88ba7a3ed0cc9884d (patch) | |
| tree | 614d45e1b6bdeffc988163fbe727c6a524c200c0 /src/yuzu/multiplayer/validation.h | |
| parent | a2fde04da9630a5bf4948a0d2798d969956eb389 (diff) | |
| parent | a75542ad2dd028f9aa3adfb00e92817ada12ccd8 (diff) | |
Merge pull request #8829 from Docteh/qt6_0002
CMake: rework for Qt6 support
Diffstat (limited to 'src/yuzu/multiplayer/validation.h')
| -rw-r--r-- | src/yuzu/multiplayer/validation.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/yuzu/multiplayer/validation.h b/src/yuzu/multiplayer/validation.h index dabf860be..dd25af280 100644 --- a/src/yuzu/multiplayer/validation.h +++ b/src/yuzu/multiplayer/validation.h @@ -3,7 +3,7 @@ #pragma once -#include <QRegExp> +#include <QRegularExpression> #include <QString> #include <QValidator> @@ -29,19 +29,21 @@ public: private: /// room name can be alphanumeric and " " "_" "." and "-" and must have a size of 4-20 - QRegExp room_name_regex = QRegExp(QStringLiteral("^[a-zA-Z0-9._- ]{4,20}$")); - QRegExpValidator room_name; + QRegularExpression room_name_regex = + QRegularExpression(QStringLiteral("^[a-zA-Z0-9._ -]{4,20}")); + QRegularExpressionValidator room_name; /// nickname can be alphanumeric and " " "_" "." and "-" and must have a size of 4-20 - QRegExp nickname_regex = QRegExp(QStringLiteral("^[a-zA-Z0-9._- ]{4,20}$")); - QRegExpValidator nickname; + const QRegularExpression nickname_regex = + QRegularExpression(QStringLiteral("^[a-zA-Z0-9._ -]{4,20}")); + QRegularExpressionValidator nickname; /// ipv4 address only // TODO remove this when we support hostnames in direct connect - QRegExp ip_regex = QRegExp(QStringLiteral( + QRegularExpression ip_regex = QRegularExpression(QStringLiteral( "(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|" "2[0-4][0-9]|25[0-5])")); - QRegExpValidator ip; + QRegularExpressionValidator ip; /// port must be between 0 and 65535 QIntValidator port; |
