From: Peter Penz Date: Fri, 26 Feb 2010 20:08:09 +0000 (+0000) Subject: use NFO URI to check whether the width and height should be merged as one label X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/65106c30375b026fa3c759b684f25af8d2cc31c2?ds=inline use NFO URI to check whether the width and height should be merged as one label svn path=/trunk/KDE/kdebase/apps/; revision=1096542 --- diff --git a/src/panels/information/kloadmetadatathread.cpp b/src/panels/information/kloadmetadatathread.cpp index 0239503be..eeb9f5146 100644 --- a/src/panels/information/kloadmetadatathread.cpp +++ b/src/panels/information/kloadmetadatathread.cpp @@ -107,7 +107,7 @@ void KLoadMetaDataThread::run() Nepomuk::Types::Property prop(it.key()); if (settings.readEntry(prop.name(), true)) { Item item; - item.name = prop.name(); + item.name = prop.uri().toString(); item.label = nfo.translation(prop.uri()); item.value = formatValue(it.value()); m_items.append(item); diff --git a/src/panels/information/kmetadatawidget.cpp b/src/panels/information/kmetadatawidget.cpp index 4d2812637..8d66dfadc 100644 --- a/src/panels/information/kmetadatawidget.cpp +++ b/src/panels/information/kmetadatawidget.cpp @@ -499,18 +499,18 @@ QList KLoadMetaDataThread::Item height; foreach (const KLoadMetaDataThread::Item& item, items) { - if (item.name == "width") { + if (item.name == QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width")) { width = item; - } else if (item.name == "height") { + } else if (item.name == QLatin1String("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height")) { height = item; } else { // insert the item sorted by the label int pos = 0; - while ( mergedItems.count() > pos && - mergedItems[pos].label < item.label ) { + while ((mergedItems.count() > pos) && + (mergedItems[pos].label < item.label)) { ++pos; } - mergedItems.insert( pos, item ); + mergedItems.insert(pos, item); } }