[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim-runtime/KDE/4.8] agents/nepomukfeeder: Don't try to index collections with content we don't
From:       Allen Winter <allen.winter () kdab ! com>
Date:       2012-03-01 18:10:06
Message-ID: 20120301181006.A37D9A60A9 () git ! kde ! org
[Download RAW message or body]

Git commit ec4f19eb781514ce0dfc09fe4e9ea4591ecc31e9 by Allen Winter, on behalf of Volker Krause.
Committed on 12/02/2012 at 18:41.
Pushed by winterz into branch 'KDE/4.8'.

Don't try to index collections with content we don't have plugins for.

Side-effect is that you can easily test indexing just one type now by
deleting the .desktop files of the plugins for other types.
(cherry picked from commit 6773e925547f4474607c7e2ef35968fc2629577e)

M  +9    -1    agents/nepomukfeeder/nepomukfeederagent.cpp

http://commits.kde.org/kdepim-runtime/ec4f19eb781514ce0dfc09fe4e9ea4591ecc31e9

diff --git a/agents/nepomukfeeder/nepomukfeederagent.cpp b/agents/nepomukfeeder/nepomukfeederagent.cpp
index 4739ccb..2014ed5 100644
--- a/agents/nepomukfeeder/nepomukfeederagent.cpp
+++ b/agents/nepomukfeeder/nepomukfeederagent.cpp
@@ -69,7 +69,15 @@ static inline bool indexingDisabled( const Collection &collection )
   if (collection.isVirtual())
     return true;
 
-  return false;
+  // check if we have a plugin for the stuff in this collection
+  foreach (const QString &mimeType, collection.contentMimeTypes()) {
+    if (mimeType == Collection::mimeType())
+     continue;
+    if (!FeederPluginloader::instance().feederPluginsForMimeType(mimeType).isEmpty())
+      return false;
+  }
+
+  return true;
 }
 
 NepomukFeederAgent::NepomukFeederAgent(const QString& id) :
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic