From ba83ae058775af8eaa54361a35d6430823ddbecf Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 27 Dec 2018 13:14:01 -0500 Subject: [PATCH] Retain CQ messages like "CQ xxxx K1ABC FN42", where xxxx is 1-4 letters or 1-3 digits. --- widgets/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index bb0089d95..30a894b25 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5274,8 +5274,11 @@ void MainWindow::on_tx6_editingFinished() //tx6 edited QString t=ui->tx6->text().toUpper(); if(t.indexOf(" ")>0) { QString t1=t.split(" ").at(1); + QRegExp AZ4("^[A-Z]{1,4}$"); + QRegExp NN3("^[0-9]{1,3}$"); m_CQtype="CQ"; - if(t1.size()==2) m_CQtype="CQ " + t1; + if(t1.size()<=4 and t1.contains(AZ4)) m_CQtype="CQ " + t1; + if(t1.size()<=3 and t1.contains(NN3)) m_CQtype="CQ " + t1; } msgtype(t, ui->tx6); }