diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2017-09-25 04:18:35 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2017-11-10 11:50:05 +0000 |
commit | eac2abca02e01c83cc696ebe8a760e842e2f8424 (patch) | |
tree | 6270824fd1973e30e672726cc0b1725ff317cf6b | |
parent | c407c61c5bd7a41dae23d280644d46a9883de6ae (diff) |
Qt: Enable searching by transaction id
-rw-r--r-- | src/qt/transactionfilterproxy.cpp | 6 | ||||
-rw-r--r-- | src/qt/transactionview.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp index c912483093..1598728294 100644 --- a/src/qt/transactionfilterproxy.cpp +++ b/src/qt/transactionfilterproxy.cpp @@ -38,6 +38,7 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex & bool involvesWatchAddress = index.data(TransactionTableModel::WatchonlyRole).toBool(); QString address = index.data(TransactionTableModel::AddressRole).toString(); QString label = index.data(TransactionTableModel::LabelRole).toString(); + QString txid = index.data(TransactionTableModel::TxIDRole).toString(); qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong()); int status = index.data(TransactionTableModel::StatusRole).toInt(); @@ -51,8 +52,11 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex & return false; if(datetime < dateFrom || datetime > dateTo) return false; - if (!address.contains(m_search_string, Qt::CaseInsensitive) && !label.contains(m_search_string, Qt::CaseInsensitive)) + if (!address.contains(m_search_string, Qt::CaseInsensitive) && + ! label.contains(m_search_string, Qt::CaseInsensitive) && + ! txid.contains(m_search_string, Qt::CaseInsensitive)) { return false; + } if(amount < minAmount) return false; diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index e8380ad744..39e85d65b5 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -97,7 +97,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa search_widget = new QLineEdit(this); #if QT_VERSION >= 0x040700 - search_widget->setPlaceholderText(tr("Enter address or label to search")); + search_widget->setPlaceholderText(tr("Enter address, transaction id, or label to search")); #endif hlayout->addWidget(search_widget); |