From 8fa070f01cb707550393115cb2399f9ab6540de7 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 19 Jan 2015 23:47:57 +0000 Subject: [PATCH] Show inline message when unable to load the Key File. --- src/gui/ChangeMasterKeyWidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/ChangeMasterKeyWidget.cpp b/src/gui/ChangeMasterKeyWidget.cpp index 185ffc26f..ba241875a 100644 --- a/src/gui/ChangeMasterKeyWidget.cpp +++ b/src/gui/ChangeMasterKeyWidget.cpp @@ -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);