Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | TxId SendCoins(CWallet &wallet, SendCoinsDialog &sendCoinsDialog, | ||||
boost::signals2::scoped_connection c = | boost::signals2::scoped_connection c = | ||||
wallet.NotifyTransactionChanged.connect( | wallet.NotifyTransactionChanged.connect( | ||||
[&txid](CWallet *, const TxId &hash, ChangeType status) { | [&txid](CWallet *, const TxId &hash, ChangeType status) { | ||||
if (status == CT_NEW) { | if (status == CT_NEW) { | ||||
txid = hash; | txid = hash; | ||||
} | } | ||||
}); | }); | ||||
ConfirmSend(); | ConfirmSend(); | ||||
bool invoked = | |||||
QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked"); | QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked"); | ||||
assert(invoked); | |||||
return txid; | return txid; | ||||
} | } | ||||
//! Find index of txid in transaction list. | //! Find index of txid in transaction list. | ||||
QModelIndex FindTx(const QAbstractItemModel &model, const uint256 &txid) { | QModelIndex FindTx(const QAbstractItemModel &model, const uint256 &txid) { | ||||
QString hash = QString::fromStdString(txid.ToString()); | QString hash = QString::fromStdString(txid.ToString()); | ||||
int rows = model.rowCount({}); | int rows = model.rowCount({}); | ||||
for (int row = 0; row < rows; ++row) { | for (int row = 0; row < rows; ++row) { | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |