summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishesh Handa <[email protected]>2015-05-13 18:57:43 +0200
committerVishesh Handa <[email protected]>2015-10-10 18:33:06 +0200
commitf5fd8e5cfb43deb1ccb0fef76e335afbde088965 (patch)
tree89f947faba1aaf856f7a4f70dffe26ec5ad027dd
parentfb9ca1399dc97aebf0d4776e87e701ea0ab56ba1 (diff)
Only perform operations with Baloo if it is enabled
REVIEW: 125584
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp2
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index b03fd9c..14e3015 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -278,7 +278,7 @@ void KFileItemModelRolesUpdater::setRoles(const QSet<QByteArray>& roles)
}
}
- if (hasBalooRole && !m_balooFileMonitor) {
+ if (hasBalooRole && m_balooConfig.fileIndexingEnabled() && !m_balooFileMonitor) {
m_balooFileMonitor = new Baloo::FileMonitor(this);
connect(m_balooFileMonitor, &Baloo::FileMonitor::fileMetaDataChanged,
this, &KFileItemModelRolesUpdater::applyChangedBalooRoles);
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h
index 216b0a5..6e7559f 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.h
+++ b/src/kitemviews/kfileitemmodelrolesupdater.h
@@ -46,6 +46,7 @@ namespace KIO {
{
class FileMonitor;
}
+ #include <Baloo/IndexerConfig>
#endif
/**
@@ -335,6 +336,7 @@ private:
#ifdef HAVE_BALOO
Baloo::FileMonitor* m_balooFileMonitor;
+ Baloo::IndexerConfig m_balooConfig;
#endif
};