Changeset View
Changeset View
Standalone View
Standalone View
src/file/fileindexerconfig.cpp
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Line(s) | 288 | { | |||
---|---|---|---|---|---|
297 | } | 297 | } | ||
298 | } | 298 | } | ||
299 | } | 299 | } | ||
300 | 300 | | |||
301 | void FileIndexerConfig::buildFolderCache() | 301 | void FileIndexerConfig::buildFolderCache() | ||
302 | { | 302 | { | ||
303 | KConfigGroup group = m_config.group("General"); | 303 | KConfigGroup group = m_config.group("General"); | ||
304 | QStringList includeFoldersPlain = group.readPathEntry("folders", QStringList() << QDir::homePath()); | 304 | QStringList includeFoldersPlain = group.readPathEntry("folders", QStringList() << QDir::homePath()); | ||
305 | QStringList excludeFoldersPlain = group.readPathEntry("exclude folders", QStringList()); | 305 | QStringList excludeFoldersPlain = group.readPathEntry("exclude folders", | ||
306 | // exclude Vaults by default until a better way is found | ||||
307 | // TODO: Find a clean way to exclude vaults from indexing | ||||
308 | QStringList() << QStringLiteral("%1/Vaults").arg(QDir::homePath()) | ||||
309 | ); | ||||
306 | 310 | | |||
307 | // Add all removable media and network shares as ignored unless they have | 311 | // Add all removable media and network shares as ignored unless they have | ||
308 | // been explicitly added in the include list | 312 | // been explicitly added in the include list | ||
309 | for (const auto& device: m_devices->allMedia()) { | 313 | for (const auto& device: m_devices->allMedia()) { | ||
310 | const QString mountPath = device.mountPath(); | 314 | const QString mountPath = device.mountPath(); | ||
311 | if (!device.isUsable() && !mountPath.isEmpty()) { | 315 | if (!device.isUsable() && !mountPath.isEmpty()) { | ||
312 | if (!includeFoldersPlain.contains(mountPath)) { | 316 | if (!includeFoldersPlain.contains(mountPath)) { | ||
313 | excludeFoldersPlain << mountPath; | 317 | excludeFoldersPlain << mountPath; | ||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |