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()); m_db.reset(new Database());
QString error; QString error;
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
m_ui->passwordFormFrame->setEnabled(false);
QCoreApplication::processEvents();
bool ok = m_db->open(m_filename, masterKey, &error, false); bool ok = m_db->open(m_filename, masterKey, &error, false);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
m_ui->passwordFormFrame->setEnabled(true);
if (!ok) { if (!ok) {
if (m_ui->editPassword->text().isEmpty() && !m_retryUnlockWithEmptyPassword) { if (m_ui->editPassword->text().isEmpty() && !m_retryUnlockWithEmptyPassword) {
QScopedPointer<QMessageBox> msgBox(new QMessageBox(this)); QScopedPointer<QMessageBox> msgBox(new QMessageBox(this));

View File

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