Baloo::IndexerConfig
#include <Baloo/IndexerConfig>
Public Member Functions | |
IndexerConfig (const IndexerConfig &)=delete | |
bool | canBeSearched (const QString &folder) const |
QStringList | excludeFilters () const |
QStringList | excludeFolders () const |
QStringList | excludeMimetypes () const |
bool | fileIndexingEnabled () const |
QStringList | includeFolders () const |
bool | indexHidden () const |
bool | onlyBasicIndexing () const |
IndexerConfig & | operator= (const IndexerConfig &)=delete |
void | refresh () const |
void | setExcludeFilters (const QStringList &excludeFilters) |
void | setExcludeFolders (const QStringList &excludeFolders) |
void | setExcludeMimetypes (const QStringList &excludeMimetypes) |
void | setFileIndexingEnabled (bool enabled) const |
void | setIncludeFolders (const QStringList &includeFolders) |
void | setIndexHidden (bool value) const |
void | setOnlyBasicIndexing (bool value) |
bool | shouldBeIndexed (const QString &path) const |
Detailed Description
This class allows it to access the current config, to read and modify it.
It is not meant as a means to infer the current state of the Indexer or the DB. The DB is updated asynchronously, and changes of the config will not be reflected immediately.
Definition at line 26 of file indexerconfig.h.
Member Function Documentation
◆ canBeSearched()
bool IndexerConfig::canBeSearched | ( | const QString & | folder | ) | const |
Check if folder
can be searched.
folder
can be searched if itself or one of its descendants is indexed.
Example: if ~/foo is not indexed and ~/foo/bar is indexed then ~/foo can be searched.
- Returns
true
if thefolder
can be searched.
Definition at line 52 of file indexerconfig.cpp.
◆ excludeFolders()
QStringList IndexerConfig::excludeFolders | ( | ) | const |
Folders that are excluded from indexing.
(Descendant folders of an excluded folder can be added and they will be indexed.)
- Returns
- list of paths.
Definition at line 57 of file indexerconfig.cpp.
◆ includeFolders()
QStringList IndexerConfig::includeFolders | ( | ) | const |
Folders to search for files to index and analyze.
- Returns
- list of paths.
Definition at line 62 of file indexerconfig.cpp.
◆ shouldBeIndexed()
bool IndexerConfig::shouldBeIndexed | ( | const QString & | path | ) | const |
Check if the file or folder path
should be indexed.
If itself or its nearest explicitly included or excluded ancestor is excluded it is not indexed. Otherwise it is indexed according to the includeFolders and excludeFilters config.
- Returns
true
if the file or folder atpath
should be indexed according to the configuration.
TODO KF6: deprecate, not of any concern for ouside users. Use Baloo::File
to know if a file has been indexed.
- See also
- Baloo::File
Definition at line 47 of file indexerconfig.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:11:50 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.