mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Apply suggestions from code review
Co-authored-by: Andrey Filipenkov <decapitator@ukr.net>
This commit is contained in:
@ -54,9 +54,7 @@ PlayerParams::PlayerParams(MapController & ctrl, int playerId, QWidget *parent)
|
||||
{
|
||||
if(playerInfo.hasMainTown && playerInfo.posOfMainTown == town->pos)
|
||||
foundMainTown = townIndex;
|
||||
auto name = town->name + ", (random)";
|
||||
if(ctown->faction)
|
||||
name = town->getObjectName();
|
||||
const auto name = ctown->faction ? town->getObjectName() : town->name + ", (random)";
|
||||
ui->mainTown->addItem(tr(name.c_str()), QVariant::fromValue(i));
|
||||
++townIndex;
|
||||
}
|
||||
@ -75,7 +73,7 @@ PlayerParams::PlayerParams(MapController & ctrl, int playerId, QWidget *parent)
|
||||
playerInfo.posOfMainTown = int3(-1, -1, -1);
|
||||
}
|
||||
|
||||
ui->playerColor->setTitle(QString("PlayerID: %1").arg(playerId));
|
||||
ui->playerColor->setTitle(tr("Player ID: %1").arg(playerId));
|
||||
show();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user