diff options
| author | Peter Penz <[email protected]> | 2009-06-21 11:33:53 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-06-21 11:33:53 +0000 |
| commit | 0dd138d147f2609c680bfae9d1892c7afea38ba5 (patch) | |
| tree | 7ef852d7e0bcc1365e54a8940adf411571baaa20 /src/panels | |
| parent | 2f233f27dac57c22a267a8634be6f6422c3bc685 (diff) | |
Use the name of the property instead of the label, otherwise the stored keys would get invalid as soon as we get translated labels.
svn path=/trunk/KDE/kdebase/apps/; revision=984677
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/information/informationpanel.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index a2adb2a52..84b706b99 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -283,7 +283,7 @@ void InformationPanel::contextMenuEvent(QContextMenuEvent* event) QHash<QUrl, Nepomuk::Variant>::const_iterator it = properties.constBegin(); while (it != properties.constEnd()) { Nepomuk::Types::Property prop(it.key()); - const QString key = prop.label(); + const QString key = prop.name(); // Meta information provided by Nepomuk that is already // available from KFileItem should not be configurable. @@ -305,7 +305,7 @@ void InformationPanel::contextMenuEvent(QContextMenuEvent* event) } if (!skip) { - const QString label = tunedLabel(key); // TODO + const QString label = tunedLabel(prop.label()); QAction* action = new QAction(label, &popup); action->setCheckable(true); action->setChecked(settings.readEntry(key, true)); @@ -584,13 +584,12 @@ void InformationPanel::showMetaInfo() QHash<QUrl, Nepomuk::Variant>::const_iterator it = properties.constBegin(); while (it != properties.constEnd()) { Nepomuk::Types::Property prop(it.key()); - const QString label = prop.label(); - if (settings.readEntry(label, true)) { + if (settings.readEntry(prop.name(), true)) { // TODO #1: use Nepomuk::formatValue(res, prop) if available // instead of it.value().toString() // TODO #2: using tunedLabel() is a workaround for KDE 4.3 until // we get translated labels - m_metaTextLabel->add(tunedLabel(label) + ':', it.value().toString()); + m_metaTextLabel->add(tunedLabel(prop.label()) + ':', it.value().toString()); } ++it; } |
