MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / open

Method open

src/qt/walletcontroller.cpp:347–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347void OpenWalletActivity::open(const std::string& path)
348{
349 QString name = GUIUtil::WalletDisplayName(path);
350
351 showProgressDialog(
352 //: Title of window indicating the progress of opening of a wallet.
353 tr("Open Wallet"),
354 /*: Descriptive text of the open wallet progress window which indicates
355 to the user which wallet is currently being opened. */
356 tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped()));
357
358 QTimer::singleShot(0, worker(), [this, path] {
359 auto wallet{node().walletLoader().loadWallet(path, m_warning_message)};
360
361 if (wallet) {
362 m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(*wallet));
363 } else {
364 m_error_message = util::ErrorString(wallet);
365 }
366
367 QTimer::singleShot(0, this, &OpenWalletActivity::finish);
368 });
369}
370
371LoadWalletsActivity::LoadWalletsActivity(WalletController* wallet_controller, QWidget* parent_widget)
372 : WalletControllerActivity(wallet_controller, parent_widget)

Callers 2

createActionsMethod · 0.45
writeMethod · 0.45

Calls 4

WalletDisplayNameFunction · 0.85
ErrorStringFunction · 0.85
loadWalletMethod · 0.80
getOrCreateWalletMethod · 0.80

Tested by

no test coverage detected