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()));
this, SLOT(showInfoMessage(const QString&)));
connect(m_view, SIGNAL(itemTriggered(KFileItem)),
this, SLOT(slotItemTriggered(KFileItem)));
- connect(m_view, SIGNAL(rootUrlChanged(const KUrl&)),
- m_urlNavigator, SLOT(saveRootUrl(const KUrl&)));
+ connect(m_view, SIGNAL(startedPathLoading(const KUrl&)),
+ this, SLOT(saveRootUrl(const KUrl&)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(restoreView(const KUrl&)));
m_folderCount = 0;
while (it != end) {
- KFileItem* item = *it;
- if (item->isDir()) {
+ const KFileItem item = *it;
+ if (item.isDir()) {
++m_folderCount;
} else {
++m_fileCount;
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();
}
void DolphinViewContainer::restoreView(const KUrl& url)
{
- m_view->setRootUrl(m_urlNavigator->savedRootUrl());
- m_view->setUrl(url);
+ m_view->updateView(url, m_urlNavigator->savedRootUrl());
+}
+
+void DolphinViewContainer::saveRootUrl(const KUrl& url)
+{
+ Q_UNUSED(url);
+ m_urlNavigator->saveRootUrl(m_view->rootUrl());
}
void DolphinViewContainer::slotItemTriggered(const KFileItem& item)