]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
Let's do this in a safe way while we wait for the release team to reply telling if...
[dolphin.git] / src / dolphinview.cpp
index 30e3e7fe773b91376a6d9208c5fb9b9679947fe5..6a6c40c7bb23cc07753cdab7696b5ec6523b53e5 100644 (file)
@@ -412,22 +412,13 @@ void DolphinView::setAdditionalInfo(KFileItemDelegate::InformationList info)
     ViewProperties props(viewPropsUrl);
     props.setAdditionalInfo(info);
 
-    m_controller->setShowAdditionalInfo(!info.isEmpty());
+    m_controller->setAdditionalInfoCount(info.count());
     m_fileItemDelegate->setShowInformation(info);
 
     emit additionalInfoChanged(info);
     startDirLister(viewPropsUrl, true);
 }
 
-void DolphinView::setAdditionalInfo(KFileItemDelegate::Information info)
-{
-    KFileItemDelegate::InformationList list;
-    if (info != KFileItemDelegate::NoInformation)
-        list << info;
-
-    setAdditionalInfo(list);
-}
-
 KFileItemDelegate::InformationList DolphinView::additionalInfo() const
 {
     return m_fileItemDelegate->showInformation();
@@ -658,7 +649,7 @@ void DolphinView::applyViewProperties(const KUrl& url)
 
     KFileItemDelegate::InformationList info = props.additionalInfo();
     if (info != m_fileItemDelegate->showInformation()) {
-        m_controller->setShowAdditionalInfo(!info.isEmpty());
+        m_controller->setAdditionalInfoCount(info.count());
         m_fileItemDelegate->setShowInformation(info);
         emit additionalInfoChanged(info);
     }
@@ -807,6 +798,11 @@ void DolphinView::clearHoverInformation()
 
 void DolphinView::createView()
 {
+    KFileItemDelegate::InformationList infoList;
+    if (m_fileItemDelegate != 0) {
+        infoList = m_fileItemDelegate->showInformation();
+    }
+
     // delete current view
     QAbstractItemView* view = itemView();
     if (view != 0) {
@@ -846,6 +842,7 @@ void DolphinView::createView()
     Q_ASSERT(view != 0);
 
     m_fileItemDelegate = new KFileItemDelegate(view);
+    m_fileItemDelegate->setShowInformation(infoList);
     view->setItemDelegate(m_fileItemDelegate);
 
     view->setModel(m_proxyModel);