X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/ddcca5fb912cd91c7c6c535e01fb963869ccaee9..e3c03e466ea53e575752154cde4e24caea118471:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index f0dc17837..b433ca343 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -364,7 +364,7 @@ void DolphinView::markUrlAsCurrent(const QUrl &url) m_scrollToCurrentItem = true; } -void DolphinView::selectItems(const QRegExp& pattern, bool enabled) +void DolphinView::selectItems(const QRegularExpression ®exp, bool enabled) { const KItemListSelectionManager::SelectionMode mode = enabled ? KItemListSelectionManager::Select @@ -373,7 +373,7 @@ void DolphinView::selectItems(const QRegExp& pattern, bool enabled) for (int index = 0; index < m_model->count(); index++) { const KFileItem item = m_model->fileItem(index); - if (pattern.exactMatch(item.text())) { + if (regexp.match(item.text()).hasMatch()) { // An alternative approach would be to store the matching items in a KItemSet and // select them in one go after the loop, but we'd need a new function // KItemListSelectionManager::setSelected(KItemSet, SelectionMode mode)