diff options
| author | Jonas Schnelli <[email protected]> | 2016-10-19 17:07:42 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2016-10-19 17:08:17 +0200 |
| commit | 3e942a7060fed368f82add85177337361f6e8edd (patch) | |
| tree | af2630502fe8a876346307c65398b55d33098085 /src/qt/splashscreen.cpp | |
| parent | Merge #7948: RPC: augment getblockchaininfo bip9_softforks data (diff) | |
| parent | Qt/splash: Specifically keep track of which wallet(s) we are connected to for... (diff) | |
| download | discoin-3e942a7060fed368f82add85177337361f6e8edd.tar.xz discoin-3e942a7060fed368f82add85177337361f6e8edd.zip | |
Merge #8774: Qt refactors to better abstract wallet access
178cd88 Qt/splash: Specifically keep track of which wallet(s) we are connected to for later disconnecting (Luke Dashjr)
1880aeb Qt: Get the private key for signing messages via WalletModel (Luke Dashjr)
Diffstat (limited to 'src/qt/splashscreen.cpp')
| -rw-r--r-- | src/qt/splashscreen.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index e36d86fdd..cd2738565 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -164,9 +164,10 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr } #ifdef ENABLE_WALLET -static void ConnectWallet(SplashScreen *splash, CWallet* wallet) +void SplashScreen::ConnectWallet(CWallet* wallet) { - wallet->ShowProgress.connect(boost::bind(ShowProgress, splash, _1, _2)); + wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2)); + connectedWallets.push_back(wallet); } #endif @@ -176,7 +177,7 @@ void SplashScreen::subscribeToCoreSignals() uiInterface.InitMessage.connect(boost::bind(InitMessage, this, _1)); uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2)); #ifdef ENABLE_WALLET - uiInterface.LoadWallet.connect(boost::bind(ConnectWallet, this, _1)); + uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this, _1)); #endif } @@ -186,8 +187,9 @@ void SplashScreen::unsubscribeFromCoreSignals() uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this, _1)); uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2)); #ifdef ENABLE_WALLET - if(pwalletMain) - pwalletMain->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2)); + Q_FOREACH(CWallet* const & pwallet, connectedWallets) { + pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2)); + } #endif } |