mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-09-06 21:51:04 +02:00
qt: Handle exceptions in SendCoinsDialog::sendButtonClicked slot
Also, uic automatic connection replaced with an explicit one.
This commit is contained in:
@@ -129,6 +129,8 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
|
|||||||
ui->customFee->SetAllowEmpty(false);
|
ui->customFee->SetAllowEmpty(false);
|
||||||
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
|
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
|
||||||
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
||||||
|
|
||||||
|
GUIUtil::ExceptionSafeConnect(ui->sendButton, &QPushButton::clicked, this, &SendCoinsDialog::sendButtonClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendCoinsDialog::setClientModel(ClientModel *_clientModel)
|
void SendCoinsDialog::setClientModel(ClientModel *_clientModel)
|
||||||
@@ -375,7 +377,7 @@ bool SendCoinsDialog::PrepareSendText(QString& question_string, QString& informa
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendCoinsDialog::on_sendButton_clicked()
|
void SendCoinsDialog::sendButtonClicked([[maybe_unused]] bool checked)
|
||||||
{
|
{
|
||||||
if(!model || !model->getOptionsModel())
|
if(!model || !model->getOptionsModel())
|
||||||
return;
|
return;
|
||||||
|
@@ -80,7 +80,7 @@ private:
|
|||||||
void updateCoinControlState(CCoinControl& ctrl);
|
void updateCoinControlState(CCoinControl& ctrl);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void on_sendButton_clicked();
|
void sendButtonClicked(bool checked);
|
||||||
void on_buttonChooseFee_clicked();
|
void on_buttonChooseFee_clicked();
|
||||||
void on_buttonMinimizeFee_clicked();
|
void on_buttonMinimizeFee_clicked();
|
||||||
void removeEntry(SendCoinsEntry* entry);
|
void removeEntry(SendCoinsEntry* entry);
|
||||||
|
@@ -73,7 +73,7 @@ uint256 SendCoins(CWallet& wallet, SendCoinsDialog& sendCoinsDialog, const CTxDe
|
|||||||
if (status == CT_NEW) txid = hash;
|
if (status == CT_NEW) txid = hash;
|
||||||
}));
|
}));
|
||||||
ConfirmSend();
|
ConfirmSend();
|
||||||
bool invoked = QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked");
|
bool invoked = QMetaObject::invokeMethod(&sendCoinsDialog, "sendButtonClicked", Q_ARG(bool, false));
|
||||||
assert(invoked);
|
assert(invoked);
|
||||||
return txid;
|
return txid;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user