diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-09-30 17:27:33 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-09-30 17:35:14 +0300 |
commit | 9013f23b0a6e0e450c4603f9d0f050ff10d552f6 (patch) | |
tree | 727a304c02a0469f7178c97b856e5446d14577b2 /src/qt/bitcoingui.cpp | |
parent | 2d8e0c0c3c0d3c4cee7bb52d1edf501f40c53463 (diff) | |
parent | 2fe69efbc607fdcc3657637d59a38cc5b4db2d05 (diff) | |
download | bitcoin-9013f23b0a6e0e450c4603f9d0f050ff10d552f6.tar.xz |
Merge bitcoin-core/gui#342: wallet: Move wallets loading out from the main GUI thread
2fe69efbc607fdcc3657637d59a38cc5b4db2d05 qt, wallet: Drop no longer used WalletController::getOpenWallets() (Hennadii Stepanov)
f6991cb906e9dad7ff76a51e2b654f798d5c2ba6 qt, wallet: Add LoadWalletsActivity class (Hennadii Stepanov)
4a024fc310f136ce62c733fb1174b3a80ea25d0a qt, wallet, refactor: Move connection to QObject::deleteLater to ctor (Hennadii Stepanov)
f9b633eeab6e9ee405bba37573aed9aa83c51ea5 qt, wallet: Move activity progress dialog from data member to local (Hennadii Stepanov)
Pull request description:
This PR improves the GUI responsiveness during initial wallets loading at startup (especially ones that have tons of txs), and shows a standard progress dialog for long loading:
![DeepinScreenshot_select-area_20210522230626](https://user-images.githubusercontent.com/32963518/119239625-0b3a9380-bb53-11eb-9a54-34980d8a1194.png)
Fixes #247.
ACKs for top commit:
ryanofsky:
Code review ACK 2fe69efbc607fdcc3657637d59a38cc5b4db2d05. Just suggested changes since last review: squashing commits and dropping unused method (thanks!)
shaavan:
reACK 2fe69efbc607fdcc3657637d59a38cc5b4db2d05
promag:
Code review ACK 2fe69efbc607fdcc3657637d59a38cc5b4db2d05.
Tree-SHA512: 2ac3cb48886e0005fc36b3fd0c2b35abd557186be16db3145d753c34d94188e4f4ff14dc07fb0fb7558944f84498204a3988f8284fd56c6d85b47bc9081e71a6
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index af05f35759..610637360b 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -107,7 +107,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty walletFrame = new WalletFrame(_platformStyle, this); connect(walletFrame, &WalletFrame::createWalletButtonClicked, [this] { auto activity = new CreateWalletActivity(getWalletController(), this); - connect(activity, &CreateWalletActivity::finished, activity, &QObject::deleteLater); activity->create(); }); connect(walletFrame, &WalletFrame::message, [this](const QString& title, const QString& message, unsigned int style) { @@ -418,7 +417,6 @@ void BitcoinGUI::createActions() connect(action, &QAction::triggered, [this, path] { auto activity = new OpenWalletActivity(m_wallet_controller, this); connect(activity, &OpenWalletActivity::opened, this, &BitcoinGUI::setCurrentWallet); - connect(activity, &OpenWalletActivity::finished, activity, &QObject::deleteLater); activity->open(path); }); } @@ -433,7 +431,6 @@ void BitcoinGUI::createActions() connect(m_create_wallet_action, &QAction::triggered, [this] { auto activity = new CreateWalletActivity(m_wallet_controller, this); connect(activity, &CreateWalletActivity::created, this, &BitcoinGUI::setCurrentWallet); - connect(activity, &CreateWalletActivity::finished, activity, &QObject::deleteLater); activity->create(); }); connect(m_close_all_wallets_action, &QAction::triggered, [this] { @@ -664,9 +661,8 @@ void BitcoinGUI::setWalletController(WalletController* wallet_controller) GUIUtil::ExceptionSafeConnect(wallet_controller, &WalletController::walletAdded, this, &BitcoinGUI::addWallet); connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet); - for (WalletModel* wallet_model : m_wallet_controller->getOpenWallets()) { - addWallet(wallet_model); - } + auto activity = new LoadWalletsActivity(m_wallet_controller, this); + activity->load(); } WalletController* BitcoinGUI::getWalletController() |