Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/qml/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ int QmlGuiMain(int argc, char* argv[])
SetupEnvironment();
util::ThreadSetInternalName("main");

// must be set before parsing command-line options; otherwise,
// if invalid parameters were passed, QSetting initialization would fail
// and the error will be displayed on terminal
app.setOrganizationName(QAPP_ORG_NAME);
app.setOrganizationDomain(QAPP_ORG_DOMAIN);
app.setApplicationName(QAPP_APP_NAME_DEFAULT);

/// Parse command-line options. We do this after qt in order to show an error if there are problems parsing these.
SetupServerArgs(gArgs);
SetupUIArgs(gArgs);
Expand All @@ -173,12 +180,6 @@ int QmlGuiMain(int argc, char* argv[])
return EXIT_FAILURE;
}

// must be set before OptionsModel is initialized or translations are loaded,
// as it is used to locate QSettings
app.setOrganizationName(QAPP_ORG_NAME);
app.setOrganizationDomain(QAPP_ORG_DOMAIN);
app.setApplicationName(QAPP_APP_NAME_DEFAULT);

/// Determine availability of data directory.
if (!CheckDataDirOption(gArgs)) {
InitError(strprintf(Untranslated("Specified data directory \"%s\" does not exist.\n"), gArgs.GetArg("-datadir", "")));
Expand Down