@@ -71,11 +71,6 @@ Q_DECLARE_METATYPE(bool*)
7171Q_DECLARE_METATYPE(CAmount)
7272Q_DECLARE_METATYPE(uint256)
7373
74- static void InitMessage(const std::string& message)
75- {
76- noui_InitMessage (message);
77- }
78-
7974/* * Translate string to current locale using Qt. */
8075const std::function<std::string(const char *)> G_TRANSLATION_FUN = [](const char * psz) {
8176 return QCoreApplication::translate (" bitcoin-core" , psz).toStdString ();
@@ -561,11 +556,13 @@ int main(int argc, char *argv[])
561556#endif
562557 SetupEnvironment ();
563558
564- // Connect bitcoind signal handlers
565- noui_connect ();
566-
567559 std::unique_ptr<interfaces::Node> node = interfaces::MakeNode ();
568560
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+
569566 // Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
570567
571568 // / 1. Basic Qt initialization (not dependent on parameters or configuration)
@@ -699,9 +696,6 @@ int main(int argc, char *argv[])
699696 // Load GUI settings from QSettings
700697 app.createOptionsModel (gArgs .GetBoolArg (" -resetguisettings" , false ));
701698
702- // Subscribe to global signals from core
703- std::unique_ptr<interfaces::Handler> handler = node->handleInitMessage (InitMessage);
704-
705699 if (gArgs .GetBoolArg (" -splash" , DEFAULT_SPLASHSCREEN) && !gArgs .GetBoolArg (" -min" , false ))
706700 app.createSplashScreen (networkStyle.data ());
707701
0 commit comments