Changeset View
Changeset View
Standalone View
Standalone View
src/file/indexcleaner.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 47 | auto shouldDelete = [&](quint64 id) { | |||
---|---|---|---|---|---|
66 | if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { | 66 | if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { | ||
67 | qDebug() << "mimetype should not be indexed: " << url << mimetype; | 67 | qDebug() << "mimetype should not be indexed: " << url << mimetype; | ||
68 | return true; | 68 | return true; | ||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | return false; | 71 | return false; | ||
72 | }; | 72 | }; | ||
73 | 73 | | |||
74 | for (const QString& folder : m_config->includeFolders()) { | 74 | const auto includeFolders = m_config->includeFolders(); | ||
75 | for (const QString& folder : includeFolders) { | ||||
75 | quint64 id = filePathToId(QFile::encodeName(folder)); | 76 | quint64 id = filePathToId(QFile::encodeName(folder)); | ||
76 | tr.removeRecursively(id, shouldDelete); | 77 | tr.removeRecursively(id, shouldDelete); | ||
77 | } | 78 | } | ||
78 | tr.commit(); | 79 | tr.commit(); | ||
79 | 80 | | |||
80 | Q_EMIT done(); | 81 | Q_EMIT done(); | ||
81 | } | 82 | } |