Bug 240835 - RegExp In Dolphin Filter-bar
Summary: RegExp In Dolphin Filter-bar
Status: RESOLVED INTENTIONAL
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 240836 330358 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-05 20:49 UTC by Павел
Modified: 2014-01-24 15:08 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Павел 2010-06-05 20:49:50 UTC
Version:           unspecified (using KDE 4.4.3) 
OS:                Linux

Can you return a feature of filter items in dolphin with regular expressions? Many peoples like "old"  filters. 
 
There is a compromise with regexp and plain-text filters: you can add a config-item in dolphin. This config item will switch on/off using regexp.  
 
Thanks. 
 
//P.S. Sorry for my bad English

Reproducible: Always
Comment 1 Anselmo L. S. Melo (anselmolsm) 2010-06-06 16:48:49 UTC
*** Bug 240836 has been marked as a duplicate of this bug. ***
Comment 2 flareguner 2010-06-09 12:48:48 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 Frank Reininghaus 2014-01-24 11:48:27 UTC
Dolphin uses the QRegExp class with the "Wildcard Matching" mode,

http://qt-project.org/doc/qt-4.8/qregexp.html#wildcard-matching

so this report is not "FIXED". We cannot simply replace the "Wildcard Matching" mode by the "QRegExp::RegExp" mode though because this will annoy everyone who got used to the current behavior.

Considering that the current behavior probably makes more sense for Dolphin's target user group, and also the extremely low amount of user feedback that this report got, I do not think that adding an option (which would not only clutter the UI, but also increase the maintenance burden for the affected code considerably) is justified.

Sorry about that.
Comment 4 Frank Reininghaus 2014-01-24 11:49:18 UTC
*** Bug 330358 has been marked as a duplicate of this bug. ***
Comment 5 Philipp A. 2014-01-24 15:08:50 UTC
> We cannot simply replace the "Wildcard Matching" mode by the "QRegExp::RegExp" mode though because this will annoy everyone who got used to the current behavior.

but some apparently got accustomed to the other behavior, so no matter what we decide on, if we decide on *one mode*, we’re going to piss off people.

so i disagree about the lack of justification an option has. regexes are so much more useful than globbing. you can’t exclude things using globbing, and that’s often very useful when viewing files. the current way is simply not enough for power users.

i also diagree about UI clutter: as said in the other report, i was very confused about what the filter bar can and can’t do. is it regex? plain text? it took quite some trial and error to figure out it’s globbing. a combobox with the selected option “Glob pattern” (and a useful tooltip about what that is) would not only have saved me much confusion and enabled more functionality by providing other options, but would also help noobs that don’t understand why “?”, “[”, “]”, and “*” are special.

i further disagree about maintainance burden: this is a single combobox widget with its change signal connected. that’s one minor UI change and two minor code changes (“minor” being an inline change that doesn’t need new data structures, classes or helper functions):

1. add the combobox to the UI.
2. fill it with items, map their indices to QRegExp::PatternSyntax values
2. connect its currentIndexChanged signal over the mapping to the setPatternSyntax slot

please give me some pointers to where in the files i’ll find the parts and i’ll implement it.

i suggest to allow selecting between the 3 regex modes
http://qt-project.org/doc/qt-4.8/qregexp.html#PatternSyntax-enum
* WildcardUnix (escapable special characters, the default)
* RegExp2 (greedy like anyone knowing regexps would expect), and
* FixedString