[TabGame] Fix dangling PlayerMenus in gameMenu (#6215)

* Player manager is responsible for deleting players.

Took 21 minutes

* Clean up dangling QAction* wrappers for PlayerMenus in TabGame::processPlayerLeave(Player* leavingPlayer)

Took 37 seconds

* Lint.

Took 11 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-10-04 01:08:04 +02:00 committed by GitHub
parent 30e6b52783
commit cff16346ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 8 deletions

View file

@ -60,6 +60,7 @@ void PlayerManager::removePlayer(int playerId)
emit playerRemoved(player);
emit playerCountChanged();
players.remove(playerId);
player->deleteLater();
}
Player *PlayerManager::getPlayer(int playerId) const