aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-04-13 12:03:06 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-04-13 12:03:06 +0100
commita45b54406dbce4fbf8a316a0e91615eb480da653 (patch)
treef6d07b5bb50ef4a7e7e51622375cf8f6c6b5e419 /src
parentcd603edeef23c6229f697f022b3a47dc111bf0e3 (diff)
qt: Register `wallet::AddressPurpose` type
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoin.cpp7
1 files changed, 6 insertions, 1 deletions
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 <qt/paymentserver.h>
#include <qt/walletcontroller.h>
#include <qt/walletmodel.h>
+#include <wallet/types.h>
#endif // ENABLE_WALLET
#include <boost/signals2/connection.hpp>
@@ -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<SyncType>();
#ifdef ENABLE_WALLET
qRegisterMetaType<WalletModel*>();
- #endif
+ qRegisterMetaType<wallet::AddressPurpose>();
+ #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>("CAmount");