Changeset View
Changeset View
Standalone View
Standalone View
src/file/fileindexerconfig.cpp
Show First 20 Lines • Show All 317 Lines • ▼ Show 20 Line(s) | 311 | { | |||
---|---|---|---|---|---|
318 | } | 318 | } | ||
319 | 319 | | |||
320 | KConfigGroup group = m_config.group("General"); | 320 | KConfigGroup group = m_config.group("General"); | ||
321 | QStringList includeFoldersPlain = group.readPathEntry("folders", QStringList() << QDir::homePath()); | 321 | QStringList includeFoldersPlain = group.readPathEntry("folders", QStringList() << QDir::homePath()); | ||
322 | QStringList excludeFoldersPlain = group.readPathEntry("exclude folders", QStringList()); | 322 | QStringList excludeFoldersPlain = group.readPathEntry("exclude folders", QStringList()); | ||
323 | 323 | | |||
324 | // Add all removable media and network shares as ignored unless they have | 324 | // Add all removable media and network shares as ignored unless they have | ||
325 | // been explicitly added in the include list | 325 | // been explicitly added in the include list | ||
326 | for (const auto& device: m_devices->allMedia()) { | 326 | const auto allMedia = m_devices->allMedia(); | ||
327 | for (const auto& device: allMedia) { | ||||
327 | const QString mountPath = device.mountPath(); | 328 | const QString mountPath = device.mountPath(); | ||
328 | if (!device.isUsable() && !mountPath.isEmpty()) { | 329 | if (!device.isUsable() && !mountPath.isEmpty()) { | ||
329 | if (!includeFoldersPlain.contains(mountPath)) { | 330 | if (!includeFoldersPlain.contains(mountPath)) { | ||
330 | excludeFoldersPlain << mountPath; | 331 | excludeFoldersPlain << mountPath; | ||
331 | } | 332 | } | ||
332 | } | 333 | } | ||
333 | } | 334 | } | ||
334 | 335 | | |||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |