Skip to content

Commit

Permalink
Merge branch 'foldynl:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aa5sh authored Oct 5, 2024
2 parents e32b0b7 + eb4cf37 commit 94ec5f2
Show file tree
Hide file tree
Showing 139 changed files with 5,775 additions and 4,603 deletions.
23 changes: 23 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
2024/10/05 - 0.39.0
- [NEW] - DXC - Added Full-text search
- [NEW] - Select S in RST Edit when focused (issue #454)
- [NEW] - Alerts - Added Member Column
- [CHANGED] - HamlibDrv Rig/Rot- Added multiplatform reliable sleep
- [CHANGED] - Changed Backup policy
- [CHANGED] - Logbook page size - improved performance
- [CHANGED] - Logbook - CTRL-A (Select All) is disabled
- [CHANGED] - Awards - Bands are displayed based on the Settings (issue #452)
- [CHANGED] - WSJTX - More reliable detection of CQ stations (PR #471 @aa5sh)
- [CHANGED] - WSJTX - SOTA/POTA/WWFF/SIG are being added to the logged QSO (PR #463 @aa5sh)
- [CHANGED] - Stats - Add a confirmation dialog for displaying over 50k QSOs on the map
- [CHANGED] - New Contact - Starting QSO Timer when Rig online and WSJTX Update Callsign Status is received
- [CHANGED] - Added a postponed handling for Rig soft errors (issue #472)
- Fixed WSJT-X does not emit band change if rig is disconnected (issue #447)
- Fixed Wrong import of ADIF file of another log program (issue #455)
- Fixed WSJTX log record is stored incorrectly if it contains non-ASCII chars(issue #458)
- Fixed ADIF import does not import records with old DXCC Entities (issue #459)
- Fixed ADIF import incorrectly uses Station Profile parameters (issue #461)
- Fixed Logbook - QSO Table Column Width Does Not Stick (issue #464)
- Fixed Alerts Window displays OOB Spots (issue #469)
- Fixed Field values from past QSOs are used incorrectly in case of WSJTX QSOs (#issue 470)

2024/08/29 - 0.38.0
- [NEW] - Logbook - Added Send DX Spot to the QSO Context Menu
- [NEW] - DX Filter - Added Dedup Time/Freq difference setting (@aa5sh)
Expand Down
5 changes: 3 additions & 2 deletions QLog.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 5): QT += widgets

TARGET = qlog
TEMPLATE = app
VERSION = 0.38.0
VERSION = 0.39.0

DEFINES += VERSION=\\\"$$VERSION\\\"

Expand Down Expand Up @@ -90,7 +90,6 @@ SOURCES += \
data/CWKeyProfile.cpp \
data/CWShortcutProfile.cpp \
data/Data.cpp \
data/Dxcc.cpp \
data/MainLayoutProfile.cpp \
data/RigProfile.cpp \
data/RotProfile.cpp \
Expand All @@ -107,6 +106,7 @@ SOURCES += \
models/LogbookModel.cpp \
models/RigTypeModel.cpp \
models/RotTypeModel.cpp \
models/SearchFilterProxyModel.cpp \
models/ShortcutEditorModel.cpp \
models/SqlListModel.cpp \
models/WsjtxTableModel.cpp \
Expand Down Expand Up @@ -242,6 +242,7 @@ HEADERS += \
models/LogbookModel.h \
models/RigTypeModel.h \
models/RotTypeModel.h \
models/SearchFilterProxyModel.h \
models/ShortcutEditorModel.h \
models/SqlListModel.h \
models/WsjtxTableModel.h \
Expand Down
13 changes: 6 additions & 7 deletions core/AlertEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "debug.h"
#include "data/DxSpot.h"
#include "data/WsjtxEntry.h"
#include "data/StationProfile.h"
#include "data/SpotAlert.h"
#include "data/BandPlan.h"

Expand Down Expand Up @@ -35,7 +34,7 @@ void AlertEvaluator::dxSpot(const DxSpot & spot)

QStringList matchedRules;

for ( const AlertRule *rule : qAsConst(ruleList) )
for ( const AlertRule *rule : static_cast<const QList<AlertRule *>&>(ruleList) )
{
qCDebug(runtime) << "Processing " << *rule;

Expand Down Expand Up @@ -76,7 +75,7 @@ void AlertEvaluator::WSJTXCQSpot(const WsjtxEntry &wsjtx)

QStringList matchedRules;

for ( const AlertRule *rule : qAsConst(ruleList) )
for ( const AlertRule *rule : static_cast<const QList<AlertRule *>&>(ruleList) )
{
qCDebug(runtime) << "Processing " << *rule;
if ( rule->match(wsjtx) )
Expand Down Expand Up @@ -344,11 +343,11 @@ bool AlertRule::match(const DxSpot &spot) const
&& (sourceMap & SpotAlert::DXSPOT)
&& (dxCountry == 0 || dxCountry == spot.dxcc.dxcc)
&& (spot.status & dxLogStatusMap)
&& (mode == "*" || mode.contains("|" + spot.modeGroupString))
&& (band == "*" || band.contains("|" + spot.band))
&& (mode == "*" || (!spot.modeGroupString.isEmpty() && mode.contains("|" + spot.modeGroupString)))
&& (band == "*" || (!spot.band.isEmpty() && band.contains("|" + spot.band)))
&& (spotterCountry == 0 || spotterCountry == spot.dxcc_spotter.dxcc )
&& (dxContinent == "*" || dxContinent.contains("|" + spot.dxcc.cont))
&& (spotterContinent == "*" || spotterContinent.contains("|" + spot.dxcc_spotter.cont))
&& (dxContinent == "*" || (!spot.dxcc.cont.isEmpty() && dxContinent.contains("|" + spot.dxcc.cont)))
&& (spotterContinent == "*" || (!spot.dxcc_spotter.cont.isEmpty() && spotterContinent.contains("|" + spot.dxcc_spotter.cont)))
&& (dxMember == QStringList("*") || spot.memberList2Set().intersects(dxMemberSet))
)
{
Expand Down
1 change: 0 additions & 1 deletion core/ClubLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "ClubLog.h"
#include "debug.h"
#include "core/CredentialStore.h"
#include "core/Callsign.h"

#define API_KEY "21507885dece41ca049fec7fe02a813f2105aff2"
#define API_LIVE_UPLOAD_URL "https://clublog.org/realtime.php"
Expand Down
8 changes: 0 additions & 8 deletions core/CredentialStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ CredentialStore::CredentialStore(QObject *parent) : QObject(parent)
FCT_IDENTIFICATION;
}

CredentialStore* CredentialStore::instance()
{
FCT_IDENTIFICATION;

static CredentialStore instance;
return &instance;
}

int CredentialStore::savePassword(const QString &storage_key, const QString &user, const QString &pass)
{
FCT_IDENTIFICATION;
Expand Down
6 changes: 5 additions & 1 deletion core/CredentialStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class CredentialStore : public QObject
Q_OBJECT
public:
explicit CredentialStore(QObject *parent = nullptr);
static CredentialStore* instance();
static CredentialStore* instance()
{
static CredentialStore instance;
return &instance;
};

int savePassword(const QString &storage_key, const QString &user, const QString &pass);
QString getPassword(const QString &storage_key, const QString &user);
Expand Down
1 change: 0 additions & 1 deletion core/Fldigi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "Fldigi.h"
#include "logformat/AdiFormat.h"
#include "debug.h"
#include "data/StationProfile.h"

MODULE_IDENTIFICATION("qlog.core.fldigi");

Expand Down
18 changes: 9 additions & 9 deletions core/KSTChat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ KSTUsersInfo KSTChat::getUserInfo(const QString &username) const

qCDebug(function_parameters) << username;

for ( const KSTUsersInfo &info : qAsConst(userList) )
for ( const KSTUsersInfo &info : static_cast<const QList<KSTUsersInfo>&>(userList) )
{
if ( info.callsign == username )
return info;
Expand Down Expand Up @@ -250,9 +250,9 @@ void KSTChat::receiveData()
QRegularExpression chatCMDEndRE("([0-9]{4})Z " + userName.toUpper() + " " + QRegularExpression::escape(chatName) + " chat>(.*)");
QRegularExpressionMatch chatCMDEndMatch;

QStringList lines = joinLines(socket->readAll());
const QStringList &lines = joinLines(socket->readAll());

for (const QString &line : qAsConst(lines) )
for (const QString &line : lines )
{
qCDebug(runtime) << "Processing Line" << line << "CMD" << currCommand;
// Skip empty lines
Expand Down Expand Up @@ -461,7 +461,7 @@ void KSTChat::finalizeShowUsersCommand(const QStringList &buffer)

userList.clear();

for ( const QString &record : qAsConst(buffer) )
for ( const QString &record : static_cast<const QList<QString>&>(buffer) )
{
QRegularExpressionMatch match = recordRE.match(record);

Expand Down Expand Up @@ -596,7 +596,7 @@ bool chatHighlightEvaluator::shouldHighlight(const KSTChatMsg &msg,
{
FCT_IDENTIFICATION;

for ( const chatHighlightRule *rule : qAsConst(ruleList) )
for ( const chatHighlightRule *rule : static_cast<const QList<chatHighlightRule *>&>(ruleList) )
{
qCDebug(runtime) << "Processing " << rule->ruleName;
if ( rule->match(roomIndex, msg) )
Expand Down Expand Up @@ -696,7 +696,7 @@ QByteArray chatHighlightRule::toJson()

QJsonArray conditionsArray;

for ( const Condition &condition : qAsConst(conditions) )
for ( const Condition &condition : static_cast<const QList<Condition>&>(conditions) )
{
QJsonObject conditionObject;

Expand Down Expand Up @@ -733,8 +733,8 @@ void chatHighlightRule::fromJson(const QJsonDocument &ruleDefinition)
enabled = ruleDefinition["enabled"].toBool();
ruleRoomIndex = ruleDefinition["roomId"].toInt();
interConditionOperand = static_cast<InterConditionOperand>(ruleDefinition["operand"].toInt());
QJsonArray conditionArray = ruleDefinition["conditions"].toArray();
for ( const QJsonValue &value : qAsConst(conditionArray) )
const QJsonArray &conditionArray = ruleDefinition["conditions"].toArray();
for ( const QJsonValue &value : conditionArray )
{
QJsonObject obj = value.toObject();
Condition condition;
Expand Down Expand Up @@ -779,7 +779,7 @@ bool chatHighlightRule::match(const int inRoomIndex,
bool result = false;
bool isFirstCondition = true;

for ( const Condition &condition : qAsConst(conditions) )
for ( const Condition &condition : static_cast<const QList<Condition>&>(conditions) )
{
QString columnValue;

Expand Down
45 changes: 15 additions & 30 deletions core/MembershipQE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ void MembershipQE::statusQueryFinished(const QString &callsign,
emit clubStatusResult(callsign, statuses);
}

MembershipQE *MembershipQE::instance()
{
FCT_IDENTIFICATION;

static MembershipQE instance;
return &instance;
}

void MembershipQE::saveEnabledClubLists(const QStringList &enabledLists)
{
QSettings settings;
Expand All @@ -124,7 +116,7 @@ void MembershipQE::removeClubsFromEnabledClubLists(const QList<QPair<QString, QS
qCDebug(runtime) << toRemove;
QStringList current = getEnabledClubLists();

for (const QPair<QString, QString>& toRemoveClub: qAsConst(toRemove))
for ( const QPair<QString, QString>& toRemoveClub : toRemove )
{
current.removeAll(toRemoveClub.first);
}
Expand Down Expand Up @@ -492,13 +484,6 @@ ClubStatusQuery::ClubStatusQuery(QObject *parent) :
ClubStatusQuery::~ClubStatusQuery()
{
FCT_IDENTIFICATION;
{
qCDebug(runtime) << "Closing connection to DB";
QSqlDatabase db1 = QSqlDatabase::database(dbConnectionName);
db1.close();
}

QSqlDatabase::removeDatabase(dbConnectionName);
}

void ClubStatusQuery::getClubStatus(const QString &in_callsign,
Expand Down Expand Up @@ -562,25 +547,25 @@ void ClubStatusQuery::getClubStatus(const QString &in_callsign,
while ( ++records && query.next() )
{
QString clubid = query.value(0).toString();
QVariant band = query.value(1);
QVariant mode = query.value(2);
QString band = query.value(1).toString();
QString mode = query.value(2).toString();
QVariant confirmed = query.value(3);
QVariant current_mode = query.value(4);
QString current_mode = query.value(4).toString();

qCDebug(runtime) << "Processing" << currentProcessedClub
<< clubid
<< band.isNull() << band
<< mode.isNull() << mode
<< confirmed.isNull() << confirmed
<< current_mode.isNull();
<< band.isEmpty() << band
<< mode.isEmpty() << mode
<< confirmed.toString().isEmpty() << confirmed
<< current_mode.isEmpty();

// the select generates starting line for a new club
// Changing the club
if ( currentProcessedClub != clubid
&& band.isNull()
&& mode.isNull()
&& confirmed.isNull()
&& current_mode.isNull() )
&& band.isEmpty()
&& mode.isEmpty()
&& confirmed.toString().isEmpty()
&& current_mode.isEmpty() )
{
if ( !currentProcessedClub.isEmpty() )
{
Expand All @@ -599,10 +584,10 @@ void ClubStatusQuery::getClubStatus(const QString &in_callsign,

if ( currentProcessedClub == clubid )
{
if ( band.toString() == in_band )
if ( band == in_band )
{
bandMatched = true;
if ( mode.toString() == current_mode.toString() )
if ( mode == current_mode )
{
bandModeMatched = true;

Expand All @@ -613,7 +598,7 @@ void ClubStatusQuery::getClubStatus(const QString &in_callsign,
}
}

if ( mode.toString() == current_mode.toString() )
if ( mode == current_mode )
{
modeMatched = true;
}
Expand Down
6 changes: 5 additions & 1 deletion core/MembershipQE.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ class MembershipQE : public QObject
Q_OBJECT

public:
static MembershipQE *instance();
static MembershipQE *instance()
{
static MembershipQE instance;
return &instance;
};
static void saveEnabledClubLists(const QStringList &enabledLists);
static QStringList getEnabledClubLists();

Expand Down
Loading

0 comments on commit 94ec5f2

Please sign in to comment.