X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/95f0ba76ae26e45a6ff9f1ec51db7d270ca278c0..abb6807645598e8117e98bbf232cd9cd90fe019a:/src/dolphindetailsview.cpp diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 460afd359..3dca2da28 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -114,8 +114,6 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, this, SLOT(slotEntered(const QModelIndex&))); connect(this, SIGNAL(viewportEntered()), controller, SLOT(emitViewportEntered())); - connect(controller, SIGNAL(nameFilterChanged(const QString&)), - this, SLOT(setNameFilter(const QString&))); connect(controller, SIGNAL(zoomLevelChanged(int)), this, SLOT(setZoomLevel(int))); connect(controller->dolphinView(), SIGNAL(additionalInfoChanged()), @@ -139,7 +137,6 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, connect(view, SIGNAL(showPreviewChanged()), this, SLOT(slotShowPreviewChanged())); - updateDecorationSize(view->showPreview()); setFocus(); viewport()->installEventFilter(this); @@ -154,7 +151,11 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, connect(m_expandableFoldersAction, SIGNAL(toggled(bool)), this, SLOT(setFoldersExpandable(bool))); + updateDecorationSize(view->showPreview()); + m_extensionsFactory = new ViewExtensionsFactory(this, controller); + m_extensionsFactory->fileItemDelegate()->setMinimizedNameColumn(true); + m_extensionsFactory->setAutoFolderExpandingEnabled(settings->expandableFolders()); } DolphinDetailsView::~DolphinDetailsView() @@ -420,7 +421,7 @@ void DolphinDetailsView::currentChanged(const QModelIndex& current, const QModel // Stay consistent with QListView: When changing the current index by key presses, // also change the selection. if (m_keyPressed) { - selectionModel()->select(current, QItemSelectionModel::ClearAndSelect); + setCurrentIndex(current); } } @@ -523,12 +524,6 @@ QRect DolphinDetailsView::elasticBandRect() const return QRect(topLeft, bottomRight).normalized(); } -void DolphinDetailsView::setNameFilter(const QString& nameFilter) -{ - DolphinSortFilterProxyModel* proxyModel = static_cast(model()); - proxyModel->setFilterRegExp(nameFilter); -} - void DolphinDetailsView::setZoomLevel(int level) { const int size = ZoomLevelInfo::iconSizeForZoomLevel(level);