From 0da47e8f7bcbf80934ce603f0207bca397f9e0b6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Sun, 1 Jan 2012 15:50:59 +0100 Subject: [PATCH] Fix compilation with KDE < 4.6 (Nepomuk): http://kdenlive.org/mantis/view.php?id=2457 --- src/utils/freesound.cpp | 16 +--------------- src/utils/resourcewidget.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/utils/freesound.cpp b/src/utils/freesound.cpp index cb445934..11637b2e 100644 --- a/src/utils/freesound.cpp +++ b/src/utils/freesound.cpp @@ -28,22 +28,8 @@ #include #include "kdenlivesettings.h" -#include -#include -#include #include -#include -#include -#include - -#ifdef USE_NEPOMUK -#include -#include -#include -#include -#include -#include -#endif +#include #ifdef USE_QJSON #include diff --git a/src/utils/resourcewidget.cpp b/src/utils/resourcewidget.cpp index e2b4fa2b..23e62474 100644 --- a/src/utils/resourcewidget.cpp +++ b/src/utils/resourcewidget.cpp @@ -38,7 +38,7 @@ #include #include -#ifdef USE_NEPOMUK +#ifdef USE_NEPOMUK AND KDE_IS_VERSION(4,6,0) #include #include #include @@ -47,7 +47,6 @@ #include #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() ); -- 2.39.2