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;
|
||||
while (myGameListModel->item(it)) {
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ void internetGameLoginDialogImpl::exec() {
|
||||
checkBox_rememberPassword->setChecked(true);
|
||||
lineEdit_password->setText(QString::fromUtf8(QByteArray::fromBase64(myConfig->readConfigString("InternetLoginPassword").c_str())));
|
||||
}
|
||||
else {
|
||||
checkBox_rememberPassword->setChecked(false);
|
||||
lineEdit_password->clear();
|
||||
}
|
||||
}
|
||||
else {
|
||||
checkBox_guest->setChecked(true);
|
||||
@@ -44,6 +48,10 @@ void internetGameLoginDialogImpl::exec() {
|
||||
|
||||
okButtonCheck();
|
||||
|
||||
if(groupBox_reguser->isChecked() && !checkBox_rememberPassword->isChecked() && lineEdit_password->text().isEmpty()) {
|
||||
lineEdit_password->setFocus();
|
||||
}
|
||||
|
||||
QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user