diff options
Diffstat (limited to 'Decoder')
| -rw-r--r-- | Decoder/decodedtext.cpp | 8 | ||||
| -rw-r--r-- | Decoder/decodedtext.pri | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Decoder/decodedtext.cpp b/Decoder/decodedtext.cpp index e476ecb9..04a5cc87 100644 --- a/Decoder/decodedtext.cpp +++ b/Decoder/decodedtext.cpp @@ -165,7 +165,13 @@ QString DecodedText::call() const // get the second word, most likely the de call and the third word, most likely grid void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) const { - auto const& match = words_re.match (message_); + auto msg = message_; + auto p = msg.indexOf ("; "); + if (p >= 0) + { + msg = msg.mid (p + 2); + } + auto const& match = words_re.match (msg); call = match.captured ("word2"); grid = match.captured ("word3"); if ("R" == grid) grid = match.captured ("word4"); diff --git a/Decoder/decodedtext.pri b/Decoder/decodedtext.pri new file mode 100644 index 00000000..6aa33dc3 --- /dev/null +++ b/Decoder/decodedtext.pri @@ -0,0 +1,3 @@ +SOURCES += Decoder/decodedtext.cpp + +HEADERS += Decoder/decodedtext.h |
