Changeset View
Changeset View
Standalone View
Standalone View
src/file/modifiedfileindexer.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | void ModifiedFileIndexer::run() | 45 | void ModifiedFileIndexer::run() | ||
46 | { | 46 | { | ||
47 | QMimeDatabase mimeDb; | 47 | QMimeDatabase mimeDb; | ||
48 | 48 | | |||
49 | Transaction tr(m_db, Transaction::ReadWrite); | 49 | Transaction tr(m_db, Transaction::ReadWrite); | ||
50 | 50 | | |||
51 | for (const QString& filePath : m_files) { | 51 | for (const QString& filePath : qAsConst(m_files)) { | ||
52 | Q_ASSERT(!filePath.endsWith('/')); | 52 | Q_ASSERT(!filePath.endsWith('/')); | ||
53 | 53 | | |||
54 | QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); | 54 | QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); | ||
55 | if (!m_config->shouldFileBeIndexed(fileName)) { | 55 | if (!m_config->shouldFileBeIndexed(fileName)) { | ||
56 | continue; | 56 | continue; | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | QString mimetype = mimeDb.mimeTypeForFile(filePath, QMimeDatabase::MatchExtension).name(); | 59 | QString mimetype = mimeDb.mimeTypeForFile(filePath, QMimeDatabase::MatchExtension).name(); | ||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |