┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincolumnwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphincolumnwidget.cpp')
-rw-r--r--src/dolphincolumnwidget.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp
index 380573629..92fbd4e79 100644
--- a/src/dolphincolumnwidget.cpp
+++ b/src/dolphincolumnwidget.cpp
@@ -190,6 +190,26 @@ void DolphinColumnWidget::updateBackground()
update();
}
+void DolphinColumnWidget::setNameFilter(const QString& nameFilter)
+{
+ // The name filter of KDirLister does a 'hard' filtering, which
+ // means that only the items are shown where the names match
+ // exactly the filter. This is non-transparent for the user, which
+ // just wants to have a 'soft' filtering: does the name contain
+ // the filter string?
+ QString adjustedFilter(nameFilter);
+ adjustedFilter.insert(0, '*');
+ adjustedFilter.append('*');
+
+ m_dirLister->setNameFilter(adjustedFilter);
+ m_dirLister->emitChanges();
+}
+
+QString DolphinColumnWidget::nameFilter() const
+{
+ return m_dirLister->nameFilter();
+}
+
void DolphinColumnWidget::dragEnterEvent(QDragEnterEvent* event)
{
if (event->mimeData()->hasUrls()) {