crashbugfix on android
This commit is contained in:
@@ -44,6 +44,8 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
|
|||||||
#endif
|
#endif
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
this->installEventFilter(this);
|
this->installEventFilter(this);
|
||||||
|
spinBox_netDelayBetweenHands->installEventFilter(this);
|
||||||
|
spinBox_netTimeOutPlayerAction->installEventFilter(this);
|
||||||
|
|
||||||
comboBox_gameType->setItemData(0, GAME_TYPE_NORMAL, Qt::UserRole);
|
comboBox_gameType->setItemData(0, GAME_TYPE_NORMAL, Qt::UserRole);
|
||||||
comboBox_gameType->setItemData(1, GAME_TYPE_REGISTERED_ONLY, Qt::UserRole);
|
comboBox_gameType->setItemData(1, GAME_TYPE_REGISTERED_ONLY, Qt::UserRole);
|
||||||
@@ -119,12 +121,11 @@ void createInternetGameDialogImpl::fillFormular(bool guestMode, QString playerNa
|
|||||||
|
|
||||||
void createInternetGameDialogImpl::keyPressEvent ( QKeyEvent * event )
|
void createInternetGameDialogImpl::keyPressEvent ( QKeyEvent * event )
|
||||||
{
|
{
|
||||||
|
#ifndef ANDROID
|
||||||
|
|
||||||
if (event->key() == 16777220) {
|
if (event->key() == 16777220) {
|
||||||
pushButton_createGame->click(); //ENTER
|
pushButton_createGame->click(); //ENTER
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void createInternetGameDialogImpl::clearGamePassword(bool clear)
|
void createInternetGameDialogImpl::clearGamePassword(bool clear)
|
||||||
@@ -253,6 +254,7 @@ bool createInternetGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
|
|
||||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||||
|
|
||||||
if(spinBox_startCash->hasFocus()) {
|
if(spinBox_startCash->hasFocus()) {
|
||||||
spinBox_startCash->clearFocus();
|
spinBox_startCash->clearFocus();
|
||||||
}
|
}
|
||||||
@@ -271,8 +273,10 @@ bool createInternetGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
if(lineEdit_Password->hasFocus()) {
|
if(lineEdit_Password->hasFocus()) {
|
||||||
lineEdit_Password->clearFocus();
|
lineEdit_Password->clearFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||||
this->reject();
|
this->reject();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -122,11 +122,11 @@ void createNetworkGameDialogImpl::showDialog()
|
|||||||
|
|
||||||
void createNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event )
|
void createNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event )
|
||||||
{
|
{
|
||||||
|
#ifndef ANDROID
|
||||||
|
|
||||||
if (event->key() == 16777220) {
|
if (event->key() == 16777220) {
|
||||||
pushButton_createGame->click(); //ENTER
|
pushButton_createGame->click(); //ENTER
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,10 +308,11 @@ void joinNetworkGameDialogImpl::deleteServerProfile()
|
|||||||
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event )
|
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event )
|
||||||
{
|
{
|
||||||
|
|
||||||
// std::cout << "key" << event->key();
|
#ifndef ANDROID
|
||||||
if (event->key() == 16777220) {
|
if (event->key() == 16777220) {
|
||||||
pushButton_connect->click(); //ENTER
|
pushButton_connect->click(); //ENTER
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void joinNetworkGameDialogImpl::checkIp()
|
void joinNetworkGameDialogImpl::checkIp()
|
||||||
|
|||||||
Reference in New Issue
Block a user