diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-04-13 14:34:07 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-04-13 14:41:28 +0100 |
commit | 19764dc143281376ea08e954018479ed10405b72 (patch) | |
tree | b59ac35aa639e1c1fb449d7f49b69908e862b1ed /src | |
parent | cd59bb2f5250e42a85825f0b471d905afea69d60 (diff) | |
parent | a45b54406dbce4fbf8a316a0e91615eb480da653 (diff) |
Merge bitcoin-core/gui#726: Register `wallet::AddressPurpose` type
a45b54406dbce4fbf8a316a0e91615eb480da653 qt: Register `wallet::AddressPurpose` type (Hennadii Stepanov)
Pull request description:
This PR is a follow up of bitcoin/bitcoin#27217.
Fixes #725.
ACKs for top commit:
achow101:
ACK a45b54406dbce4fbf8a316a0e91615eb480da653
furszy:
Tested ACK a45b54406dbce4fbf8a316a0e91615eb480da653
Tree-SHA512: c670f4bf56442613d3fe038b0ba21acfcd4c69aa5340072e9a77d83f5fab1bf2facd87a9e1f42d88f496d277b27b79e7090444d59a9b9e71f3b486e171daa669
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoin.cpp | 7 |
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"); |