Changeset View
Changeset View
Standalone View
Standalone View
src/file/modifiedfileindexer.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 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 : qAsConst(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->shouldBeIndexed(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(); | ||
60 | if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { | 60 | if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { | ||
61 | continue; | 61 | continue; | ||
62 | } | 62 | } | ||
63 | 63 | | |||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |