Skip to content

KCoreDirLister::nameFilter: revert to non-partial matching again

Friedrich W. H. Kossebau requested to merge work/kossebau/wildcardfilter into kf5

Commit 192b2baf added the un-anchoring of the regex pattern in setNameFilter().

Having unanchored matches though breaks some expectations from wildcard expressions as used with name filters (see also examples in the API docs of setNameFilter). E.g. for "*.po" one would only expect files with suffix "po" only, not also "pot" or any other suffixes starting with "po". Similar "*.tar" should not deliver "tar.gz" files etc.

The olc QRegExp code also was just using QRegExp(filter, Qt::CaseInsensitive, QRegExp::Wildcard) so also not doing partial matches of any kind.

Edited by Friedrich W. H. Kossebau

Merge request reports