Changeset View
Changeset View
Standalone View
Standalone View
src/lib/indexerconfig.h
Show All 29 Lines | |||||
30 | { | 30 | { | ||
31 | public: | 31 | public: | ||
32 | IndexerConfig(); | 32 | IndexerConfig(); | ||
33 | ~IndexerConfig(); | 33 | ~IndexerConfig(); | ||
34 | 34 | | |||
35 | bool fileIndexingEnabled() const; | 35 | bool fileIndexingEnabled() const; | ||
36 | void setFileIndexingEnabled(bool enabled) const; | 36 | void setFileIndexingEnabled(bool enabled) const; | ||
37 | 37 | | |||
38 | /** | ||||
39 | * Check if the file or folder \p path should be indexed. | ||||
40 | * | ||||
41 | * If itself or its nearest explicitly included or excluded ancestor is | ||||
42 | * excluded it is not indexed. | ||||
43 | * Otherwise it is indexed according to the | ||||
44 | * includeFolders and excludeFilters config. | ||||
45 | * | ||||
adridg: This makes it unclear if the entire path is used, (e.g. `\p path`) or whether some special part… | |||||
Ouch... This one hurts, but it's to the best of my abilities in English. michaelh: Ouch... This one hurts, but it's to the best of my abilities in English. | |||||
46 | * \return \c true if the file or folder at \p path should | ||||
47 | * be indexed according to the configuration. | ||||
Is \p true really the right markup here? That's for parameters. You probably want \c true -- even though that will produce exactly the same output, the meaning is different. adridg: Is `\p true` really the right markup here? That's for parameters. You probably want `\c true`… | |||||
48 | */ | ||||
38 | bool shouldBeIndexed(const QString& path) const; | 49 | bool shouldBeIndexed(const QString& path) const; | ||
39 | 50 | | |||
51 | /** | ||||
52 | * Folders to search for files to index and analyze. | ||||
adridg: What does "cached and cleaned up" mean here? (Same applies below) | |||||
michaelh: Here, nothing :-) | |||||
53 | * \return list of paths. | ||||
54 | */ | ||||
40 | QStringList includeFolders() const; | 55 | QStringList includeFolders() const; | ||
56 | | ||||
57 | /** | ||||
58 | * Folders that are excluded from indexing. | ||||
59 | * (Descendant folders of an excluded folder can be added | ||||
What does "perfectly possible" mean here? This might need one or more examples, or a link to how in- and ex-clusion works. adridg: What does "perfectly possible" mean here? This might need one or more examples, or a link to… | |||||
60 | * and they will be indexed.) | ||||
61 | * \return list of paths. | ||||
62 | */ | ||||
41 | QStringList excludeFolders() const; | 63 | QStringList excludeFolders() const; | ||
42 | QStringList excludeFilters() const; | 64 | QStringList excludeFilters() const; | ||
43 | QStringList excludeMimetypes() const; | 65 | QStringList excludeMimetypes() const; | ||
44 | 66 | | |||
45 | void setIncludeFolders(const QStringList& includeFolders); | 67 | void setIncludeFolders(const QStringList& includeFolders); | ||
46 | void setExcludeFolders(const QStringList& excludeFolders); | 68 | void setExcludeFolders(const QStringList& excludeFolders); | ||
47 | void setExcludeFilters(const QStringList& excludeFilters); | 69 | void setExcludeFilters(const QStringList& excludeFilters); | ||
48 | void setExcludeMimetypes(const QStringList& excludeMimetypes); | 70 | void setExcludeMimetypes(const QStringList& excludeMimetypes); | ||
49 | 71 | | |||
50 | /** | 72 | /** | ||
51 | * The first run indicates if the File Indexer has ever been run before | 73 | * \return \c true if the service is run for the first time | ||
52 | * and made a successful pass over all the files. | 74 | * (or after manually setting "first run=true" in the config). | ||
53 | */ | 75 | */ | ||
54 | bool firstRun() const; | 76 | bool firstRun() const; | ||
55 | void setFirstRun(bool firstRun) const; | 77 | void setFirstRun(bool firstRun) const; | ||
56 | 78 | | |||
57 | bool indexHidden() const; | 79 | bool indexHidden() const; | ||
58 | void setIndexHidden(bool value) const; | 80 | void setIndexHidden(bool value) const; | ||
59 | 81 | | |||
60 | bool onlyBasicIndexing() const; | 82 | bool onlyBasicIndexing() const; | ||
Show All 11 Lines |
This makes it unclear if the entire path is used, (e.g. \p path) or whether some special part of the path (the dir) is used for matching. It *might* be nice to have documentation on how exactly (e.g. most-specific wins) the matching works, unless that is documented elsewhere.