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

Merge bitcoin-core/gui#726: Register wallet::AddressPurpose type

a45b54406d 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 a45b54406d
  furszy:
    Tested ACK a45b54406d

Tree-SHA512: c670f4bf56442613d3fe038b0ba21acfcd4c69aa5340072e9a77d83f5fab1bf2facd87a9e1f42d88f496d277b27b79e7090444d59a9b9e71f3b486e171daa669
This commit is contained in:
Hennadii Stepanov 2023-04-13 14:34:07 +01:00
commit 19764dc143
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/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");