Changeset View
Changeset View
Standalone View
Standalone View
src/terms.h
| Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 45 | namespace Terms { | |||
|---|---|---|---|---|---|
| 91 | * | 91 | * | ||
| 92 | * Term to filter the resources according to their types | 92 | * Term to filter the resources according to their types | ||
| 93 | */ | 93 | */ | ||
| 94 | struct KACTIVITIESSTATS_EXPORT Type { | 94 | struct KACTIVITIESSTATS_EXPORT Type { | ||
| 95 | /** | 95 | /** | ||
| 96 | * Show resources of any type | 96 | * Show resources of any type | ||
| 97 | */ | 97 | */ | ||
| 98 | static Type any(); | 98 | static Type any(); | ||
| 99 | /** | ||||
| 100 | * Show non-directory resources | ||||
| 101 | */ | ||||
| 102 | static Type files(); | ||||
| 103 | /** | ||||
| 104 | * Show directory resources aka folders | ||||
| 105 | */ | ||||
| 106 | static Type directories(); | ||||
ivan: Can we call it `directories` to follow the Qt API? That is the only complaint I have, otherwise… | |||||
+1, directories is fine for the code, and we can just surface the word "locations" in the UI. ngraham: +1, directories is fine for the code, and we can just surface the word "locations" in the UI. | |||||
| 99 | 107 | | |||
| 100 | #ifdef Q_COMPILER_INITIALIZER_LISTS | 108 | #ifdef Q_COMPILER_INITIALIZER_LISTS | ||
| 101 | inline Type(std::initializer_list<QString> types) | 109 | inline Type(std::initializer_list<QString> types) | ||
| 102 | : values(types) | 110 | : values(types) | ||
| 103 | { | 111 | { | ||
| 104 | } | 112 | } | ||
| 105 | #endif | 113 | #endif | ||
| 106 | 114 | | |||
| ▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines | |||||
Can we call it directories to follow the Qt API? That is the only complaint I have, otherwise thie is quite a nice addition.