Undo some weird formatting

It seems I accidentally ran some sort of auto-format, undoing.
This commit is contained in:
Dale Glass 2023-07-03 00:23:40 +02:00
parent 441413020e
commit 37d5734f28

View file

@ -37,7 +37,7 @@
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <Windows.h> #include <Windows.h>
extern "C" { extern "C" {
typedef int(__stdcall* CHECKMINSPECPROC)(); typedef int(__stdcall* CHECKMINSPECPROC)();
} }
#endif #endif
@ -73,93 +73,185 @@ int main(int argc, const char* argv[]) {
QCommandLineOption helpOption = parser.addHelpOption(); QCommandLineOption helpOption = parser.addHelpOption();
QCommandLineOption versionOption = parser.addVersionOption(); QCommandLineOption versionOption = parser.addVersionOption();
QCommandLineOption urlOption("url", "Start at specified URL location.", "string"); QCommandLineOption urlOption(
QCommandLineOption protocolVersionOption("protocolVersion", "Writes the protocol version base64 signature to a file?", "url",
"path"); "Start at specified URL location.",
QCommandLineOption noUpdaterOption("no-updater", "Do not show auto-updater."); "string"
QCommandLineOption );
checkMinSpecOption("checkMinSpec", QCommandLineOption protocolVersionOption(
"Check if machine meets minimum specifications. The program will run if check passes."); "protocolVersion",
QCommandLineOption runServerOption("runServer", "Run the server."); "Writes the protocol version base64 signature to a file?",
QCommandLineOption listenPortOption("listenPort", "Port to listen on.", "port_number"); "path"
QCommandLineOption serverContentPathOption("serverContentPath", );
"Path to find server content.", // What content?? QCommandLineOption noUpdaterOption(
"path"); "no-updater",
QCommandLineOption overrideAppLocalDataPathOption("cache", "Set test cache.", "dir"); "Do not show auto-updater."
QCommandLineOption scriptsOption("scripts", );
"Set path for defaultScripts. These are probably scripts that run automatically. This " QCommandLineOption checkMinSpecOption(
"parameter does not seem to work.", "checkMinSpec",
"dir"); "Check if machine meets minimum specifications. The program will run if check passes."
QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run."); );
QCommandLineOption displaysOption("display", "Preferred display.", "displays"); QCommandLineOption runServerOption(
QCommandLineOption disableDisplaysOption("disable-displays", "runServer",
"Displays to disable. Valid options include \"OpenVR (Vive)\" and \"Oculus Rift\"", "Run the server."
"string"); );
QCommandLineOption disableInputsOption("disable-inputs", QCommandLineOption listenPortOption(
"Inputs to disable. Valid options include \"OpenVR (Vive)\" and \"Oculus Rift\"", "listenPort",
"string"); "Port to listen on.",
QCommandLineOption suppressSettingsResetOption("suppress-settings-reset", "port_number"
"Suppress the prompt to reset interface settings."); );
QCommandLineOption oculusStoreOption("oculus-store", QCommandLineOption serverContentPathOption(
"Let the Oculus plugin know if interface was run from the Oculus Store."); "serverContentPath",
QCommandLineOption standaloneOption("standalone", "Emulate a standalone device."); "Path to find server content.", // What content??
QCommandLineOption disableWatchdogOption("disableWatchdog", "path"
"Disable the watchdog thread. The interface will crash on deadlocks."); );
QCommandLineOption systemCursorOption("system-cursor", "Use the default system cursor."); QCommandLineOption overrideAppLocalDataPathOption(
QCommandLineOption "cache",
concurrentDownloadsOption("concurrent-downloads", "Set test cache.",
"Maximum concurrent resource downloads. Default is 16, except for Android where it is 4.", "dir"
"integer"); );
QCommandLineOption avatarURLOption("avatarURL", "Override the avatar U.R.L.", "url"); QCommandLineOption scriptsOption(
QCommandLineOption replaceAvatarURLOption("replaceAvatarURL", "scripts",
"Replaces the avatar U.R.L. When used with --avatarURL, this takes precedence.", "Set path for defaultScripts. These are probably scripts that run automatically. This parameter does not seem to work.",
"url"); "dir"
QCommandLineOption );
setBookmarkOption("setBookmark", QCommandLineOption allowMultipleInstancesOption(
"Set bookmark as key=value pair. Including the '=' symbol in either string is unsupported.", "allowMultipleInstances",
"string"); "Allow multiple instances to run."
QCommandLineOption forceCrashReportingOption("forceCrashReporting", "Force crash reporting to initialize."); );
QCommandLineOption displaysOption(
"display",
"Preferred display.",
"displays"
);
QCommandLineOption disableDisplaysOption(
"disable-displays",
"Displays to disable. Valid options include \"OpenVR (Vive)\" and \"Oculus Rift\"",
"string"
);
QCommandLineOption disableInputsOption(
"disable-inputs",
"Inputs to disable. Valid options include \"OpenVR (Vive)\" and \"Oculus Rift\"",
"string"
);
QCommandLineOption suppressSettingsResetOption(
"suppress-settings-reset",
"Suppress the prompt to reset interface settings."
);
QCommandLineOption oculusStoreOption(
"oculus-store",
"Let the Oculus plugin know if interface was run from the Oculus Store."
);
QCommandLineOption standaloneOption(
"standalone",
"Emulate a standalone device."
);
QCommandLineOption disableWatchdogOption(
"disableWatchdog",
"Disable the watchdog thread. The interface will crash on deadlocks."
);
QCommandLineOption systemCursorOption(
"system-cursor",
"Use the default system cursor."
);
QCommandLineOption concurrentDownloadsOption(
"concurrent-downloads",
"Maximum concurrent resource downloads. Default is 16, except for Android where it is 4.",
"integer"
);
QCommandLineOption avatarURLOption(
"avatarURL",
"Override the avatar U.R.L.",
"url"
);
QCommandLineOption replaceAvatarURLOption(
"replaceAvatarURL",
"Replaces the avatar U.R.L. When used with --avatarURL, this takes precedence.",
"url"
);
QCommandLineOption setBookmarkOption(
"setBookmark",
"Set bookmark as key=value pair. Including the '=' symbol in either string is unsupported.",
"string"
);
QCommandLineOption forceCrashReportingOption(
"forceCrashReporting",
"Force crash reporting to initialize."
);
// The documented "--disable-lod" does not seem to exist. // The documented "--disable-lod" does not seem to exist.
// Below are undocumented. // Below are undocumented.
QCommandLineOption noLauncherOption("no-launcher", QCommandLineOption noLauncherOption(
"Supposedly does something for the server, unrelated to the application launcher. The " "no-launcher",
"feature may never have been implemented."); "Supposedly does something for the server, unrelated to the application launcher. The feature may never have been implemented."
QCommandLineOption );
overrideScriptsPathOption("overrideScriptsPath", QCommandLineOption overrideScriptsPathOption(
"Specifies path to default directory where the application will look for scripts to load.", "overrideScriptsPath",
"string"); "Specifies path to default directory where the application will look for scripts to load.",
QCommandLineOption defaultScriptsOverrideOption("defaultScriptsOverride", "string"
"Override default script to run automatically on start. Default is " );
"\"defaultsScripts.js\".", QCommandLineOption defaultScriptsOverrideOption(
"string"); "defaultScriptsOverride",
QCommandLineOption responseTokensOption("tokens", "Set response tokens <json>.", "json"); "Override default script to run automatically on start. Default is \"defaultsScripts.js\".",
QCommandLineOption displayNameOption("displayName", "Set user display name <string>.", "string"); "string"
QCommandLineOption noLoginOption("no-login-suggestion", "Do not show log-in dialogue."); );
QCommandLineOption QCommandLineOption responseTokensOption(
traceFileOption("traceFile", "tokens",
"Writes a trace to a file in the documents folder. Only works if \"--traceDuration\" is specified.", "Set response tokens <json>.",
"path"); "json"
QCommandLineOption );
traceDurationOption("traceDuration", QCommandLineOption displayNameOption(
"Automatically quit interface after duration. Only works if \"--traceFile\" is specified.", "displayName",
"seconds"); "Set user display name <string>.",
QCommandLineOption clockSkewOption("clockSkew", "Forces client instance's clock to skew for demonstration purposes.", "string"
"integer"); // This should probably be removed. );
QCommandLineOption testScriptOption("testScript", "Undocumented. Accepts parameter as U.R.L.", "string"); QCommandLineOption noLoginOption(
QCommandLineOption testResultsLocationOption("testResultsLocation", "Undocumented", "path"); "no-login-suggestion",
"Do not show log-in dialogue."
);
QCommandLineOption traceFileOption(
"traceFile",
"Writes a trace to a file in the documents folder. Only works if \"--traceDuration\" is specified.",
"path"
);
QCommandLineOption traceDurationOption(
"traceDuration",
"Automatically quit interface after duration. Only works if \"--traceFile\" is specified.",
"seconds"
);
QCommandLineOption clockSkewOption(
"clockSkew",
"Forces client instance's clock to skew for demonstration purposes.",
"integer"
); // This should probably be removed.
QCommandLineOption testScriptOption(
"testScript",
"Undocumented. Accepts parameter as U.R.L.",
"string"
);
QCommandLineOption testResultsLocationOption(
"testResultsLocation",
"Undocumented",
"path"
);
QCommandLineOption quitWhenFinishedOption( QCommandLineOption quitWhenFinishedOption(
"quitWhenFinished", "quitWhenFinished",
"Only works if \"--testScript\" is provided."); // Should probably also be made to work on testResultsLocationOption. "Only works if \"--testScript\" is provided."
QCommandLineOption fastHeartbeatOption("fast-heartbeat", "Change stats polling interval from 10000ms to 1000ms."); ); // Should probably also be made to work on testResultsLocationOption.
QCommandLineOption logOption("logOptions", QCommandLineOption fastHeartbeatOption(
"Logging options, comma separated: " "fast-heartbeat",
"color,nocolor,process_id,thread_id,milliseconds,keep_repeats,journald,nojournald", "Change stats polling interval from 10000ms to 1000ms."
"options"); );
QCommandLineOption logOption(
"logOptions",
"Logging options, comma separated: color,nocolor,process_id,thread_id,milliseconds,keep_repeats,journald,nojournald",
"options"
);
// "--qmljsdebugger", which appears in output from "--help-all". // "--qmljsdebugger", which appears in output from "--help-all".
// Those below don't seem to be optional. // Those below don't seem to be optional.
// --ignore-gpu-blacklist // --ignore-gpu-blacklist
// --suppress-settings-reset // --suppress-settings-reset
parser.addOption(urlOption); parser.addOption(urlOption);
parser.addOption(protocolVersionOption); parser.addOption(protocolVersionOption);
parser.addOption(noUpdaterOption); parser.addOption(noUpdaterOption);
@ -220,6 +312,7 @@ int main(int argc, const char* argv[]) {
// We want to configure the logging system as early as possible // We want to configure the logging system as early as possible
auto& logHandler = LogHandler::getInstance(); auto& logHandler = LogHandler::getInstance();
if (parser.isSet(logOption)) { if (parser.isSet(logOption)) {
if (!logHandler.parseOptions(parser.value(logOption).toUtf8(), logOption.names().first())) { if (!logHandler.parseOptions(parser.value(logOption).toUtf8(), logOption.names().first())) {
QCoreApplication mockApp(argc, const_cast<char**>(argv)); // required for call to showHelp() QCoreApplication mockApp(argc, const_cast<char**>(argv)); // required for call to showHelp()
@ -535,8 +628,8 @@ int main(int argc, const char* argv[]) {
server.removeServer(applicationName); server.removeServer(applicationName);
server.listen(applicationName); server.listen(applicationName);
QObject::connect(&server, &QLocalServer::newConnection, &app, &Application::handleLocalServerConnection, QObject::connect(&server, &QLocalServer::newConnection,
Qt::DirectConnection); &app, &Application::handleLocalServerConnection, Qt::DirectConnection);
printSystemInformation(); printSystemInformation();