mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-05 11:28:49 +02:00
Merge #14879: qt: Add warning messages to the debug window
593ba696fbAdd warning messages to the debug window (Hennadii Stepanov) Pull request description: Fix: #11016 This PR adds warning messages to the debug window in `-disablewallet` mode.  ACKs for top commit: jonasschnelli: utACK593ba696fbpromag: ACK593ba696fb, agree with @Sjors https://github.com/bitcoin/bitcoin/pull/14879#pullrequestreview-196433092 above. ryanofsky: utACK593ba696fbTree-SHA512: a8ca78529bb16813ba7bfaf5ccd4349189979f08e78ea857746a6fb00fd9d7ed98d8f06f384830acba21dac57070060af23f6be8249398feb32a6efff1333de8
This commit is contained in:
@@ -558,6 +558,17 @@ bool RPCConsole::eventFilter(QObject* obj, QEvent *event)
|
||||
void RPCConsole::setClientModel(ClientModel *model)
|
||||
{
|
||||
clientModel = model;
|
||||
|
||||
bool wallet_enabled{false};
|
||||
#ifdef ENABLE_WALLET
|
||||
wallet_enabled = WalletModel::isWalletEnabled();
|
||||
#endif // ENABLE_WALLET
|
||||
if (model && !wallet_enabled) {
|
||||
// Show warning, for example if this is a prerelease version
|
||||
connect(model, &ClientModel::alertsChanged, this, &RPCConsole::updateAlerts);
|
||||
updateAlerts(model->getStatusBarWarnings());
|
||||
}
|
||||
|
||||
ui->trafficGraph->setClientModel(model);
|
||||
if (model && clientModel->getPeerTableModel() && clientModel->getBanTableModel()) {
|
||||
// Keep up to date with client
|
||||
@@ -1274,3 +1285,9 @@ QString RPCConsole::tabTitle(TabTypes tab_type) const
|
||||
{
|
||||
return ui->tabWidget->tabText(tab_type);
|
||||
}
|
||||
|
||||
void RPCConsole::updateAlerts(const QString& warnings)
|
||||
{
|
||||
this->ui->label_alerts->setVisible(!warnings.isEmpty());
|
||||
this->ui->label_alerts->setText(warnings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user