]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
invalidateFilter() handling on >= Qt 6.10 windows-2.8.1-001
authorgg <chown_tee@proton.me>
Tue, 13 Jan 2026 03:38:03 +0000 (22:38 -0500)
committergg <chown_tee@proton.me>
Tue, 13 Jan 2026 03:38:03 +0000 (22:38 -0500)
src/model/CoinsProxyModel.cpp

index 193f428081cca1792b1ae5ffd3a10a18f709185d..bd9bfc45d286f2b4f77d3bf90ef0c5c11e1e8a40 100644 (file)
@@ -4,6 +4,7 @@
 #include "CoinsProxyModel.h"
 #include "CoinsModel.h"
 #include "libwalletqt/rows/CoinsInfo.h"
+#include <QtGlobal>
 
 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