@@ -236,15 +236,6 @@ void ClientModel::updateBanlist()
236
236
}
237
237
238
238
// Handlers for core signals
239
- static void ShowProgress (ClientModel *clientmodel, const std::string &title, int nProgress)
240
- {
241
- // emits signal "showProgress"
242
- bool invoked = QMetaObject::invokeMethod (clientmodel, " showProgress" , Qt::QueuedConnection,
243
- Q_ARG (QString, QString::fromStdString (title)),
244
- Q_ARG (int , nProgress));
245
- assert (invoked);
246
- }
247
-
248
239
static void NotifyNumConnectionsChanged (ClientModel *clientmodel, int newNumConnections)
249
240
{
250
241
// Too noisy: qDebug() << "NotifyNumConnectionsChanged: " + QString::number(newNumConnections);
@@ -306,7 +297,10 @@ static void BlockTipChanged(ClientModel* clientmodel, SynchronizationState sync_
306
297
void ClientModel::subscribeToCoreSignals ()
307
298
{
308
299
// Connect signals to client
309
- m_handler_show_progress = m_node.handleShowProgress (std::bind (ShowProgress, this , std::placeholders::_1, std::placeholders::_2));
300
+ m_handler_show_progress = m_node.handleShowProgress (
301
+ [this ](const std::string& title, int progress, [[maybe_unused]] bool resume_possible) {
302
+ Q_EMIT showProgress (QString::fromStdString (title), progress);
303
+ });
310
304
m_handler_notify_num_connections_changed = m_node.handleNotifyNumConnectionsChanged (std::bind (NotifyNumConnectionsChanged, this , std::placeholders::_1));
311
305
m_handler_notify_network_active_changed = m_node.handleNotifyNetworkActiveChanged (std::bind (NotifyNetworkActiveChanged, this , std::placeholders::_1));
312
306
m_handler_notify_alert_changed = m_node.handleNotifyAlertChanged (std::bind (NotifyAlertChanged, this ));
0 commit comments