]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use Xesam ontology instead of NIE. Since Strigi uses Xesam and we have no mapping...
authorSebastian Trueg <sebastian@trueg.de>
Mon, 10 Dec 2007 12:34:56 +0000 (12:34 +0000)
committerSebastian Trueg <sebastian@trueg.de>
Mon, 10 Dec 2007 12:34:56 +0000 (12:34 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=746846

src/CMakeLists.txt
src/dolphinmodel.cpp
src/metadatawidget.cpp

index a07cdf255eadc0276e6bff65c349f576f8b2d9da..7c73a7a3bba17d6ac4db077139c50941ad3b4f8c 100644 (file)
@@ -36,13 +36,14 @@ kde4_add_kcfg_files(dolphinprivate_LIB_SRCS
 kde4_add_library(dolphinprivate SHARED ${dolphinprivate_LIB_SRCS})
 
 find_package(Nepomuk)
+find_package(Soprano)
 macro_bool_to_01(Nepomuk_FOUND HAVE_NEPOMUK)
 
 configure_file(config-nepomuk.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nepomuk.h )
 
 target_link_libraries(dolphinprivate ${KDE4_KFILE_LIBS} konq ${BLITZ_LIBRARIES})
 if (Nepomuk_FOUND)
-  target_link_libraries(dolphinprivate ${NEPOMUK_LIBRARIES})
+  target_link_libraries(dolphinprivate ${NEPOMUK_LIBRARIES} ${SOPRANO_LIBRARIES})
 endif (Nepomuk_FOUND)
 
 
index 8a5b6c73215df52b3aecf12d22eb60b1ade5bfe7..1b94e0339d2b5bd26c9a419873574851dc36a0d9 100644 (file)
@@ -29,6 +29,7 @@
 #include <nepomuk/global.h>
 #include <nepomuk/resource.h>
 #include <nepomuk/tag.h>
+#include <Soprano/Vocabulary/Xesam>
 #endif
 
 #include <kdatetime.h>
@@ -331,7 +332,7 @@ quint32 DolphinModel::ratingForIndex(const QModelIndex& index)
     const DolphinModel* dolphinModel = static_cast<const DolphinModel*>(index.model());
     KFileItem item = dolphinModel->itemForIndex(index);
     if (!item.isNull()) {
-        const Nepomuk::Resource resource(item.url().url(), Nepomuk::NFO::File());
+        const Nepomuk::Resource resource(item.url().url(), Soprano::Vocabulary::Xesam::File());
         rating = resource.rating();
     }
     return rating;
@@ -349,7 +350,7 @@ QString DolphinModel::tagsForIndex(const QModelIndex& index)
     const DolphinModel* dolphinModel = static_cast<const DolphinModel*>(index.model());
     KFileItem item = dolphinModel->itemForIndex(index);
     if (!item.isNull()) {
-        const Nepomuk::Resource resource(item.url().url(), Nepomuk::NFO::File());
+        const Nepomuk::Resource resource(item.url().url(), Soprano::Vocabulary::Xesam::File());
         const QList<Nepomuk::Tag> tags = resource.tags();
         QStringList stringList;
         foreach (const Nepomuk::Tag& tag, tags) {
index 5c510f088f7b450dc9444e4e4078a1314ab58607..8db305e93e5dadb94b3ed3c85c9fc634601443f6 100644 (file)
@@ -35,6 +35,7 @@
 #include <nepomuk/variant.h>
 #include <nepomuk/kratingwidget.h>
 #include <nepomuk/global.h>
+#include <Soprano/Vocabulary/Xesam>
 #endif
 
 
@@ -132,7 +133,7 @@ void MetaDataWidget::setFiles(const KUrl::List& urls)
     bool first = true;
     QList<Nepomuk::Resource> fileRes;
     Q_FOREACH( KUrl url, urls ) {
-        Nepomuk::Resource file( url.url(), Nepomuk::NFO::File() );
+        Nepomuk::Resource file( url.url(), Soprano::Vocabulary::Xesam::File() );
 //    file.setLocation(url.url());
         d->files.insert( url, file );
         fileRes.append( file );