[LyX/master] revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12.
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Sun Mar 12 11:02:57 UTC 2023
commit 05469a053fab46c865bba5e9329832853b24629e
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Sun Mar 12 13:04:24 2023 +0100
revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12.
---
src/frontends/qt/CategorizedCombo.cpp | 4 ++++
src/frontends/qt/LayoutBox.cpp | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/CategorizedCombo.cpp b/src/frontends/qt/CategorizedCombo.cpp
index ac4b450..0482e1c 100644
--- a/src/frontends/qt/CategorizedCombo.cpp
+++ b/src/frontends/qt/CategorizedCombo.cpp
@@ -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
diff --git a/src/frontends/qt/LayoutBox.cpp b/src/frontends/qt/LayoutBox.cpp
index ab2cd7a..435bd47 100644
--- a/src/frontends/qt/LayoutBox.cpp
+++ b/src/frontends/qt/LayoutBox.cpp
@@ -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
More information about the lyx-cvs
mailing list