0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

qt: Register wallet::AddressPurpose type

This commit is contained in:
Hennadii Stepanov 2023-04-13 12:03:06 +01:00
parent cd603edeef
commit a45b54406d
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -40,6 +40,7 @@
#include <qt/paymentserver.h> #include <qt/paymentserver.h>
#include <qt/walletcontroller.h> #include <qt/walletcontroller.h>
#include <qt/walletmodel.h> #include <qt/walletmodel.h>
#include <wallet/types.h>
#endif // ENABLE_WALLET #endif // ENABLE_WALLET
#include <boost/signals2/connection.hpp> #include <boost/signals2/connection.hpp>
@ -79,6 +80,9 @@ Q_DECLARE_METATYPE(CAmount)
Q_DECLARE_METATYPE(SynchronizationState) Q_DECLARE_METATYPE(SynchronizationState)
Q_DECLARE_METATYPE(SyncType) Q_DECLARE_METATYPE(SyncType)
Q_DECLARE_METATYPE(uint256) Q_DECLARE_METATYPE(uint256)
#ifdef ENABLE_WALLET
Q_DECLARE_METATYPE(wallet::AddressPurpose)
#endif // ENABLE_WALLET
static void RegisterMetaTypes() static void RegisterMetaTypes()
{ {
@ -88,7 +92,8 @@ static void RegisterMetaTypes()
qRegisterMetaType<SyncType>(); qRegisterMetaType<SyncType>();
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
qRegisterMetaType<WalletModel*>(); qRegisterMetaType<WalletModel*>();
#endif qRegisterMetaType<wallet::AddressPurpose>();
#endif // ENABLE_WALLET
// Register typedefs (see https://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType) // 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) // 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"); qRegisterMetaType<CAmount>("CAmount");