From 2827b96d9817252c22ae6f788f4d073303178cea Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 8 Dec 2011 11:05:27 +0100 Subject: Fix "show hidden files" issues Use KFileItemModel instead of KDirLister for toggling the whether hidden files should be shown. This assures that the signal KFileItemModel::loadingCompleted() will be emitted. In the longterm Dolphin should only use the KFileItemModel, so that the KDirLister instance is used only internally as implementation detail in KFileItemModel. Although there are only a few cases left where KDirLister is used instead of KFileItemModel this cleanup will be postponed to after the 4.8 release... BUG: 287314 BUG: 288213 FIXED-IN: 4.8.0 --- src/views/dolphinview.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 873074653..fdca4cf86 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -262,8 +262,7 @@ void DolphinView::setHiddenFilesShown(bool show) ViewProperties props(url()); props.setHiddenFilesShown(show); - m_dirLister->setShowingDotFiles(show); - m_dirLister->emitChanges(); + fileItemModel()->setShowHiddenFiles(show); emit hiddenFilesShownChanged(show); } @@ -1170,9 +1169,8 @@ void DolphinView::applyViewProperties() } const bool hiddenFilesShown = props.hiddenFilesShown(); - if (hiddenFilesShown != m_dirLister->showingDotFiles()) { - m_dirLister->setShowingDotFiles(hiddenFilesShown); - m_dirLister->emitChanges(); + if (hiddenFilesShown != model->showHiddenFiles()) { + model->setShowHiddenFiles(hiddenFilesShown); emit hiddenFilesShownChanged(hiddenFilesShown); } -- cgit v1.3