Skip to content

Commit

Permalink
Fixed #377 - Callbook query does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed May 29, 2024
1 parent ac7295d commit d7bc821
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions core/HamQTH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ void HamQTH::queryCallsign(const QString &callsign)
return;
}

queuedCallsign = "";

QUrlQuery query;
query.addQueryItem("id", sessionId);
query.addQueryItem("callsign", callsign);
Expand All @@ -114,6 +112,10 @@ void HamQTH::queryCallsign(const QString &callsign)

currentReply = nam->get(QNetworkRequest(url));
currentReply->setProperty("queryCallsign", callsign);

// Attention, variable callsign and queuedCallsign point to the same object
// queuedCallsign must be cleared after the last use of the callsign variable
queuedCallsign = QString();
}

void HamQTH::abortQuery()
Expand Down
6 changes: 4 additions & 2 deletions core/QRZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ void QRZ::queryCallsign(const QString &callsign)
return;
}

queuedCallsign = "";

QUrlQuery query;
query.addQueryItem("s", sessionId);

Expand Down Expand Up @@ -86,6 +84,10 @@ void QRZ::queryCallsign(const QString &callsign)
currentReply = nam->get(QNetworkRequest(url));
currentReply->setProperty("queryCallsign", QVariant(callsign));
currentReply->setProperty("messageType", QVariant("callsignInfoQuery"));

// Attention, variable callsign and queuedCallsign point to the same object
// queuedCallsign must be cleared after the last use of the callsign variable
queuedCallsign = QString();
}

void QRZ::abortQuery()
Expand Down

0 comments on commit d7bc821

Please sign in to comment.