🐛 fix: QSortFilterProxyModel::begin/endFilterChange is available since 6.9
This commit is contained in:
@@ -10,10 +10,16 @@ ProxyModel::ProxyModel(QObject* parent)
|
|||||||
|
|
||||||
void ProxyModel::setSearchText(const QString& text) {
|
void ProxyModel::setSearchText(const QString& text) {
|
||||||
if (m_searchText != text) {
|
if (m_searchText != text) {
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||||
beginFilterChange();
|
beginFilterChange();
|
||||||
|
#endif
|
||||||
m_searchText = text;
|
m_searchText = text;
|
||||||
setFilterFixedString(text);
|
setFilterFixedString(text);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||||
endFilterChange();
|
endFilterChange();
|
||||||
|
#elif
|
||||||
|
invalidateFilter();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user