Kicking players at the beginning of a network game now works.

This commit is contained in:
lotodore
2007-06-07 21:19:06 +00:00
parent f886ebda86
commit fb274284f5
14 changed files with 122 additions and 45 deletions
@@ -21,12 +21,10 @@
#include "session.h"
#include "configfile.h"
startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent, ConfigFile *config, Session *session)
: QDialog(parent), myConfig(config), mySession(session)
startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent, ConfigFile *config)
: QDialog(parent), myConfig(config)
{
assert(mySession);
setupUi(this);
setupUi(this);
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
connect( pushButton_startGame, SIGNAL( clicked() ), this, SLOT( startGame() ) );
@@ -81,7 +79,8 @@ void startNetworkGameDialogImpl::kickPlayer() {
QMessageBox::Close); }
}
else {
// kickplayerFunktion(playerName.toStdString());
assert(mySession);
mySession->kickPlayer(playerName.toUtf8().constData());
}
}
pushButton_Kick->setEnabled(FALSE);
@@ -94,6 +93,11 @@ void startNetworkGameDialogImpl::checkPlayerQuantity() {
}
void startNetworkGameDialogImpl::setSession(Session *session)
{
mySession = session;
}
void startNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {