Added new networking-related error messages.
This commit is contained in:
@@ -3350,10 +3350,9 @@ void mainWindowImpl::paintStartSplash() {
|
||||
}
|
||||
|
||||
|
||||
void mainWindowImpl::networkError(int errorID, int osErrorID) {
|
||||
void mainWindowImpl::networkError(int errorID, int /*osErrorID*/) {
|
||||
|
||||
switch (errorID) {
|
||||
|
||||
case ERR_SOCK_SERVERADDR_NOT_SET:
|
||||
{QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("Server address was not set."),
|
||||
@@ -3469,8 +3468,9 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
|
||||
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(); }
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("The game name is either too short or too long. Please choose another one."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_UNKNOWN_GAME:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
@@ -3487,6 +3487,16 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
|
||||
tr("The server referred to an unknown player. Aborting."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_NO_CURRENT_PLAYER:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("Internal error: The current player could not be found."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_PLAYER_NOT_ACTIVE:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("Internal error: The current player is not active."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_PLAYER_KICKED:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("You were kicked from the server."),
|
||||
@@ -3497,6 +3507,32 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
|
||||
tr("The client player count is invalid."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_TOO_MANY_MANUAL_BLINDS:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("Too many manual blinds were set. Please reconfigure the manual blinds."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_INVALID_AVATAR_FILE:
|
||||
case ERR_NET_WRONG_AVATAR_SIZE:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("An invalid avatar file was configured. Please choose a different avatar."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_AVATAR_TOO_LARGE:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("The selected avatar file is too large. Please choose a different avatar."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_INVALID_REQUEST_ID:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("The server requested a non-existing avatar."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case ERR_NET_START_TIMEOUT:
|
||||
{ QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("Could not start game: Synchronization failed."),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
default: { QMessageBox::warning(this, tr("Network Error"),
|
||||
tr("An internal error occured."),
|
||||
QMessageBox::Close); }
|
||||
@@ -3711,7 +3747,7 @@ void mainWindowImpl::mouseOverFlipCards(bool front) {
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindowImpl::closeEvent(QCloseEvent *event) { quitPokerTH(); }
|
||||
void mainWindowImpl::closeEvent(QCloseEvent */*event*/) { quitPokerTH(); }
|
||||
|
||||
void mainWindowImpl::quitPokerTH() {
|
||||
|
||||
|
||||
+9
-10
@@ -56,16 +56,15 @@
|
||||
#define ERR_NET_UNKNOWN_PLAYER_ID 112
|
||||
#define ERR_NET_NO_CURRENT_PLAYER 113
|
||||
#define ERR_NET_PLAYER_NOT_ACTIVE 114
|
||||
#define ERR_NET_INVALID_ROUND 115
|
||||
#define ERR_NET_PLAYER_KICKED 116
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 117
|
||||
#define ERR_NET_TOO_MANY_MANUAL_BLINDS 118
|
||||
#define ERR_NET_INVALID_AVATAR_FILE 119
|
||||
#define ERR_NET_AVATAR_TOO_LARGE 120
|
||||
#define ERR_NET_BUF_INVALID_SIZE 121
|
||||
#define ERR_NET_INVALID_REQUEST_ID 122
|
||||
#define ERR_NET_WRONG_AVATAR_SIZE 123
|
||||
#define ERR_NET_START_TIMEOUT 124
|
||||
#define ERR_NET_PLAYER_KICKED 117
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 118
|
||||
#define ERR_NET_TOO_MANY_MANUAL_BLINDS 119
|
||||
#define ERR_NET_INVALID_AVATAR_FILE 120
|
||||
#define ERR_NET_AVATAR_TOO_LARGE 121
|
||||
#define ERR_NET_BUF_INVALID_SIZE 122
|
||||
#define ERR_NET_INVALID_REQUEST_ID 123
|
||||
#define ERR_NET_WRONG_AVATAR_SIZE 124
|
||||
#define ERR_NET_START_TIMEOUT 125
|
||||
|
||||
#define ERR_IRC_INTERNAL 151
|
||||
#define ERR_IRC_CONNECT_FAILED 152
|
||||
|
||||
Reference in New Issue
Block a user