Connect signals correctly. (#6124)

Took 58 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL
2025-09-13 03:31:05 +02:00
committed by GitHub
parent fb23cc8c7a
commit 9ca5ee52e7
2 changed files with 2 additions and 1 deletions

View File

@@ -141,6 +141,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor,
void TabGame::connectToGameState()
{
connect(game->getGameState(), &GameState::gameStarted, this, &TabGame::startGame);
connect(game->getGameState(), &GameState::gameStopped, this, &TabGame::stopGame);
connect(game->getGameState(), &GameState::activePhaseChanged, this, &TabGame::setActivePhase);
connect(game->getGameState(), &GameState::activePlayerChanged, this, &TabGame::setActivePlayer);
}

View File

@@ -39,7 +39,7 @@ Player *PlayerManager::addPlayer(int playerId, const ServerInfo_User &info)
{
auto *newPlayer = new Player(info, playerId, isLocalPlayer(playerId) || game->getGameState()->getIsLocalGame(),
isJudge(), getGame());
connect(newPlayer, &Player::concededChanged, this, &PlayerManager::playerConceded);
connect(newPlayer, &Player::concededChanged, this, &PlayerManager::onPlayerConceded);
players.insert(playerId, newPlayer);
emit playerAdded(newPlayer);
emit playerCountChanged();