From fc4f0e563dc6cf61898f710ed3700e7015b3d384 Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 10 Aug 2024 19:49:11 +0200 Subject: [PATCH] removed qmake and Qt5 support --- .github/workflows/CI-unixish-docker.yml | 2 +- .github/workflows/CI-unixish.yml | 124 +--------- .github/workflows/CI-windows.yml | 20 +- .github/workflows/asan.yml | 2 +- .github/workflows/clang-tidy.yml | 4 +- .github/workflows/iwyu.yml | 6 +- .github/workflows/release-windows.yml | 4 +- .github/workflows/selfcheck.yml | 8 +- .github/workflows/tsan.yml | 2 +- .github/workflows/ubsan.yml | 2 +- .gitignore | 7 - build-pcre.txt | 13 - cmake/cxx11.cmake | 2 +- cmake/findDependencies.cmake | 36 ++- cmake/options.cmake | 1 - cmake/printInfo.cmake | 10 +- cmake/qtCompat.cmake | 53 +---- console_common.pri | 23 -- externals/externals.pri | 11 - gui/checkthread.cpp | 8 - gui/codeeditor.cpp | 9 - gui/codeeditstyledialog.cpp | 4 - gui/codeeditstyledialog.h | 4 - gui/cppchecklibrarydata.cpp | 4 - gui/csvreport.cpp | 8 - gui/gui.pro | 225 ------------------ gui/main.cpp | 6 - gui/projectfile.cpp | 4 - gui/projectfiledialog.cpp | 12 - gui/readme.txt | 70 ------ gui/resultstree.cpp | 9 - gui/statsdialog.cpp | 4 - gui/test/common.pri | 12 - .../cppchecklibrarydata.pro | 23 -- gui/test/filelist/filelist.pro | 29 --- gui/test/projectfile/projectfile.pro | 22 -- gui/test/readme.txt | 27 --- gui/test/resultstree/resultstree.pro | 31 --- gui/test/test.pro | 9 - .../translationhandler/translationhandler.pro | 22 -- gui/test/xmlreportv2/xmlreportv2.pro | 28 --- gui/txtreport.cpp | 4 - gui/xmlreport.cpp | 4 - gui/xmlreportv2.cpp | 4 - lib/lib.pri | 190 --------------- lib/pcrerules.pri | 13 - readme.md | 15 +- readme.txt | 8 - readmeja.md | 11 - releasenotes.txt | 2 + test/cli/QML-Samples-TableView/main.cpp | 4 - tools/dmake/dmake.cpp | 24 -- tools/triage/.gitignore | 1 - tools/triage/triage.pro | 24 -- 54 files changed, 57 insertions(+), 1147 deletions(-) delete mode 100644 console_common.pri delete mode 100644 externals/externals.pri delete mode 100644 gui/gui.pro delete mode 100644 gui/readme.txt delete mode 100644 gui/test/common.pri delete mode 100644 gui/test/cppchecklibrarydata/cppchecklibrarydata.pro delete mode 100644 gui/test/filelist/filelist.pro delete mode 100644 gui/test/projectfile/projectfile.pro delete mode 100644 gui/test/readme.txt delete mode 100644 gui/test/resultstree/resultstree.pro delete mode 100644 gui/test/test.pro delete mode 100644 gui/test/translationhandler/translationhandler.pro delete mode 100644 gui/test/xmlreportv2/xmlreportv2.pro delete mode 100644 lib/lib.pri delete mode 100644 lib/pcrerules.pri delete mode 100644 tools/triage/triage.pro diff --git a/.github/workflows/CI-unixish-docker.yml b/.github/workflows/CI-unixish-docker.yml index 018a5490b371..407c58a78142 100644 --- a/.github/workflows/CI-unixish-docker.yml +++ b/.github/workflows/CI-unixish-docker.yml @@ -85,7 +85,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 diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index 0cdd45876856..e940576491a0 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -20,10 +20,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 }} @@ -41,13 +37,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 @@ -64,13 +54,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) @@ -82,10 +72,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 }} @@ -102,12 +88,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 @@ -123,7 +103,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 @@ -140,13 +120,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 @@ -244,94 +224,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/ccache-action@v1.2.11 - 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: @@ -552,9 +444,9 @@ jobs: ./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b1 --addon=naming.json --enable=internal lib || ec=1 # check gui with qt settings mkdir b2 - ./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b2 -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui || ec=1 + ./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b2 -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=68 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui || ec=1 # self check test and tools ./cppcheck $selfcheck_options $cppcheck_options -Icli test/*.cpp tools/*.cpp || ec=1 # triage - ./cppcheck $selfcheck_options $cppcheck_options -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage || ec=1 + ./cppcheck $selfcheck_options $cppcheck_options -DQ_MOC_OUTPUT_REVISION=68 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage || ec=1 exit $ec diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index dae587332275..afa19cc2df84 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: os: [windows-2019, windows-2022] - qt_ver: [5.15.2, 6.7.0] + qt_ver: [6.7.0] fail-fast: false runs-on: ${{ matrix.os }} @@ -46,26 +46,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 diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 9297b2f2d5e2..eb5b5ed81d8a 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-22.04 env: - QT_VERSION: 5.15.2 + QT_VERSION: 6.7.2 ASAN_OPTIONS: detect_stack_use_after_return=1 # TODO: figure out why there are cache misses with PCH enabled CCACHE_SLOPPINESS: pch_defines,time_macros diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index f934f2bb16b8..e961206226ec 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-22.04 env: - QT_VERSION: 6.7.0 + QT_VERSION: 6.7.2 steps: - uses: actions/checkout@v4 @@ -53,7 +53,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 diff --git a/.github/workflows/iwyu.yml b/.github/workflows/iwyu.yml index 2baded1f6cdf..4d25c6315894 100644 --- a/.github/workflows/iwyu.yml +++ b/.github/workflows/iwyu.yml @@ -24,7 +24,7 @@ jobs: image: ${{ matrix.image }} env: - QT_VERSION: 6.7.0 + QT_VERSION: 6.7.2 steps: - uses: actions/checkout@v4 @@ -87,7 +87,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++ @@ -160,7 +160,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 diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index ced557ae694c..76bc7c04aba0 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -27,7 +27,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 @@ -79,7 +79,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! diff --git a/.github/workflows/selfcheck.yml b/.github/workflows/selfcheck.yml index 6241f3851d73..37c23b6915be 100644 --- a/.github/workflows/selfcheck.yml +++ b/.github/workflows/selfcheck.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-22.04 env: - QT_VERSION: 6.7.0 + QT_VERSION: 6.7.2 steps: - uses: actions/checkout@v4 @@ -61,7 +61,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: | @@ -87,7 +87,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: | @@ -128,7 +128,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: | diff --git a/.github/workflows/tsan.yml b/.github/workflows/tsan.yml index d18ca317bc9c..0bd04ad0c121 100644 --- a/.github/workflows/tsan.yml +++ b/.github/workflows/tsan.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-22.04 env: - QT_VERSION: 5.15.2 + QT_VERSION: 6.7.2 TSAN_OPTIONS: halt_on_error=1 # TODO: figure out why there are cache misses with PCH enabled CCACHE_SLOPPINESS: pch_defines,time_macros diff --git a/.github/workflows/ubsan.yml b/.github/workflows/ubsan.yml index 41ff8a62fe8e..49e54e9c8a26 100644 --- a/.github/workflows/ubsan.yml +++ b/.github/workflows/ubsan.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-22.04 env: - QT_VERSION: 5.15.2 + QT_VERSION: 6.7.2 UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1:report_error_type=1 # TODO: figure out why there are cache misses with PCH enabled CCACHE_SLOPPINESS: pch_defines,time_macros diff --git a/.gitignore b/.gitignore index 48df3dad1ef7..3a78b8c34fd7 100644 --- a/.gitignore +++ b/.gitignore @@ -82,10 +82,6 @@ build/ # Doxygen output folder doxyoutput/ -# qmake generated -htmlreport/.tox/ -htmlreport/MANIFEST - # Backup files and stuff from patches *.rej *~ @@ -124,9 +120,6 @@ stage .cache/ compile_commands.json -# qmake -.qmake.stash - #vs code /.vscode diff --git a/build-pcre.txt b/build-pcre.txt index 3dad4274c926..9f4e8e06e29f 100644 --- a/build-pcre.txt +++ b/build-pcre.txt @@ -2,19 +2,6 @@ PCRE is a library that is used by the optional "rules" feature for the command line version of cppcheck. It is readily available on Linux and Mac OS X, but must be obtained separately for Windows. -If you're using qmake to generate makefiles, the following behavior applies: - -- If you're not on Windows, it assumes by default that you have PCRE and want - to enable rules support. You can disable rules support (removing the PCRE - dependency) by passing HAVE_RULES=no to qmake. - -- If you are on Windows, but have PCRE available, you can enable rules support - by passing HAVE_RULES=yes to qmake. - - - Note: This includes using build.bat since it calls qmake - to use PCRE and - build.bat, you need to run set HAVE_RULES=yes before each run of build.bat - - Build instructions ------------------ diff --git a/cmake/cxx11.cmake b/cmake/cxx11.cmake index b5cb4631218d..34772e86b7c2 100644 --- a/cmake/cxx11.cmake +++ b/cmake/cxx11.cmake @@ -1,6 +1,6 @@ macro(use_cxx11) # some GitHub Action Windows runners randomly fail with a complaint that Qt6 requires a C++17 compiler - if(MSVC AND USE_QT6) + if(MSVC) # CMAKE_CXX_STANDARD 17 was added in CMake 3.8 set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use") else() diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 3675bd5167cb..bc590c438963 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -6,27 +6,21 @@ if(BUILD_GUI) if(BUILD_TESTS) list(APPEND qt_components Test) endif() - if(USE_QT6) - find_package(Qt6 COMPONENTS ${qt_components} REQUIRED) - set(QT_VERSION "${Qt6Core_VERSION}") - if(NOT QT_VERSION) - # TODO: remove fallback - message(WARNING "'Qt6Core_VERSION' is not set - using 6.0.0 as fallback") - set(QT_VERSION "6.0.0") - endif() - if(MSVC) - # disable Visual Studio C++ memory leak detection since it causes compiler errors with Qt 6 - # D:\a\cppcheck\Qt\6.2.4\msvc2019_64\include\QtCore/qhash.h(179,15): warning C4003: not enough arguments for function-like macro invocation 'free' [D:\a\cppcheck\cppcheck\build\gui\cppcheck-gui.vcxproj] - # D:\a\cppcheck\Qt\6.2.4\msvc2019_64\include\QtCore/qhash.h(179,15): error C2059: syntax error: ',' [D:\a\cppcheck\cppcheck\build\gui\cppcheck-gui.vcxproj] - # this is supposed to be fixed according to the following tickets but it still happens - # https://bugreports.qt.io/browse/QTBUG-40575 - # https://bugreports.qt.io/browse/QTBUG-86395 - set(DISABLE_CRTDBG_MAP_ALLOC ON) - endif() - else() - message(WARNING "Building with Qt5 is deprecated (it went EOL in May 2023) and will be removed in a future release - please use Qt6 instead") - find_package(Qt5 COMPONENTS ${qt_components} REQUIRED) - set(QT_VERSION "${Qt5Core_VERSION_STRING}") + find_package(Qt6 COMPONENTS ${qt_components} REQUIRED) + set(QT_VERSION "${Qt6Core_VERSION}") + if(NOT QT_VERSION) + # TODO: remove fallback + message(WARNING "'Qt6Core_VERSION' is not set - using 6.0.0 as fallback") + set(QT_VERSION "6.0.0") + endif() + if(MSVC) + # disable Visual Studio C++ memory leak detection since it causes compiler errors with Qt 6 + # D:\a\cppcheck\Qt\6.2.4\msvc2019_64\include\QtCore/qhash.h(179,15): warning C4003: not enough arguments for function-like macro invocation 'free' [D:\a\cppcheck\cppcheck\build\gui\cppcheck-gui.vcxproj] + # D:\a\cppcheck\Qt\6.2.4\msvc2019_64\include\QtCore/qhash.h(179,15): error C2059: syntax error: ',' [D:\a\cppcheck\cppcheck\build\gui\cppcheck-gui.vcxproj] + # this is supposed to be fixed according to the following tickets but it still happens + # https://bugreports.qt.io/browse/QTBUG-40575 + # https://bugreports.qt.io/browse/QTBUG-86395 + set(DISABLE_CRTDBG_MAP_ALLOC ON) endif() endif() diff --git a/cmake/options.cmake b/cmake/options.cmake index 90c753358b04..f497bf962206 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -55,7 +55,6 @@ option(BUILD_CLI "Build the cli application" option(BUILD_GUI "Build the qt application" OFF) option(WITH_QCHART "Enable QtCharts usage in the GUI" OFF) -option(USE_QT6 "Prefer Qt6 when available" OFF) option(REGISTER_GUI_TESTS "Register GUI tests in CTest" ON) option(HAVE_RULES "Usage of rules (needs PCRE library and headers)" OFF) diff --git a/cmake/printInfo.cmake b/cmake/printInfo.cmake index bb633650b7d1..c63c9b64b4cf 100644 --- a/cmake/printInfo.cmake +++ b/cmake/printInfo.cmake @@ -64,15 +64,9 @@ message(STATUS "BUILD_GUI = ${BUILD_GUI}") if(BUILD_GUI) message(STATUS "REGISTER_GUI_TESTS = ${REGISTER_GUI_TESTS}") message(STATUS "WITH_QCHART = ${WITH_QCHART}") - message(STATUS "USE_QT6 = ${USE_QT6}") message(STATUS "QT_VERSION = ${QT_VERSION}") - if(USE_QT6) - message(STATUS "Qt6Core_LIBRARIES = ${Qt6Core_LIBRARIES}") - message(STATUS "Qt6Core_INCLUDE_DIRS = ${Qt6Core_INCLUDE_DIRS}") - else() - message(STATUS "Qt5Core_LIBRARIES = ${Qt5Core_LIBRARIES}") - message(STATUS "Qt5Core_INCLUDE_DIRS = ${Qt5Core_INCLUDE_DIRS}") - endif() + message(STATUS "Qt6Core_LIBRARIES = ${Qt6Core_LIBRARIES}") + message(STATUS "Qt6Core_INCLUDE_DIRS = ${Qt6Core_INCLUDE_DIRS}") endif() message(STATUS) message(STATUS "HAVE_RULES = ${HAVE_RULES}") diff --git a/cmake/qtCompat.cmake b/cmake/qtCompat.cmake index 91995610a900..bc3e3851440b 100644 --- a/cmake/qtCompat.cmake +++ b/cmake/qtCompat.cmake @@ -1,43 +1,10 @@ -if(QT_VERSION VERSION_LESS 5.15) - # "versionless" Qt is not supported until 5.15 so we need to use wrappers - - function(qt_wrap_ui out) - qt5_wrap_ui(_uis_hdrs ${ARGN}) - set("${out}" ${_uis_hdrs} PARENT_SCOPE) - endfunction() - - function(qt_add_resources out) - qt5_add_resources(_resources ${ARGN}) - set("${out}" ${_resources} PARENT_SCOPE) - endfunction() - - function(qt_create_translation out) - qt5_create_translation(_qms ${ARGN}) - set("${out}" ${_qms} PARENT_SCOPE) - endfunction() - - function(qt_wrap_cpp out) - qt5_wrap_cpp(_sources ${ARGN}) - set("${out}" ${_sources} PARENT_SCOPE) - endfunction() - - set(QT_CORE_LIB Qt5::Core) - set(QT_TEST_LIB Qt5::Test) - set(QT_WIDGETS_LIB Qt5::Widgets) - set(QT_GUI_LIB Qt5::Gui) - set(QT_HELP_LIB Qt5::Help) - set(QT_PRINTSUPPORT_LIB Qt5::PrintSupport) - set(QT_CHARTS_LIB Qt5::Charts) - set(QT_NETWORK_LIB Qt5::Network) -else() - # use "versionless" targets - no need for wrapper functions - - set(QT_CORE_LIB Qt::Core) - set(QT_TEST_LIB Qt::Test) - set(QT_WIDGETS_LIB Qt::Widgets) - set(QT_GUI_LIB Qt::Gui) - set(QT_HELP_LIB Qt::Help) - set(QT_PRINTSUPPORT_LIB Qt::PrintSupport) - set(QT_CHARTS_LIB Qt::Charts) - set(QT_NETWORK_LIB Qt::Network) -endif() +# use "versionless" targets - no need for wrapper functions + +set(QT_CORE_LIB Qt::Core) +set(QT_TEST_LIB Qt::Test) +set(QT_WIDGETS_LIB Qt::Widgets) +set(QT_GUI_LIB Qt::Gui) +set(QT_HELP_LIB Qt::Help) +set(QT_PRINTSUPPORT_LIB Qt::PrintSupport) +set(QT_CHARTS_LIB Qt::Charts) +set(QT_NETWORK_LIB Qt::Network) diff --git a/console_common.pri b/console_common.pri deleted file mode 100644 index 9937ae5d06f5..000000000000 --- a/console_common.pri +++ /dev/null @@ -1,23 +0,0 @@ -# console_common.pri -# These are common definitions for console builds. - -win32 { - CONFIG += embed_manifest_exe console - DEFINES += _CRT_SECURE_NO_WARNINGS - LIBS += -lshlwapi -} - -# Add more strict compiling flags for GCC -contains(QMAKE_CXX, g++) { - QMAKE_CXXFLAGS_WARN_ON += -Wextra -pedantic -Wfloat-equal -Wcast-qual -Wlogical-op -Wno-long-long -} - -# Change Visual Studio compiler (CL) warning level to W4 -contains(QMAKE_CXX, cl) { - QMAKE_CXXFLAGS_WARN_ON -= -W3 - QMAKE_CXXFLAGS_WARN_ON += -W4 -} - -CONFIG(release, debug|release) { - DEFINES += NDEBUG -} diff --git a/externals/externals.pri b/externals/externals.pri deleted file mode 100644 index 023e8053733d..000000000000 --- a/externals/externals.pri +++ /dev/null @@ -1,11 +0,0 @@ -INCLUDEPATH += $${PWD} \ - $${PWD}/picojson \ - $${PWD}/simplecpp \ - $${PWD}/tinyxml2 - -HEADERS += $${PWD}/picojson/picojson.h \ - $${PWD}/simplecpp/simplecpp.h \ - $${PWD}/tinyxml2/tinyxml2.h - -SOURCES += $${PWD}/simplecpp/simplecpp.cpp \ - $${PWD}/tinyxml2/tinyxml2.cpp diff --git a/gui/checkthread.cpp b/gui/checkthread.cpp index 4218535986d9..7246d1c8df39 100644 --- a/gui/checkthread.cpp +++ b/gui/checkthread.cpp @@ -50,10 +50,6 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -#include -#endif - // NOLINTNEXTLINE(performance-unnecessary-value-param) - used as callback so we need to preserve the signature int CheckThread::executeCommand(std::string exe, std::vector args, std::string redirect, std::string &output) // cppcheck-suppress passedByValue { @@ -222,11 +218,7 @@ void CheckThread::runAddonsAndTools(const FileSettings *fileSettings, const QStr process.start(clangCmd(),args2); process.waitForFinished(); const QByteArray &ba = process.readAllStandardOutput(); -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) const quint16 chksum = qChecksum(QByteArrayView(ba)); -#else - const quint16 chksum = qChecksum(ba.data(), ba.length()); -#endif QFile f1(analyzerInfoFile + '.' + addon + "-E"); if (f1.open(QIODevice::ReadOnly | QIODevice::Text)) { diff --git a/gui/codeeditor.cpp b/gui/codeeditor.cpp index ecc3575bc26b..37eadf5741e1 100644 --- a/gui/codeeditor.cpp +++ b/gui/codeeditor.cpp @@ -284,13 +284,8 @@ CodeEditor::CodeEditor(QWidget *parent) : setObjectName("CodeEditor"); setStyleSheet(generateStyleString()); -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) auto *copyText = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_C),this); auto *allText = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_A),this); -#else - const auto *copyText = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_C),this); - const auto *allText = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_A),this); -#endif connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int))); connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); @@ -367,11 +362,7 @@ int CodeEditor::lineNumberAreaWidth() ++digits; } -#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) const int space = 3 + (fontMetrics().horizontalAdvance(QLatin1Char('9')) * digits); -#else - const int space = 3 + (fontMetrics().width(QLatin1Char('9')) * digits); -#endif return space; } diff --git a/gui/codeeditstyledialog.cpp b/gui/codeeditstyledialog.cpp index cf2988da43a4..dc1c8fba6961 100644 --- a/gui/codeeditstyledialog.cpp +++ b/gui/codeeditstyledialog.cpp @@ -129,11 +129,7 @@ StyleEditDialog::StyleEditDialog(const CodeEditorStyle& newStyle, mSampleEditor = new CodeEditor(this); QFont sampleFont("Monospace"); QFontMetrics fm(sampleFont); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) mSampleEditor->setMinimumWidth(fm.horizontalAdvance(QString(40, 'W'))); -#else - mSampleEditor->setMinimumWidth(fm.width(QString(40, 'W'))); -#endif // designate highlight, errors, and symbols mSampleEditor->setError(mSampleDocument, mErrLineNum, mErrSymbolsList); // End Controls diff --git a/gui/codeeditstyledialog.h b/gui/codeeditstyledialog.h index 09a1418fa266..b0aec7b9acf1 100644 --- a/gui/codeeditstyledialog.h +++ b/gui/codeeditstyledialog.h @@ -33,10 +33,6 @@ class SelectFontWeightCombo; class QPushButton; class QWidget; -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -class QStringList; -#endif - class StyleEditDialog : public QDialog { Q_OBJECT public: diff --git a/gui/cppchecklibrarydata.cpp b/gui/cppchecklibrarydata.cpp index 682e544137cf..c54059a3044d 100644 --- a/gui/cppchecklibrarydata.cpp +++ b/gui/cppchecklibrarydata.cpp @@ -30,10 +30,6 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -#include -#endif - const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U; const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U; diff --git a/gui/csvreport.cpp b/gui/csvreport.cpp index 26e983009ddc..f99dd5061e38 100644 --- a/gui/csvreport.cpp +++ b/gui/csvreport.cpp @@ -42,11 +42,7 @@ bool CsvReport::create() void CsvReport::writeHeader() { // Added 5 columns to the header. -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) mTxtWriter << "File, Line, Severity, Id, Summary" << Qt::endl; -#else - mTxtWriter << "File, Line, Severity, Id, Summary" << endl; -#endif } void CsvReport::writeFooter() @@ -64,9 +60,5 @@ void CsvReport::writeError(const ErrorItem &error) const QString file = QDir::toNativeSeparators(error.errorPath.back().file); QString line = QString("%1,%2,").arg(file).arg(error.errorPath.back().line); line += QString("%1,%2,%3").arg(GuiSeverity::toString(error.severity)).arg(error.errorId).arg(error.summary); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) mTxtWriter << line << Qt::endl; -#else - mTxtWriter << line << endl; -#endif } diff --git a/gui/gui.pro b/gui/gui.pro deleted file mode 100644 index 338be751fd21..000000000000 --- a/gui/gui.pro +++ /dev/null @@ -1,225 +0,0 @@ -lessThan(QT_MAJOR_VERSION, 5): error(requires >= Qt 5 (You used: $$QT_VERSION)) -greaterThan(QT_MAJOR_VERSION, 5): error(Qt 6 is not supported via qmake - please use CMake instead) - -message("Building the GUI via qmake is deprecated and will be removed in a future release. Please use CMake instead.") - -TEMPLATE = app -TARGET = cppcheck-gui -CONFIG += warn_on debug -DEPENDPATH += . \ - ../lib -INCLUDEPATH += . \ - ../lib -QT += widgets -QT += printsupport -QT += help -QT += network - -# Build online help -onlinehelp.target = online-help.qhc -equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 12) { - # qcollectiongenerator is used in case of QT version < 5.12 - onlinehelp.commands = qcollectiongenerator $$PWD/help/online-help.qhcp -o $$PWD/help/online-help.qhc -} else { - onlinehelp.commands = qhelpgenerator $$PWD/help/online-help.qhcp -o $$PWD/help/online-help.qhc -} -QMAKE_EXTRA_TARGETS += onlinehelp -PRE_TARGETDEPS += online-help.qhc - -contains(LINKCORE, [yY][eE][sS]) { - LIBS += -l../bin/cppcheck-core - DEFINES += CPPCHECKLIB_IMPORT -} -LIBS += -L$$PWD/../externals - -DESTDIR = . -RCC_DIR = temp -MOC_DIR = temp -OBJECTS_DIR = temp -UI_DIR = temp - -isEmpty(QMAKE_CXX) { - isEmpty(CXX)) { - QMAKE_CXX = gcc - } else { - QMAKE_CXX = $$(CXX) - } -} - -win32 { - CONFIG += windows - contains(LINKCORE, [yY][eE][sS]) { - DESTDIR = ../bin - RCC_DIR = temp/generated - MOC_DIR = temp/generated - OBJECTS_DIR = temp/generated - UI_DIR = temp/generated - } else { - DESTDIR = ../Build/gui - RCC_DIR = ../BuildTmp/gui - MOC_DIR = ../BuildTmp/gui - OBJECTS_DIR = ../BuildTmp/gui - UI_DIR = ../BuildTmp/gui - } -} - -RESOURCES = gui.qrc -FORMS = about.ui \ - applicationdialog.ui \ - compliancereportdialog.ui \ - fileview.ui \ - helpdialog.ui \ - mainwindow.ui \ - projectfile.ui \ - resultsview.ui \ - scratchpad.ui \ - settings.ui \ - statsdialog.ui \ - librarydialog.ui \ - libraryaddfunctiondialog.ui \ - libraryeditargdialog.ui \ - newsuppressiondialog.ui - -TRANSLATIONS = cppcheck_de.ts \ - cppcheck_es.ts \ - cppcheck_fi.ts \ - cppcheck_fr.ts \ - cppcheck_it.ts \ - cppcheck_ja.ts \ - cppcheck_ka.ts \ - cppcheck_ko.ts \ - cppcheck_nl.ts \ - cppcheck_ru.ts \ - cppcheck_sr.ts \ - cppcheck_sv.ts \ - cppcheck_zh_CN.ts \ - cppcheck_zh_TW.ts - -# Windows-specific options -CONFIG += embed_manifest_exe - -contains(LINKCORE, [yY][eE][sS]) { -} else { - BASEPATH = ../lib/ - include($$PWD/../lib/lib.pri) -} - -win32-msvc* { - MSVC_VER = $$(VisualStudioVersion) - message($$MSVC_VER) - MSVC_VER_SPLIT = $$split(MSVC_VER, .) - MSVC_VER_MAJOR = $$first(MSVC_VER_SPLIT) - # doesn't compile with older VS versions - assume VS2019 (16.x) is the first working for now - !lessThan(MSVC_VER_MAJOR, 16) { - message("using precompiled header") - CONFIG += precompile_header - PRECOMPILED_HEADER = precompiled_qmake.h - } -} - -HEADERS += aboutdialog.h \ - application.h \ - applicationdialog.h \ - applicationlist.h \ - checkstatistics.h \ - checkthread.h \ - codeeditstylecontrols.h \ - codeeditorstyle.h \ - codeeditstyledialog.h \ - codeeditor.h \ - common.h \ - compliancereportdialog.h \ - csvreport.h \ - erroritem.h \ - filelist.h \ - fileviewdialog.h \ - helpdialog.h \ - mainwindow.h \ - platforms.h \ - printablereport.h \ - projectfile.h \ - projectfiledialog.h \ - report.h \ - resultstree.h \ - resultsview.h \ - scratchpad.h \ - settingsdialog.h \ - showtypes.h \ - statsdialog.h \ - threadhandler.h \ - threadresult.h \ - translationhandler.h \ - txtreport.h \ - xmlreport.h \ - xmlreportv2.h \ - librarydialog.h \ - cppchecklibrarydata.h \ - libraryaddfunctiondialog.h \ - libraryeditargdialog.h \ - newsuppressiondialog.h - -SOURCES += aboutdialog.cpp \ - application.cpp \ - applicationdialog.cpp \ - applicationlist.cpp \ - checkstatistics.cpp \ - checkthread.cpp \ - codeeditorstyle.cpp \ - codeeditstylecontrols.cpp \ - codeeditstyledialog.cpp \ - codeeditor.cpp \ - common.cpp \ - compliancereportdialog.cpp \ - csvreport.cpp \ - erroritem.cpp \ - filelist.cpp \ - fileviewdialog.cpp \ - helpdialog.cpp \ - main.cpp \ - mainwindow.cpp\ - platforms.cpp \ - printablereport.cpp \ - projectfile.cpp \ - projectfiledialog.cpp \ - report.cpp \ - resultstree.cpp \ - resultsview.cpp \ - scratchpad.cpp \ - settingsdialog.cpp \ - showtypes.cpp \ - statsdialog.cpp \ - threadhandler.cpp \ - threadresult.cpp \ - translationhandler.cpp \ - txtreport.cpp \ - xmlreport.cpp \ - xmlreportv2.cpp \ - librarydialog.cpp \ - cppchecklibrarydata.cpp \ - libraryaddfunctiondialog.cpp \ - libraryeditargdialog.cpp \ - newsuppressiondialog.cpp - -win32 { - RC_FILE = cppcheck-gui.rc - HEADERS += ../lib/version.h - contains(LINKCORE, [yY][eE][sS]) { - } else { - LIBS += -lshlwapi - } -} - -contains(QMAKE_CC, gcc) { - QMAKE_CXXFLAGS += -std=c++17 -pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -} - -contains(QMAKE_CXX, clang++) { - QMAKE_CXXFLAGS += -std=c++17 -pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -} - -contains(HAVE_QCHART, [yY][eE][sS]) { - QT += charts -} else { - message("Charts disabled - to enable it pass HAVE_QCHART=yes to qmake.") -} - diff --git a/gui/main.cpp b/gui/main.cpp index 91bc9e7a084b..22e1bc8cbd07 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -47,12 +47,6 @@ static bool CheckArgs(const QStringList &args); int main(int argc, char *argv[]) { - -#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) && (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) - QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -#endif - QApplication app(argc, argv); QCoreApplication::setOrganizationName("Cppcheck"); diff --git a/gui/projectfile.cpp b/gui/projectfile.cpp index 6d32b9e3d4aa..b7174f8b3b3b 100644 --- a/gui/projectfile.cpp +++ b/gui/projectfile.cpp @@ -35,10 +35,6 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -#include -#endif - ProjectFile *ProjectFile::mActiveProject; ProjectFile::ProjectFile(QObject *parent) : diff --git a/gui/projectfiledialog.cpp b/gui/projectfiledialog.cpp index ee2a630fabf3..331d69ecb59c 100644 --- a/gui/projectfiledialog.cpp +++ b/gui/projectfiledialog.cpp @@ -512,11 +512,7 @@ void ProjectFileDialog::saveToProjectFile(ProjectFile *projectFile) const projectFile->setBughunting(mUI->mBughunting->isChecked()); projectFile->setClangAnalyzer(mUI->mToolClangAnalyzer->isChecked()); projectFile->setClangTidy(mUI->mToolClangTidy->isChecked()); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) projectFile->setTags(mUI->mEditTags->text().split(";", Qt::SkipEmptyParts)); -#else - projectFile->setTags(mUI->mEditTags->text().split(";", QString::SkipEmptyParts)); -#endif } void ProjectFileDialog::ok() @@ -689,21 +685,13 @@ QStringList ProjectFileDialog::getIncludePaths() const QStringList ProjectFileDialog::getDefines() const { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) return mUI->mEditDefines->text().trimmed().split(QRegularExpression("\\s*;\\s*"), Qt::SkipEmptyParts); -#else - return mUI->mEditDefines->text().trimmed().split(QRegularExpression("\\s*;\\s*"), QString::SkipEmptyParts); -#endif } QStringList ProjectFileDialog::getUndefines() const { const QString undefine = mUI->mEditUndefines->text().trimmed(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) QStringList undefines = undefine.split(QRegularExpression("\\s*;\\s*"), Qt::SkipEmptyParts); -#else - QStringList undefines = undefine.split(QRegularExpression("\\s*;\\s*"), QString::SkipEmptyParts); -#endif undefines.removeDuplicates(); return undefines; } diff --git a/gui/readme.txt b/gui/readme.txt deleted file mode 100644 index 3974af609d29..000000000000 --- a/gui/readme.txt +++ /dev/null @@ -1,70 +0,0 @@ -Cppcheck GUI -============ -This is a GUI for cppcheck. It allows selecting folder or set of files to check -with cppcheck and shows list of found errors. - -Running -------- -You need Qt5 libraries installed in your system. Packages/files to install -depends on your operating system: -- Windows: download Qt from http://www.qt.io/download/ -- Linux: install Qt using your package manager, look for packages having Qt - in their name, e.g. for Ubuntu install libqt5core5a, libqt5gui5, libqt5widgets5 - and libqt5printsupport5. - -Compiling ---------- -Windows: -- The easy ways are: --- download Qt SDK from http://www.qt.io/download/ and use - QtCreator to build the GUI. --- Download precompiled libraries for your platform and use your preferred - IDE/environment to build GUI. Be careful to download the correct version of - library for your compiler! -- The harder way is to download Qt sources and build Qt. Compiling Qt alone may - take over 4 hours! - -Linux: -- Install Qt development packages (make sure qmake -tool gets installed!). The - names depend on distribution, but e.g. for Ubuntu the needed packages are: - * qt5-default - -After you have needed libraries and tools installed, open command -prompt/console, go to gui directory and run command: -- qmake (in Linux and in Windows if build with MinGW/gcc or nmake) -- qmake -tp vc (to generate Visual Studio project file) -- qmake -tp vc LINKCORE=yes (to generate Visual Studio project file, linking - dynamically to core. Recommended.) - -On Windows, you have to either call qtvars.bat in Qt folder or use the Qt command -line prompt shortcut added in the start menu by Qt installation. - -These commands generate makefiles to actually build the software. After that -the actual building is done in IDE or command line as usual. Note that you -don't need to run qmake again unless you add/remove files from the project. - -The Visual Studio solution does not contain a configuration for x64 platform, but -it can be added easily. - -Tests ------ -There are tests for the GUI in gui/test -directory. There is test.pro --projectfile for building all the tests. Each test is in own subdirectory and -builds own binary. Test is run by simple running that binary. The binary also -has several options to select tests etc. You can get the help by running -"binaryname -help" -command. - -Translations ------------- -The GUI is translated to several languages. Qt comes with two tools to update -and compile the translations. lupdate updates translations files from the code -and lrelease compiles translation files use with the executable. - -To update translations: -- run "lupdate gui.pro -no-obsolete" to update the translation files to match the code. This - command updates all the .ts files. Which can be then edited to translate - the application. - -To compile translations: -- run "lrelease gui.pro" to compile .ts files to .qm files which are used by the - executable. diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 9d1c16d0962f..917a537ce03f 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -1037,16 +1037,7 @@ void ResultsTree::startApplication(const QStandardItem *target, int application) const QString cmdLine = QString("%1 %2").arg(program).arg(params); - // this is reported as deprecated in Qt 5.15.2 but no longer in Qt 6 -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) - SUPPRESS_WARNING_CLANG_PUSH("-Wdeprecated") - SUPPRESS_WARNING_GCC_PUSH("-Wdeprecated-declarations") -#endif const bool success = QProcess::startDetached(cmdLine); -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) - SUPPRESS_WARNING_GCC_POP - SUPPRESS_WARNING_CLANG_POP -#endif if (!success) { QString text = tr("Could not start %1\n\nPlease check the application path and parameters are correct.").arg(program); diff --git a/gui/statsdialog.cpp b/gui/statsdialog.cpp index 35fb1fef36b0..24bd3d80e8f4 100644 --- a/gui/statsdialog.cpp +++ b/gui/statsdialog.cpp @@ -63,10 +63,6 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -QT_CHARTS_USE_NAMESPACE -#endif - static QLineSeries *numberOfReports(const QString &fileName, const QString &severity); static QChartView *createChart(const QString &statsFile, const QString &tool); #endif diff --git a/gui/test/common.pri b/gui/test/common.pri deleted file mode 100644 index e6589d8ed090..000000000000 --- a/gui/test/common.pri +++ /dev/null @@ -1,12 +0,0 @@ -QT += testlib - -INCLUDEPATH += $${PWD}/.. \ - $${PWD}/../../lib - -contains(QMAKE_CC, gcc) { - QMAKE_CXXFLAGS += -std=c++11 -} - -contains(QMAKE_CXX, clang++) { - QMAKE_CXXFLAGS += -std=c++11 -} diff --git a/gui/test/cppchecklibrarydata/cppchecklibrarydata.pro b/gui/test/cppchecklibrarydata/cppchecklibrarydata.pro deleted file mode 100644 index 787e95f8a595..000000000000 --- a/gui/test/cppchecklibrarydata/cppchecklibrarydata.pro +++ /dev/null @@ -1,23 +0,0 @@ -TEMPLATE = app -TARGET = test-cppchecklibrarydata -DEPENDPATH += . -INCLUDEPATH += . -OBJECTS_DIR = ../../temp -MOC_DIR = ../../temp - -QT -= gui -QT += core -QT += testlib - -include(../common.pri) - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -SOURCES += testcppchecklibrarydata.cpp \ - ../../cppchecklibrarydata.cpp - -HEADERS += testcppchecklibrarydata.h \ - ../../cppchecklibrarydata.h \ - -RESOURCES += \ - resources.qrc diff --git a/gui/test/filelist/filelist.pro b/gui/test/filelist/filelist.pro deleted file mode 100644 index 110746a5ae0d..000000000000 --- a/gui/test/filelist/filelist.pro +++ /dev/null @@ -1,29 +0,0 @@ -TEMPLATE = app -TARGET = test-filelist -DEPENDPATH += . -INCLUDEPATH += . ../../../externals/simplecpp -OBJECTS_DIR = ../../temp -MOC_DIR = ../../temp - -QT -= gui -QT += core -QT += testlib - -include(../common.pri) - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -# tests -SOURCES += testfilelist.cpp \ - ../../filelist.cpp \ - ../../../lib/pathmatch.cpp \ - ../../../lib/path.cpp \ - ../../../lib/utils.cpp \ - ../../../externals/simplecpp/simplecpp.cpp - -HEADERS += testfilelist.h \ - ../../filelist.h \ - ../../../lib/pathmatch.h \ - ../../../lib/path.h \ - ../../../lib/utils.h \ - ../../../externals/simplecpp/simplecpp.h diff --git a/gui/test/projectfile/projectfile.pro b/gui/test/projectfile/projectfile.pro deleted file mode 100644 index 68555272d6cf..000000000000 --- a/gui/test/projectfile/projectfile.pro +++ /dev/null @@ -1,22 +0,0 @@ -TEMPLATE = app -TARGET = test-projectfile -DEPENDPATH += . -INCLUDEPATH += . ../../../externals/simplecpp ../../../externals/tinyxml2 ../../../externals/picojson -OBJECTS_DIR = ../../temp -MOC_DIR = ../../temp - -QT -= gui -QT += core -QT += testlib - -include(../common.pri) - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -# tests -SOURCES += testprojectfile.cpp \ - ../../projectfile.cpp - -HEADERS += testprojectfile.h \ - ../../projectfile.h \ - ../../../externals/picojson/picojson.h diff --git a/gui/test/readme.txt b/gui/test/readme.txt deleted file mode 100644 index b02dcbcab876..000000000000 --- a/gui/test/readme.txt +++ /dev/null @@ -1,27 +0,0 @@ -GUI tests -=========================== - -As the GUI uses Qt framework, the GUI tests also use Qt's Testlib. This is -totally different test framework than lib/cli is using. By principle each -testcase is compiled as an own runnable binary. - -Compiling ---------- - -To compile all the tests run in root directory of tests: - - qmake ; make - -You can also (re)compile single test by CD:ing to the directory where test -(source) resides and running: - - qmake ; make - -Running -------- - -As each test is compiled as single executable binary you can run the test just -by running the executable. - -You can get from - http://bitbucket.org/kimmov/testrun -a script which runs all the tests and collects the results. - diff --git a/gui/test/resultstree/resultstree.pro b/gui/test/resultstree/resultstree.pro deleted file mode 100644 index 27f2c0dda410..000000000000 --- a/gui/test/resultstree/resultstree.pro +++ /dev/null @@ -1,31 +0,0 @@ -TEMPLATE = app -TARGET = test-resultstree -DEPENDPATH += . -INCLUDEPATH += . ../../../lib -OBJECTS_DIR = ../../temp -MOC_DIR = ../../temp - -QT += widgets core -QT += testlib - -include(../common.pri) - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -# tests -SOURCES += testresultstree.cpp \ - ../../resultstree.cpp \ - ../../erroritem.cpp \ - ../../showtypes.cpp \ - ../../report.cpp \ - ../../xmlreportv2.cpp \ - ../../../lib/checkers.cpp - -HEADERS += testresultstree.h \ - ../../resultstree.h \ - ../../common.h \ - ../../erroritem.h \ - ../../showtypes.h \ - ../../report.h \ - ../../xmlreportv2.h \ - ../../../lib/checkers.h diff --git a/gui/test/test.pro b/gui/test/test.pro deleted file mode 100644 index 7f75e3711f94..000000000000 --- a/gui/test/test.pro +++ /dev/null @@ -1,9 +0,0 @@ -#lessThan(QT_MAJOR_VERSION, 5): error(requires >= Qt 5 (You used: $$QT_VERSION)) - -CONFIG += ordered -TEMPLATE = subdirs - -SUBDIRS = \ - filelist \ - projectfile \ - xmlreportv2 diff --git a/gui/test/translationhandler/translationhandler.pro b/gui/test/translationhandler/translationhandler.pro deleted file mode 100644 index bc4468effa7b..000000000000 --- a/gui/test/translationhandler/translationhandler.pro +++ /dev/null @@ -1,22 +0,0 @@ -TEMPLATE = app -TARGET = test-translationhandler -DEPENDPATH += . -INCLUDEPATH += . -OBJECTS_DIR = ../../temp -MOC_DIR = ../../temp - -QT -= gui -QT += core -QT += widgets # TODO: get rid of this - causes X server dependency -QT += testlib - -include(../common.pri) - -# tests -SOURCES += testtranslationhandler.cpp \ - ../../translationhandler.cpp \ - ../../common.cpp - -HEADERS += testtranslationhandler.h \ - ../../translationhandler.h \ - ../../common.h diff --git a/gui/test/xmlreportv2/xmlreportv2.pro b/gui/test/xmlreportv2/xmlreportv2.pro deleted file mode 100644 index 5802dadb3451..000000000000 --- a/gui/test/xmlreportv2/xmlreportv2.pro +++ /dev/null @@ -1,28 +0,0 @@ -TEMPLATE = app -TARGET = test-xmlreportv2 -DEPENDPATH += . -INCLUDEPATH += . ../../../externals/simplecpp -OBJECTS_DIR = ../../temp -MOC_DIR = ../../temp - -QT -= gui -QT += core -QT += testlib - -include(../common.pri) -include(../../../lib/lib.pri) - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -# tests -SOURCES += testxmlreportv2.cpp \ - ../../erroritem.cpp \ - ../../report.cpp \ - ../../xmlreport.cpp \ - ../../xmlreportv2.cpp - -HEADERS += testxmlreportv2.h \ - ../../erroritem.h \ - ../../report.h \ - ../../xmlreport.cpp \ - ../../xmlreportv2.h diff --git a/gui/txtreport.cpp b/gui/txtreport.cpp index caa3833ef8d2..ec48d83a0a6d 100644 --- a/gui/txtreport.cpp +++ b/gui/txtreport.cpp @@ -77,9 +77,5 @@ void TxtReport::writeError(const ErrorItem &error) line += temp.arg(GuiSeverity::toString(error.severity)); line += error.summary; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) mTxtWriter << line << Qt::endl; -#else - mTxtWriter << line << endl; -#endif } diff --git a/gui/xmlreport.cpp b/gui/xmlreport.cpp index 3e432d62380e..3ee24de7560b 100644 --- a/gui/xmlreport.cpp +++ b/gui/xmlreport.cpp @@ -25,10 +25,6 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -#include -#endif - static constexpr char ResultElementName[] = "results"; static constexpr char VersionAttribute[] = "version"; diff --git a/gui/xmlreportv2.cpp b/gui/xmlreportv2.cpp index 81445fdc3089..b489af33ad7f 100644 --- a/gui/xmlreportv2.cpp +++ b/gui/xmlreportv2.cpp @@ -33,10 +33,6 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -#include -#endif - static const QString ResultElementName = "results"; static const QString CppcheckElementName = "cppcheck"; static const QString ErrorElementName = "error"; diff --git a/lib/lib.pri b/lib/lib.pri deleted file mode 100644 index 4dd6782b633a..000000000000 --- a/lib/lib.pri +++ /dev/null @@ -1,190 +0,0 @@ -# no manual edits - this file is autogenerated by dmake - -include($$PWD/pcrerules.pri) -include($$PWD/../externals/externals.pri) -INCLUDEPATH += $$PWD -HEADERS += $${PWD}/addoninfo.h \ - $${PWD}/analyzer.h \ - $${PWD}/analyzerinfo.h \ - $${PWD}/astutils.h \ - $${PWD}/calculate.h \ - $${PWD}/check.h \ - $${PWD}/check64bit.h \ - $${PWD}/checkassert.h \ - $${PWD}/checkautovariables.h \ - $${PWD}/checkbool.h \ - $${PWD}/checkboost.h \ - $${PWD}/checkbufferoverrun.h \ - $${PWD}/checkclass.h \ - $${PWD}/checkcondition.h \ - $${PWD}/checkers.h \ - $${PWD}/checkersreport.h \ - $${PWD}/checkexceptionsafety.h \ - $${PWD}/checkfunctions.h \ - $${PWD}/checkinternal.h \ - $${PWD}/checkio.h \ - $${PWD}/checkleakautovar.h \ - $${PWD}/checkmemoryleak.h \ - $${PWD}/checknullpointer.h \ - $${PWD}/checkother.h \ - $${PWD}/checkpostfixoperator.h \ - $${PWD}/checksizeof.h \ - $${PWD}/checkstl.h \ - $${PWD}/checkstring.h \ - $${PWD}/checktype.h \ - $${PWD}/checkuninitvar.h \ - $${PWD}/checkunusedfunctions.h \ - $${PWD}/checkunusedvar.h \ - $${PWD}/checkvaarg.h \ - $${PWD}/clangimport.h \ - $${PWD}/color.h \ - $${PWD}/config.h \ - $${PWD}/cppcheck.h \ - $${PWD}/ctu.h \ - $${PWD}/errorlogger.h \ - $${PWD}/errortypes.h \ - $${PWD}/filesettings.h \ - $${PWD}/findtoken.h \ - $${PWD}/forwardanalyzer.h \ - $${PWD}/fwdanalysis.h \ - $${PWD}/importproject.h \ - $${PWD}/infer.h \ - $${PWD}/json.h \ - $${PWD}/keywords.h \ - $${PWD}/library.h \ - $${PWD}/mathlib.h \ - $${PWD}/path.h \ - $${PWD}/pathanalysis.h \ - $${PWD}/pathmatch.h \ - $${PWD}/platform.h \ - $${PWD}/precompiled.h \ - $${PWD}/preprocessor.h \ - $${PWD}/programmemory.h \ - $${PWD}/reverseanalyzer.h \ - $${PWD}/settings.h \ - $${PWD}/smallvector.h \ - $${PWD}/standards.h \ - $${PWD}/summaries.h \ - $${PWD}/suppressions.h \ - $${PWD}/symboldatabase.h \ - $${PWD}/templatesimplifier.h \ - $${PWD}/timer.h \ - $${PWD}/token.h \ - $${PWD}/tokenize.h \ - $${PWD}/tokenlist.h \ - $${PWD}/tokenrange.h \ - $${PWD}/utils.h \ - $${PWD}/valueflow.h \ - $${PWD}/valueptr.h \ - $${PWD}/version.h \ - $${PWD}/vf_analyze.h \ - $${PWD}/vf_array.h \ - $${PWD}/vf_arraybool.h \ - $${PWD}/vf_arrayelement.h \ - $${PWD}/vf_bailout.h \ - $${PWD}/vf_bitand.h \ - $${PWD}/vf_common.h \ - $${PWD}/vf_debug.h \ - $${PWD}/vf_enumvalue.h \ - $${PWD}/vf_functionreturn.h \ - $${PWD}/vf_globalconstvar.h \ - $${PWD}/vf_globalstaticvar.h \ - $${PWD}/vf_impossiblevalues.h \ - $${PWD}/vf_iteratorinfer.h \ - $${PWD}/vf_iterators.h \ - $${PWD}/vf_number.h \ - $${PWD}/vf_pointeralias.h \ - $${PWD}/vf_rightshift.h \ - $${PWD}/vf_sameexpressions.h \ - $${PWD}/vf_settokenvalue.h \ - $${PWD}/vf_string.h \ - $${PWD}/vf_symbolicinfer.h \ - $${PWD}/vf_unknownfunctionreturn.h \ - $${PWD}/vfvalue.h \ - $${PWD}/xml.h - -SOURCES += $${PWD}/valueflow.cpp \ - $${PWD}/tokenize.cpp \ - $${PWD}/symboldatabase.cpp \ - $${PWD}/addoninfo.cpp \ - $${PWD}/analyzerinfo.cpp \ - $${PWD}/astutils.cpp \ - $${PWD}/check.cpp \ - $${PWD}/check64bit.cpp \ - $${PWD}/checkassert.cpp \ - $${PWD}/checkautovariables.cpp \ - $${PWD}/checkbool.cpp \ - $${PWD}/checkboost.cpp \ - $${PWD}/checkbufferoverrun.cpp \ - $${PWD}/checkclass.cpp \ - $${PWD}/checkcondition.cpp \ - $${PWD}/checkers.cpp \ - $${PWD}/checkersreport.cpp \ - $${PWD}/checkexceptionsafety.cpp \ - $${PWD}/checkfunctions.cpp \ - $${PWD}/checkinternal.cpp \ - $${PWD}/checkio.cpp \ - $${PWD}/checkleakautovar.cpp \ - $${PWD}/checkmemoryleak.cpp \ - $${PWD}/checknullpointer.cpp \ - $${PWD}/checkother.cpp \ - $${PWD}/checkpostfixoperator.cpp \ - $${PWD}/checksizeof.cpp \ - $${PWD}/checkstl.cpp \ - $${PWD}/checkstring.cpp \ - $${PWD}/checktype.cpp \ - $${PWD}/checkuninitvar.cpp \ - $${PWD}/checkunusedfunctions.cpp \ - $${PWD}/checkunusedvar.cpp \ - $${PWD}/checkvaarg.cpp \ - $${PWD}/clangimport.cpp \ - $${PWD}/color.cpp \ - $${PWD}/cppcheck.cpp \ - $${PWD}/ctu.cpp \ - $${PWD}/errorlogger.cpp \ - $${PWD}/errortypes.cpp \ - $${PWD}/forwardanalyzer.cpp \ - $${PWD}/fwdanalysis.cpp \ - $${PWD}/importproject.cpp \ - $${PWD}/infer.cpp \ - $${PWD}/keywords.cpp \ - $${PWD}/library.cpp \ - $${PWD}/mathlib.cpp \ - $${PWD}/path.cpp \ - $${PWD}/pathanalysis.cpp \ - $${PWD}/pathmatch.cpp \ - $${PWD}/platform.cpp \ - $${PWD}/preprocessor.cpp \ - $${PWD}/programmemory.cpp \ - $${PWD}/reverseanalyzer.cpp \ - $${PWD}/settings.cpp \ - $${PWD}/summaries.cpp \ - $${PWD}/suppressions.cpp \ - $${PWD}/templatesimplifier.cpp \ - $${PWD}/timer.cpp \ - $${PWD}/token.cpp \ - $${PWD}/tokenlist.cpp \ - $${PWD}/utils.cpp \ - $${PWD}/vf_array.cpp \ - $${PWD}/vf_arraybool.cpp \ - $${PWD}/vf_arrayelement.cpp \ - $${PWD}/vf_bailout.cpp \ - $${PWD}/vf_bitand.cpp \ - $${PWD}/vf_common.cpp \ - $${PWD}/vf_debug.cpp \ - $${PWD}/vf_enumvalue.cpp \ - $${PWD}/vf_functionreturn.cpp \ - $${PWD}/vf_globalconstvar.cpp \ - $${PWD}/vf_globalstaticvar.cpp \ - $${PWD}/vf_impossiblevalues.cpp \ - $${PWD}/vf_iteratorinfer.cpp \ - $${PWD}/vf_iterators.cpp \ - $${PWD}/vf_number.cpp \ - $${PWD}/vf_pointeralias.cpp \ - $${PWD}/vf_rightshift.cpp \ - $${PWD}/vf_sameexpressions.cpp \ - $${PWD}/vf_settokenvalue.cpp \ - $${PWD}/vf_string.cpp \ - $${PWD}/vf_symbolicinfer.cpp \ - $${PWD}/vf_unknownfunctionreturn.cpp \ - $${PWD}/vfvalue.cpp diff --git a/lib/pcrerules.pri b/lib/pcrerules.pri deleted file mode 100644 index 267b54ab34df..000000000000 --- a/lib/pcrerules.pri +++ /dev/null @@ -1,13 +0,0 @@ -# If HAVE_RULES=yes is passed to qmake, use PCRE and enable rules -contains(HAVE_RULES, [yY][eE][sS]) { - CONFIG += use_pcre_rules -} - -use_pcre_rules { - DEFINES += HAVE_RULES - LIBS += -L../externals -lpcre - INCLUDEPATH += ../externals - message("Rules enabled - to disable them and remove the dependency on PCRE, pass HAVE_RULES=no to qmake.") -} else { - message("Rules disabled - to enable them, make PCRE available and pass HAVE_RULES=yes to qmake.") -} diff --git a/readme.md b/readme.md index a653810a04cb..efeeb01d8942 100644 --- a/readme.md +++ b/readme.md @@ -35,12 +35,11 @@ You can stop the script whenever you like with Ctrl C. Cppcheck requires a C++ compiler with (partial) C++11 support. Minimum required versions are GCC 5.1 / Clang 3.5 / Visual Studio 2015. -To build the GUI application, you need to use the CMake or qmake (deprecated) build system. +To build the GUI application, you need to use the CMakebuild system. When building the command line tool, [PCRE](http://www.pcre.org/) is optional. It is used if you build with rules. There are multiple compilation choices: -* qmake - cross platform build tool (deprecated) * CMake - cross platform build tool * Windows: Visual Studio * Windows: Qt Creator + MinGW @@ -95,18 +94,6 @@ cmake .. cmake --build . --config RelWithDebInfo ``` -### qmake - -NOTE: This has been deprecated and will be removed in a future version. Please use CMake instead. - -You can use the gui/gui.pro file to build the GUI. - -```shell -cd gui -qmake -make -``` - ### Visual Studio Use the cppcheck.sln file. The file is configured for Visual Studio 2019, but the platform toolset can be changed easily to older or newer versions. The solution contains platform targets for both x86 and x64. diff --git a/readme.txt b/readme.txt index 06b24b7f0a5e..6d99d199d4fa 100644 --- a/readme.txt +++ b/readme.txt @@ -23,7 +23,6 @@ Compiling While building the command line tool, PCRE is optional. It is used if you build with rules. There are multiple compilation choices: - * qmake - cross platform build tool * cmake - cross platform build tool * Windows: Visual Studio * Windows: Qt Creator + mingw @@ -48,13 +47,6 @@ Compiling For release builds it is recommended that you use: -DUSE_MATCHCOMPILER=ON - qmake - ===== - You can use the gui/gui.pro file to build the GUI. - cd gui - qmake - make - Visual Studio ============= Use the cppcheck.sln file. The file is configured for Visual Studio 2019, but the platform diff --git a/readmeja.md b/readmeja.md index 27770202fbd0..e731873ba3eb 100644 --- a/readmeja.md +++ b/readmeja.md @@ -23,7 +23,6 @@ GUIも利用する場合、Qtライブラリが必要です。 コマンドラインツールをビルドする場合、[PCRE](http://www.pcre.org/)はオプションです。これはルールを作成するために利用します。 コンパイル上の選択肢がいくつかあります。 -* qmake - クロスプラットフォームのビルドツール * cmake - クロスプラットフォームのビルドツール * Windows: Visual Studio (VS 2013 またはそれ以上) * Windows: Qt Creator + mingw @@ -51,16 +50,6 @@ CppcheckのGUIが必要な場合次のフラグを指定します。 pcreが必要になりますが、正規表現のルールサポートが必要な場合次のフラグを指定します。 -DHAVE_RULES=ON -### qmake - -GUIをビルドするには、gui/gui.proファイルが利用できます。 - -```shell -cd gui -qmake -make -``` - ### Visual Studio cppcheck.slnファイルが利用できます。このファイルは、Visual Studio 2019向けです。しかし、このプラットフォームツールセットはこれより新しいバージョンまたは古いバージョン向けに変更できます。このソルーションには、プラットフォームターゲットとしてx86とx64があります。 diff --git a/releasenotes.txt b/releasenotes.txt index 352afff73c35..b4256c486a5a 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -21,3 +21,5 @@ Other: - Added command-line option `--cpp-header-probe` (and `--no-cpp-header-probe`) to probe headers and extension-less files for Emacs marker (see https://trac.cppcheck.net/ticket/10692 for more details) - Add "remark comments" that can be used to generate reports with justifications for warnings - The whole program analysis is now being executed when "--project" is being used. +- Removed support for builds via qmake. +- Removed support for builds with Qt5. diff --git a/test/cli/QML-Samples-TableView/main.cpp b/test/cli/QML-Samples-TableView/main.cpp index 1c57799425c3..21d72bf21e88 100644 --- a/test/cli/QML-Samples-TableView/main.cpp +++ b/test/cli/QML-Samples-TableView/main.cpp @@ -4,10 +4,6 @@ int main(int argc, char *argv[]) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#endif - QGuiApplication app(argc, argv); QQmlApplicationEngine engine; diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp index d4ee7ddb3e03..7e369fb289bc 100644 --- a/tools/dmake/dmake.cpp +++ b/tools/dmake/dmake.cpp @@ -546,30 +546,6 @@ int main(int argc, char **argv) } }); - // QMAKE - lib/lib.pri - { - std::ofstream fout1("lib/lib.pri"); - if (fout1.is_open()) { - fout1 << "# no manual edits - this file is autogenerated by dmake\n\n"; - fout1 << "include($$PWD/pcrerules.pri)\n"; - fout1 << "include($$PWD/../externals/externals.pri)\n"; - fout1 << "INCLUDEPATH += $$PWD\n"; - fout1 << "HEADERS += "; - for (const std::string &libfile_h : libfiles_h) { - fout1 << "$${PWD}/" << libfile_h; - if (libfile_h != libfiles_h.back()) - fout1 << " \\\n" << std::string(11, ' '); - } - fout1 << "\n\nSOURCES += "; - for (const std::string &libfile : libfiles_prio) { - fout1 << "$${PWD}/" << libfile.substr(4); - if (libfile != libfiles.back()) - fout1 << " \\\n" << std::string(11, ' '); - } - fout1 << "\n"; - } - } - static constexpr char makefile[] = "Makefile"; std::ofstream fout(makefile, std::ios_base::trunc); if (!fout.is_open()) { diff --git a/tools/triage/.gitignore b/tools/triage/.gitignore index c26029fd7057..fbe1975b7798 100644 --- a/tools/triage/.gitignore +++ b/tools/triage/.gitignore @@ -1,6 +1,5 @@ moc_*.cpp moc_*.h ui_*.h -.qmake.stash Makefile triage diff --git a/tools/triage/triage.pro b/tools/triage/triage.pro deleted file mode 100644 index dc32e70bec8f..000000000000 --- a/tools/triage/triage.pro +++ /dev/null @@ -1,24 +0,0 @@ -lessThan(QT_MAJOR_VERSION, 5): error(requires >= Qt 5 (You used: $$QT_VERSION)) - -QT += core gui widgets - -TARGET = triage -TEMPLATE = app - -QMAKE_CXXFLAGS += -std=c++11 -INCLUDEPATH += ../../gui - -MOC_DIR = temp -OBJECTS_DIR = temp -UI_DIR = temp - -SOURCES += main.cpp\ - mainwindow.cpp \ - ../../gui/codeeditorstyle.cpp \ - ../../gui/codeeditor.cpp - -HEADERS += mainwindow.h \ - ../../gui/codeeditorstyle.h \ - ../../gui/codeeditor.h - -FORMS += mainwindow.ui