diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2019-03-11 14:21:27 +0100 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2019-03-11 14:21:27 +0100 |
| commit | 8c76e27e9f157f37e1f3c930f76c2522d25ff091 (patch) | |
| tree | c5dab105e64c191047793997c869773db020c6ec /decodedtext.cpp | |
| parent | fa2daec5ce5510e373c53b987fa4b21a310987f6 (diff) | |
| parent | 200de07a95209a55d6019ba87f0abc78d302bf4c (diff) | |
Update upstream source from tag 'upstream/2.0.1+repack'
Update to upstream version '2.0.1+repack'
with Debian dir f7e347d4250c45b22e01a489f197c55fb378ba9c
Diffstat (limited to 'decodedtext.cpp')
| -rw-r--r-- | decodedtext.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/decodedtext.cpp b/decodedtext.cpp index f466bb8d..88f6bd62 100644 --- a/decodedtext.cpp +++ b/decodedtext.cpp @@ -65,7 +65,7 @@ QStringList DecodedText::messageWords () const QString DecodedText::CQersCall() const { - QRegularExpression callsign_re {R"(^(CQ|DE|QRZ)(\s?DX|\s([A-Z]{2,4}|\d{3}))?\s(?<callsign>[A-Z0-9/]{2,})(\s[A-R]{2}[0-9]{2})?)"}; + QRegularExpression callsign_re {R"(^(CQ|DE|QRZ)(\s?DX|\s([A-Z]{1,4}|\d{3}))?\s(?<callsign>[A-Z0-9/]{2,})(\s[A-R]{2}[0-9]{2})?)"}; return callsign_re.match (message_).captured ("callsign"); } @@ -167,9 +167,8 @@ void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) const call = match.captured ("word2"); grid = match.captured ("word3"); if ("R" == grid) grid = match.captured ("word4"); - if(match.captured("word1")=="CQ" and call.length()>=3 and call.length()<=4 - and !call.contains(QRegExp("[0-9]"))) { - //Second word has length 3 or 4 and contains no digits + if(match.captured("word1")=="CQ" and call.length()<=4 and !call.contains(QRegExp("[0-9]"))) { + //Second word has length 1-4 and contains no digits call = match.captured ("word3"); grid = match.captured ("word4"); } |
