diff options
| author | Tilka <tilkax@gmail.com> | 2020-08-08 20:45:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-08 20:45:57 +0100 |
| commit | f17b5dd41b83be014811ca78cf01764f621746c6 (patch) | |
| tree | d80aa2181c1ffa46dc4032efcf4aa12474914fee /Source/Core/DolphinQt/Config/ControllerInterface/ServerStringValidator.cpp | |
| parent | 76b955e090b9bf7e897e6bb6c295db75c3a8bd26 (diff) | |
| parent | 97c9cf3e21460a2292c108e676703cdeb826a22f (diff) | |
Merge pull request #8804 from iwubcode/dsu-improvements
DolphinQt / InputCommon - Support multiple DSU servers
Diffstat (limited to 'Source/Core/DolphinQt/Config/ControllerInterface/ServerStringValidator.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/ControllerInterface/ServerStringValidator.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Config/ControllerInterface/ServerStringValidator.cpp b/Source/Core/DolphinQt/Config/ControllerInterface/ServerStringValidator.cpp new file mode 100644 index 0000000000..1ab0935b53 --- /dev/null +++ b/Source/Core/DolphinQt/Config/ControllerInterface/ServerStringValidator.cpp @@ -0,0 +1,23 @@ +// Copyright 2020 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#include "DolphinQt/Config/ControllerInterface/ServerStringValidator.h" + +ServerStringValidator::ServerStringValidator(QObject* parent) : QValidator(parent) +{ +} + +QValidator::State ServerStringValidator::validate(QString& input, int& pos) const +{ + if (input.isEmpty()) + return Invalid; + + if (input.contains(QStringLiteral(":"))) + return Invalid; + + if (input.contains(QStringLiteral(";"))) + return Invalid; + + return Acceptable; +} |
