Bug 196352 - filters: custom filters are deleted on dialog-close because of errors
Summary: filters: custom filters are deleted on dialog-close because of errors
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Unmaintained
Component: filtering (show other bugs)
Version: unspecified
Platform: openSUSE Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-13 17:42 UTC by Maciej Pilichowski
Modified: 2009-06-24 14:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2009-06-13 17:42:15 UTC
Version:            (using KDE 4.2.90)
Installed from:    SuSE RPMs

Some time ago I wrote report about warning user about non valid filters:
https://bugs.kde.org/show_bug.cgi?id=137294

In a way it is implemented. Invalid filters are deleted. This is completely wrong -- when you write a program, would you expect compiler output says:
"Syntax error: your source file has been deleted"

? I think no. So why deleting filter rules because of user omission:
a) warn user, correct
b) mark the filter as invalid (inactive)

ad.b) let the user _correct_ the filter, don't make him/her start entire filter from scratch
Comment 1 Maciej Pilichowski 2009-06-13 17:43:34 UTC
PS. Current behaviour has an absurd side-effect, when there are no filters, the default one is created automatically. User clicks ok, filter is deleted, you go see filters, it is recreated again. And so on...
Comment 2 Jonathan Armond 2009-06-15 21:54:04 UTC
Hmmmm.. I thought it made sense to warn that the default is not saved, since the Ok implies saving. It's never deleted, because it is not saved.

You can press Apply to check whether a complex filter is invalid without any danger. But I agree it is unexpected to lose your half-finished filter.
Comment 3 Jonathan Armond 2009-06-24 14:00:12 UTC
SVN commit 986219 by jarmond:

Give user the option to continue editing filters after being warned they
are invalid. Addresses usability complaint in bug 196352.

BUG: 196352

 M  +63 -20    kmfilterdlg.cpp  
 M  +15 -4     kmfilterdlg.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=986219