mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
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
This commit is contained in:
parent
7603e1ce8c
commit
d4442aca01
@ -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>
|
||||
#include <qt/masternodelist.h>
|
||||
@ -1775,9 +1774,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);
|
||||
|
@ -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("dash-core", psz).toStdString();
|
||||
@ -576,6 +571,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)
|
||||
@ -804,9 +804,6 @@ int main(int argc, char *argv[])
|
||||
"Warning: UI debug mode (-debug-ui) enabled" + QString(gArgs.IsArgSet("-custom-css-dir") ? "." : " without a custom css directory set with -custom-css-dir."));
|
||||
}
|
||||
|
||||
// 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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user