Improvements to KFileDialog filtering

Review Request #101013 - Created April 2, 2011 and submitted

Information
Parker Coates
kdelibs
master
142900
Reviewers
kdelibs
This patch attempts to improve the usefulness and usability of KFileDialog's filter field when in Opening mode.

Firstly, if the filter text isn't: * the display name of one of the filters passed to the dialog or
                                   * one or more space separated mimetype specifiers (containing a '/')  or
                                   * one or more space separated file globs (containing '*', '?' or "[.*]")
we convert the text to a glob by prepending and appending asterisks. This lets the user enter a piece of text (without having to know any glob patterns) and see only the files whose names contain that text, much the same as they would when filtering in Dolphin.

Secondly, the filtering updates on the fly as the filter text is typed. Previously, the filtering updated only when Return was pressed, which differs from the behaviour of most of KDE's other filter boxes. The old behaviour is especially confusing when one clicks the small clear button embedded in the combobox, because it clears the box, but the filtering is unchanged until the user goes to the keyboard to press enter.
I've played around with it a fair bit and it seems to work fine. I've never really worked with this code before, so if I'm doing something silly please let me know.
Christoph Feck
Parker Coates
Review request changed

Change Summary:

Added relevant bug report.

Bugs:

+142900
Christoph Feck
No problem, then please commit as is.
Commit Hook
This review has been submitted with commit 6344c4f0505f7a0994bd7f36e5c607959d2dfbcf by Parker Coates.
Loading...