Wire --version and --help flags to existing display functions#74
Merged
sanny32 merged 1 commit intosanny32:devfrom Apr 10, 2026
Merged
Wire --version and --help flags to existing display functions#74sanny32 merged 1 commit intosanny32:devfrom
sanny32 merged 1 commit intosanny32:devfrom
Conversation
The showVersion() and showHelp() functions in main.cpp were already implemented but never called — the command-line options were not registered with QCommandLineParser, and the isSet() checks were missing. This commit: - Registers --help and --version options in CmdLineParser (cmdlineparser.cpp) - Adds corresponding option name constants (cmdlineparser.h) - Adds isSet() checks in main() to call showVersion()/showHelp() and exit before entering the GUI event loop (main.cpp) - Updates translation files with new translatable strings This aligns OpenModScan's CLI behavior with the sibling project OpenModSim, which already has this functionality working correctly.
4b36d91 to
2761699
Compare
Contributor
Author
|
Rebased onto |
sanny32
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
showVersion()andshowHelp()functions inmain.cppwere already implemented but never called — the command-line options were not registered withQCommandLineParser, and theisSet()checks were missing.Changes
_helpand_versionoption name constants--helpand--versionoptions withQCommandLineParserisSet()checks to callshowVersion()/showHelp()and exit before entering the GUI event loopMotivation
The sibling project OpenModSim already has this functionality working correctly (options registered,
isSet()checks in place). This PR aligns OpenModScan's CLI behavior with OpenModSim.Testing
Verified on Linux (Qt 6.8.2):