mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-21 07:20:28 -05:00
Catch and handle all errors from libgcrypt.
This commit is contained in:
parent
a7f4e2d0cd
commit
a762cef0a9
29 changed files with 622 additions and 194 deletions
|
|
@ -599,8 +599,13 @@ void DatabaseWidget::updateMasterKey(bool accepted)
|
|||
{
|
||||
if (accepted) {
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
m_db->setKey(m_changeMasterKeyWidget->newMasterKey());
|
||||
bool result = m_db->setKey(m_changeMasterKeyWidget->newMasterKey());
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
if (!result) {
|
||||
MessageBox::critical(this, tr("Error"), tr("Unable to calculate master key"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (!m_db->hasKey()) {
|
||||
Q_EMIT closeRequest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue