aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-09-03 00:27:14 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-09-03 00:27:14 +0300
commitd319c4dae9ed7d59d71b926e677707fce4194d0c (patch)
tree9edaf41d675ed96010510f673ba779218c6db595 /src/qt/walletframe.cpp
parent92ddc02a16a74e10f24190929f05e2dcf2b55871 (diff)
qt, refactor: Replace WalletFrame::addWallet with WalletFrame::addView
No need to pass an instance of the WalletModel class to this method. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
Diffstat (limited to 'src/qt/walletframe.cpp')
-rw-r--r--src/qt/walletframe.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index d5bde544f7..f694fbecb5 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -64,11 +64,11 @@ void WalletFrame::setClientModel(ClientModel *_clientModel)
}
}
-bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView)
+bool WalletFrame::addView(WalletView* walletView)
{
- if (!clientModel || !walletModel) return false;
+ if (!clientModel) return false;
- if (mapWalletViews.count(walletModel) > 0) return false;
+ if (mapWalletViews.count(walletView->getWalletModel()) > 0) return false;
walletView->setClientModel(clientModel);
walletView->showOutOfSyncWarning(bOutOfSync);
@@ -81,7 +81,7 @@ bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView)
}
walletStack->addWidget(walletView);
- mapWalletViews[walletModel] = walletView;
+ mapWalletViews[walletView->getWalletModel()] = walletView;
return true;
}