Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed qmake and Qt5 support #6678

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI-unixish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: CMake build (with GUI)
if: matrix.build_gui
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build cmake.output -- -j$(nproc)

- name: Run CMake test
Expand Down
120 changes: 6 additions & 114 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12]
include:
- use_qt6: On
- os: ubuntu-20.04
use_qt6: Off
fail-fast: false # Prefer quick result

runs-on: ${{ matrix.os }}
Expand All @@ -42,13 +38,7 @@ jobs:
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'Off'
run: |
sudo apt-get update
sudo apt-get install libxml2-utils libtinyxml2-dev qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'On'
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
# qt6-tools-dev-tools for lprodump
Expand All @@ -65,13 +55,13 @@ jobs:
- name: CMake build on ubuntu (with GUI / system tinyxml2)
if: contains(matrix.os, 'ubuntu')
run: |
cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=${{ matrix.use_qt6 }} -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build cmake.output.tinyxml2 -- -j$(nproc)

- name: CMake build on macos (with GUI / system tinyxml2)
if: contains(matrix.os, 'macos')
run: |
cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
cmake -S . -B cmake.output.tinyxml2 -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
cmake --build cmake.output.tinyxml2 -- -j$(nproc)

- name: Run CMake test (system tinyxml2)
Expand All @@ -83,10 +73,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12]
include:
- use_qt6: On
- os: ubuntu-20.04
use_qt6: Off
fail-fast: false # Prefer quick result

runs-on: ${{ matrix.os }}
Expand All @@ -103,12 +89,6 @@ jobs:
with:
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'Off'
run: |
sudo apt-get update
sudo apt-get install libxml2-utils qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser

# TODO: move latest compiler to separate step
# TODO: bail out on warnings with latest GCC
- name: Set up GCC
Expand All @@ -124,7 +104,7 @@ jobs:
echo "CXX=g++-13" >> $GITHUB_ENV

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu') && matrix.use_qt6 == 'On'
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
# qt6-tools-dev-tools for lprodump
Expand All @@ -141,13 +121,13 @@ jobs:
- name: CMake build on ubuntu (with GUI)
if: contains(matrix.os, 'ubuntu')
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=${{ matrix.use_qt6 }} -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build cmake.output -- -j$(nproc)

- name: CMake build on macos (with GUI)
if: contains(matrix.os, 'macos')
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
cmake --build cmake.output -- -j$(nproc)

- name: Run CMake test
Expand Down Expand Up @@ -245,94 +225,6 @@ jobs:
run: |
ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG

build_qmake:

strategy:
matrix:
# no longer build with qmake on MacOS as brew might lack pre-built Qt5 packages causing the step to run for hours
os: [ubuntu-20.04, ubuntu-22.04]
fail-fast: false # Prefer quick result

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser

# coreutils contains "nproc"
- name: Install missing software on macos
if: contains(matrix.os, 'macos')
run: |
brew install coreutils qt@5
# expose qmake
brew link qt@5 --force

- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}

- name: Build GUI
run: |
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
pushd gui
qmake CONFIG+=debug CONFIG+=ccache HAVE_QCHART=yes
make -j$(nproc)

# TODO: binaries are in a different location on macos
- name: Build and Run GUI tests
if: contains(matrix.os, 'ubuntu')
run: |
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
pushd gui/test/cppchecklibrarydata
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-cppchecklibrarydata
popd
pushd gui/test/filelist
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-filelist
popd
pushd gui/test/projectfile
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-projectfile
popd
pushd gui/test/resultstree
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
export QT_QPA_PLATFORM=offscreen
./test-resultstree
popd
pushd gui/test/translationhandler
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
# TODO: requires X session because of QApplication dependency in translationhandler.cpp
#./test-translationhandler
popd
pushd gui/test/xmlreportv2
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-xmlreportv2

- name: Generate Qt help file
run: |
pushd gui/help
qhelpgenerator online-help.qhcp -o online-help.qhc

- name: Build triage
run: |
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
pushd tools/triage
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)

build:

strategy:
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
os: [windows-2019, windows-2022]
qt_ver: [5.15.2, 6.7.2]
qt_ver: [6.7.2]
fail-fast: false

runs-on: ${{ matrix.os }}
Expand All @@ -47,26 +47,10 @@ jobs:
modules: 'qtcharts'
cache: true

- name: Build GUI release (qmake)
if: startsWith(matrix.qt_ver, '5')
run: |
cd gui || exit /b !errorlevel!
qmake HAVE_QCHART=yes || exit /b !errorlevel!
nmake release || exit /b !errorlevel!
env:
CL: /MP

- name: Deploy GUI
if: startsWith(matrix.qt_ver, '5')
run: |
windeployqt Build\gui || exit /b !errorlevel!
del Build\gui\cppcheck-gui.ilk || exit /b !errorlevel!
del Build\gui\cppcheck-gui.pdb || exit /b !errorlevel!

- name: Build GUI release (CMake)
if: startsWith(matrix.qt_ver, '6')
run: |
cmake -S . -B build -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On || exit /b !errorlevel!
cmake -S . -B build -DBUILD_GUI=On -DWITH_QCHART=On || exit /b !errorlevel!
cmake --build build --target cppcheck-gui || exit /b !errorlevel!

# TODO: deploy with CMake/Qt6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Prepare CMake
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off
env:
CC: clang-19
CXX: clang++-19
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: include-what-you-use

on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
on: [push, pull_request]

permissions:
contents: read
Expand Down Expand Up @@ -87,7 +84,7 @@ jobs:

- name: Prepare CMake
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On
cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On
env:
CC: clang
CXX: clang++
Expand Down Expand Up @@ -160,7 +157,7 @@ jobs:

- name: Prepare CMake
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On
cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On
env:
CC: clang-19
CXX: clang++-19
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: release-windows

on:
push:
tags:
- '2.*'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
on: [push, pull_request]

permissions:
contents: read
Expand All @@ -27,7 +21,7 @@ jobs:
env:
# see https://www.pcre.org/original/changelog.txt
PCRE_VERSION: 8.45
QT_VERSION: 5.15.2
QT_VERSION: 6.7.2

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -79,7 +73,9 @@ jobs:
run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel!

- name: Build x64 release GUI
if: false
run: |
# TODO: build with CMake
cd gui || exit /b !errorlevel!
qmake HAVE_QCHART=yes || exit /b !errorlevel!
nmake release || exit /b !errorlevel!
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/selfcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# unusedFunction - start
- name: CMake
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=ON -DUSE_QT6=On -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=ON -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On

- name: Generate dependencies
run: |
Expand All @@ -88,7 +88,7 @@ jobs:
# unusedFunction notest - start
- name: CMake (no test)
run: |
cmake -S . -B cmake.output.notest -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=Off -DBUILD_GUI=ON -DUSE_QT6=On -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On
cmake -S . -B cmake.output.notest -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=Off -DBUILD_GUI=ON -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On

- name: Generate dependencies (no test)
run: |
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
# unusedFunction notest nocli - start
- name: CMake (no test / no cli)
run: |
cmake -S . -B cmake.output.notest_nocli -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=Off -DBUILD_CLI=Off -DBUILD_GUI=ON -DUSE_QT6=On -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On
cmake -S . -B cmake.output.notest_nocli -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=Off -DBUILD_CLI=Off -DBUILD_GUI=ON -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On

- name: Generate dependencies (no test / no cli)
run: |
Expand Down
31 changes: 0 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,14 @@ ipch/
*.pbxuser
build/

# GUI build folders
/gui/debug/
/gui/release/
/gui/temp/
/triage/temp

# Other (generated) GUI files
/gui/*.qm
/gui/cppcheck-gui
/gui/cppcheck-gui.exe
/gui/gui.sln
/gui/gui.vcproj
/gui/help/online-help.qch
/gui/help/online-help.qhc
/gui/Makefile
/gui/Makefile.debug
/gui/Makefile.release
/gui/qrc_gui.cpp
/gui/test/Makefile
/gui/test/*/Makefile
/gui/test/*/*/Makefile
/gui/test/benchmark/simple/benchmark-simple
/gui/test/cppchecklibrarydata/qrc_resources.cpp
/gui/test/cppchecklibrarydata/test-cppchecklibrarydata
/gui/test/filelist/test-filelist
/gui/test/projectfile/test-projectfile
/gui/test/translationhandler/test-translationhandler
/gui/test/xmlreportv2/test-xmlreportv2

# Doxygen output folder
doxyoutput/

# qmake generated
htmlreport/.tox/
htmlreport/MANIFEST

# Backup files and stuff from patches
*.rej
*~
Expand Down Expand Up @@ -124,9 +96,6 @@ stage
.cache/
compile_commands.json

# qmake
.qmake.stash

#vs code
/.vscode

Expand Down
Loading