Changeset View
Changeset View
Standalone View
Standalone View
src/file/xattrindexer.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 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 : qAsConst(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->shouldBeIndexed(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(); | ||
56 | if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { | 56 | if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { | ||
57 | continue; | 57 | continue; | ||
58 | } | 58 | } | ||
59 | 59 | | |||
Show All 23 Lines |