From 46e0215953aa3320a12faa307ae30a7100c74030 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 22 Dec 2023 13:18:37 +0100 Subject: [PATCH] libwalletqt: forward declare wallet2 --- src/libwalletqt/AddressBook.cpp | 1 + src/libwalletqt/AddressBook.h | 5 ++++- src/libwalletqt/Coins.cpp | 1 + src/libwalletqt/Coins.h | 6 ++++-- src/libwalletqt/Subaddress.cpp | 2 ++ src/libwalletqt/Subaddress.h | 6 ++++-- src/libwalletqt/SubaddressAccount.cpp | 2 +- src/libwalletqt/SubaddressAccount.h | 7 ++++--- src/libwalletqt/TransactionHistory.cpp | 1 + src/libwalletqt/TransactionHistory.h | 5 ++++- 10 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/libwalletqt/AddressBook.cpp b/src/libwalletqt/AddressBook.cpp index 607bd92..b145c1f 100644 --- a/src/libwalletqt/AddressBook.cpp +++ b/src/libwalletqt/AddressBook.cpp @@ -3,6 +3,7 @@ #include "AddressBook.h" #include +#include AddressBook::AddressBook(Wallet *wallet, tools::wallet2 *wallet2, QObject *parent) : QObject(parent) diff --git a/src/libwalletqt/AddressBook.h b/src/libwalletqt/AddressBook.h index b9e7f20..f3724ad 100644 --- a/src/libwalletqt/AddressBook.h +++ b/src/libwalletqt/AddressBook.h @@ -13,12 +13,15 @@ #include "rows/ContactRow.h" #include "Wallet.h" -#include "wallet/wallet2.h" namespace Monero { struct AddressBook; } +namespace tools{ + class wallet2; +} + class AddressBook : public QObject { Q_OBJECT diff --git a/src/libwalletqt/Coins.cpp b/src/libwalletqt/Coins.cpp index 3f74fe4..aefe557 100644 --- a/src/libwalletqt/Coins.cpp +++ b/src/libwalletqt/Coins.cpp @@ -3,6 +3,7 @@ #include "Coins.h" #include "rows/CoinsInfo.h" +#include Coins::Coins(Wallet *wallet, tools::wallet2 *wallet2, QObject *parent) : QObject(parent) diff --git a/src/libwalletqt/Coins.h b/src/libwalletqt/Coins.h index 8c6e9cd..68b58ee 100644 --- a/src/libwalletqt/Coins.h +++ b/src/libwalletqt/Coins.h @@ -10,15 +10,17 @@ #include #include #include -#include #include "Wallet.h" -#include "wallet/wallet2.h" namespace Monero { struct TransactionHistory; } +namespace tools { + class wallet2; +} + class CoinsInfo; class Coins : public QObject diff --git a/src/libwalletqt/Subaddress.cpp b/src/libwalletqt/Subaddress.cpp index d33072d..1a3bf5f 100644 --- a/src/libwalletqt/Subaddress.cpp +++ b/src/libwalletqt/Subaddress.cpp @@ -4,6 +4,8 @@ #include "Subaddress.h" #include +#include + Subaddress::Subaddress(Wallet *wallet, tools::wallet2 *wallet2, QObject *parent) : QObject(parent) , m_wallet(wallet) diff --git a/src/libwalletqt/Subaddress.h b/src/libwalletqt/Subaddress.h index 96c111a..32439fc 100644 --- a/src/libwalletqt/Subaddress.h +++ b/src/libwalletqt/Subaddress.h @@ -12,11 +12,13 @@ #include #include -#include - #include "Wallet.h" #include "rows/SubaddressRow.h" +namespace tools { + class wallet2; +} + class Subaddress : public QObject { Q_OBJECT diff --git a/src/libwalletqt/SubaddressAccount.cpp b/src/libwalletqt/SubaddressAccount.cpp index 16db72f..69b4a5b 100644 --- a/src/libwalletqt/SubaddressAccount.cpp +++ b/src/libwalletqt/SubaddressAccount.cpp @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: 2020-2023 The Monero Project #include "SubaddressAccount.h" -#include +#include SubaddressAccount::SubaddressAccount(Wallet *wallet, tools::wallet2 *wallet2, QObject *parent) : QObject(parent) diff --git a/src/libwalletqt/SubaddressAccount.h b/src/libwalletqt/SubaddressAccount.h index 28957b4..30d1a58 100644 --- a/src/libwalletqt/SubaddressAccount.h +++ b/src/libwalletqt/SubaddressAccount.h @@ -6,17 +6,18 @@ #include -#include #include #include #include #include -#include - #include "Wallet.h" #include "rows/AccountRow.h" +namespace tools { + class wallet2; +} + class SubaddressAccount : public QObject { Q_OBJECT diff --git a/src/libwalletqt/TransactionHistory.cpp b/src/libwalletqt/TransactionHistory.cpp index 3502992..bdcddcd 100644 --- a/src/libwalletqt/TransactionHistory.cpp +++ b/src/libwalletqt/TransactionHistory.cpp @@ -9,6 +9,7 @@ #include "WalletManager.h" #include "Transfer.h" #include "Ring.h" +#include "wallet/wallet2.h" bool TransactionHistory::transaction(int index, std::function callback) { diff --git a/src/libwalletqt/TransactionHistory.h b/src/libwalletqt/TransactionHistory.h index c55298d..cd6afbe 100644 --- a/src/libwalletqt/TransactionHistory.h +++ b/src/libwalletqt/TransactionHistory.h @@ -13,7 +13,10 @@ #include "rows/TransactionRow.h" #include "Wallet.h" -#include "wallet/wallet2.h" + +namespace tools { + class wallet2; +} namespace Monero { struct TransactionHistory;