From e0737c56c1e384e05064a0c6e1ac46979371041b Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 19 Dec 2018 22:58:32 +0100 Subject: New upstream version 2.0.0+repack --- CallsignValidator.cpp | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 CallsignValidator.cpp (limited to 'CallsignValidator.cpp') diff --git a/CallsignValidator.cpp b/CallsignValidator.cpp deleted file mode 100644 index ddcd64f1..00000000 --- a/CallsignValidator.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "CallsignValidator.hpp" - -CallsignValidator::CallsignValidator (QObject * parent, bool allow_compound) - : QValidator {parent} - , re_ {allow_compound ? R"(^[A-Za-z0-9/]+$)" : R"(^[A-Za-z0-9]+$)"} -{ -} - -auto CallsignValidator::validate (QString& input, int& pos) const -> State -{ - auto match = re_.match (input, 0, QRegularExpression::PartialPreferCompleteMatch); - input = input.toUpper (); - if (match.hasMatch ()) return Acceptable; - if (!input.size () || match.hasPartialMatch ()) return Intermediate; - pos = input.size (); - return Invalid; -} -- cgit v1.2.3