mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
* [GameScene] Sever connections properly. Took 2 minutes Took 54 minutes * [GameScene] Sever animated item destroy connections at teardown Fix crash when a replay's board is closed (GameScene teardown abort). The old QObject::disconnect(nullptr, nullptr, this, nullptr) is invalid per Qt docs (the sender must never be nullptr), so it never severed the PMF destroyed -> GameScene::removeAnimatedItem connections that fire when QGraphicsScene::~QGraphicsScene -> clear() destroys the remaining items. Store the QMetaObject::Connection handle for each animated item and disconnect them all in ~GameScene via the connection-handle overload. Dedup connections on the connection map rather than animatedItems, since the animation timer clears animatedItems on completion, which let a re-registered item (e.g. a life counter flashed repeatedly) accumulate orphaned duplicate destroyed connections that survived teardown. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> |
||
|---|---|---|
| .. | ||
| resources | ||
| sounds | ||
| src | ||
| themes | ||
| translations | ||
| .qdevelop | ||
| CMakeLists.txt | ||
| cockatrice-cod.xml | ||
| cockatrice.desktop | ||
| cockatrice.qrc | ||
| cockatrice.rc | ||
| cockatrice_en@source.ts | ||