From 6db0332d1484acc728616458eabd2596cba6a771 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Sun, 10 Nov 2019 12:03:53 +0200 Subject: [PATCH] merge bitcoin#17427: Fix missing qRegisterMetaType for size_t --- src/qt/dash.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index 24603e1c46..53077b4311 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.cpp @@ -470,16 +470,19 @@ int GuiMain(int argc, char* argv[]) BitcoinApplication app(*node, argc, argv); - // Register meta types used for QMetaObject::invokeMethod - qRegisterMetaType< bool* >(); + // Register meta types used for QMetaObject::invokeMethod and Qt::QueuedConnection + qRegisterMetaType(); #ifdef ENABLE_WALLET qRegisterMetaType(); #endif - // Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType) - // IMPORTANT if it is no longer a typedef use the normal variant above - qRegisterMetaType< CAmount >("CAmount"); - qRegisterMetaType< std::function >("std::function"); + // Register typedefs (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType) + // IMPORTANT: if CAmount is no longer a typedef use the normal variant above (see https://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType-1) + qRegisterMetaType("CAmount"); + qRegisterMetaType("size_t"); + + qRegisterMetaType>("std::function"); qRegisterMetaType("QMessageBox::Icon"); + /// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these // Command-line options take precedence: node->setupServerArgs();