Skip to content

Commit 19764dc

Browse files
committed
Merge #726: Register wallet::AddressPurpose type
a45b544 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 a45b544 furszy: Tested ACK a45b544 Tree-SHA512: c670f4bf56442613d3fe038b0ba21acfcd4c69aa5340072e9a77d83f5fab1bf2facd87a9e1f42d88f496d277b27b79e7090444d59a9b9e71f3b486e171daa669
2 parents cd59bb2 + a45b544 commit 19764dc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/qt/bitcoin.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <qt/paymentserver.h>
4141
#include <qt/walletcontroller.h>
4242
#include <qt/walletmodel.h>
43+
#include <wallet/types.h>
4344
#endif // ENABLE_WALLET
4445

4546
#include <boost/signals2/connection.hpp>
@@ -79,6 +80,9 @@ Q_DECLARE_METATYPE(CAmount)
7980
Q_DECLARE_METATYPE(SynchronizationState)
8081
Q_DECLARE_METATYPE(SyncType)
8182
Q_DECLARE_METATYPE(uint256)
83+
#ifdef ENABLE_WALLET
84+
Q_DECLARE_METATYPE(wallet::AddressPurpose)
85+
#endif // ENABLE_WALLET
8286

8387
static void RegisterMetaTypes()
8488
{
@@ -88,7 +92,8 @@ static void RegisterMetaTypes()
8892
qRegisterMetaType<SyncType>();
8993
#ifdef ENABLE_WALLET
9094
qRegisterMetaType<WalletModel*>();
91-
#endif
95+
qRegisterMetaType<wallet::AddressPurpose>();
96+
#endif // ENABLE_WALLET
9297
// Register typedefs (see https://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType)
9398
// IMPORTANT: if CAmount is no longer a typedef use the normal variant above (see https://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType-1)
9499
qRegisterMetaType<CAmount>("CAmount");

0 commit comments

Comments
 (0)