Kicking players at the beginning of a network game now works.
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user