Skip to content

Fix #15238 Remove QtCharts dependency - #9047

Open
wjakobsson wants to merge 6 commits into
cppcheck-opensource:mainfrom
wjakobsson:depricate-qtchart
Open

wjakobsson wants to merge 6 commits into
cppcheck-opensource:mainfrom
wjakobsson:depricate-qtchart

Conversation

@wjakobsson

@wjakobsson wjakobsson commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Left qtchart in selfcheck as it's needed for building cppcheck 2.8

Update: added cmake snippet to ignore opt-in strict diagnostics

Update 2: windows-2025 now uses the clang-tidy bundled with Visual Studio, as the standalone one (LLVM 20) no longer works with the VS version shipped with the windows runner. The newer version however also reports the C-style cast under the new modernize-avoid-c-style-cast check, which is a duplicate of google-readability-casting, so it's suppressed now.

@dmcppcheck

Copy link
Copy Markdown
Contributor

Tests may be missing

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AI review

I found no new problems. The QtCharts removal looks complete. No code references to QT_CHARTS_LIB, Qt::Charts, getTools, saveStatistics or mTabHistory are left. The only remaining QtCharts references are in the cppcheck-2.8 corpus jobs in selfcheck.yml (qtcharts module, -DWITH_QCHART=ON, -DQT_CHARTS_LIB), which the description says are kept on purpose. Passing -DWITH_QCHART=On now prints a deprecation warning and the build carries on. It is a message(WARNING), not an author warning, so the -Werror=dev in CI does not turn it into an error. The includes that are left in statsdialog.cpp and resultsview.cpp are all still used.

Comments

# Comment By Where Status
1 Tests may be missing @dmcppcheck general ⚠️ Open

@wjakobsson, please fix, resolve or reply to the open and new comments: #1.

Testing

  • Configured the GUI with CMake 3.28.3 using -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TESTING=On. Configuration succeeded and printed CMake Warning at cmake/options.cmake:84 (message): WITH_QCHART is deprecated and has no effect ..., which is the intended warning.
  • Built cppcheck-gui and gui-tests with no compiler warnings.
  • QT_QPA_PLATFORM=offscreen ctest --test-dir build-gui -R test- --output-on-failure: 5 of 5 passed.
  • make -j8 cppcheck testrunner succeeded.
  • pytest other_test.py -k clang_tidy: all 7 tests were skipped because clang-tidy is not installed in the container. So the NOLINT(modernize-avoid-c-style-cast) change could not be checked here.
  • Could not test:
    • the cmake_diagnostic(SET CMD_STRICT ...) block, because it only runs on CMake ≥ 4.5;
    • the qmake build;
    • the Windows installer.
  • Searched the tree for leftover chart and statistics references. The only ones outside translations are the intentional cppcheck-2.8 corpus jobs in selfcheck.yml and a list of Qt header names in tools/donate_cpu_lib.py, which only names headers and adds no dependency.

Automated review of 88fee66 by Claude. The pull request was built and tested locally.

@wjakobsson

Copy link
Copy Markdown
Collaborator Author

don't think tests fit this pr

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.

2 participants