Changeset View
Changeset View
Standalone View
Standalone View
src/file/newfileindexer.cpp
Show All 38 Lines | |||||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | void NewFileIndexer::run() | 41 | void NewFileIndexer::run() | ||
42 | { | 42 | { | ||
43 | QMimeDatabase mimeDb; | 43 | QMimeDatabase mimeDb; | ||
44 | 44 | | |||
45 | Transaction tr(m_db, Transaction::ReadWrite); | 45 | Transaction tr(m_db, Transaction::ReadWrite); | ||
46 | 46 | | |||
47 | for (const QString& filePath : m_files) { | 47 | for (const QString& filePath : qAsConst(m_files)) { | ||
48 | Q_ASSERT(!filePath.endsWith('/')); | 48 | Q_ASSERT(!filePath.endsWith('/')); | ||
49 | 49 | | |||
50 | QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); | 50 | QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); | ||
51 | if (!m_config->shouldFileBeIndexed(fileName)) { | 51 | if (!m_config->shouldFileBeIndexed(fileName)) { | ||
52 | continue; | 52 | continue; | ||
53 | } | 53 | } | ||
54 | 54 | | |||
55 | QString mimetype = mimeDb.mimeTypeForFile(filePath, QMimeDatabase::MatchExtension).name(); | 55 | QString mimetype = mimeDb.mimeTypeForFile(filePath, QMimeDatabase::MatchExtension).name(); | ||
Show All 22 Lines |