aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-21 16:58:20 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-04 12:23:40 +0000
commit8847cdaaaeb45c1ddee89f43ac4b8fafb20e5c0d (patch)
tree321d97f44c2168eef5725b5e2528de375d96dbaf /src/qt/bitcoingui.cpp
parent4c8982a88e3d9fae4f8fc147a2d9f9650a493da7 (diff)
gui: Add OpenWalletActivity
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index e7279e1229..3622bd5657 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -371,7 +371,9 @@ void BitcoinGUI::createActions()
QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
QAction* action = m_open_wallet_action->menu()->addAction(name);
connect(action, &QAction::triggered, [this, path] {
- setCurrentWallet(m_wallet_controller->openWallet(path));
+ OpenWalletActivity* activity = m_wallet_controller->openWallet(path);
+ connect(activity, &OpenWalletActivity::opened, this, &BitcoinGUI::setCurrentWallet);
+ connect(activity, &OpenWalletActivity::finished, activity, &QObject::deleteLater);
});
}
});