From c3f07d08b6b3d1d2055c24ca4acdcb8dcf3ab4f6 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 18 Sep 2020 17:12:01 +0200 Subject: [PATCH] Use setFilterRegularExpression() in Qt >= 5.12 The issue mentioned in the last commit was actually just about case sensitivity and using QRegularExpression::CaseInsensitiveOption fixes it. --- gui/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 91111af..3a172b0 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1002,12 +1002,12 @@ void MainWindow::removeEntry() void MainWindow::applyFilter(const QString &filterText) { m_entryFilterModel-> -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) - setFilterRegularExpression +#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) + setFilterRegularExpression(QRegularExpression(filterText, QRegularExpression::CaseInsensitiveOption)) #else - setFilterRegExp + setFilterRegExp(filterText) #endif - (filterText); + ; if (filterText.isEmpty()) { applyDefaultExpanding(QModelIndex()); } else {