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