aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-02-27 11:28:31 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-02-27 12:00:19 +0100
commit6f43ed4c5a3a7dde59eb291e22a09903289401d3 (patch)
treec99167de7ea2c57449fc75b1dca2585a6d14497c /src
parentd88f7f8764b1f93e3992c714f62446b6ed5cfd1e (diff)
parenta720a983015c9ef8cc814c16a5b9ef6379695817 (diff)
Merge #15462: gui: Fix async open wallet call order
a720a983015c9ef8cc814c16a5b9ef6379695817 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
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoingui.cpp2
-rw-r--r--src/qt/walletcontroller.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index bc88dd5e0a..abf9136eee 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -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);
});
}
});
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp
index c532ffbbfe..fab86a7912 100644
--- a/src/qt/walletcontroller.cpp
+++ b/src/qt/walletcontroller.cpp
@@ -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;
}