Fix: Cancelling the password prompt of the PSK database doesn't keep endlessly asking for password.

This commit is contained in:
eelke 2019-01-29 19:52:50 +01:00
parent ecae0464f9
commit 27fde22d54

View file

@ -187,8 +187,12 @@ bool MasterController::UnlockPasswordManagerIfNeeded()
int exec_result = dlg->exec();
bool ok = (exec_result == QDialog::Accepted);
// IF user gave OK
if (ok && m_passwordManager->openDatabase(m_userConfigDatabase, dlg->password()))
if (!ok) {
// leave this retry loop
break;
}
// user gave OK, if succeeds return true otherwise loop a prompt for password again.
if (m_passwordManager->openDatabase(m_userConfigDatabase, dlg->password()))
return true;
}
}