void Client::removePlayer(const QString &player_name){ ClientPlayer *player = findChild<ClientPlayer*>(player_name); if(player){ player->setParent(NULL); alive_count--; emit player_removed(player_name); } }
void Client::removePlayer(const QJsonValue &player_name){ QString name = player_name.toString(); ClientPlayer *player = findChild<ClientPlayer*>(name); if(player){ player->setParent(NULL); alive_count--; emit player_removed(name); } }