Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3b3f5062 authored by Laurent Montel's avatar Laurent Montel 😁

Reduce duplicate code

parent 24e1461f
......@@ -412,22 +412,15 @@ QList<MailFilter *> KMFilterListBox::filtersForSaving(bool closeAfterSaving, boo
// report on invalid filters:
if (!emptyFilters.empty()) {
if (closeAfterSaving) {
QPointer<MailCommon::InvalidFilterDialog> dlg = new MailCommon::InvalidFilterDialog(nullptr);
dlg->setInvalidFilters(listInvalidFilters);
if (!dlg->exec()) {
QPointer<MailCommon::InvalidFilterDialog> dlg = new MailCommon::InvalidFilterDialog(nullptr);
dlg->setInvalidFilters(listInvalidFilters);
if (!dlg->exec()) {
if (closeAfterSaving) {
Q_EMIT abortClosing();
wasCanceled = true;
}
delete dlg;
} else {
QPointer<MailCommon::InvalidFilterDialog> dlg = new MailCommon::InvalidFilterDialog(nullptr);
dlg->setInvalidFilters(listInvalidFilters);
if (!dlg->exec()) {
wasCanceled = true;
}
delete dlg;
wasCanceled = true;
}
delete dlg;
}
return filters;
}
......
Markdown is supported
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