mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 14:02:53 +02:00
qt, refactor: Drop superfluous type conversions
This commit is contained in:
@@ -167,13 +167,13 @@ void PSBTOperationsDialog::saveTransaction() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PSBTOperationsDialog::updateTransactionDisplay() {
|
void PSBTOperationsDialog::updateTransactionDisplay() {
|
||||||
m_ui->transactionDescription->setText(QString::fromStdString(renderTransaction(m_transaction_data)));
|
m_ui->transactionDescription->setText(renderTransaction(m_transaction_data));
|
||||||
showTransactionStatus(m_transaction_data);
|
showTransactionStatus(m_transaction_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx)
|
QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx)
|
||||||
{
|
{
|
||||||
QString tx_description = "";
|
QString tx_description;
|
||||||
CAmount totalAmount = 0;
|
CAmount totalAmount = 0;
|
||||||
for (const CTxOut& out : psbtx.tx->vout) {
|
for (const CTxOut& out : psbtx.tx->vout) {
|
||||||
CTxDestination address;
|
CTxDestination address;
|
||||||
@@ -217,7 +217,7 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
|
|||||||
tx_description.append(tr("Transaction has %1 unsigned inputs.").arg(QString::number(num_unsigned)));
|
tx_description.append(tr("Transaction has %1 unsigned inputs.").arg(QString::number(num_unsigned)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return tx_description.toStdString();
|
return tx_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PSBTOperationsDialog::showStatus(const QString &msg, StatusLevel level) {
|
void PSBTOperationsDialog::showStatus(const QString &msg, StatusLevel level) {
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#define BITCOIN_QT_PSBTOPERATIONSDIALOG_H
|
#define BITCOIN_QT_PSBTOPERATIONSDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
#include <psbt.h>
|
#include <psbt.h>
|
||||||
#include <qt/clientmodel.h>
|
#include <qt/clientmodel.h>
|
||||||
@@ -46,7 +47,7 @@ private:
|
|||||||
|
|
||||||
size_t couldSignInputs(const PartiallySignedTransaction &psbtx);
|
size_t couldSignInputs(const PartiallySignedTransaction &psbtx);
|
||||||
void updateTransactionDisplay();
|
void updateTransactionDisplay();
|
||||||
std::string renderTransaction(const PartiallySignedTransaction &psbtx);
|
QString renderTransaction(const PartiallySignedTransaction &psbtx);
|
||||||
void showStatus(const QString &msg, StatusLevel level);
|
void showStatus(const QString &msg, StatusLevel level);
|
||||||
void showTransactionStatus(const PartiallySignedTransaction &psbtx);
|
void showTransactionStatus(const PartiallySignedTransaction &psbtx);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user