From 6c65b486e4d6ecdd1f4ab819bf01f4ca696b293a Mon Sep 17 00:00:00 2001 From: Balazs Gyurak Date: Mon, 18 Nov 2019 08:17:26 -0500 Subject: [PATCH] Disable database unlock form while decrypting --- src/gui/DatabaseOpenWidget.cpp | 5 +++++ src/gui/DatabaseOpenWidget.ui | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index a409aadc3..7190fb389 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -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 msgBox(new QMessageBox(this)); diff --git a/src/gui/DatabaseOpenWidget.ui b/src/gui/DatabaseOpenWidget.ui index 14a1337c6..60b2feadc 100644 --- a/src/gui/DatabaseOpenWidget.ui +++ b/src/gui/DatabaseOpenWidget.ui @@ -132,7 +132,7 @@ 15 - + 400