Skip to content

Conversation

HTRamsey
Copy link
Collaborator

@HTRamsey HTRamsey commented Aug 9, 2025

Using QCommandLineParser allows much finer controls over parsing the command line options.
Move the handling to a separate file to help cleanup the main and QGCApplication files.

QGroundControl

Options:
-h, --help Displays help on commandline options.
--help-all Displays help, including generic Qt options.
-v, --version Displays version information.
--system-id MAVLink GCS system id.
--clear-settings Clear stored application settings.
--clear-cache Clear parameter and airframe caches.
--logging Enable logging with optional rules string.
--log-output Log to console.
--simple-boot-test Initialize subsystems and exit.
--unittest Run unit tests (optional filter value).
--unittest-stress Stress unit tests.
--fake-mobile Run with mobile-style UI.
--allow-multiple Bypass single-instance guard.
--qmljsdebugger Activates the QML/JS debugger with a specified
port. The value must be of format
port:1234[,block]. "block" makes the application
wait for a connection.

@HTRamsey HTRamsey requested a review from Copilot August 9, 2025 06:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Replaces the custom CmdLineOptParser with Qt's standard QCommandLineParser for handling command line arguments. This modernizes the command line parsing implementation by using Qt's built-in functionality instead of a custom solution.

  • Migrates from custom CmdLineOpt_t array structure to individual QCommandLineOption objects
  • Adds proper help and version option support through Qt's standard methods
  • Improves error handling for unknown options and unexpected positional arguments

@HTRamsey HTRamsey force-pushed the dev-commandlineparser2 branch 2 times, most recently from 563395d to 40393fb Compare August 10, 2025 10:09
@HTRamsey HTRamsey force-pushed the dev-commandlineparser2 branch 5 times, most recently from 22f96a0 to 19fc139 Compare August 22, 2025 15:22
@HTRamsey HTRamsey force-pushed the dev-commandlineparser2 branch from 19fc139 to c839383 Compare August 22, 2025 15:52
@HTRamsey HTRamsey merged commit b4cf41f into mavlink:master Aug 22, 2025
13 checks passed
@HTRamsey HTRamsey deleted the dev-commandlineparser2 branch August 22, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant