@@ -71,11 +71,6 @@ Q_DECLARE_METATYPE(bool*)
71
71
Q_DECLARE_METATYPE(CAmount)
72
72
Q_DECLARE_METATYPE(uint256)
73
73
74
- static void InitMessage(const std::string& message)
75
- {
76
- noui_InitMessage (message);
77
- }
78
-
79
74
/* * Translate string to current locale using Qt. */
80
75
const std::function<std::string(const char *)> G_TRANSLATION_FUN = [](const char * psz) {
81
76
return QCoreApplication::translate (" bitcoin-core" , psz).toStdString ();
@@ -561,11 +556,13 @@ int main(int argc, char *argv[])
561
556
#endif
562
557
SetupEnvironment ();
563
558
564
- // Connect bitcoind signal handlers
565
- noui_connect ();
566
-
567
559
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode ();
568
560
561
+ // Subscribe to global signals from core
562
+ std::unique_ptr<interfaces::Handler> handler_message_box = node->handleMessageBox (noui_ThreadSafeMessageBox);
563
+ std::unique_ptr<interfaces::Handler> handler_question = node->handleQuestion (noui_ThreadSafeQuestion);
564
+ std::unique_ptr<interfaces::Handler> handler_init_message = node->handleInitMessage (noui_InitMessage);
565
+
569
566
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
570
567
571
568
// / 1. Basic Qt initialization (not dependent on parameters or configuration)
@@ -699,9 +696,6 @@ int main(int argc, char *argv[])
699
696
// Load GUI settings from QSettings
700
697
app.createOptionsModel (gArgs .GetBoolArg (" -resetguisettings" , false ));
701
698
702
- // Subscribe to global signals from core
703
- std::unique_ptr<interfaces::Handler> handler = node->handleInitMessage (InitMessage);
704
-
705
699
if (gArgs .GetBoolArg (" -splash" , DEFAULT_SPLASHSCREEN) && !gArgs .GetBoolArg (" -min" , false ))
706
700
app.createSplashScreen (networkStyle.data ());
707
701
0 commit comments