┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/kmetadatawidget.cpp
diff options
context:
space:
mode:
authorSebastian Trueg <[email protected]>2009-11-21 09:33:37 +0000
committerSebastian Trueg <[email protected]>2009-11-21 09:33:37 +0000
commitccd9a32988576784f77f63539b48745843ac52ba (patch)
tree55db6bcc6752d312bd1052189aa3fcaf152ea5d6 /src/panels/information/kmetadatawidget.cpp
parent83e8cdf8fb1bce53a6adc601cc845bb5334476d2 (diff)
Simplified the clickable resource metadata display. This also fixes a bug where sometimes resources are not displayed at all
svn path=/trunk/KDE/kdebase/apps/; revision=1052237
Diffstat (limited to 'src/panels/information/kmetadatawidget.cpp')
-rw-r--r--src/panels/information/kmetadatawidget.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/panels/information/kmetadatawidget.cpp b/src/panels/information/kmetadatawidget.cpp
index 7e99c45ff..7109fd282 100644
--- a/src/panels/information/kmetadatawidget.cpp
+++ b/src/panels/information/kmetadatawidget.cpp
@@ -108,12 +108,6 @@ public:
* Merges items like 'width' and 'height' as one item.
*/
QList<KLoadMetaDataThread::Item> mergedItems(const QList<KLoadMetaDataThread::Item>& items);
-
- /**
- * Returns a (clickable) text for the given item, that can be used for
- * the information value widget.
- */
- QString labelText(const KLoadMetaDataThread::Item& item) const;
#endif
bool m_sizeVisible;
@@ -372,7 +366,7 @@ void KMetaDataWidget::Private::slotLoadingFinished()
} else {
// create new row
QLabel* infoLabel = new QLabel(item.label, q);
- QLabel* infoValue = new QLabel(labelText(item), q);
+ QLabel* infoValue = new QLabel(item.value, q);
connect(infoValue, SIGNAL(linkActivated(QString)),
q, SLOT(slotLinkActivated(QString)));
addRow(infoLabel, infoValue);
@@ -503,21 +497,6 @@ QList<KLoadMetaDataThread::Item>
return mergedItems;
}
-
-QString KMetaDataWidget::Private::labelText(const KLoadMetaDataThread::Item& item) const
-{
- if (item.resources.isEmpty()) {
- return item.value;
- }
-
- QStringList links;
- foreach(const Nepomuk::Resource& res, item.resources) {
- links << QString::fromLatin1("<a href=\"%1\">%2</a>")
- .arg(KUrl(res.resourceUri()).url())
- .arg(res.genericLabel());
- }
- return QLatin1String("<p>") + links.join(QLatin1String(";\n"));
-}
#endif
KMetaDataWidget::KMetaDataWidget(QWidget* parent) :