diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-15 22:57:35 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-29 15:49:29 +0300 |
commit | 20e2e24e90d782219e853ef0676ac66dc6a9de6a (patch) | |
tree | 5b24e3705c844bd57f302c9837a17c5c8e89e331 /src/qt/walletframe.cpp | |
parent | 123b401e0acf3b26f149711bdf06d7f6eced1968 (diff) |
qt: Move WalletView connections from WalletFrame to BitcoinGUI
This changes remove some pointers to the BitcoinGUI instance that is
required for the next commits.
This commit does not change behavior.
Diffstat (limited to 'src/qt/walletframe.cpp')
-rw-r--r-- | src/qt/walletframe.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 02b3c62867..af8eb4006a 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -66,17 +66,15 @@ void WalletFrame::setClientModel(ClientModel *_clientModel) } } -bool WalletFrame::addWallet(WalletModel *walletModel) +bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView) { if (!gui || !clientModel || !walletModel) return false; if (mapWalletViews.count(walletModel) > 0) return false; - WalletView *walletView = new WalletView(platformStyle, this); walletView->setClientModel(clientModel); walletView->setWalletModel(walletModel); walletView->showOutOfSyncWarning(bOutOfSync); - walletView->setPrivacy(gui->isPrivacyModeActivated()); WalletView* current_wallet_view = currentWalletView(); if (current_wallet_view) { @@ -88,17 +86,6 @@ bool WalletFrame::addWallet(WalletModel *walletModel) walletStack->addWidget(walletView); mapWalletViews[walletModel] = walletView; - connect(walletView, &WalletView::outOfSyncWarningClicked, this, &WalletFrame::outOfSyncWarningClicked); - connect(walletView, &WalletView::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage); - connect(walletView, &WalletView::coinsSent, gui, &BitcoinGUI::gotoHistoryPage); - connect(walletView, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) { - gui->message(title, message, style); - }); - connect(walletView, &WalletView::encryptionStatusChanged, gui, &BitcoinGUI::updateWalletStatus); - connect(walletView, &WalletView::incomingTransaction, gui, &BitcoinGUI::incomingTransaction); - connect(walletView, &WalletView::hdEnabledStatusChanged, gui, &BitcoinGUI::updateWalletStatus); - connect(gui, &BitcoinGUI::setPrivacy, walletView, &WalletView::setPrivacy); - return true; } |