Skip to content

feat(ui): show version, commit and OS in --version and About - #55

Merged
blocksmith314 merged 1 commit into
mainfrom
feature/version-info
Nov 8, 2026
Merged

blocksmith314 merged 1 commit into
mainfrom
feature/version-info

Conversation

@blocksmith314

Copy link
Copy Markdown
Owner

Summary

Fixes #19: the application now reports its version, commit and OS.

  • CMake generates build/generated/version.h from PROJECT_VERSION plus git rev-parse --short HEAD and git log -1 --format=%cs; outside a git checkout the values fall back to unknown.

  • --version prints before QApplication is created, so it works without a display:

    Digital Image Analyzer 0.1.2
    commit 26f0917 (2026-11-07)
    Qt 6.12.0, macOS Tahoe (26.3.1)
    
  • Help -> About Digital Image Analyzer shows the same data. On macOS Qt moves this action to the application menu (QAction::AboutRole), which is the native placement (follow-up Add a Help menu with usage information and links #54 covers adding real Help content).

  • New tests: app_version (CTest) and MainWindowTest.HasHelpMenu.

Verification

  • ctest: 64/64 pass.
  • ./build/DigitalImageAnalyzer.app/Contents/MacOS/DigitalImageAnalyzer --version prints the expected block.
  • ./test/tools/tidy.sh main.cpp mainwindow.cpp mainwindow.h: 0 issues.

Fixes #19

- CMake generates version.h from the project version and git metadata
  (commit hash and commit date), falling back to "unknown" outside git
- --version prints version, commit, commit date, Qt version and OS before
  QApplication starts
- Help menu contains an About action; Qt moves it to the application menu
  on macOS (AboutRole), which is the native location
- add an app_version CTest case and a HasHelpMenu GUI test
@blocksmith314
blocksmith314 merged commit 36519e9 into main Nov 8, 2026
3 checks passed
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.

Show version information (version, commit, commit date, OS) in About and --version

1 participant