Cockatrice/cockatrice/src
BruebachL 9f66a098ac
[PictureLoader] Fix worker thread shutdown and cross-thread cache clearing (#7292)
* [PictureLoader] Fix worker thread shutdown and cross-thread cache clearing

clearNetworkCache() ran directly on the UI thread while the worker thread
owned the disk cache and redirect cache, racing cache reads/writes. Make it
a worker-thread slot invoked via a blocking queued call when the thread is
running, so the 'Cached card pictures have been reset.' message is truthful.

The worker thread was also never quit()/wait()ed: both destructors only
deleteLater'd their objects, so Qt warned 'QThread: Destroyed while thread
is still running' and leaked a running loop at exit. Wire the worker's
finished() signal to its own deleteLater() (canonical worker-object
pattern), add shutdownThread() to stop the loop, and let CardPictureLoader
destroy the QThread only after wait() has returned.

* [PictureLoader] Guard cache teardown and stop blocking the UI thread

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-09-21 18:30:03 +02:00
..
client Use capitalized app names (#7255) 2026-09-12 17:30:46 +02:00
database/interface [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
filters [Card] Add a setting for the language used in card search (#7314) 2026-09-21 08:50:48 +02:00
game [Game] Preserve hand card order when restoring connection (#7266) 2026-09-07 08:21:44 +02:00
game_graphics [Card] Add a setting for the language used in card search (#7314) 2026-09-21 08:50:48 +02:00
interface [PictureLoader] Fix worker thread shutdown and cross-thread cache clearing (#7292) 2026-09-21 18:30:03 +02:00
main.cpp [DeckShare] Open shared decks via links with a gated preview flow (#7244) 2026-09-20 20:22:17 +02:00
main.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
single_instance_manager.cpp [DeckShare] Open shared decks via links with a gated preview flow (#7244) 2026-09-20 20:22:17 +02:00
single_instance_manager.h [DeckShare] Open shared decks via links with a gated preview flow (#7244) 2026-09-20 20:22:17 +02:00