Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Lines | void BitcoinApplication::createWindow(const Config *config, | ||||
pollShutdownTimer = new QTimer(window); | pollShutdownTimer = new QTimer(window); | ||||
connect(pollShutdownTimer, &QTimer::timeout, window, | connect(pollShutdownTimer, &QTimer::timeout, window, | ||||
&BitcoinGUI::detectShutdown); | &BitcoinGUI::detectShutdown); | ||||
} | } | ||||
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) { | void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) { | ||||
SplashScreen *splash = new SplashScreen(m_node, networkStyle); | SplashScreen *splash = new SplashScreen(m_node, networkStyle); | ||||
// We don't hold a direct pointer to the splash screen after creation, but | // We don't hold a direct pointer to the splash screen after creation, but | ||||
// the splash screen will take care of deleting itself when slotFinish | // the splash screen will take care of deleting itself when finish() | ||||
// happens. | // happens. | ||||
splash->show(); | splash->show(); | ||||
connect(this, &BitcoinApplication::splashFinished, splash, | connect(this, &BitcoinApplication::splashFinished, splash, | ||||
&SplashScreen::slotFinish); | &SplashScreen::finish); | ||||
connect(this, &BitcoinApplication::requestedShutdown, splash, | connect(this, &BitcoinApplication::requestedShutdown, splash, | ||||
&QWidget::close); | &QWidget::close); | ||||
} | } | ||||
bool BitcoinApplication::baseInitialize(Config &config) { | bool BitcoinApplication::baseInitialize(Config &config) { | ||||
return m_node.baseInitialize(config); | return m_node.baseInitialize(config); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | void BitcoinApplication::requestShutdown(Config &config) { | ||||
Q_EMIT requestedShutdown(); | Q_EMIT requestedShutdown(); | ||||
} | } | ||||
void BitcoinApplication::initializeResult(bool success) { | void BitcoinApplication::initializeResult(bool success) { | ||||
qDebug() << __func__ << ": Initialization result: " << success; | qDebug() << __func__ << ": Initialization result: " << success; | ||||
returnValue = success ? EXIT_SUCCESS : EXIT_FAILURE; | returnValue = success ? EXIT_SUCCESS : EXIT_FAILURE; | ||||
if (!success) { | if (!success) { | ||||
// Make sure splash screen doesn't stick around during shutdown. | // Make sure splash screen doesn't stick around during shutdown. | ||||
Q_EMIT splashFinished(window); | Q_EMIT splashFinished(); | ||||
// Exit first main loop invocation. | // Exit first main loop invocation. | ||||
quit(); | quit(); | ||||
return; | return; | ||||
} | } | ||||
// Log this only after AppInitMain finishes, as then logging setup is | // Log this only after AppInitMain finishes, as then logging setup is | ||||
// guaranteed complete. | // guaranteed complete. | ||||
qWarning() << "Platform customization:" << platformStyle->getName(); | qWarning() << "Platform customization:" << platformStyle->getName(); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
Show All 18 Lines | |||||
#endif | #endif | ||||
// If -min option passed, start window minimized. | // If -min option passed, start window minimized. | ||||
if (gArgs.GetBoolArg("-min", false)) { | if (gArgs.GetBoolArg("-min", false)) { | ||||
window->showMinimized(); | window->showMinimized(); | ||||
} else { | } else { | ||||
window->show(); | window->show(); | ||||
} | } | ||||
Q_EMIT splashFinished(window); | Q_EMIT splashFinished(); | ||||
Q_EMIT windowShown(window); | Q_EMIT windowShown(window); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
// Now that initialization/startup is done, process any command-line | // Now that initialization/startup is done, process any command-line | ||||
// bitcoincash: URIs or payment requests: | // bitcoincash: URIs or payment requests: | ||||
if (paymentServer) { | if (paymentServer) { | ||||
connect(paymentServer, &PaymentServer::receivedPaymentRequest, window, | connect(paymentServer, &PaymentServer::receivedPaymentRequest, window, | ||||
&BitcoinGUI::handlePaymentRequest); | &BitcoinGUI::handlePaymentRequest); | ||||
▲ Show 20 Lines • Show All 362 Lines • Show Last 20 Lines |