From 3cec2d3dffbb82ddda4e8895081092d372fa7e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= Date: Tue, 6 Dec 2016 11:13:13 +0100 Subject: [PATCH] Make key generation dialog in Identity page modal Prevents closing the identity dialog while key generation is in progress, which lead to crash. --- src/identity/identitydialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/identity/identitydialog.cpp b/src/identity/identitydialog.cpp index 7311ffa7e..f593c3570 100644 --- a/src/identity/identitydialog.cpp +++ b/src/identity/identitydialog.cpp @@ -265,7 +265,8 @@ void KeySelectionCombo::onCustomItemSelected(const QVariant &type) return; } else if (type == QLatin1String("generate-new-key")) { auto job = new KeyGenerationJob(mName, mEmail, this); - new Kleo::ProgressDialog(job, i18n("Generating new key pair..."), parentWidget()); + auto dlg = new Kleo::ProgressDialog(job, i18n("Generating new key pair..."), parentWidget()); + dlg->setModal(true); setEnabled(false); connect(job, &KeyGenerationJob::done, this, [this]() {