-#ifdef HAVE_NEPOMUK
- if (m_nepomukResourceWatcher) {
- const KNepomukRolesProvider& rolesProvider = KNepomukRolesProvider::instance();
- Nepomuk2::Resource resource(item.nepomukUri());
- QHashIterator<QByteArray, QVariant> it(rolesProvider.roleValues(resource, m_roles));
- while (it.hasNext()) {
- it.next();
- data.insert(it.key(), it.value());
- }
-
- QUrl uri = resource.uri();
- if (uri.isEmpty()) {
- // TODO: Is there another way to explicitly create a resource?
- // We need a resource to be able to track it for changes.
- resource.setRating(0);
- uri = resource.uri();
- }
- if (!uri.isEmpty() && !m_nepomukUriItems.contains(uri)) {
- m_nepomukResourceWatcher->addResource(resource);
-
- if (m_nepomukUriItems.isEmpty()) {
- m_nepomukResourceWatcher->start();
- }
-
- m_nepomukUriItems.insert(uri, item.url());
- }
+#ifdef HAVE_BALOO
+ if (m_balooFileMonitor) {
+ m_balooFileMonitor->addFile(item.localPath());
+ applyChangedBalooRoles(item.localPath());