| 369 | } |
| 370 | |
| 371 | void 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 | |
| 407 | void BitcoinApplication::handleRunawayException(const QString &message) |
| 408 | { |
nothing calls this directly
no test coverage detected