Fixed #206: Double compound calls are valid

This commit is contained in:
Jordan Sherer 2019-10-13 20:28:47 -04:00
parent 8ceef83f2e
commit e37089c78a
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@ auto CallsignValidator::validate (QString& input, int& pos) const -> State
{
auto match = re_.match (input, 0, QRegularExpression::PartialPreferCompleteMatch);
input = input.toUpper ();
if (input.count(QLatin1Char('/')) > 1) return Invalid;
if (input.count(QLatin1Char('/')) > 2) return Invalid;
if (match.hasMatch ()) return Acceptable;
if (!input.size () || match.hasPartialMatch ()) return Intermediate;
pos = input.size ();

View File

@ -85,7 +85,8 @@ SOURCES += \
SpotClient.cpp \
TCPClient.cpp \
TransmitTextEdit.cpp \
NotificationAudio.cpp
NotificationAudio.cpp \
CallsignValidator.cpp
HEADERS += qt_helpers.hpp \
pimpl_h.hpp pimpl_impl.hpp \