@@ -148,11 +148,6 @@ uint256 ClientModel::getBestBlockHash()
148
148
return m_cached_tip_blocks;
149
149
}
150
150
151
- void ClientModel::updateAlert ()
152
- {
153
- Q_EMIT alertsChanged (getStatusBarWarnings ());
154
- }
155
-
156
151
enum BlockSource ClientModel::getBlockSource () const
157
152
{
158
153
if (m_node.getReindex ())
@@ -226,13 +221,6 @@ void ClientModel::updateBanlist()
226
221
}
227
222
228
223
// Handlers for core signals
229
- static void NotifyAlertChanged (ClientModel *clientmodel)
230
- {
231
- qDebug () << " NotifyAlertChanged" ;
232
- bool invoked = QMetaObject::invokeMethod (clientmodel, " updateAlert" , Qt::QueuedConnection);
233
- assert (invoked);
234
- }
235
-
236
224
static void BannedListChanged (ClientModel *clientmodel)
237
225
{
238
226
qDebug () << QString (" %1: Requesting update for peer banlist" ).arg (__func__);
@@ -284,7 +272,11 @@ void ClientModel::subscribeToCoreSignals()
284
272
[this ](bool network_active) {
285
273
Q_EMIT networkActiveChanged (network_active);
286
274
});
287
- m_handler_notify_alert_changed = m_node.handleNotifyAlertChanged (std::bind (NotifyAlertChanged, this ));
275
+ m_handler_notify_alert_changed = m_node.handleNotifyAlertChanged (
276
+ [this ]() {
277
+ qDebug () << " ClientModel: NotifyAlertChanged" ;
278
+ Q_EMIT alertsChanged (getStatusBarWarnings ());
279
+ });
288
280
m_handler_banned_list_changed = m_node.handleBannedListChanged (std::bind (BannedListChanged, this ));
289
281
m_handler_notify_block_tip = m_node.handleNotifyBlockTip (std::bind (BlockTipChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, false ));
290
282
m_handler_notify_header_tip = m_node.handleNotifyHeaderTip (std::bind (BlockTipChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, true ));
0 commit comments