Connect player->openDeckEditor signal directly in the player constructor

Took 6 minutes
This commit is contained in:
Lukas Brübach 2025-09-09 12:33:48 +02:00
parent c344b40a71
commit 2de650f4ba
2 changed files with 2 additions and 2 deletions

View file

@ -43,6 +43,8 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
connect(this, &Player::deckChanged, playerMenu, &PlayerMenu::enableOpenInDeckEditorAction);
connect(this, &Player::deckChanged, playerMenu, &PlayerMenu::populatePredefinedTokensMenu);
connect(this, &Player::openDeckEditor, game, &TabGame::openDeckEditor);
}
void Player::initializeZones()

View file

@ -62,8 +62,6 @@ public:
Player *addPlayer(int playerId, const ServerInfo_User &info, TabGame *game)
{
auto *newPlayer = new Player(info, playerId, isLocalPlayer(playerId), isJudge(), game);
// TODO
// connect(newPlayer, &Player::openDeckEditor, game, &TabGame::openDeckEditor);
players.insert(playerId, newPlayer);
emit playerAdded(newPlayer);
emit playerCountChanged();