Changeset View
Changeset View
Standalone View
Standalone View
src/file/fileindexerconfig.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright (c) 2008-2009 Sebastian Trueg <trueg@kde.org> | 2 | Copyright (c) 2008-2009 Sebastian Trueg <trueg@kde.org> | ||
3 | Copyright (c) 2012-2014 Vishesh Handa <me@vhanda.in> | 3 | Copyright (c) 2012-2014 Vishesh Handa <me@vhanda.in> | ||
4 | Copyright (c) 2020 Benjamin Port <benjamin.port@enioka.com> | ||||
4 | 5 | | |||
5 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public | ||
7 | License version 2 as published by the Free Software Foundation. | 8 | License version 2 as published by the Free Software Foundation. | ||
8 | 9 | | |||
9 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | Library General Public License for more details. | 13 | Library General Public License for more details. | ||
13 | 14 | | |||
14 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 18 | Boston, MA 02110-1301, USA. | ||
18 | */ | 19 | */ | ||
19 | 20 | | |||
20 | #ifndef BALOO_FILEINDEXER_CONFIG_H_ | 21 | #ifndef BALOO_FILEINDEXER_CONFIG_H_ | ||
21 | #define BALOO_FILEINDEXER_CONFIG_H_ | 22 | #define BALOO_FILEINDEXER_CONFIG_H_ | ||
22 | 23 | | |||
23 | #include <QObject> | 24 | #include <QObject> | ||
24 | #include <QList> | 25 | #include <QList> | ||
25 | #include <QSet> | 26 | #include <QSet> | ||
26 | 27 | | |||
27 | #include <kconfig.h> | | |||
28 | | ||||
29 | #include "regexpcache.h" | 28 | #include "regexpcache.h" | ||
30 | 29 | | |||
30 | class BalooSettings; | ||||
31 | | ||||
31 | namespace Baloo | 32 | namespace Baloo | ||
32 | { | 33 | { | ||
33 | 34 | | |||
34 | class StorageDevices; | 35 | class StorageDevices; | ||
35 | 36 | | |||
36 | /** | 37 | /** | ||
37 | * Active config class which emits signals if the config | 38 | * Active config class which emits signals if the config | ||
38 | * was changed, for example if the KCM saved the config file. | 39 | * was changed, for example if the KCM saved the config file. | ||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 168 | public Q_SLOTS: | |||
181 | void setInitialRun(bool isInitialRun); | 182 | void setInitialRun(bool isInitialRun); | ||
182 | 183 | | |||
183 | private: | 184 | private: | ||
184 | 185 | | |||
185 | void buildFolderCache(); | 186 | void buildFolderCache(); | ||
186 | void buildExcludeFilterRegExpCache(); | 187 | void buildExcludeFilterRegExpCache(); | ||
187 | void buildMimeTypeCache(); | 188 | void buildMimeTypeCache(); | ||
188 | 189 | | |||
189 | KConfig m_config; | 190 | BalooSettings *m_settings; | ||
190 | 191 | | |||
191 | /// Caching cleaned up list (no duplicates, no useless entries, etc.) | 192 | /// Caching cleaned up list (no duplicates, no useless entries, etc.) | ||
192 | QList<QPair<QString, bool> > m_folderCache; | 193 | QList<QPair<QString, bool> > m_folderCache; | ||
193 | /// Whether the folder cache needs to be rebuilt the next time it is used | 194 | /// Whether the folder cache needs to be rebuilt the next time it is used | ||
194 | bool m_folderCacheDirty; | 195 | bool m_folderCacheDirty; | ||
195 | 196 | | |||
196 | /// cache of regexp objects for all exclude filters | 197 | /// cache of regexp objects for all exclude filters | ||
197 | /// to prevent regexp parsing over and over | 198 | /// to prevent regexp parsing over and over | ||
Show All 16 Lines |