Work on error messages.
This commit is contained in:
@@ -2567,9 +2567,23 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
|
||||
myChangeHumanPlayerNameDialog->exec(); }
|
||||
break;
|
||||
case ERR_NET_INVALID_PLAYER_NAME:
|
||||
{ myChangeHumanPlayerNameDialog->label_Message->setText(tr("The player name is either too short or too long. Please choose another one."));
|
||||
{ myChangeHumanPlayerNameDialog->label_Message->setText(tr("The player name is too short, too long or reserved. Please choose another one."));
|
||||
myChangeHumanPlayerNameDialog->exec(); }
|
||||
break;
|
||||
case ERR_NET_INVALID_GAME_NAME:
|
||||
{ myChangeHumanPlayerNameDialog->label_Message->setText(tr("The game name is either too short or too long. Please choose another one."));
|
||||
myChangeHumanPlayerNameDialog->exec(); }
|
||||
break;
|
||||
case ERR_NET_UNKNOWN_GAME:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("The game could not be found."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_INVALID_CHAT_TEXT:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("The chat text is invalid."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_UNKNOWN_PLAYER_ID:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("The server referred to an unknown player. Aborting."),
|
||||
@@ -2590,6 +2604,7 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
|
||||
QMessageBox::Close); }
|
||||
}
|
||||
// close dialogs
|
||||
myGameLobbyDialog->reject();
|
||||
myConnectToServerDialog->reject();
|
||||
myStartNetworkGameDialog->reject();
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#define ERR_NET_INVALID_ROUND 114
|
||||
#define ERR_NET_PLAYER_KICKED 115
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 116
|
||||
#define ERR_NET_PLAYER_NOT_IN_GAME 117
|
||||
|
||||
// This is an internal message which is not reported.
|
||||
#define MSG_SOCK_INTERNAL_PENDING 0
|
||||
|
||||
Reference in New Issue
Block a user