@@ -353,7 +353,7 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
353353 window = new BitcoinGUI (m_node, platformStyle, networkStyle, 0 );
354354
355355 pollShutdownTimer = new QTimer (window);
356- connect (pollShutdownTimer, SIGNAL ( timeout ()) , window, SLOT ( detectShutdown ()) );
356+ connect (pollShutdownTimer, &QTimer:: timeout, window, &BitcoinGUI:: detectShutdown);
357357}
358358
359359void BitcoinApplication::createSplashScreen (const NetworkStyle *networkStyle)
@@ -362,8 +362,8 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
362362 // We don't hold a direct pointer to the splash screen after creation, but the splash
363363 // screen will take care of deleting itself when slotFinish happens.
364364 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);
367367}
368368
369369void BitcoinApplication::startThread ()
@@ -375,14 +375,14 @@ void BitcoinApplication::startThread()
375375 executor->moveToThread (coreThread);
376376
377377 /* 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);
383383 /* 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);
386386
387387 coreThread->start ();
388388}
@@ -442,9 +442,9 @@ void BitcoinApplication::addWallet(WalletModel* walletModel)
442442 window->setCurrentWallet (walletModel->getWalletName ());
443443 }
444444
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);
448448
449449 m_wallet_models.push_back (walletModel);
450450#endif
@@ -504,13 +504,12 @@ void BitcoinApplication::initializeResult(bool success)
504504#ifdef ENABLE_WALLET
505505 // Now that initialization/startup is done, process any command-line
506506 // 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);
514513#endif
515514 pollShutdownTimer->start (200 );
516515 } else {
0 commit comments