mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Merge #15462: gui: Fix async open wallet call order
a720a98301
gui: Fix async open wallet call order (João Barbosa)
Pull request description:
Fixes #15455. Must call `OpenWalletActivity::open` asynchronously only after all connections are made to the `OpenWalletActivity` instance, otherwise signals can be missed.
Tree-SHA512: 4e5fdbd09d2ca017ed07a1813c2707c09f96275f1498779804e322e0a4dbd7dcff0c2e9cd6ec18463cd427b88b192a8d02373de9edc2b03ba5e4b8484b264417
This commit is contained in:
commit
6f43ed4c5a
2 changed files with 2 additions and 1 deletions
|
@ -396,6 +396,8 @@ void BitcoinGUI::createActions()
|
|||
connect(activity, &OpenWalletActivity::opened, this, &BitcoinGUI::setCurrentWallet);
|
||||
connect(activity, &OpenWalletActivity::finished, activity, &QObject::deleteLater);
|
||||
connect(activity, &OpenWalletActivity::finished, dialog, &QObject::deleteLater);
|
||||
bool invoked = QMetaObject::invokeMethod(activity, "open");
|
||||
assert(invoked);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -59,7 +59,6 @@ OpenWalletActivity* WalletController::openWallet(const std::string& name, QWidge
|
|||
{
|
||||
OpenWalletActivity* activity = new OpenWalletActivity(this, name);
|
||||
activity->moveToThread(&m_activity_thread);
|
||||
QMetaObject::invokeMethod(activity, "open", Qt::QueuedConnection);
|
||||
return activity;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue