]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Only perform operations with Baloo if it is enabled
authorVishesh Handa <me@vhanda.in>
Wed, 13 May 2015 16:57:43 +0000 (18:57 +0200)
committerVishesh Handa <me@vhanda.in>
Sat, 10 Oct 2015 16:33:06 +0000 (18:33 +0200)
REVIEW: 125584

src/kitemviews/kfileitemmodelrolesupdater.cpp
src/kitemviews/kfileitemmodelrolesupdater.h

index b03fd9c1a37667ee6a320b80128b176cfcbc1443..14e301522b912d2e215fe0e5619d093ec63da90d 100644 (file)
@@ -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);
             m_balooFileMonitor = new Baloo::FileMonitor(this);
             connect(m_balooFileMonitor, &Baloo::FileMonitor::fileMetaDataChanged,
                     this, &KFileItemModelRolesUpdater::applyChangedBalooRoles);
index 216b0a501aa9b4a21fd962515e6a9da8abf130a6..6e7559fb53a7f98eb167865a45abd23eefa6e583 100644 (file)
@@ -46,6 +46,7 @@ namespace KIO {
     {
         class FileMonitor;
     }
     {
         class FileMonitor;
     }
+    #include <Baloo/IndexerConfig>
 #endif
 
 /**
 #endif
 
 /**
@@ -335,6 +336,7 @@ private:
 
 #ifdef HAVE_BALOO
     Baloo::FileMonitor* m_balooFileMonitor;
 
 #ifdef HAVE_BALOO
     Baloo::FileMonitor* m_balooFileMonitor;
+    Baloo::IndexerConfig m_balooConfig;
 #endif
 };
 
 #endif
 };