diff options
| author | Vishesh Handa <[email protected]> | 2013-01-07 14:24:47 +0530 |
|---|---|---|
| committer | Vishesh Handa <[email protected]> | 2013-01-07 19:59:23 +0530 |
| commit | 24c9bc6ce7f9d2dbef9f386befcdeed76622ef18 (patch) | |
| tree | cb13a9a351307c21969e9322adbc1b9ee5caabb4 /src/panels | |
| parent | 863a80dbd085aa7212b897f124226816bf683c85 (diff) | |
Dolphin: Make Nepomuk Support Optional
Use the KFileMetadataWidget if Nepomuk is not present.
REVIEW: 108236
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 8 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.h | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 355a57196..85571befd 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -31,7 +31,11 @@ #include <kseparator.h> #include <KStringHandler> +#ifndef HAVE_NEPOMUK +#include <KFileMetaDataWidget> +#else #include <nepomuk2/filemetadatawidget.h> +#endif #include <panels/places/placesitem.h> #include <panels/places/placesitemmodel.h> @@ -107,7 +111,11 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : const bool previewsShown = InformationPanelSettings::previewsShown(); m_preview->setVisible(previewsShown); +#ifndef HAVE_NEPOMUK + m_metaDataWidget = new KFileMetaDataWidget(parent); +#else m_metaDataWidget = new Nepomuk2::FileMetaDataWidget(parent); +#endif m_metaDataWidget->setFont(KGlobalSettings::smallestReadableFont()); m_metaDataWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); connect(m_metaDataWidget, SIGNAL(urlActivated(KUrl)), this, SIGNAL(urlActivated(KUrl))); diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h index 2a369bbbc..ed9200aef 100644 --- a/src/panels/information/informationpanelcontent.h +++ b/src/panels/information/informationpanelcontent.h @@ -20,6 +20,7 @@ #ifndef INFORMATIONPANELCONTENT_H #define INFORMATIONPANELCONTENT_H +#include "config-nepomuk.h" #include <KConfig> #include <KFileItem> #include <KUrl> @@ -34,9 +35,13 @@ class QString; class QLabel; class QScrollArea; +#ifndef HAVE_NEPOMUK +class KFileMetaDataWidget; +#else namespace Nepomuk2 { class FileMetaDataWidget; } +#endif /** * @brief Manages the widgets that display the meta information @@ -136,7 +141,11 @@ private: PixmapViewer* m_preview; PhononWidget* m_phononWidget; QLabel* m_nameLabel; +#ifndef HAVE_NEPOMUK + KFileMetaDataWidget* m_metaDataWidget; +#else Nepomuk2::FileMetaDataWidget* m_metaDataWidget; +#endif QScrollArea* m_metaDataArea; PlacesItemModel* m_placesItemModel; |
