From 7f64b5554b38b6229591aa61c2f2486b4960cb57 Mon Sep 17 00:00:00 2001 From: Steve Woodruff Date: Fri, 7 Nov 2025 21:28:58 -0500 Subject: [PATCH] ui: Allow callbook lookups for WSJT-X contacts even without grid square This change is to allow WSJT-X format broadcast packets to trigger a callbook lookup even when the grid square is not specified. This is useful for non FT8 content. For example, realtime contest logs being sent from WriteLog to Qlog via the WSJT-X protocol. It is safe to call finalizeCallsignEdit() even without the grid square because the CallbookManager will cache lookups and prevent redundant lookups when WSJT-X sends multiple status type messages. --- ui/NewContactWidget.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/NewContactWidget.cpp b/ui/NewContactWidget.cpp index 9d5418c0..ea3adb2f 100644 --- a/ui/NewContactWidget.cpp +++ b/ui/NewContactWidget.cpp @@ -2944,18 +2944,16 @@ void NewContactWidget::prepareWSJTXQSO(const QString &receivedCallsign, setDxccInfo(receivedCallsign); queryPota(); - // at the moment WSJTX sends several statuses about changing one callsign. - // In order to avoid multiple searches, we will search only when we have a grid - it was usually the last - // status message - // the current status message sequence is - // 1) prev Callsign empty grid - // 2) new Callsign empty grid - // 3) new Calllsign, new gris + // Always trigger callbook lookup, even without grid square + // This enables lookups for WSJT-X compatible apps that don't provide grids + // CallbookManager has QCache caching to prevent redundant queries so this is safe + // it is needed for non WSJT-X content that we're accepting on the same port, such + // as WriteLog broadcast udp xml packets converted to ADIF. if ( !grid.isEmpty() ) { useFieldsFromPrevQSO(callsign, grid); - finalizeCallsignEdit(); } + finalizeCallsignEdit(); } void NewContactWidget::setDefaultReport()