qt: Register CAmount metatype
This allows sending the type over queued connections. Also normalize signal/slot names.
This commit is contained in:
@@ -73,6 +73,7 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
||||
|
||||
// Declare meta types used for QMetaObject::invokeMethod
|
||||
Q_DECLARE_METATYPE(bool*)
|
||||
Q_DECLARE_METATYPE(CAmount)
|
||||
|
||||
static void InitMessage(const std::string &message)
|
||||
{
|
||||
@@ -509,6 +510,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Register meta types used for QMetaObject::invokeMethod
|
||||
qRegisterMetaType< bool* >();
|
||||
// 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");
|
||||
|
||||
/// 3. Application identification
|
||||
// must be set before OptionsModel is initialized or translations are loaded,
|
||||
|
||||
Reference in New Issue
Block a user