diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-15 23:04:01 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-29 15:49:30 +0300 |
commit | 62cb8d98d27e7f316f01f177f35ad0ed6f8cd9ce (patch) | |
tree | 95c61299575516e33b40dc5d9e32b79ff4c509f8 /src | |
parent | f73e5c972ab096e0f80cb9e753fa221d17313358 (diff) | |
download | bitcoin-62cb8d98d27e7f316f01f177f35ad0ed6f8cd9ce.tar.xz |
qt: Drop BitcoinGUI* WalletFrame data member
This changes removes bitcoingui->walletframe->bitcoingui circular
dependency.
This commit does not change behavior.
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/walletframe.cpp | 8 | ||||
-rw-r--r-- | src/qt/walletframe.h | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index f85a882eed..0f2ea99685 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -4,7 +4,6 @@ #include <qt/walletframe.h> -#include <qt/bitcoingui.h> #include <qt/overviewpage.h> #include <qt/walletmodel.h> #include <qt/walletview.h> @@ -17,9 +16,8 @@ #include <QPushButton> #include <QVBoxLayout> -WalletFrame::WalletFrame(const PlatformStyle* _platformStyle, BitcoinGUI* _gui) - : QFrame(_gui), - gui(_gui), +WalletFrame::WalletFrame(const PlatformStyle* _platformStyle, QWidget* parent) + : QFrame(parent), platformStyle(_platformStyle), m_size_hint(OverviewPage{platformStyle, nullptr}.sizeHint()) { @@ -62,7 +60,7 @@ void WalletFrame::setClientModel(ClientModel *_clientModel) bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView) { - if (!gui || !clientModel || !walletModel) return false; + if (!clientModel || !walletModel) return false; if (mapWalletViews.count(walletModel) > 0) return false; diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h index 74bdef40df..844ed121a0 100644 --- a/src/qt/walletframe.h +++ b/src/qt/walletframe.h @@ -8,7 +8,6 @@ #include <QFrame> #include <QMap> -class BitcoinGUI; class ClientModel; class PlatformStyle; class SendCoinsRecipient; @@ -31,7 +30,7 @@ class WalletFrame : public QFrame Q_OBJECT public: - explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = nullptr); + explicit WalletFrame(const PlatformStyle* platformStyle, QWidget* parent); ~WalletFrame(); void setClientModel(ClientModel *clientModel); @@ -55,7 +54,6 @@ Q_SIGNALS: private: QStackedWidget *walletStack; - BitcoinGUI *gui; ClientModel *clientModel; QMap<WalletModel*, WalletView*> mapWalletViews; |