@@ -52,32 +52,77 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
5252
5353void TransactionFilterProxy::setDateRange (const std::optional<QDateTime>& from, const std::optional<QDateTime>& to)
5454{
55+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
56+ beginFilterChange ();
57+ #endif
58+
5559 dateFrom = from;
5660 dateTo = to;
61+
62+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
63+ endFilterChange (QSortFilterProxyModel::Direction::Rows);
64+ #else
5765 invalidateFilter ();
66+ #endif
5867}
5968
6069void TransactionFilterProxy::setSearchString (const QString &search_string)
6170{
71+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
72+ beginFilterChange ();
73+ #endif
74+
6275 if (m_search_string == search_string) return ;
6376 m_search_string = search_string;
77+
78+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
79+ endFilterChange (QSortFilterProxyModel::Direction::Rows);
80+ #else
6481 invalidateFilter ();
82+ #endif
6583}
6684
6785void TransactionFilterProxy::setTypeFilter (quint32 modes)
6886{
87+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
88+ beginFilterChange ();
89+ #endif
90+
6991 this ->typeFilter = modes;
92+
93+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
94+ endFilterChange (QSortFilterProxyModel::Direction::Rows);
95+ #else
7096 invalidateFilter ();
97+ #endif
7198}
7299
73100void TransactionFilterProxy::setMinAmount (const CAmount& minimum)
74101{
102+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
103+ beginFilterChange ();
104+ #endif
105+
75106 this ->minAmount = minimum;
107+
108+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
109+ endFilterChange (QSortFilterProxyModel::Direction::Rows);
110+ #else
76111 invalidateFilter ();
112+ #endif
77113}
78114
79115void TransactionFilterProxy::setShowInactive (bool _showInactive)
80116{
117+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
118+ beginFilterChange ();
119+ #endif
120+
81121 this ->showInactive = _showInactive;
122+
123+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
124+ endFilterChange (QSortFilterProxyModel::Direction::Rows);
125+ #else
82126 invalidateFilter ();
127+ #endif
83128}
0 commit comments