qt: Handle exceptions in TransactionView::bumpFee slot

Also the parameter list of the TransactionView::bumpFee slot is made
compatible with one of the QAction::triggered signal.
This commit is contained in:
Hennadii Stepanov 2021-03-27 19:33:26 +02:00
parent bc00e13bc8
commit 1ac2bc7ac0
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F
2 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
connect(transactionView, &QTableView::doubleClicked, this, &TransactionView::doubleClicked); connect(transactionView, &QTableView::doubleClicked, this, &TransactionView::doubleClicked);
connect(transactionView, &QTableView::customContextMenuRequested, this, &TransactionView::contextualMenu); connect(transactionView, &QTableView::customContextMenuRequested, this, &TransactionView::contextualMenu);
connect(bumpFeeAction, &QAction::triggered, this, &TransactionView::bumpFee); GUIUtil::ExceptionSafeConnect(bumpFeeAction, &QAction::triggered, this, &TransactionView::bumpFee);
connect(abandonAction, &QAction::triggered, this, &TransactionView::abandonTx); connect(abandonAction, &QAction::triggered, this, &TransactionView::abandonTx);
connect(copyAddressAction, &QAction::triggered, this, &TransactionView::copyAddress); connect(copyAddressAction, &QAction::triggered, this, &TransactionView::copyAddress);
connect(copyLabelAction, &QAction::triggered, this, &TransactionView::copyLabel); connect(copyLabelAction, &QAction::triggered, this, &TransactionView::copyLabel);
@ -424,7 +424,7 @@ void TransactionView::abandonTx()
model->getTransactionTableModel()->updateTransaction(hashQStr, CT_UPDATED, false); model->getTransactionTableModel()->updateTransaction(hashQStr, CT_UPDATED, false);
} }
void TransactionView::bumpFee() void TransactionView::bumpFee([[maybe_unused]] bool checked)
{ {
if(!transactionView || !transactionView->selectionModel()) if(!transactionView || !transactionView->selectionModel())
return; return;

View File

@ -99,7 +99,7 @@ private Q_SLOTS:
void openThirdPartyTxUrl(QString url); void openThirdPartyTxUrl(QString url);
void updateWatchOnlyColumn(bool fHaveWatchOnly); void updateWatchOnlyColumn(bool fHaveWatchOnly);
void abandonTx(); void abandonTx();
void bumpFee(); void bumpFee(bool checked);
Q_SIGNALS: Q_SIGNALS:
void doubleClicked(const QModelIndex&); void doubleClicked(const QModelIndex&);