From: Jean-Baptiste Mardelle Date: Sun, 1 Jan 2012 17:20:36 +0000 (+0100) Subject: Fix incorrect check for KDE version X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f92aeac8ef7a40b72be249215ee5468544051c1d;p=kdenlive Fix incorrect check for KDE version --- diff --git a/src/utils/resourcewidget.cpp b/src/utils/resourcewidget.cpp index 23e62474..c8cb51ed 100644 --- a/src/utils/resourcewidget.cpp +++ b/src/utils/resourcewidget.cpp @@ -29,6 +29,7 @@ #include #include +#include #include "kdenlivesettings.h" #include #include @@ -38,7 +39,8 @@ #include #include -#ifdef USE_NEPOMUK AND KDE_IS_VERSION(4,6,0) +#ifdef USE_NEPOMUK +#if KDE_IS_VERSION(4,6,0) #include #include #include @@ -46,6 +48,7 @@ #include #include #endif +#endif ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) : QDialog(parent), @@ -81,8 +84,10 @@ 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) +#ifdef USE_NEPOMUK +#if KDE_IS_VERSION(4,6,0) Nepomuk::ResourceManager::instance()->init(); +#endif #endif slotChangeService(); } @@ -222,13 +227,15 @@ 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 AND KDE_IS_VERSION(4,6,0) +#ifdef USE_NEPOMUK +#if 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() ); res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), sound_name->url() ); //res.setDescription(item_description->toPlainText()); //res.setProperty( Soprano::Vocabulary::NAO::description(), +#endif #endif emit addClip(KUrl(saveUrl), QString());//, sound_name->url()); }