Cockatrice/cockatrice/src/game_graphics
DawnFire42 17f583013b
[CardMenu] Free the card menus and submenus rebuilt on each right-click (#7093)
* Parent card menu submenus to the menu that owns them

QMenu::addMenu(QMenu *) does not take ownership of the submenu, and these
submenus were created without a parent. Since CardMenu is rebuilt from
scratch on every right-click, each rebuild leaked the MoveMenu, PtMenu,
card counters and related-cards submenus.

Pass the owning CardMenu as the QWidget parent so Qt's parent-child
mechanism frees them with it.

* Delete the replaced card menu in TabGame to fix menu rebuild leak

PlayerMenu creates a new CardMenu on every right-click and TabGame installs
it with QAction::setMenu(), which does not take ownership, so the previous
menu was never freed. TabGame now deletes the menu it replaces and reuses a
single empty placeholder menu instead of allocating one per update. The
installed menu is also released when the tab is destroyed.
2026-11-06 20:51:00 +01:00
..
board [Fonts] Migrate CardText surfaces to theme font role (#7538) 2026-11-04 07:57:54 +01:00
deckview [Fonts] Restore DeckList Serif default and live-update all role readers (#7541) 2026-11-04 07:57:55 +01:00
dialogs [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
log [Game] Follow the palette in judge message tags (#7597) 2026-11-04 18:39:42 +01:00
player [CardMenu] Free the card menus and submenus rebuilt on each right-click (#7093) 2026-11-06 20:51:00 +01:00
tally [Refactor] Move card selection actions to GameScene and p/t parsing to CardState (#7426) 2026-10-31 18:44:12 +01:00
zones [Icons] Migrate UI glyphs to palette-token SVGs (#7595) 2026-11-04 18:39:41 +01:00
animated_item.h [Game] Generic Animation Interface (#7098) 2026-08-12 20:36:33 +02:00
card_dimensions.h [Game] Move graphics out of game and into game_graphics (#6928) 2026-06-09 09:51:13 +02:00
game_scene.cpp [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
game_scene.h [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
game_view.cpp [Fonts] Migrate DeckList and InterfaceDefault surfaces to theme roles (#7539) 2026-11-04 07:57:54 +01:00
game_view.h [Fonts] Migrate DeckList and InterfaceDefault surfaces to theme roles (#7539) 2026-11-04 07:57:54 +01:00
hand_counter.cpp [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
hand_counter.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
phases_toolbar.cpp [Refactor] Emit phase toolbar intent instead of protobuf commands (#7419) 2026-10-31 18:44:10 +01:00
phases_toolbar.h [Refactor] Emit phase toolbar intent instead of protobuf commands (#7419) 2026-10-31 18:44:10 +01:00
pq_cockatrice_event_player.cpp [Tests] Play card interactions through a Cockatrice event player (#7697) 2026-11-04 06:23:45 +01:00
pq_cockatrice_event_player.h [Tests] Play card interactions through a Cockatrice event player (#7697) 2026-11-04 06:23:45 +01:00
z_value_layer_manager.h [Game] Move graphics out of game and into game_graphics (#6928) 2026-06-09 09:51:13 +02:00
z_values.h [Game] Move graphics out of game and into game_graphics (#6928) 2026-06-09 09:51:13 +02:00