Classes | |
| struct | CommandLineParseResult |
| Result of parsing command-line arguments. More... | |
Enumerations | |
| enum class | AppMode { Gui , BootTest } |
| Application execution mode. More... | |
Functions | |
| static QStringList | normalizeArgs (const QStringList &args) |
| Normalizes command-line arguments Converts colon-separated syntax (–option:value) to standard format (–option value) and handles special cases like –unittest without a value. | |
| CommandLineParseResult | parseCommandLine () |
| Parse command-line arguments (requires existing QCoreApplication). | |
| CommandLineParseResult | parse (int argc, char *argv[]) |
| Parse command-line arguments with automatic QCoreApplication management. | |
| std::optional< int > | handleParseResult (const CommandLineParseResult &result) |
| Handle early exit conditions (help, version, error). | |
| AppMode | determineAppMode (const CommandLineParseResult &args) |
| Determine the application mode from parsed arguments. | |
| std::optional< quint32 > | parseSystemId (const QString &value) |
| Validate a –system-id value. | |
| std::optional< std::pair< uint, uint > > | parseUnitTestShard (const QString &value) |
| Validate a –unittest-shard value of the form <index>/<count>. | |
|
strong |
Application execution mode.
| Enumerator | |
|---|---|
| Gui | Normal GUI application. |
| BootTest | Initialize and exit (for CI validation). |
Definition at line 81 of file QGCCommandLineParser.h.
| AppMode QGCCommandLineParser::determineAppMode | ( | const CommandLineParseResult & | args | ) |
Determine the application mode from parsed arguments.
| args | Parsed command line arguments |
Definition at line 482 of file QGCCommandLineParser.cc.
References BootTest, determineAppMode(), Gui, QGCCommandLineParser::CommandLineParseResult::listTests, QGCCommandLineParser::CommandLineParseResult::runningUnitTests, and QGCCommandLineParser::CommandLineParseResult::simpleBootTest.
Referenced by determineAppMode(), and main().
| std::optional< int > QGCCommandLineParser::handleParseResult | ( | const CommandLineParseResult & | result | ) |
Handle early exit conditions (help, version, error).
| result | The parse result to check |
Definition at line 465 of file QGCCommandLineParser.cc.
References QGCCommandLineParser::CommandLineParseResult::Error, QGCCommandLineParser::CommandLineParseResult::errorString, handleParseResult(), QGCCommandLineParser::CommandLineParseResult::HelpRequested, QGCCommandLineParser::CommandLineParseResult::Ok, QGCCommandLineParser::CommandLineParseResult::statusCode, and QGCCommandLineParser::CommandLineParseResult::VersionRequested.
Referenced by handleParseResult(), and main().
|
static |
Normalizes command-line arguments Converts colon-separated syntax (–option:value) to standard format (–option value) and handles special cases like –unittest without a value.
Definition at line 68 of file QGCCommandLineParser.cc.
References normalizeArgs().
Referenced by normalizeArgs(), and parseCommandLine().
| CommandLineParseResult QGCCommandLineParser::parse | ( | int | argc, |
| char * | argv[] ) |
Parse command-line arguments with automatic QCoreApplication management.
Definition at line 456 of file QGCCommandLineParser.cc.
References parse(), and parseCommandLine().
| CommandLineParseResult QGCCommandLineParser::parseCommandLine | ( | ) |
Parse command-line arguments (requires existing QCoreApplication).
Definition at line 114 of file QGCCommandLineParser.cc.
References QGCCommandLineParser::CommandLineParseResult::allowMultiple, QGCCommandLineParser::CommandLineParseResult::clearCache, QGCCommandLineParser::CommandLineParseResult::clearSettingsOptions, QGCCommandLineParser::CommandLineParseResult::Error, QGCCommandLineParser::CommandLineParseResult::errorString, QGCCommandLineParser::CommandLineParseResult::fakeMobile, QGCCommandLineParser::CommandLineParseResult::HelpRequested, QGCCommandLineParser::CommandLineParseResult::helpText, QGCCommandLineParser::CommandLineParseResult::labelFilter, QGCCommandLineParser::CommandLineParseResult::listTests, QGCCommandLineParser::CommandLineParseResult::loggingOptions, QGCCommandLineParser::CommandLineParseResult::logOutput, normalizeArgs(), QGCCommandLineParser::CommandLineParseResult::Ok, QGCCommandLineParser::CommandLineParseResult::onscreen, parseCommandLine(), QGCCommandLineParser::CommandLineParseResult::parser, parseSystemId(), parseUnitTestShard(), QGCCommandLineParser::CommandLineParseResult::positional, QGCCommandLineParser::CommandLineParseResult::quietWindowsAsserts, QGCCommandLineParser::CommandLineParseResult::runningUnitTests, QGCCommandLineParser::CommandLineParseResult::simpleBootTest, QGCCommandLineParser::CommandLineParseResult::statusCode, QGCCommandLineParser::CommandLineParseResult::stressUnitTests, QGCCommandLineParser::CommandLineParseResult::stressUnitTestsCount, QGCCommandLineParser::CommandLineParseResult::systemId, QGCCommandLineParser::CommandLineParseResult::unitTestOutput, QGCCommandLineParser::CommandLineParseResult::unitTests, QGCCommandLineParser::CommandLineParseResult::unitTestShardCount, QGCCommandLineParser::CommandLineParseResult::unitTestShardIndex, QGCCommandLineParser::CommandLineParseResult::unknownOptions, QGCCommandLineParser::CommandLineParseResult::useSwRast, QGCCommandLineParser::CommandLineParseResult::VersionRequested, and QGCCommandLineParser::CommandLineParseResult::versionText.
Referenced by parse(), and parseCommandLine().
| std::optional< quint32 > QGCCommandLineParser::parseSystemId | ( | const QString & | value | ) |
Validate a –system-id value.
Definition at line 498 of file QGCCommandLineParser.cc.
References parseSystemId().
Referenced by parseCommandLine(), and parseSystemId().
| std::optional< std::pair< uint, uint > > QGCCommandLineParser::parseUnitTestShard | ( | const QString & | value | ) |
Validate a –unittest-shard value of the form <index>/<count>.
Definition at line 508 of file QGCCommandLineParser.cc.
References parseUnitTestShard().
Referenced by parseCommandLine(), and parseUnitTestShard().