From 4c4b182b723aa790b72bd1188ae614128bb9d390 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 28 Jun 2016 15:53:50 +0000 Subject: [PATCH] Allow for empty decode message in UDP reply message git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6812 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 7 ++----- mainwindow.ui | 16 ---------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index ea210a2e5..b70a87e7e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -5035,11 +5036,7 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de return; } - auto decode_parts = message_text.split (' ', QString::SkipEmptyParts); - - if (decode_parts[0] == "CQ" - || decode_parts[0] == "CQDX" - || decode_parts[0] == "QRZ") + if (message_text.contains (QRegularExpression {R"(^(CQ |CQDX |QRZ ))"})) { // a message we are willing to accept QString format_string {"%1 %2 %3 %4 %5 %6"}; diff --git a/mainwindow.ui b/mainwindow.ui index 5c3cec388..32a7a58c1 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -2,14 +2,6 @@ MainWindow - - - 0 - 0 - 896 - 565 - - WSJT-X by K1JT @@ -2284,14 +2276,6 @@ QPushButton[state="ok"] { - - - 0 - 0 - 896 - 21 - - File