some bugfixes --> see changelog

This commit is contained in:
doitux
2007-04-29 18:48:20 +00:00
parent c02251981b
commit 44fb72fd8e
3 changed files with 32 additions and 28 deletions
+28 -28
View File
@@ -720,13 +720,13 @@ void mainWindowImpl::callSettingsDialog() {
//Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen
if (v->getPlayerNickIsChanged() && actualGame) {
actualHand->getPlayerArray()[0]->setMyName(v->lineEdit_humanPlayerName->text().toStdString());
actualHand->getPlayerArray()[1]->setMyName(v->lineEdit_Opponent1Name->text().toStdString());
actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toStdString());
actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toStdString());
actualHand->getPlayerArray()[4]->setMyName(v->lineEdit_Opponent4Name->text().toStdString());
actualHand->getPlayerArray()[5]->setMyName(v->lineEdit_Opponent5Name->text().toStdString());
actualHand->getPlayerArray()[6]->setMyName(v->lineEdit_Opponent6Name->text().toStdString());
actualHand->getPlayerArray()[0]->setMyName(v->lineEdit_humanPlayerName->text().toUtf8().constData());
actualHand->getPlayerArray()[1]->setMyName(v->lineEdit_Opponent1Name->text().toUtf8().constData());
actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toUtf8().constData());
actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toUtf8().constData());
actualHand->getPlayerArray()[4]->setMyName(v->lineEdit_Opponent4Name->text().toUtf8().constData());
actualHand->getPlayerArray()[5]->setMyName(v->lineEdit_Opponent5Name->text().toUtf8().constData());
actualHand->getPlayerArray()[6]->setMyName(v->lineEdit_Opponent6Name->text().toUtf8().constData());
v->setPlayerNickIsChanged(FALSE);
refreshPlayerName();
@@ -734,13 +734,13 @@ void mainWindowImpl::callSettingsDialog() {
if(actualGame) {
actualHand->getPlayerArray()[0]->setMyAvatar(v->lineEdit_humanPlayerAvatar->text().toStdString());
actualHand->getPlayerArray()[1]->setMyAvatar(v->lineEdit_Opponent1Avatar->text().toStdString());
actualHand->getPlayerArray()[2]->setMyAvatar(v->lineEdit_Opponent2Avatar->text().toStdString());
actualHand->getPlayerArray()[3]->setMyAvatar(v->lineEdit_Opponent3Avatar->text().toStdString());
actualHand->getPlayerArray()[4]->setMyAvatar(v->lineEdit_Opponent4Avatar->text().toStdString());
actualHand->getPlayerArray()[5]->setMyAvatar(v->lineEdit_Opponent5Avatar->text().toStdString());
actualHand->getPlayerArray()[6]->setMyAvatar(v->lineEdit_Opponent6Avatar->text().toStdString());
actualHand->getPlayerArray()[0]->setMyAvatar(v->lineEdit_humanPlayerAvatar->text().toUtf8().constData());
actualHand->getPlayerArray()[1]->setMyAvatar(v->lineEdit_Opponent1Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[2]->setMyAvatar(v->lineEdit_Opponent2Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[3]->setMyAvatar(v->lineEdit_Opponent3Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[4]->setMyAvatar(v->lineEdit_Opponent4Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[5]->setMyAvatar(v->lineEdit_Opponent5Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[6]->setMyAvatar(v->lineEdit_Opponent6Avatar->text().toUtf8().constData());
//avatar refresh
refreshPlayerAvatar();
@@ -2191,56 +2191,56 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
tr("Connection was closed by server."),
QMessageBox::Close); }
break;
case ERR_SOCK_CONN_EXISTS:
case ERR_SOCK_CONN_EXISTS:
{ QMessageBox::warning(this, tr("Network Error"),
tr("Internal network error: Duplicate TCP connection."),
QMessageBox::Close); }
break;
case ERR_SOCK_INVALID_PACKET:
case ERR_SOCK_INVALID_PACKET:
{ QMessageBox::warning(this, tr("Network Error"),
tr("An invalid network packet was received.\nPlease make sure that all players use the same version of PokerTH."),
QMessageBox::Close); }
break;
case ERR_SOCK_INVALID_STATE:
case ERR_SOCK_INVALID_STATE:
{ QMessageBox::warning(this, tr("Network Error"),
tr("Internal state error.\nPlease make sure that all players use the same version of PokerTH."),
QMessageBox::Close); }
break;
case ERR_NET_VERSION_NOT_SUPPORTED:
case ERR_NET_VERSION_NOT_SUPPORTED:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The PokerTH server does not support this version of the game.\nPlease update PokerTH."),
QMessageBox::Close); }
break;
case ERR_NET_SERVER_FULL:
case ERR_NET_SERVER_FULL:
{ QMessageBox::warning(this, tr("Network Error"),
tr("Sorry, this server is already full."),
QMessageBox::Close); }
break;
case ERR_NET_GAME_ALREADY_RUNNING:
case ERR_NET_GAME_ALREADY_RUNNING:
{ QMessageBox::warning(this, tr("Network Error"),
tr("Unable to join - the server has already started the game."),
QMessageBox::Close); }
break;
case ERR_NET_INVALID_PASSWORD:
case ERR_NET_INVALID_PASSWORD:
{ QMessageBox::warning(this, tr("Network Error"),
tr("Invalid password when joining the game.\nPlease reenter the password and try again."),
QMessageBox::Close); }
break;
case ERR_NET_INVALID_PASSWORD_STR:
break;
case ERR_NET_INVALID_PASSWORD_STR:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The password is too long. Please choose another one."),
QMessageBox::Close); }
break;
case ERR_NET_PLAYER_NAME_IN_USE:
break;
case ERR_NET_PLAYER_NAME_IN_USE:
{ QMessageBox::warning(this, tr("Network Error"),
tr("Your player name is already used by another player.\nPlease choose a different name."),
QMessageBox::Close); }
break;
case ERR_NET_INVALID_PLAYER_NAME:
break;
case ERR_NET_INVALID_PLAYER_NAME:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The player name is either too short or too long. Please choose another one."),
QMessageBox::Close); }
break;
break;
default: { QMessageBox::warning(this, tr("Network Error"),
tr("An internal error occured."),
QMessageBox::Close); }
@@ -100,6 +100,8 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
connect( lineEdit_Opponent2Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent3Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent4Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent5Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent6Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( pushButton_openFlipsidePicture, SIGNAL( clicked() ), this, SLOT( setFlipsidePicFileName()) );
connect( pushButton_openLogDir, SIGNAL( clicked() ), this, SLOT( setLogDir()) );
connect( pushButton_openAvatarFile0, SIGNAL( clicked() ), this, SLOT( setAvatarFile0()) );