Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui: Fix boost::signals2::no_slots_error in early calls to InitWarning #14783

merged 2 commits into from Dec 6, 2018
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -71,11 +71,6 @@ Q_DECLARE_METATYPE(bool*)

static void InitMessage(const std::string& message)

/** Translate string to current locale using Qt. */
const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) {
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
@@ -563,6 +558,11 @@ int main(int argc, char *argv[])

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

This comment has been minimized.

Copy link

MarcoFalke Nov 26, 2018


What makes it safe to subscribe to them here already, when some of then log to the debug log, which is in the datadir?

This comment has been minimized.

Copy link

promag Nov 27, 2018

Author Member

If that was the case then boost::signals2::no_slots_error would have been raised before?

/// 1. Basic Qt initialization (not dependent on parameters or configuration)
@@ -696,9 +696,6 @@ int main(int argc, char *argv[])
// Load GUI settings from QSettings
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))

@@ -31,7 +31,6 @@
#include <chainparams.h>
#include <interfaces/handler.h>
#include <interfaces/node.h>
#include <noui.h>
#include <ui_interface.h>
#include <util/system.h>

@@ -1226,9 +1225,6 @@ void BitcoinGUI::showModalOverlay()

static bool ThreadSafeMessageBox(BitcoinGUI* gui, const std::string& message, const std::string& caption, unsigned int style)
// Redundantly log and print message in non-gui fashion
noui_ThreadSafeMessageBox(message, caption, style);

bool modal = (style & CClientUIInterface::MODAL);
// The SECURE flag has no effect in the Qt GUI.
// bool secure = (style & CClientUIInterface::SECURE);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.