revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12.

This commit is contained in:
Jean-Marc Lasgouttes 2023-03-12 13:04:24 +01:00
parent 108f9c891b
commit 05469a053f
2 changed files with 8 additions and 0 deletions

View File

@ -287,7 +287,11 @@ void CategorizedCombo::Private::setFilter(QString const & s)
lastSel_ = filterModel_->mapToSource(filterModel_->index(sel, 0)).row();
filter_ = s;
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
filterModel_->setFilterRegExp(charFilterRegExp(filter_));
#else
filterModel_->setFilterRegularExpression(charFilterRegExp(filter_));
#endif
countCategories();
// restore old selection

View File

@ -320,7 +320,11 @@ void LayoutBox::Private::setFilter(QString const & s)
lastSel_ = filterModel_->mapToSource(filterModel_->index(sel, 0)).row();
filter_ = s;
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
filterModel_->setFilterRegExp(charFilterRegExp(filter_));
#else
filterModel_->setFilterRegularExpression(charFilterRegExp(filter_));
#endif
countCategories();
// restore old selection