diff --git a/UDPExamples/ClientWidget.cpp b/UDPExamples/ClientWidget.cpp index eea15576c..7d44c85ee 100644 --- a/UDPExamples/ClientWidget.cpp +++ b/UDPExamples/ClientWidget.cpp @@ -7,7 +7,7 @@ namespace { //QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"}; QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>]*"}; - QRegularExpression cq_re {"[^A-Z0-9]*(CQ|QRZ)[^A-Z0-9]*"}; + QRegularExpression cq_re {"(CQ|CQDX|QRZ)[^A-Z0-9/]+"}; void update_dynamic_property (QWidget * widget, char const * property, QVariant const& value) { diff --git a/decodedtext.cpp b/decodedtext.cpp index 580d8ac2b..b54080971 100644 --- a/decodedtext.cpp +++ b/decodedtext.cpp @@ -12,6 +12,10 @@ QString DecodedText::CQersCall() { s1 = 7 + position; } + else if ((position = _string.indexOf (" CQDX ")) >= 0) + { + s1 = 6 + position; + } else if ((position = _string.indexOf (" CQ ")) >= 0) { s1 = 4 + position; diff --git a/displaytext.cpp b/displaytext.cpp index b4607cd50..b8f8c08aa 100644 --- a/displaytext.cpp +++ b/displaytext.cpp @@ -147,7 +147,9 @@ void DisplayText::displayDecodedText(DecodedText decodedText, QString myCall, { QString bg="white"; bool CQcall = false; - if (decodedText.string ().contains (" CQ ") > 0 || decodedText.string ().contains (" CQ DX ")) + if (decodedText.string ().contains (" CQ ") + || decodedText.string ().contains (" CQDX ") + || decodedText.string ().contains (" QRZ ")) { CQcall = true; bg=color_CQ.name(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 7cfe22f08..d4a10ed78 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5044,7 +5044,9 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de auto decode_parts = message_text.split (' ', QString::SkipEmptyParts); - if (decode_parts.contains ("CQ") || decode_parts.contains ("QRZ")) + if (decode_parts[0] == "CQ" + || decode_parts[0] == "CQDX" + || decode_parts[0] == "QRZ") { // a message we are willing to accept QString format_string {"%1 %2 %3 %4 %5 %6"};