]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
Port dolphin to the KFileItemDelegate API changes.
[dolphin.git] / src / dolphinviewcontainer.cpp
index 5194646f670804a4e3847391688bfc749353a03a..bd4acc2be131a4ead94a600585dfc5f86b11dbd3 100644 (file)
@@ -106,7 +106,7 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
             this, SLOT(updateStatusBar()));
     connect(m_dirLister, SIGNAL(percent(int)),
             this, SLOT(updateProgress(int)));
-    connect(m_dirLister, SIGNAL(deleteItem(KFileItem*)),
+    connect(m_dirLister, SIGNAL(deleteItem(const KFileItem&)),
             this, SLOT(updateStatusBar()));
     connect(m_dirLister, SIGNAL(completed()),
             this, SLOT(updateItemCount()));
@@ -309,8 +309,8 @@ void DolphinViewContainer::updateItemCount()
     m_folderCount = 0;
 
     while (it != end) {
-        KFileItem* item = *it;
-        if (item->isDir()) {
+        const KFileItem item = *it;
+        if (item.isDir()) {
             ++m_folderCount;
         } else {
             ++m_fileCount;
@@ -452,18 +452,8 @@ void DolphinViewContainer::changeNameFilter(const QString& nameFilter)
     adjustedFilter.insert(0, '*');
     adjustedFilter.append('*');
 
-    // Use the ProxyModel to filter:
-    // This code is #ifdefed as setNameFilter behaves
-    // slightly different than the QSortFilterProxyModel
-    // as it will not remove directories. I will ask
-    // our beloved usability experts for input
-    // -- z.
-#if 0
     m_dirLister->setNameFilter(adjustedFilter);
     m_dirLister->emitChanges();
-#else
-    m_proxyModel->setFilterRegExp(nameFilter);
-#endif
 
     updateStatusBar();
 }