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 43b21b3e authored by Laurent Montel's avatar Laurent Montel 😁

Signal that filter is invalid when it has any action

parent 28cce16b
......@@ -584,17 +584,24 @@ QString MailFilter::purify(bool removeAction)
{
QString informationAboutNotValidAction = mPattern.purify(removeAction);
QListIterator<FilterAction *> it(mActions);
it.toBack();
while (it.hasPrevious()) {
FilterAction *action = it.previous();
if (action->isEmpty()) {
if (!informationAboutNotValidAction.isEmpty()) {
informationAboutNotValidAction += QLatin1Char('\n');
}
informationAboutNotValidAction += action->informationAboutNotValidAction();
if (removeAction) {
mActions.removeAll(action);
if (mActions.isEmpty()) {
if (!informationAboutNotValidAction.isEmpty()) {
informationAboutNotValidAction += QLatin1Char('\n');
}
informationAboutNotValidAction += i18n("Any action defined.");
} else {
QListIterator<FilterAction *> it(mActions);
it.toBack();
while (it.hasPrevious()) {
FilterAction *action = it.previous();
if (action->isEmpty()) {
if (!informationAboutNotValidAction.isEmpty()) {
informationAboutNotValidAction += QLatin1Char('\n');
}
informationAboutNotValidAction += action->informationAboutNotValidAction();
if (removeAction) {
mActions.removeAll(action);
}
}
}
}
......
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