mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
* 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. |
||
|---|---|---|
| .. | ||
| board | ||
| deckview | ||
| dialogs | ||
| log | ||
| player | ||
| tally | ||
| zones | ||
| animated_item.h | ||
| card_dimensions.h | ||
| game_scene.cpp | ||
| game_scene.h | ||
| game_view.cpp | ||
| game_view.h | ||
| hand_counter.cpp | ||
| hand_counter.h | ||
| phases_toolbar.cpp | ||
| phases_toolbar.h | ||
| pq_cockatrice_event_player.cpp | ||
| pq_cockatrice_event_player.h | ||
| z_value_layer_manager.h | ||
| z_values.h | ||