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
+2
View File
@@ -1,5 +1,7 @@
SVN changes: SVN changes:
- bugfix: reload playernames after settingsdialog also with utf8
- bugfix: reload playernames for opponent5 and opponent6 after settingsdialog
- bugfix: wrong font-color for mac-qt - bugfix: wrong font-color for mac-qt
- bugfix: raise after x hands - bugfix: raise after x hands
- add version number to title bar and about-dialog - add version number to title bar and about-dialog
+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 //Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen
if (v->getPlayerNickIsChanged() && actualGame) { if (v->getPlayerNickIsChanged() && actualGame) {
actualHand->getPlayerArray()[0]->setMyName(v->lineEdit_humanPlayerName->text().toStdString()); actualHand->getPlayerArray()[0]->setMyName(v->lineEdit_humanPlayerName->text().toUtf8().constData());
actualHand->getPlayerArray()[1]->setMyName(v->lineEdit_Opponent1Name->text().toStdString()); actualHand->getPlayerArray()[1]->setMyName(v->lineEdit_Opponent1Name->text().toUtf8().constData());
actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toStdString()); actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toUtf8().constData());
actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toStdString()); actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toUtf8().constData());
actualHand->getPlayerArray()[4]->setMyName(v->lineEdit_Opponent4Name->text().toStdString()); actualHand->getPlayerArray()[4]->setMyName(v->lineEdit_Opponent4Name->text().toUtf8().constData());
actualHand->getPlayerArray()[5]->setMyName(v->lineEdit_Opponent5Name->text().toStdString()); actualHand->getPlayerArray()[5]->setMyName(v->lineEdit_Opponent5Name->text().toUtf8().constData());
actualHand->getPlayerArray()[6]->setMyName(v->lineEdit_Opponent6Name->text().toStdString()); actualHand->getPlayerArray()[6]->setMyName(v->lineEdit_Opponent6Name->text().toUtf8().constData());
v->setPlayerNickIsChanged(FALSE); v->setPlayerNickIsChanged(FALSE);
refreshPlayerName(); refreshPlayerName();
@@ -734,13 +734,13 @@ void mainWindowImpl::callSettingsDialog() {
if(actualGame) { if(actualGame) {
actualHand->getPlayerArray()[0]->setMyAvatar(v->lineEdit_humanPlayerAvatar->text().toStdString()); actualHand->getPlayerArray()[0]->setMyAvatar(v->lineEdit_humanPlayerAvatar->text().toUtf8().constData());
actualHand->getPlayerArray()[1]->setMyAvatar(v->lineEdit_Opponent1Avatar->text().toStdString()); actualHand->getPlayerArray()[1]->setMyAvatar(v->lineEdit_Opponent1Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[2]->setMyAvatar(v->lineEdit_Opponent2Avatar->text().toStdString()); actualHand->getPlayerArray()[2]->setMyAvatar(v->lineEdit_Opponent2Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[3]->setMyAvatar(v->lineEdit_Opponent3Avatar->text().toStdString()); actualHand->getPlayerArray()[3]->setMyAvatar(v->lineEdit_Opponent3Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[4]->setMyAvatar(v->lineEdit_Opponent4Avatar->text().toStdString()); actualHand->getPlayerArray()[4]->setMyAvatar(v->lineEdit_Opponent4Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[5]->setMyAvatar(v->lineEdit_Opponent5Avatar->text().toStdString()); actualHand->getPlayerArray()[5]->setMyAvatar(v->lineEdit_Opponent5Avatar->text().toUtf8().constData());
actualHand->getPlayerArray()[6]->setMyAvatar(v->lineEdit_Opponent6Avatar->text().toStdString()); actualHand->getPlayerArray()[6]->setMyAvatar(v->lineEdit_Opponent6Avatar->text().toUtf8().constData());
//avatar refresh //avatar refresh
refreshPlayerAvatar(); refreshPlayerAvatar();
@@ -2191,56 +2191,56 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
tr("Connection was closed by server."), tr("Connection was closed by server."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_SOCK_CONN_EXISTS: case ERR_SOCK_CONN_EXISTS:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("Internal network error: Duplicate TCP connection."), tr("Internal network error: Duplicate TCP connection."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_SOCK_INVALID_PACKET: case ERR_SOCK_INVALID_PACKET:
{ QMessageBox::warning(this, tr("Network Error"), { 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."), tr("An invalid network packet was received.\nPlease make sure that all players use the same version of PokerTH."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_SOCK_INVALID_STATE: case ERR_SOCK_INVALID_STATE:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("Internal state error.\nPlease make sure that all players use the same version of PokerTH."), tr("Internal state error.\nPlease make sure that all players use the same version of PokerTH."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_VERSION_NOT_SUPPORTED: case ERR_NET_VERSION_NOT_SUPPORTED:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("The PokerTH server does not support this version of the game.\nPlease update PokerTH."), tr("The PokerTH server does not support this version of the game.\nPlease update PokerTH."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_SERVER_FULL: case ERR_NET_SERVER_FULL:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("Sorry, this server is already full."), tr("Sorry, this server is already full."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_GAME_ALREADY_RUNNING: case ERR_NET_GAME_ALREADY_RUNNING:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("Unable to join - the server has already started the game."), tr("Unable to join - the server has already started the game."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_INVALID_PASSWORD: case ERR_NET_INVALID_PASSWORD:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("Invalid password when joining the game.\nPlease reenter the password and try again."), tr("Invalid password when joining the game.\nPlease reenter the password and try again."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_INVALID_PASSWORD_STR: case ERR_NET_INVALID_PASSWORD_STR:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("The password is too long. Please choose another one."), tr("The password is too long. Please choose another one."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_PLAYER_NAME_IN_USE: case ERR_NET_PLAYER_NAME_IN_USE:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("Your player name is already used by another player.\nPlease choose a different name."), tr("Your player name is already used by another player.\nPlease choose a different name."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_INVALID_PLAYER_NAME: case ERR_NET_INVALID_PLAYER_NAME:
{ QMessageBox::warning(this, tr("Network Error"), { QMessageBox::warning(this, tr("Network Error"),
tr("The player name is either too short or too long. Please choose another one."), tr("The player name is either too short or too long. Please choose another one."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;
default: { QMessageBox::warning(this, tr("Network Error"), default: { QMessageBox::warning(this, tr("Network Error"),
tr("An internal error occured."), tr("An internal error occured."),
QMessageBox::Close); } QMessageBox::Close); }
@@ -100,6 +100,8 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
connect( lineEdit_Opponent2Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) ); connect( lineEdit_Opponent2Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent3Name, 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_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_openFlipsidePicture, SIGNAL( clicked() ), this, SLOT( setFlipsidePicFileName()) );
connect( pushButton_openLogDir, SIGNAL( clicked() ), this, SLOT( setLogDir()) ); connect( pushButton_openLogDir, SIGNAL( clicked() ), this, SLOT( setLogDir()) );
connect( pushButton_openAvatarFile0, SIGNAL( clicked() ), this, SLOT( setAvatarFile0()) ); connect( pushButton_openAvatarFile0, SIGNAL( clicked() ), this, SLOT( setAvatarFile0()) );