show >500 ms in connect dialog if ping is too long

This commit is contained in:
Volker Fischer 2011-07-04 15:27:02 +00:00
parent e1556bc44e
commit 000bf50be8

View File

@ -391,9 +391,17 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress& InetAddr,
break;
}
// update ping text
lvwServers->topLevelItem ( iIdx )->
setText ( 1, QString().setNum ( iPingTime ) + " ms" );
// update ping text, take special care if ping time exceeds a
// certain value
if ( iPingTime > 500 )
{
lvwServers->topLevelItem ( iIdx )->setText ( 1, ">500 ms" );
}
else
{
lvwServers->topLevelItem ( iIdx )->
setText ( 1, QString().setNum ( iPingTime ) + " ms" );
}
// update number of clients text
lvwServers->topLevelItem ( iIdx )->