diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-01-21 16:57:22 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-02-04 12:20:42 +0000 |
commit | be82dea23c3e6931f9ae7ab8c6a8595ae950587f (patch) | |
tree | cc6fbc6c0fb4c2682089b9b334c9afb031b5a3aa /src/qt/walletcontroller.cpp | |
parent | 6c49a55b472fa4ec403e48ec718af85bfd402199 (diff) |
gui: Add thread to run background activity in WalletController
Diffstat (limited to 'src/qt/walletcontroller.cpp')
-rw-r--r-- | src/qt/walletcontroller.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index 0730afca98..a103f4c89b 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -26,11 +26,17 @@ WalletController::WalletController(interfaces::Node& node, const PlatformStyle* for (std::unique_ptr<interfaces::Wallet>& wallet : m_node.getWallets()) { getOrCreateWallet(std::move(wallet)); } + + m_activity_thread.start(); } // Not using the default destructor because not all member types definitions are // available in the header, just forward declared. -WalletController::~WalletController() {} +WalletController::~WalletController() +{ + m_activity_thread.quit(); + m_activity_thread.wait(); +} std::vector<WalletModel*> WalletController::getWallets() const { |