Skip to content

Commit

Permalink
KLog 1.5.2 - Closes issue 177
Browse files Browse the repository at this point in the history
  • Loading branch information
ea4k committed May 9, 2021
1 parent e8072ee commit e65d1e9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
May 2021 - 1.5.2
- Bugfix: Complex calls like K/EA4K/P were identified as wrong calls. (Closes issue #177) (TNX PA3FNT)

April 2021 - 1.5.1
- Added the GitHub repository to find new releases due to the issue with savannah.nongnu.org
- New feature: F4 toggles the real time status (on/off).
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main(int argc, char *argv[])
//qDebug() << "KLog Main: " << QSslSocket::supportsSsl() << QSslSocket::sslLibraryBuildVersionString() << QSslSocket::sslLibraryVersionString() << endl;
QT_REQUIRE_VERSION(argc, argv, "5.11")
QDir d1 = QDir();
QString version = "1.5.1";
QString version = "1.5.2";
//qDebug() << "KLog Main STARTED: " << version << endl;
Utilities util = Utilities();
QStringList arguments;
Expand Down
9 changes: 5 additions & 4 deletions src/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,19 +855,20 @@ bool Utilities::isValidCall(const QString &_c)
}
if (call.count('/') == 2)
{ //Things like F/EA4K/P will become F/EA4K
//qDebug() << "Utilities::isValidCall: Two /; Ignoring the last part: " << call << endl;
QStringList parts;
parts.clear();
parts << call.split('/');
call = parts.at(0)+parts.at(1);
call = parts.at(0) + "/" + parts.at(1);
}
//QString prefix = QString();
//qDebug() << "Utilities::isValidCall: Call: " << call << endl;

if (call.count('/') == 1)
{ // Complex calls (like F/EA4K or EA4K/F OR /p OR /qrp
// We are just checking the call format not if it belongs to a country or whatever.
// It may return true for wrong calls like "ABC/EA4K"
// TODO: Add a check just for prefixes to fix the previous

//qDebug() << "Utilities::isValidCall: Call with one /: " << call << endl;
QStringList parts;
parts.clear();
parts << call.split ('/');
Expand Down Expand Up @@ -900,7 +901,7 @@ QString Utilities::getPrefixFromCall(const QString &_c)
QStringList parts;
parts.clear();
parts << call.split('/');
call = parts.at(0)+parts.at(1);
call = parts.at(0) + "/" + parts.at(1);
}

QString prefix = QString();
Expand Down
1 change: 1 addition & 0 deletions tests/utilities/tst_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ void tst_Utilities::test_isValidCall()
// use of call signs with more than the four characters referred to in No. 19.68.(WRC-03
//qDebug() << Q_FUNC_INFO << " Complex" << endl;
QVERIFY2(util->isValidCall("EA4K/P") == true, "EA4K/P");
QVERIFY2(util->isValidCall("K/EA4K/P") == true, "EA4K/P");
QVERIFY2(util->isValidCall("EA4K/F") == true, "EA4K/F");
QVERIFY2(util->isValidCall("EA4K/1") == true, "EA4K/1");
QVERIFY2(util->isValidCall("EA4K/K1") == true, "EA4K/K1");
Expand Down

0 comments on commit e65d1e9

Please sign in to comment.