Refactor files in common to new Qt Slot/Signal syntax (#5872)

This commit is contained in:
RickyRister
2025-04-21 13:30:40 -07:00
committed by GitHub
parent ffe02e59c7
commit bcaa6c6b8a
4 changed files with 11 additions and 10 deletions

View File

@@ -31,8 +31,9 @@ Server_Room::Server_Room(int _id,
permissionLevel(_permissionLevel), privilegeLevel(_privilegeLevel), autoJoin(_autoJoin),
joinMessage(_joinMessage), gameTypes(_gameTypes), gamesLock(QReadWriteLock::Recursive)
{
connect(this, SIGNAL(gameListChanged(ServerInfo_Game)), this, SLOT(broadcastGameListUpdate(ServerInfo_Game)),
Qt::QueuedConnection);
connect(
this, &Server_Room::gameListChanged, this, [this](auto gameInfo) { broadcastGameListUpdate(gameInfo); },
Qt::QueuedConnection);
}
Server_Room::~Server_Room()
@@ -352,7 +353,7 @@ void Server_Room::addGame(Server_Game *game)
roomInfo.set_room_id(id);
gamesLock.lockForWrite();
connect(game, SIGNAL(gameInfoChanged(ServerInfo_Game)), this, SLOT(broadcastGameListUpdate(ServerInfo_Game)));
connect(game, &Server_Game::gameInfoChanged, this, [this](auto gameInfo) { broadcastGameListUpdate(gameInfo); });
game->gameMutex.lock();
games.insert(game->getGameId(), game);