login dialog: focus for pw if password save is unchecked, memory leak
fixes
This commit is contained in:
@@ -423,7 +423,11 @@ void gameLobbyDialogImpl::removeGame(unsigned gameId)
|
|||||||
int it = 0;
|
int it = 0;
|
||||||
while (myGameListModel->item(it)) {
|
while (myGameListModel->item(it)) {
|
||||||
if (myGameListModel->item(it, 0)->data(Qt::UserRole) == gameId)
|
if (myGameListModel->item(it, 0)->data(Qt::UserRole) == gameId)
|
||||||
{
|
{
|
||||||
|
delete myGameListModel->item(it, 0);
|
||||||
|
delete myGameListModel->item(it, 1);
|
||||||
|
delete myGameListModel->item(it, 2);
|
||||||
|
delete myGameListModel->item(it, 3);
|
||||||
myGameListModel->removeRow(it);
|
myGameListModel->removeRow(it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ void internetGameLoginDialogImpl::exec() {
|
|||||||
checkBox_rememberPassword->setChecked(true);
|
checkBox_rememberPassword->setChecked(true);
|
||||||
lineEdit_password->setText(QString::fromUtf8(QByteArray::fromBase64(myConfig->readConfigString("InternetLoginPassword").c_str())));
|
lineEdit_password->setText(QString::fromUtf8(QByteArray::fromBase64(myConfig->readConfigString("InternetLoginPassword").c_str())));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
checkBox_rememberPassword->setChecked(false);
|
||||||
|
lineEdit_password->clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
checkBox_guest->setChecked(true);
|
checkBox_guest->setChecked(true);
|
||||||
@@ -44,6 +48,10 @@ void internetGameLoginDialogImpl::exec() {
|
|||||||
|
|
||||||
okButtonCheck();
|
okButtonCheck();
|
||||||
|
|
||||||
|
if(groupBox_reguser->isChecked() && !checkBox_rememberPassword->isChecked() && lineEdit_password->text().isEmpty()) {
|
||||||
|
lineEdit_password->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
QDialog::exec();
|
QDialog::exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user