┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/metadataconfigurationdialog.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-10-16 13:45:47 +0000
committerPeter Penz <[email protected]>2009-10-16 13:45:47 +0000
commit7d4242d2c77e8e70e0a45af7a626b561febfdd04 (patch)
tree33b8d2b941b8eb9cfb1090b4d623fa674a05b3ab /src/panels/information/metadataconfigurationdialog.cpp
parent3852f31c30faea6c305d65e6756797184b3776d5 (diff)
Fixed compilation issue if HAVE_NEPOMUK is not set. This #ifdef HAVE_NEPOMUK stuff is really a pain :-(
svn path=/trunk/KDE/kdebase/apps/; revision=1036067
Diffstat (limited to 'src/panels/information/metadataconfigurationdialog.cpp')
-rw-r--r--src/panels/information/metadataconfigurationdialog.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/panels/information/metadataconfigurationdialog.cpp b/src/panels/information/metadataconfigurationdialog.cpp
index 42343780f..aa9ae5d96 100644
--- a/src/panels/information/metadataconfigurationdialog.cpp
+++ b/src/panels/information/metadataconfigurationdialog.cpp
@@ -23,10 +23,13 @@
#include <klocale.h>
-#define DISABLE_NEPOMUK_LEGACY
-#include <Nepomuk/Resource>
-#include <Nepomuk/Types/Property>
-#include <Nepomuk/Variant>
+#include <config-nepomuk.h>
+#ifdef HAVE_NEPOMUK
+ #define DISABLE_NEPOMUK_LEGACY
+ #include <Nepomuk/Resource>
+ #include <Nepomuk/Types/Property>
+ #include <Nepomuk/Variant>
+#endif
#include <QLabel>
#include <QListWidget>
@@ -100,10 +103,12 @@ void MetaDataConfigurationDialog::loadMetaData()
fixedItems.append(FixedItem("size", i18nc("@item::inlistbox", "Size")));
fixedItems.append(FixedItem("modified", i18nc("@item::inlistbox", "Modified")));
fixedItems.append(FixedItem("owner", i18nc("@item::inlistbox", "Owner")));
- fixedItems.append(FixedItem("permissions", i18nc("@item::inlistbox", "Permission")));
+ fixedItems.append(FixedItem("permissions", i18nc("@item::inlistbox", "Permissions")));
+#ifdef HAVE_NEPOMUK
fixedItems.append(FixedItem("rating", i18nc("@item::inlistbox", "Rating")));
fixedItems.append(FixedItem("tags", i18nc("@item::inlistbox", "Tags")));
fixedItems.append(FixedItem("comment", i18nc("@item::inlistbox", "Comment")));
+#endif
foreach (const FixedItem& fixedItem, fixedItems) {
const QString key = fixedItem.first;
@@ -115,6 +120,7 @@ void MetaDataConfigurationDialog::loadMetaData()
}
+#ifdef HAVE_NEPOMUK
// Get all meta information labels that are available for
// the currently shown file item and add them to the list.
Nepomuk::Resource res(m_url);
@@ -126,14 +132,15 @@ void MetaDataConfigurationDialog::loadMetaData()
// Meta information provided by Nepomuk that is already
// available from KFileItem should not be configurable.
- bool skip = (key == "fileExtension") ||
+ bool skip = (key == "contentSize") ||
+ (key == "fileExtension") ||
(key == "name") ||
- (key == "sourceModified") ||
+ (key == "lastModified") ||
(key == "size") ||
- (key == "mime type");
+ (key == "mimeType");
if (!skip) {
// const QString label = tunedLabel(prop.label());
- const QString label = prop.label();
+ const QString label = prop.label() + " --- " + key;
QListWidgetItem* item = new QListWidgetItem(label, m_metaDataList);
item->setData(Qt::UserRole, key);
const bool show = settings.readEntry(key, true);
@@ -142,6 +149,7 @@ void MetaDataConfigurationDialog::loadMetaData()
++it;
}
+#endif
}
#include "metadataconfigurationdialog_p.moc"