| 404 | } |
| 405 | |
| 406 | void BitcoinApplication::requestShutdown() |
| 407 | { |
| 408 | // Show a simple window indicating shutdown status |
| 409 | // Do this first as some of the steps may take some time below, |
| 410 | // for example the RPC console may still be executing a command. |
| 411 | shutdownWindow.reset(ShutdownWindow::showShutdownWindow(window)); |
| 412 | |
| 413 | qDebug() << __func__ << ": Requesting shutdown"; |
| 414 | startThread(); |
| 415 | window->hide(); |
| 416 | window->setClientModel(0); |
| 417 | pollShutdownTimer->stop(); |
| 418 | |
| 419 | #ifdef ENABLE_WALLET |
| 420 | window->removeAllWallets(); |
| 421 | for (WalletModel *walletModel : m_wallet_models) { |
| 422 | delete walletModel; |
| 423 | } |
| 424 | m_wallet_models.clear(); |
| 425 | #endif |
| 426 | delete clientModel; |
| 427 | clientModel = 0; |
| 428 | |
| 429 | m_node.startShutdown(); |
| 430 | |
| 431 | // Request shutdown from core thread |
| 432 | Q_EMIT requestedShutdown(); |
| 433 | } |
| 434 | |
| 435 | void BitcoinApplication::addWallet(WalletModel* walletModel) |
| 436 | { |
no test coverage detected