Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | |||||
BitcoinABC::BitcoinABC() : QObject() {} | BitcoinABC::BitcoinABC() : QObject() {} | ||||
void BitcoinABC::handleRunawayException(const std::exception *e) { | void BitcoinABC::handleRunawayException(const std::exception *e) { | ||||
PrintExceptionContinue(e, "Runaway exception"); | PrintExceptionContinue(e, "Runaway exception"); | ||||
Q_EMIT runawayException(QString::fromStdString(GetWarnings("gui"))); | Q_EMIT runawayException(QString::fromStdString(GetWarnings("gui"))); | ||||
} | } | ||||
void BitcoinABC::initialize(Config *cfg, | void BitcoinABC::initialize(Config *cfg, | ||||
HTTPRPCRequestProcessor *httpRPCRequestProcessor) { | HTTPRPCRequestProcessor *httpRPCRequestProcessor, | ||||
RPCServer *rpcServer) { | |||||
Config &config(*cfg); | Config &config(*cfg); | ||||
RPCServer &rpcServer = *rpcSrv; | |||||
try { | try { | ||||
qDebug() << __func__ << ": Running AppInit2 in thread"; | qDebug() << __func__ << ": Running AppInit2 in thread"; | ||||
if (!AppInitBasicSetup()) { | if (!AppInitBasicSetup()) { | ||||
Q_EMIT initializeResult(false); | Q_EMIT initializeResult(false); | ||||
return; | return; | ||||
} | } | ||||
if (!AppInitParameterInteraction(config)) { | if (!AppInitParameterInteraction(config, rpcServer)) { | ||||
Q_EMIT initializeResult(false); | Q_EMIT initializeResult(false); | ||||
return; | return; | ||||
} | } | ||||
if (!AppInitSanityChecks()) { | if (!AppInitSanityChecks()) { | ||||
Q_EMIT initializeResult(false); | Q_EMIT initializeResult(false); | ||||
return; | return; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 482 Lines • ▼ Show 20 Lines | #endif | ||||
// Get global config | // Get global config | ||||
Config &config = const_cast<Config &>(GetConfig()); | Config &config = const_cast<Config &>(GetConfig()); | ||||
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && | if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && | ||||
!gArgs.GetBoolArg("-min", false)) | !gArgs.GetBoolArg("-min", false)) | ||||
app.createSplashScreen(networkStyle.data()); | app.createSplashScreen(networkStyle.data()); | ||||
HTTPRPCRequestProcessor httpRPCRequestProcessor(config); | RPCServer rpcServer; | ||||
HTTPRPCRequestProcessor httpRPCRequestProcessor(config, rpcServer); | |||||
try { | try { | ||||
app.createWindow(&config, networkStyle.data()); | app.createWindow(&config, networkStyle.data()); | ||||
app.requestInitialize(config, httpRPCRequestProcessor); | app.requestInitialize(config, httpRPCRequestProcessor); | ||||
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000 | #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000 | ||||
WinShutdownMonitor::registerShutdownBlockReason( | WinShutdownMonitor::registerShutdownBlockReason( | ||||
QObject::tr("%1 didn't yet exit safely...") | QObject::tr("%1 didn't yet exit safely...") | ||||
.arg(QObject::tr(PACKAGE_NAME)), | .arg(QObject::tr(PACKAGE_NAME)), | ||||
Show All 15 Lines |