squashme: connect thru node interface
This commit is contained in:
parent
a0f8df365d
commit
6bbdb2077e
1 changed files with 5 additions and 11 deletions
|
@ -71,11 +71,6 @@ Q_DECLARE_METATYPE(bool*)
|
||||||
Q_DECLARE_METATYPE(CAmount)
|
Q_DECLARE_METATYPE(CAmount)
|
||||||
Q_DECLARE_METATYPE(uint256)
|
Q_DECLARE_METATYPE(uint256)
|
||||||
|
|
||||||
static void InitMessage(const std::string& message)
|
|
||||||
{
|
|
||||||
noui_InitMessage(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Translate string to current locale using Qt. */
|
/** Translate string to current locale using Qt. */
|
||||||
const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) {
|
const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) {
|
||||||
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
|
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
|
||||||
|
@ -561,11 +556,13 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
SetupEnvironment();
|
SetupEnvironment();
|
||||||
|
|
||||||
// Connect bitcoind signal handlers
|
|
||||||
noui_connect();
|
|
||||||
|
|
||||||
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode();
|
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode();
|
||||||
|
|
||||||
|
// Subscribe to global signals from core
|
||||||
|
std::unique_ptr<interfaces::Handler> handler_message_box = node->handleMessageBox(noui_ThreadSafeMessageBox);
|
||||||
|
std::unique_ptr<interfaces::Handler> handler_question = node->handleQuestion(noui_ThreadSafeQuestion);
|
||||||
|
std::unique_ptr<interfaces::Handler> handler_init_message = node->handleInitMessage(noui_InitMessage);
|
||||||
|
|
||||||
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
|
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
|
||||||
|
|
||||||
/// 1. Basic Qt initialization (not dependent on parameters or configuration)
|
/// 1. Basic Qt initialization (not dependent on parameters or configuration)
|
||||||
|
@ -699,9 +696,6 @@ int main(int argc, char *argv[])
|
||||||
// Load GUI settings from QSettings
|
// Load GUI settings from QSettings
|
||||||
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false));
|
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false));
|
||||||
|
|
||||||
// Subscribe to global signals from core
|
|
||||||
std::unique_ptr<interfaces::Handler> handler = node->handleInitMessage(InitMessage);
|
|
||||||
|
|
||||||
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false))
|
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false))
|
||||||
app.createSplashScreen(networkStyle.data());
|
app.createSplashScreen(networkStyle.data());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue