diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-10-23 15:06:29 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-10-23 15:06:29 +0100 |
commit | d8298e7f069f961fc077ceacff2c332d58734688 (patch) | |
tree | 7469d65e7bcf7180a117062a3c903ca0909cc467 /src/qt | |
parent | f4e96c29a6620f609e9918292b99cb876c9665f7 (diff) |
qt, refactor: Drop superfluous type conversions
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/psbtoperationsdialog.cpp | 8 | ||||
-rw-r--r-- | src/qt/psbtoperationsdialog.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/qt/psbtoperationsdialog.cpp b/src/qt/psbtoperationsdialog.cpp index 26f1696de1..4f2f9d7457 100644 --- a/src/qt/psbtoperationsdialog.cpp +++ b/src/qt/psbtoperationsdialog.cpp @@ -167,13 +167,13 @@ void PSBTOperationsDialog::saveTransaction() { } 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); } -std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx) +QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx) { - QString tx_description = ""; + QString tx_description; CAmount totalAmount = 0; for (const CTxOut& out : psbtx.tx->vout) { 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))); } - return tx_description.toStdString(); + return tx_description; } void PSBTOperationsDialog::showStatus(const QString &msg, StatusLevel level) { diff --git a/src/qt/psbtoperationsdialog.h b/src/qt/psbtoperationsdialog.h index f37bdbe39a..23f7dbf227 100644 --- a/src/qt/psbtoperationsdialog.h +++ b/src/qt/psbtoperationsdialog.h @@ -6,6 +6,7 @@ #define BITCOIN_QT_PSBTOPERATIONSDIALOG_H #include <QDialog> +#include <QString> #include <psbt.h> #include <qt/clientmodel.h> @@ -46,7 +47,7 @@ private: size_t couldSignInputs(const PartiallySignedTransaction &psbtx); void updateTransactionDisplay(); - std::string renderTransaction(const PartiallySignedTransaction &psbtx); + QString renderTransaction(const PartiallySignedTransaction &psbtx); void showStatus(const QString &msg, StatusLevel level); void showTransactionStatus(const PartiallySignedTransaction &psbtx); }; |