Merge pull request #6780

a46f87f Initialize logging before we do parameter interaction (Jonas Schnelli)
df66147 Move -blocksonly parameter interaction to the new ParameterInteraction() function (Jonas Schnelli)
68354e7 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli)
411b05a Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli)
This commit is contained in:
Wladimir J. van der Laan
2015-11-27 13:34:08 +01:00
4 changed files with 102 additions and 67 deletions

View File

@@ -201,6 +201,8 @@ public:
/// Create payment server
void createPaymentServer();
#endif
/// parameter interaction/setup based on rules
void parameterSetup();
/// Create options model
void createOptionsModel(bool resetSettings);
/// Create main window
@@ -397,6 +399,12 @@ void BitcoinApplication::startThread()
coreThread->start();
}
void BitcoinApplication::parameterSetup()
{
InitLogging();
InitParameterInteraction();
}
void BitcoinApplication::requestInitialize()
{
qDebug() << __func__ << ": Requesting initialize";
@@ -644,6 +652,8 @@ int main(int argc, char *argv[])
// Install qDebug() message handler to route to debug.log
qInstallMessageHandler(DebugMessageHandler);
#endif
// Allow parameter interaction before we create the options model
app.parameterSetup();
// Load GUI settings from QSettings
app.createOptionsModel(mapArgs.count("-resetguisettings") != 0);