Add --version flag with -V alias via QCommandLineParser#140
Open
nerdCopter wants to merge 5 commits intofstl-app:masterfrom
Open
Add --version flag with -V alias via QCommandLineParser#140nerdCopter wants to merge 5 commits intofstl-app:masterfrom
nerdCopter wants to merge 5 commits intofstl-app:masterfrom
Conversation
added 2 commits
January 17, 2026 13:33
Print 'fstl <version>' and exit for --version/-V; use raw argv checks for robustness; add CTest entries to validate outputs.
Recognize --version, -V, and -v; add CTest to validate -v output; use literal '.' matching in version regex and skip tests on WIN32.
ptsouchlos
requested changes
Jan 17, 2026
Implement POSIX-compliant version handling using QCommandLineParser: Changes: - Enable version tests on all platforms (remove WIN32 restriction) - Use QCommandLineParser for proper --help, -h, and --version handling - Support -V (uppercase, POSIX-compliant) and --version for version output - Remove -v (lowercase) to follow POSIX conventions (typically reserved for verbose) - Tests: version_check (--version) and version_check_V (-V) on all platforms Benefits: - Cross-platform compatibility (Windows, Linux, macOS) - Qt best practices with QCommandLineParser - No hardcoded program name or version (uses CMake PROJECT_VERSION) - Proper --help output with option documentation - All values sourced from QCoreApplication and CMake configuration
Author
|
Pushed. |
ptsouchlos
requested changes
Jan 19, 2026
Co-authored-by: Paul T <6591180+ptsouchlos@users.noreply.github.com>
Use standard iostream streams instead of C-style printf for version output, improving consistency with modern C++ practices.
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.
Implement version flag handling using Qt's QCommandLineParser with cross-platform tests.
Changes
Benefits