From a45b54406dbce4fbf8a316a0e91615eb480da653 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 13 Apr 2023 12:03:06 +0100 Subject: [PATCH] qt: Register `wallet::AddressPurpose` type --- src/qt/bitcoin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 2c413e8b43..f604039427 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #endif // ENABLE_WALLET #include @@ -79,6 +80,9 @@ Q_DECLARE_METATYPE(CAmount) Q_DECLARE_METATYPE(SynchronizationState) Q_DECLARE_METATYPE(SyncType) Q_DECLARE_METATYPE(uint256) +#ifdef ENABLE_WALLET +Q_DECLARE_METATYPE(wallet::AddressPurpose) +#endif // ENABLE_WALLET static void RegisterMetaTypes() { @@ -88,7 +92,8 @@ static void RegisterMetaTypes() qRegisterMetaType(); #ifdef ENABLE_WALLET qRegisterMetaType(); - #endif + qRegisterMetaType(); + #endif // ENABLE_WALLET // Register typedefs (see https://doc.qt.io/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");