@@ -353,7 +353,7 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
353
353
window = new BitcoinGUI (m_node, platformStyle, networkStyle, 0 );
354
354
355
355
pollShutdownTimer = new QTimer (window);
356
- connect (pollShutdownTimer, SIGNAL ( timeout ()) , window, SLOT ( detectShutdown ()) );
356
+ connect (pollShutdownTimer, &QTimer:: timeout, window, &BitcoinGUI:: detectShutdown);
357
357
}
358
358
359
359
void BitcoinApplication::createSplashScreen (const NetworkStyle *networkStyle)
@@ -362,8 +362,8 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
362
362
// We don't hold a direct pointer to the splash screen after creation, but the splash
363
363
// screen will take care of deleting itself when slotFinish happens.
364
364
splash->show ();
365
- connect (this , SIGNAL ( splashFinished (QWidget*)) , splash, SLOT ( slotFinish (QWidget*)) );
366
- connect (this , SIGNAL ( requestedShutdown ()) , splash, SLOT ( close ()) );
365
+ connect (this , &BitcoinApplication:: splashFinished, splash, &SplashScreen:: slotFinish);
366
+ connect (this , &BitcoinApplication:: requestedShutdown, splash, &QWidget:: close);
367
367
}
368
368
369
369
void BitcoinApplication::startThread ()
@@ -375,14 +375,14 @@ void BitcoinApplication::startThread()
375
375
executor->moveToThread (coreThread);
376
376
377
377
/* communication to and from thread */
378
- connect (executor, SIGNAL ( initializeResult ( bool )) , this , SLOT ( initializeResult ( bool )) );
379
- connect (executor, SIGNAL ( shutdownResult ()) , this , SLOT ( shutdownResult ()) );
380
- connect (executor, SIGNAL ( runawayException (QString)) , this , SLOT ( handleRunawayException (QString)) );
381
- connect (this , SIGNAL ( requestedInitialize ()) , executor, SLOT ( initialize ()) );
382
- connect (this , SIGNAL ( requestedShutdown ()) , executor, SLOT ( shutdown ()) );
378
+ connect (executor, &BitcoinCore:: initializeResult, this , &BitcoinApplication:: initializeResult);
379
+ connect (executor, &BitcoinCore:: shutdownResult, this , &BitcoinApplication:: shutdownResult);
380
+ connect (executor, &BitcoinCore:: runawayException, this , &BitcoinApplication:: handleRunawayException);
381
+ connect (this , &BitcoinApplication:: requestedInitialize, executor, &BitcoinCore:: initialize);
382
+ connect (this , &BitcoinApplication:: requestedShutdown, executor, &BitcoinCore:: shutdown);
383
383
/* make sure executor object is deleted in its own thread */
384
- connect (this , SIGNAL ( stopThread ()) , executor, SLOT ( deleteLater ()) );
385
- connect (this , SIGNAL ( stopThread ()) , coreThread, SLOT ( quit ()) );
384
+ connect (this , &BitcoinApplication:: stopThread, executor, &QObject:: deleteLater);
385
+ connect (this , &BitcoinApplication:: stopThread, coreThread, &QThread:: quit);
386
386
387
387
coreThread->start ();
388
388
}
@@ -442,9 +442,9 @@ void BitcoinApplication::addWallet(WalletModel* walletModel)
442
442
window->setCurrentWallet (walletModel->getWalletName ());
443
443
}
444
444
445
- connect (walletModel, SIGNAL ( coinsSent ( WalletModel*, SendCoinsRecipient, QByteArray)) ,
446
- paymentServer, SLOT ( fetchPaymentACK (WalletModel*, const SendCoinsRecipient&, QByteArray)) );
447
- connect (walletModel, SIGNAL ( unload ()) , this , SLOT ( removeWallet ()) );
445
+ connect (walletModel, & WalletModel::coinsSent ,
446
+ paymentServer, &PaymentServer::fetchPaymentACK );
447
+ connect (walletModel, &WalletModel:: unload, this , &BitcoinApplication:: removeWallet);
448
448
449
449
m_wallet_models.push_back (walletModel);
450
450
#endif
@@ -504,13 +504,12 @@ void BitcoinApplication::initializeResult(bool success)
504
504
#ifdef ENABLE_WALLET
505
505
// Now that initialization/startup is done, process any command-line
506
506
// bitcoin: URIs or payment requests:
507
- connect (paymentServer, SIGNAL (receivedPaymentRequest (SendCoinsRecipient)),
508
- window, SLOT (handlePaymentRequest (SendCoinsRecipient)));
509
- connect (window, SIGNAL (receivedURI (QString)),
510
- paymentServer, SLOT (handleURIOrFile (QString)));
511
- connect (paymentServer, SIGNAL (message (QString,QString,unsigned int )),
512
- window, SLOT (message (QString,QString,unsigned int )));
513
- QTimer::singleShot (100 , paymentServer, SLOT (uiReady ()));
507
+ connect (paymentServer, &PaymentServer::receivedPaymentRequest, window, &BitcoinGUI::handlePaymentRequest);
508
+ connect (window, &BitcoinGUI::receivedURI, paymentServer, &PaymentServer::handleURIOrFile);
509
+ connect (paymentServer, &PaymentServer::message, [this ](const QString& title, const QString& message, unsigned int style) {
510
+ window->message (title, message, style);
511
+ });
512
+ QTimer::singleShot (100 , paymentServer, &PaymentServer::uiReady);
514
513
#endif
515
514
pollShutdownTimer->start (200 );
516
515
} else {
0 commit comments