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.
This commit is contained in:
Martchus 2020-09-18 17:12:01 +02:00
parent 85a816e444
commit c3f07d08b6
1 changed files with 4 additions and 4 deletions

View File

@ -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 {