Skip to content

Commit 97a85eb

Browse files
committed
[GUI] Connect alert signal
1 parent ce58263 commit 97a85eb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/qt/clientmodel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "netbase.h"
2121
#include "guiinterface.h"
2222
#include "util.h"
23+
#include "warnings.h"
2324

2425
#include <stdint.h>
2526

src/qt/pivx/pivxgui.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ void PIVXGUI::handleRestart(QStringList args)
239239
}
240240

241241

242-
void PIVXGUI::setClientModel(ClientModel* clientModel)
242+
void PIVXGUI::setClientModel(ClientModel* _clientModel)
243243
{
244-
this->clientModel = clientModel;
244+
this->clientModel = _clientModel;
245245
if (this->clientModel) {
246246
// Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
247247
// while the client has not yet fully loaded
@@ -254,6 +254,9 @@ void PIVXGUI::setClientModel(ClientModel* clientModel)
254254

255255
// Receive and report messages from client model
256256
connect(clientModel, &ClientModel::message, this, &PIVXGUI::message);
257+
connect(clientModel, &ClientModel::alertsChanged, [this](const QString& _alertStr) {
258+
message(tr("Alert!"), _alertStr, CClientUIInterface::MSG_WARNING);
259+
});
257260
connect(topBar, &TopBar::walletSynced, dashboard, &DashboardWidget::walletSynced);
258261
connect(topBar, &TopBar::walletSynced, coldStakingWidget, &ColdStakingWidget::walletSynced);
259262

0 commit comments

Comments
 (0)