Add Term::Type::files() and Term::Type::directories() to filter only directories or excluding them
ClosedPublic

Authored by meven on Sep 5 2019, 2:43 PM.

Diff Detail

Repository
R159 KActivities Statistics
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.Sep 5 2019, 2:43 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 5 2019, 2:43 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
meven requested review of this revision.Sep 5 2019, 2:43 PM
meven updated this revision to Diff 65446.Sep 5 2019, 3:46 PM

Exclude files whose mimetype is not known from the files filter

ivan requested changes to this revision.Sep 5 2019, 3:57 PM

Add the same for directories for completeness

This revision now requires changes to proceed.Sep 5 2019, 3:57 PM
meven updated this revision to Diff 65485.Sep 5 2019, 8:39 PM

Add Term::Type::locations

meven retitled this revision from Add a Term::Type::files() to filter excluding directories to Add Term::Type::files() and Term::Type::locations() to filter excluding or only directories.Sep 5 2019, 8:39 PM
ivan added inline comments.Sep 5 2019, 8:48 PM
src/terms.h
106

Can we call it directories to follow the Qt API? That is the only complaint I have, otherwise thie is quite a nice addition.

ngraham added a subscriber: ngraham.Sep 5 2019, 8:55 PM
ngraham added inline comments.
src/terms.h
106

+1, directories is fine for the code, and we can just surface the word "locations" in the UI.

meven updated this revision to Diff 65488.Sep 6 2019, 3:10 AM

Rename locations to directories

meven retitled this revision from Add Term::Type::files() and Term::Type::locations() to filter excluding or only directories to Add Term::Type::files() and Term::Type::directories() to filter only directories or excluding then.Sep 6 2019, 3:10 AM
meven retitled this revision from Add Term::Type::files() and Term::Type::directories() to filter only directories or excluding then to Add Term::Type::files() and Term::Type::directories() to filter only directories or excluding them.
meven updated this revision to Diff 65489.Sep 6 2019, 3:12 AM

Rename constant LOCATIONS_TYPE_TAG -> DIRECTORIES_TYPE_TAG

meven updated this revision to Diff 65490.Sep 6 2019, 3:14 AM

Rename constant LOCATIONS_TYPE_TAG -> DIRECTORIES_TYPE_TAG bis

meven updated this revision to Diff 65491.Sep 6 2019, 3:16 AM

Spacing

ivan accepted this revision.Sep 6 2019, 7:22 AM
This revision is now accepted and ready to land.Sep 6 2019, 7:22 AM
This revision was automatically updated to reflect the committed changes.