X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/b6fb59fc7e8a0eb82fcd479ca3613bea682722cc..362817d1834f2ada3ea4552a25fa39bbbb540f8c:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 91d668e9d..379cd9f90 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -141,7 +141,6 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) : connect(controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF))); connect(controller, SIGNAL(viewContextMenuRequested(QPointF)), this, SLOT(slotViewContextMenuRequested(QPointF))); connect(controller, SIGNAL(headerContextMenuRequested(QPointF)), this, SLOT(slotHeaderContextMenuRequested(QPointF))); - connect(controller, SIGNAL(itemExpansionToggleClicked(int)), this, SLOT(slotItemExpansionToggleClicked(int))); connect(controller, SIGNAL(itemHovered(int)), this, SLOT(slotItemHovered(int))); connect(controller, SIGNAL(itemUnhovered(int)), this, SLOT(slotItemUnhovered(int))); connect(controller, SIGNAL(itemDropEvent(int,QGraphicsSceneDragDropEvent*)), this, SLOT(slotItemDropEvent(int,QGraphicsSceneDragDropEvent*))); @@ -339,7 +338,7 @@ void DolphinView::setItemSelectionEnabled(const QRegExp& pattern, bool enabled) for (int index = 0; index < model->count(); index++) { const KFileItem item = model->fileItem(index); - if (pattern.exactMatch(item.name())) { + if (pattern.exactMatch(item.text())) { // An alternative approach would be to store the matching items in a QSet and // select them in one go after the loop, but we'd need a new function // KItemListSelectionManager::setSelected(QSet, SelectionMode mode) @@ -788,17 +787,6 @@ void DolphinView::slotHeaderContextMenuRequested(const QPointF& pos) delete menu.data(); } -void DolphinView::slotItemExpansionToggleClicked(int index) -{ - // TODO: When doing a model->setExpanded(false) it should - // be checked here whether the current index is part of the - // closed sub-tree. If this is the case, the current index - // should be adjusted to the parent index. - KFileItemModel* model = fileItemModel(); - const bool expanded = model->isExpanded(index); - model->setExpanded(index, !expanded); -} - void DolphinView::slotItemHovered(int index) { const KFileItem item = fileItemModel()->fileItem(index);