mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Show inline message when unable to load the Key File.
This commit is contained in:
committed by
Janek Bevendorff
parent
3c4af1a194
commit
8fa070f01c
@@ -121,10 +121,10 @@ void ChangeMasterKeyWidget::generateKey()
|
|||||||
if (m_ui->keyFileGroup->isChecked()) {
|
if (m_ui->keyFileGroup->isChecked()) {
|
||||||
FileKey fileKey;
|
FileKey fileKey;
|
||||||
QString errorMsg;
|
QString errorMsg;
|
||||||
if (!fileKey.load(m_ui->keyFileCombo->currentText(), &errorMsg)) {
|
QString fileKeyName = m_ui->keyFileCombo->currentText();
|
||||||
MessageBox::critical(this, tr("Failed to set key file"),
|
if (!fileKey.load(fileKeyName, &errorMsg)) {
|
||||||
tr("Failed to set %1 as the Key file:\n%2")
|
m_ui->messageWidget->showMessageError(
|
||||||
.arg(m_ui->keyFileCombo->currentText(), errorMsg));
|
tr("Failed to set %1 as the Key file:\n%2: ").arg(fileKeyName, errorMsg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_key.addKey(fileKey);
|
m_key.addKey(fileKey);
|
||||||
|
|||||||
Reference in New Issue
Block a user