@@ -31,31 +31,35 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
31
31
{
32
32
QModelIndex index = sourceModel ()->index (sourceRow, 0 , sourceParent);
33
33
34
- int type = index.data (TransactionTableModel::TypeRole).toInt ();
35
- QDateTime datetime = index.data (TransactionTableModel::DateRole).toDateTime ();
36
- bool involvesWatchAddress = index.data (TransactionTableModel::WatchonlyRole).toBool ();
37
- QString address = index.data (TransactionTableModel::AddressRole).toString ();
38
- QString label = index.data (TransactionTableModel::LabelRole).toString ();
39
- QString txid = index.data (TransactionTableModel::TxHashRole).toString ();
40
- qint64 amount = llabs (index.data (TransactionTableModel::AmountRole).toLongLong ());
41
34
int status = index.data (TransactionTableModel::StatusRole).toInt ();
42
-
43
- if (!showInactive && status == TransactionStatus::Conflicted)
35
+ if (!showInactive && status == TransactionStatus::Conflicted)
44
36
return false ;
45
- if (!(TYPE (type) & typeFilter))
37
+
38
+ int type = index.data (TransactionTableModel::TypeRole).toInt ();
39
+ if (!(TYPE (type) & typeFilter))
46
40
return false ;
41
+
42
+ bool involvesWatchAddress = index.data (TransactionTableModel::WatchonlyRole).toBool ();
47
43
if (involvesWatchAddress && watchOnlyFilter == WatchOnlyFilter_No)
48
44
return false ;
49
45
if (!involvesWatchAddress && watchOnlyFilter == WatchOnlyFilter_Yes)
50
46
return false ;
51
- if (datetime < dateFrom || datetime > dateTo)
47
+
48
+ QDateTime datetime = index.data (TransactionTableModel::DateRole).toDateTime ();
49
+ if (datetime < dateFrom || datetime > dateTo)
52
50
return false ;
51
+
52
+ QString address = index.data (TransactionTableModel::AddressRole).toString ();
53
+ QString label = index.data (TransactionTableModel::LabelRole).toString ();
54
+ QString txid = index.data (TransactionTableModel::TxHashRole).toString ();
53
55
if (!address.contains (m_search_string, Qt::CaseInsensitive) &&
54
56
! label.contains (m_search_string, Qt::CaseInsensitive) &&
55
57
! txid.contains (m_search_string, Qt::CaseInsensitive)) {
56
58
return false ;
57
59
}
58
- if (amount < minAmount)
60
+
61
+ qint64 amount = llabs (index.data (TransactionTableModel::AmountRole).toLongLong ());
62
+ if (amount < minAmount)
59
63
return false ;
60
64
61
65
return true ;
0 commit comments