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");