]> git.lyx.org Git - features.git/commitdiff
revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 12 Mar 2023 12:04:24 +0000 (13:04 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 12 Mar 2023 12:05:58 +0000 (13:05 +0100)
src/frontends/qt/CategorizedCombo.cpp
src/frontends/qt/LayoutBox.cpp

index ac4b45068f807178075527eccd0a95660bcf6fa9..0482e1c874fe14a9e6135679166543e0e9e33fa5 100644 (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
index ab2cd7a0854f78785fe48d9f6e088270b7f4e0e1..435bd47835321ba867fbee9add160df70da94a2d 100644 (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