Verified Commit 668ea9b7 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Reset OK / Close Buttons when tasks are restarted

When we import a key in decryptverifyfilesdialog the task
collection is restarted. In that case the Button Box needs
a close button again instead of an OK button.
This also fixes the case that multiple OK buttons would
be added when restarting.

BUG: 391593
parent d5a46288
......@@ -159,6 +159,12 @@ void DecryptVerifyFilesDialog::started(const std::shared_ptr<Task> &task)
} else {
label->setText(i18nc("tag( \"OpenPGP\" or \"CMS\"), operation description", "%1: %2", tag, task->label()));
}
if (m_saveButton != QDialogButtonBox::NoButton) {
m_buttonBox->button(m_saveButton)->setEnabled(false);
} else if (m_buttonBox->button(QDialogButtonBox::Ok)) {
m_buttonBox->removeButton(m_buttonBox->button(QDialogButtonBox::Ok));
m_buttonBox->addButton(QDialogButtonBox::Close);
}
}
QLabel *DecryptVerifyFilesDialog::labelForTag(const QString &tag)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment