diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-12-06 14:51:37 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-12-06 14:52:18 -0500 |
commit | f8456256c8cb68562c6392c6f715b64fcdfa3fe7 (patch) | |
tree | 4fb8f1a9452f153ff7d076a491107d361d2183f1 /src | |
parent | 23a1fa0248fe3d152c6d74e919a19ccdb5141155 (diff) | |
parent | 6bbdb2077eb4dae9f7a1938bdbcffab884719cbe (diff) |
Merge #14783: gui: Fix boost::signals2::no_slots_error in early calls to InitWarning
6bbdb2077e squashme: connect thru node interface (João Barbosa)
a0f8df365d qt: Call noui_connect to prevent boost::signals2::no_slots_error in early calls to InitWarning (João Barbosa)
Pull request description:
Adding the following to `bitcoin.conf`
```
[xxx]
disablewallet=1
```
And running `bitcoin-qt` gives:
```
libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::signals2::no_slots_error> >: boost::signals2::no_slots_error
```
Fixes regression in #14708.
Tree-SHA512: 7c158376fad6ebcd80fc0dbe549d5b6e893fb82e7dc1e455825633d7f91b14dc34493487cab7642152e88f9eaf99bfa91988972d600e9fb289cf26afd64aff8a
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoin.cpp | 13 | ||||
-rw-r--r-- | src/qt/bitcoingui.cpp | 4 |
2 files changed, 5 insertions, 12 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index de236a016f..9d2ff6909e 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -71,11 +71,6 @@ Q_DECLARE_METATYPE(bool*) Q_DECLARE_METATYPE(CAmount) Q_DECLARE_METATYPE(uint256) -static void InitMessage(const std::string& message) -{ - noui_InitMessage(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 /// 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)) app.createSplashScreen(networkStyle.data()); diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ed705d6ba8..a16b2ddebf 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -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); |