aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-22 15:46:32 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-23 09:29:59 +0000
commita720a983015c9ef8cc814c16a5b9ef6379695817 (patch)
tree2c6309b8d0efbee112c94afb9fc602e510ed7d92 /src
parenta094b543324267e6d956bb0df2ede990b90118cb (diff)
gui: Fix async open wallet call order
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;
}