mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
qt: Remove TransactionTableModel::TxIDRole
This commit is contained in:
parent
20e3b9a485
commit
3b26b6af72
8 changed files with 8 additions and 12 deletions
|
@ -240,7 +240,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
|
||||||
if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
|
if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
|
||||||
strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
|
strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
|
||||||
|
|
||||||
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + rec->getTxID() + "<br>";
|
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + rec->getTxHash() + "<br>";
|
||||||
strHTML += "<b>" + tr("Transaction total size") + ":</b> " + QString::number(wtx.tx->GetTotalSize()) + " bytes<br>";
|
strHTML += "<b>" + tr("Transaction total size") + ":</b> " + QString::number(wtx.tx->GetTotalSize()) + " bytes<br>";
|
||||||
strHTML += "<b>" + tr("Transaction virtual size") + ":</b> " + QString::number(GetVirtualTransactionSize(*wtx.tx)) + " bytes<br>";
|
strHTML += "<b>" + tr("Transaction virtual size") + ":</b> " + QString::number(GetVirtualTransactionSize(*wtx.tx)) + " bytes<br>";
|
||||||
strHTML += "<b>" + tr("Output index") + ":</b> " + QString::number(rec->getOutputIndex()) + "<br>";
|
strHTML += "<b>" + tr("Output index") + ":</b> " + QString::number(rec->getOutputIndex()) + "<br>";
|
||||||
|
|
|
@ -14,7 +14,7 @@ TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *pa
|
||||||
ui(new Ui::TransactionDescDialog)
|
ui(new Ui::TransactionDescDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowTitle(tr("Details for %1").arg(idx.data(TransactionTableModel::TxIDRole).toString()));
|
setWindowTitle(tr("Details for %1").arg(idx.data(TransactionTableModel::TxHashRole).toString()));
|
||||||
QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString();
|
QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString();
|
||||||
ui->detailText->setHtml(desc);
|
ui->detailText->setHtml(desc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
|
||||||
bool involvesWatchAddress = index.data(TransactionTableModel::WatchonlyRole).toBool();
|
bool involvesWatchAddress = index.data(TransactionTableModel::WatchonlyRole).toBool();
|
||||||
QString address = index.data(TransactionTableModel::AddressRole).toString();
|
QString address = index.data(TransactionTableModel::AddressRole).toString();
|
||||||
QString label = index.data(TransactionTableModel::LabelRole).toString();
|
QString label = index.data(TransactionTableModel::LabelRole).toString();
|
||||||
QString txid = index.data(TransactionTableModel::TxIDRole).toString();
|
QString txid = index.data(TransactionTableModel::TxHashRole).toString();
|
||||||
qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong());
|
qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong());
|
||||||
int status = index.data(TransactionTableModel::StatusRole).toInt();
|
int status = index.data(TransactionTableModel::StatusRole).toInt();
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@ bool TransactionRecord::statusUpdateNeeded() const
|
||||||
return status.cur_num_blocks != chainActive.Height() || status.needsUpdate;
|
return status.cur_num_blocks != chainActive.Height() || status.needsUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TransactionRecord::getTxID() const
|
QString TransactionRecord::getTxHash() const
|
||||||
{
|
{
|
||||||
return QString::fromStdString(hash.ToString());
|
return QString::fromStdString(hash.ToString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ public:
|
||||||
bool involvesWatchAddress;
|
bool involvesWatchAddress;
|
||||||
|
|
||||||
/** Return the unique identifier for this transaction (part) */
|
/** Return the unique identifier for this transaction (part) */
|
||||||
QString getTxID() const;
|
QString getTxHash() const;
|
||||||
|
|
||||||
/** Return the output index of the subtransaction */
|
/** Return the output index of the subtransaction */
|
||||||
int getOutputIndex() const;
|
int getOutputIndex() const;
|
||||||
|
|
|
@ -615,10 +615,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
||||||
return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
|
return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
|
||||||
case AmountRole:
|
case AmountRole:
|
||||||
return qint64(rec->credit + rec->debit);
|
return qint64(rec->credit + rec->debit);
|
||||||
case TxIDRole:
|
|
||||||
return rec->getTxID();
|
|
||||||
case TxHashRole:
|
case TxHashRole:
|
||||||
return QString::fromStdString(rec->hash.ToString());
|
return rec->getTxHash();
|
||||||
case TxHexRole:
|
case TxHexRole:
|
||||||
return priv->getTxHex(rec);
|
return priv->getTxHex(rec);
|
||||||
case TxPlainTextRole:
|
case TxPlainTextRole:
|
||||||
|
|
|
@ -56,8 +56,6 @@ public:
|
||||||
LabelRole,
|
LabelRole,
|
||||||
/** Net amount of transaction */
|
/** Net amount of transaction */
|
||||||
AmountRole,
|
AmountRole,
|
||||||
/** Unique identifier */
|
|
||||||
TxIDRole,
|
|
||||||
/** Transaction hash */
|
/** Transaction hash */
|
||||||
TxHashRole,
|
TxHashRole,
|
||||||
/** Transaction data, hex-encoded */
|
/** Transaction data, hex-encoded */
|
||||||
|
|
|
@ -371,7 +371,7 @@ void TransactionView::exportClicked()
|
||||||
writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
|
writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
|
||||||
writer.addColumn(tr("Address"), 0, TransactionTableModel::AddressRole);
|
writer.addColumn(tr("Address"), 0, TransactionTableModel::AddressRole);
|
||||||
writer.addColumn(BitcoinUnits::getAmountColumnTitle(model->getOptionsModel()->getDisplayUnit()), 0, TransactionTableModel::FormattedAmountRole);
|
writer.addColumn(BitcoinUnits::getAmountColumnTitle(model->getOptionsModel()->getDisplayUnit()), 0, TransactionTableModel::FormattedAmountRole);
|
||||||
writer.addColumn(tr("ID"), 0, TransactionTableModel::TxIDRole);
|
writer.addColumn(tr("ID"), 0, TransactionTableModel::TxHashRole);
|
||||||
|
|
||||||
if(!writer.write()) {
|
if(!writer.write()) {
|
||||||
Q_EMIT message(tr("Exporting Failed"), tr("There was an error trying to save the transaction history to %1.").arg(filename),
|
Q_EMIT message(tr("Exporting Failed"), tr("There was an error trying to save the transaction history to %1.").arg(filename),
|
||||||
|
@ -455,7 +455,7 @@ void TransactionView::copyAmount()
|
||||||
|
|
||||||
void TransactionView::copyTxID()
|
void TransactionView::copyTxID()
|
||||||
{
|
{
|
||||||
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxIDRole);
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxHashRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransactionView::copyTxHex()
|
void TransactionView::copyTxHex()
|
||||||
|
|
Loading…
Reference in a new issue