Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 314 Lines • ▼ Show 20 Lines | void BitcoinApplication::parameterSetup() { | ||||
// Default printtoconsole to false for the GUI. GUI programs should not | // Default printtoconsole to false for the GUI. GUI programs should not | ||||
// print to the console unnecessarily. | // print to the console unnecessarily. | ||||
gArgs.SoftSetBoolArg("-printtoconsole", false); | gArgs.SoftSetBoolArg("-printtoconsole", false); | ||||
InitLogging(gArgs); | InitLogging(gArgs); | ||||
InitParameterInteraction(gArgs); | InitParameterInteraction(gArgs); | ||||
} | } | ||||
void BitcoinApplication::SetPrune(bool prune, bool force) { | void BitcoinApplication::InitializePruneSetting(bool prune) { | ||||
optionsModel->SetPrune(prune, force); | // If prune is set, intentionally override existing prune size with | ||||
// the default size since this is called when choosing a new datadir. | |||||
optionsModel->SetPruneTargetGB(prune ? DEFAULT_PRUNE_TARGET_GB : 0, true); | |||||
} | } | ||||
void BitcoinApplication::requestInitialize( | void BitcoinApplication::requestInitialize( | ||||
Config &config, RPCServer &rpcServer, | Config &config, RPCServer &rpcServer, | ||||
HTTPRPCRequestProcessor &httpRPCRequestProcessor) { | HTTPRPCRequestProcessor &httpRPCRequestProcessor) { | ||||
qDebug() << __func__ << ": Requesting initialize"; | qDebug() << __func__ << ": Requesting initialize"; | ||||
startThread(); | startThread(); | ||||
// IMPORTANT: config must NOT be a reference to a temporary because below | // IMPORTANT: config must NOT be a reference to a temporary because below | ||||
▲ Show 20 Lines • Show All 410 Lines • ▼ Show 20 Lines | #endif | ||||
// Allow parameter interaction before we create the options model | // Allow parameter interaction before we create the options model | ||||
app.parameterSetup(); | app.parameterSetup(); | ||||
GUIUtil::LogQtInfo(); | GUIUtil::LogQtInfo(); | ||||
// Load GUI settings from QSettings | // Load GUI settings from QSettings | ||||
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false)); | app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false)); | ||||
if (did_show_intro) { | if (did_show_intro) { | ||||
// Store intro dialog settings other than datadir (network specific) | // Store intro dialog settings other than datadir (network specific) | ||||
app.SetPrune(prune, true); | app.InitializePruneSetting(prune); | ||||
} | } | ||||
// 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()); | ||||
Show All 39 Lines |