MCPcopy Create free account
hub / github.com/ElementsProject/elements / initializeResult

Method initializeResult

src/qt/bitcoin.cpp:371–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void BitcoinApplication::initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info)
372{
373 qDebug() << __func__ << ": Initialization result: " << success;
374 // Set exit result.
375 returnValue = success ? EXIT_SUCCESS : EXIT_FAILURE;
376 if(success)
377 {
378 // Log this only after AppInitMain finishes, as then logging setup is guaranteed complete
379 qInfo() << "Platform customization:" << platformStyle->getName();
380 clientModel = new ClientModel(node(), optionsModel);
381 window->setClientModel(clientModel, &tip_info);
382#ifdef ENABLE_WALLET
383 if (WalletModel::isWalletEnabled()) {
384 m_wallet_controller = new WalletController(*clientModel, platformStyle, this);
385 window->setWalletController(m_wallet_controller);
386 }
387#endif // ENABLE_WALLET
388
389 // If -min option passed, start window minimized (iconified) or minimized to tray
390 if (!gArgs.GetBoolArg("-min", false)) {
391 window->show();
392 } else if (clientModel->getOptionsModel()->getMinimizeToTray() && window->hasTrayIcon()) {
393 // do nothing as the window is managed by the tray icon
394 } else {
395 window->showMinimized();
396 }
397 Q_EMIT splashFinished();
398 Q_EMIT windowShown(window);
399
400 pollShutdownTimer->start(SHUTDOWN_POLLING_DELAY);
401 } else {
402 Q_EMIT splashFinished(); // Make sure splash screen doesn't stick around during shutdown
403 requestShutdown();
404 }
405}
406
407void BitcoinApplication::handleRunawayException(const QString &message)
408{

Callers

nothing calls this directly

Calls 8

getNameMethod · 0.80
setWalletControllerMethod · 0.80
GetBoolArgMethod · 0.80
getMinimizeToTrayMethod · 0.80
hasTrayIconMethod · 0.80
setClientModelMethod · 0.45
getOptionsModelMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected