┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Trueg <[email protected]>2008-06-27 18:34:52 +0000
committerSebastian Trueg <[email protected]>2008-06-27 18:34:52 +0000
commit868d2c946a51010a47c14707c2a89756680f29e9 (patch)
tree21e7dc43d9ed5d20ee7c178693b8631e59665282 /src
parentd6cddc8c7d8b408f23e5210e762fd653ad44113a (diff)
It is hard to understand which is the actual selected item here: m_selection, m_fileItem, or m_shownUrl. Anyway, now the descision for the metadata uses the exact same algo as for the name and preview and it works.
svn path=/trunk/KDE/kdebase/apps/; revision=825279
Diffstat (limited to 'src')
-rw-r--r--src/infosidebarpage.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp
index 4cb4e22c6..2cfe56bf7 100644
--- a/src/infosidebarpage.cpp
+++ b/src/infosidebarpage.cpp
@@ -339,16 +339,11 @@ void InfoSidebarPage::showMetaInfo()
{
m_metaTextLabel->clear();
+ const KUrl file = (!m_fileItem.isNull() || m_selection.isEmpty()) ? m_shownUrl : m_selection[0].url();
+
if ((m_selection.size() <= 1) || !m_fileItem.isNull()) {
- KFileItem fileItem;
- if (m_fileItem.isNull()) {
- // no pending request is ongoing
- const KUrl url = (m_selection.size() == 1) ? m_selection.first().url() : m_shownUrl;
- fileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url);
- fileItem.refresh();
- } else {
- fileItem = m_fileItem;
- }
+ KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, file);
+ fileItem.refresh();
if (fileItem.isDir()) {
m_metaTextLabel->add(i18nc("@label", "Type:"), i18nc("@label", "Folder"));