Fix SQL fall down bug

This commit is contained in:
kradchen
2023-11-15 16:15:58 +08:00
parent ebf719240f
commit 940f986756
5 changed files with 15 additions and 15 deletions

View File

@@ -162,16 +162,10 @@ void LoginDialog::clearInputData()
void LoginDialog::doLogin()
{
if (!(AppGlobalValues::DBconnected().toBool())){
bool sqlConnected= SQLHelper::Open();
if (sqlConnected)
{
AppGlobalValues::setDBconnected(true);
}
else{
mErrorMessage->setText(QString(tr("Can't connect db. Please reboot the device and retry, or call for the service help.")).arg(LOGIN_LOCK_MINUTIES));
mErrorMessage->setVisible(true);
return;
}
mErrorMessage->setText(QString(tr("Can't connect db. Please reboot the device and retry, or call for the service help.")).arg(LOGIN_LOCK_MINUTIES));
mErrorMessage->setVisible(true);
return;
}
if(mLoginFailedCount >= LOGIN_LOCK_COUNT)
{