mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
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. |
||
|---|---|---|
| .. | ||
| resources | ||
| sounds | ||
| src | ||
| themes | ||
| translations | ||
| .qdevelop | ||
| CMakeLists.txt | ||
| cockatrice-cod.xml | ||
| cockatrice.desktop | ||
| cockatrice.qrc | ||
| cockatrice.rc | ||
| cockatrice_en@source.ts | ||