From: gg Date: Tue, 13 Jan 2026 03:38:03 +0000 (-0500) Subject: invalidateFilter() handling on >= Qt 6.10 X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=1bb4a4dfb3364f7fcef70df70544a28d06c2f0a7;p=gamesguru%2Ffeather.git invalidateFilter() handling on >= Qt 6.10 --- diff --git a/src/model/CoinsProxyModel.cpp b/src/model/CoinsProxyModel.cpp index 193f4280..bd9bfc45 100644 --- a/src/model/CoinsProxyModel.cpp +++ b/src/model/CoinsProxyModel.cpp @@ -4,6 +4,7 @@ #include "CoinsProxyModel.h" #include "CoinsModel.h" #include "libwalletqt/rows/CoinsInfo.h" +#include CoinsProxyModel::CoinsProxyModel(QObject *parent, Coins *coins) : QSortFilterProxyModel(parent) @@ -15,13 +16,25 @@ CoinsProxyModel::CoinsProxyModel(QObject *parent, Coins *coins) } void CoinsProxyModel::setShowSpent(const bool showSpent) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) + beginFilterChange(); + m_showSpent = showSpent; + endFilterChange(); +#else m_showSpent = showSpent; invalidateFilter(); +#endif } void CoinsProxyModel::setSearchFilter(const QString &searchString) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) + beginFilterChange(); + m_searchRegExp.setPattern(searchString); + endFilterChange(); +#else m_searchRegExp.setPattern(searchString); invalidateFilter(); +#endif } bool CoinsProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const