Disable database unlock form while decrypting

This commit is contained in:
Balazs Gyurak 2019-11-18 08:17:26 -05:00 committed by Jonathan White
parent dc6c9186c9
commit 6c65b486e4
2 changed files with 6 additions and 1 deletions

View File

@ -204,9 +204,14 @@ void DatabaseOpenWidget::openDatabase()
m_db.reset(new Database());
QString error;
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
m_ui->passwordFormFrame->setEnabled(false);
QCoreApplication::processEvents();
bool ok = m_db->open(m_filename, masterKey, &error, false);
QApplication::restoreOverrideCursor();
m_ui->passwordFormFrame->setEnabled(true);
if (!ok) {
if (m_ui->editPassword->text().isEmpty() && !m_retryUnlockWithEmptyPassword) {
QScopedPointer<QMessageBox> msgBox(new QMessageBox(this));

View File

@ -132,7 +132,7 @@
<number>15</number>
</property>
<item>
<widget class="QFrame" name="verticalFrame">
<widget class="QFrame" name="passwordFormFrame">
<property name="minimumSize">
<size>
<width>400</width>