Merged
Conversation
Two bugs prevented dupe detection from working: 1. getDateTimeFromSQLiteString() used setTimeZone(UTC) which CONVERTS local→UTC instead of just re-labeling. On systems with non-UTC timezone (e.g. macOS UTC+2), a stored UTC time "14:30" was parsed as "14:30 local" then converted to "12:30 UTC", causing cache entries to be 2 h off and never matching the user-entered UTC time. Fixed by using QDateTime(date, time, QTimeZone::UTC) which re-labels without conversion, consistent with normalizeForCache(). 2. loadDuplicateCache() was commented out in applySettings(), so the cache was never populated on normal application startup. Dupes from previous sessions were invisible until the user opened Setup or imported a file. Uncommented the call so the cache is loaded on every settings apply (startup included). Also cleaned up checkIfDupe() to construct _dateTime directly as UTC, making the intent explicit. https://claude.ai/code/session_0117DBDtTcYmq9Nv3tujU3p2
loadDuplicateCache() now launches a background thread (same pattern as loadCacheBG/ensureCacheReady used for band/mode cache) and returns immediately, eliminating the startup/settings freeze on slow platforms. - loadDupeCacheBG(): static method, opens its own SQLite connection in the worker thread, builds DupeCacheData (QMultiHash) and returns it - ensureDupeCacheReady(): called lazily by findDuplicateId, addDuplicateCache and removeDuplicateCache; waits for the future only on first access (usually already done by then) - clearDuplicateCache(): sets m_dupeCacheLoading=false so any in-flight BG result is discarded rather than applied after a deliberate clear - generateGroupingKey(): made static so loadDupeCacheBG can call it - loadDuplicateCache() moved from applySettings() to init(), so it runs once at startup only; settings dialog close without log changes does not trigger a reload (slotSetupDialogFinished already handles the logChanged/logsModified case) https://claude.ai/code/session_0117DBDtTcYmq9Nv3tujU3p2
The two early returns in checkIfDupe() were exiting without resetting the groupbox title and stylesheet, leaving the red "DUPE" label visible even after the user deleted the callsign or the QSO became incomplete. Both guard clauses now restore the normal "Callsign" title and clear the stylesheet before returning. https://claude.ai/code/session_0117DBDtTcYmq9Nv3tujU3p2
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.