]> git.sesse.net Git - kdenlive/commitdiff
Fix compilation with KDE < 4.6 (Nepomuk):
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 1 Jan 2012 14:50:59 +0000 (15:50 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 1 Jan 2012 14:50:59 +0000 (15:50 +0100)
http://kdenlive.org/mantis/view.php?id=2457

src/utils/freesound.cpp
src/utils/resourcewidget.cpp

index cb4459344afb302ff49360df5f534c3244ce8856..11637b2e6cc8e80f74d8da7dc354b53efcbc9374 100644 (file)
 
 #include <KDebug>
 #include "kdenlivesettings.h"
-#include <KGlobalSettings>
-#include <KMessageBox>
-#include <KFileDialog>
 #include <kio/job.h>
-#include <KIO/NetAccess>
-#include <Solid/Networking>
-#include <KRun>
-
-#ifdef USE_NEPOMUK
-#include <Nepomuk/Variant>
-#include <Nepomuk/Resource>
-#include <Nepomuk/ResourceManager>
-#include <Soprano/Vocabulary/NAO>
-#include <Nepomuk/Vocabulary/NIE>
-#include <Nepomuk/Vocabulary/NDO>
-#endif
+#include <KLocale>
 
 #ifdef USE_QJSON
 #include <qjson/parser.h>
index e2b4fa2b8319ca40c03d6193e6cd13aff6cf0e43..23e624746575fd49e1189b6121eb232163de7449 100644 (file)
@@ -38,7 +38,7 @@
 #include <Solid/Networking>
 #include <KRun>
 
-#ifdef USE_NEPOMUK
+#ifdef USE_NEPOMUK AND KDE_IS_VERSION(4,6,0)
 #include <Nepomuk/Variant>
 #include <Nepomuk/Resource>
 #include <Nepomuk/ResourceManager>
@@ -47,7 +47,6 @@
 #include <Nepomuk/Vocabulary/NDO>
 #endif
 
-
 ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) :
         QDialog(parent),
         m_folder(folder),
@@ -82,7 +81,9 @@ ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) :
     connect(page_number, SIGNAL(valueChanged(int)), this, SLOT(slotStartSearch(int)));
     sound_box->setEnabled(false);
     search_text->setFocus();
+#ifdef USE_NEPOMUK AND KDE_IS_VERSION(4,6,0)    
     Nepomuk::ResourceManager::instance()->init();
+#endif
     slotChangeService();
 }
 
@@ -221,7 +222,7 @@ void ResourceWidget::slotSaveSound()
     if (saveUrl.isEmpty()) return;
     if (KIO::NetAccess::download(KUrl(m_currentInfo.itemDownload), saveUrl, this)) {
         const KUrl filePath = KUrl(saveUrl);
-#ifdef USE_NEPOMUK
+#ifdef USE_NEPOMUK AND KDE_IS_VERSION(4,6,0)
         Nepomuk::Resource res( filePath );
         res.setProperty( Nepomuk::Vocabulary::NIE::license(), (Nepomuk::Variant) item_license->text() );
         res.setProperty( Nepomuk::Vocabulary::NIE::licenseType(), (Nepomuk::Variant) item_license->url() );