From a77b22d470222e258c06ac09718f93dbf9523061 Mon Sep 17 00:00:00 2001 From: firewave Date: Thu, 10 Oct 2024 12:20:51 +0200 Subject: [PATCH] fixed #13132 - removed deprecated support for qmake [skip ci] --- .github/workflows/CI-unixish.yml | 88 ------- .github/workflows/CI-windows.yml | 21 +- .github/workflows/iwyu.yml | 3 - .gitignore | 31 --- build-pcre.txt | 13 - console_common.pri | 23 -- externals/externals.pri | 11 - gui/gui.pro | 225 ------------------ gui/readme.txt | 70 ------ gui/test/CMakeLists.txt | 6 +- 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/CMakeLists.txt | 3 +- gui/test/resultstree/resultstree.pro | 31 --- gui/test/test.pro | 9 - gui/test/translationhandler/CMakeLists.txt | 2 +- .../translationhandler/translationhandler.pro | 22 -- gui/test/xmlreportv2/xmlreportv2.pro | 28 --- lib/lib.pri | 204 ---------------- lib/pcrerules.pri | 13 - readme.md | 15 +- readme.txt | 8 - readmeja.md | 11 - releasenotes.txt | 2 +- tools/dmake/dmake.cpp | 24 -- tools/triage/.gitignore | 1 - tools/triage/triage.pro | 24 -- 30 files changed, 13 insertions(+), 988 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.yml b/.github/workflows/CI-unixish.yml index be7b227333c..9fdb4b101fd 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -247,94 +247,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 - 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: diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 5072c2d6315..bf35c83b52e 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -47,23 +47,15 @@ jobs: modules: 'qtcharts' cache: true - - name: Build GUI release (qmake) + - name: Build GUI release (Qt 5) 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! + ; TODO: enable rules? + ; specify Release build so matchcompiler is used + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel! + cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel! - - name: Build GUI release (CMake) + - name: Build GUI release (Qt 6) if: startsWith(matrix.qt_ver, '6') run: | ; TODO: enable rules? @@ -72,7 +64,6 @@ jobs: cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel! - name: Deploy GUI - if: startsWith(matrix.qt_ver, '6') run: | windeployqt build\bin\Release || exit /b !errorlevel! del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel! diff --git a/.github/workflows/iwyu.yml b/.github/workflows/iwyu.yml index a433b1428a9..305bf3498e7 100644 --- a/.github/workflows/iwyu.yml +++ b/.github/workflows/iwyu.yml @@ -70,9 +70,6 @@ jobs: run: | zypper install -y cmake clang pcre-devel zypper install -y include-what-you-use-tools - # fixes error during Qt installation - # /__w/cppcheck/Qt/6.7.0/gcc_64/bin/qmake: error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file: No such file or directory - zypper install -y libgthread-2_0-0 ln -s iwyu_tool.py /usr/bin/iwyu_tool # Fails on OpenSUSE: diff --git a/.gitignore b/.gitignore index 48df3dad1ef..5e8ad86b08c 100644 --- a/.gitignore +++ b/.gitignore @@ -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 *~ @@ -124,9 +96,6 @@ stage .cache/ compile_commands.json -# qmake -.qmake.stash - #vs code /.vscode diff --git a/build-pcre.txt b/build-pcre.txt index 3dad4274c92..9f4e8e06e29 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/console_common.pri b/console_common.pri deleted file mode 100644 index 9937ae5d06f..00000000000 --- 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 023e8053733..00000000000 --- 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/gui.pro b/gui/gui.pro deleted file mode 100644 index 2327f42aff5..00000000000 --- 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 Cppcheck 2.16. 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/readme.txt b/gui/readme.txt deleted file mode 100644 index 3974af609d2..00000000000 --- 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/test/CMakeLists.txt b/gui/test/CMakeLists.txt index d086e890cb1..52f3d95023b 100644 --- a/gui/test/CMakeLists.txt +++ b/gui/test/CMakeLists.txt @@ -1,8 +1,6 @@ add_subdirectory(cppchecklibrarydata) add_subdirectory(filelist) add_subdirectory(projectfile) -# FIXME does not work in CI -#add_subdirectory(resultstree) +add_subdirectory(resultstree) add_subdirectory(translationhandler) -add_subdirectory(xmlreportv2) -# TODO: add all tests to CTest \ No newline at end of file +add_subdirectory(xmlreportv2) \ No newline at end of file diff --git a/gui/test/common.pri b/gui/test/common.pri deleted file mode 100644 index e6589d8ed09..00000000000 --- 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 787e95f8a59..00000000000 --- 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 110746a5ae0..00000000000 --- 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 68555272d6c..00000000000 --- 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 b02dcbcab87..00000000000 --- 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/CMakeLists.txt b/gui/test/resultstree/CMakeLists.txt index 3e5cc0fe96f..0f1438b938e 100644 --- a/gui/test/resultstree/CMakeLists.txt +++ b/gui/test/resultstree/CMakeLists.txt @@ -21,5 +21,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() if (REGISTER_GUI_TESTS) - add_test(NAME test-resultstree COMMAND $) + # TODO: does not work in the CI + # add_test(NAME test-resultstree COMMAND $) endif() diff --git a/gui/test/resultstree/resultstree.pro b/gui/test/resultstree/resultstree.pro deleted file mode 100644 index 27f2c0dda41..00000000000 --- 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 7f75e3711f9..00000000000 --- 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/CMakeLists.txt b/gui/test/translationhandler/CMakeLists.txt index 35cbf3c0d14..4cfc29f170f 100644 --- a/gui/test/translationhandler/CMakeLists.txt +++ b/gui/test/translationhandler/CMakeLists.txt @@ -16,6 +16,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() if (REGISTER_GUI_TESTS) - # TODO: requires X session + # TODO: requires X session - run with QT_QPA_PLATFORM=offscreen? #add_test(NAME test-translationhandler COMMAND $) endif() \ No newline at end of file diff --git a/gui/test/translationhandler/translationhandler.pro b/gui/test/translationhandler/translationhandler.pro deleted file mode 100644 index bc4468effa7..00000000000 --- 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 5802dadb345..00000000000 --- 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/lib/lib.pri b/lib/lib.pri deleted file mode 100644 index 1331bd4735a..00000000000 --- a/lib/lib.pri +++ /dev/null @@ -1,204 +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}/matchcompiler.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}/sourcelocation.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_analyzers.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_conditionexpressions.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_infercondition.h \ - $${PWD}/vf_iteratorinfer.h \ - $${PWD}/vf_iterators.h \ - $${PWD}/vf_number.h \ - $${PWD}/vf_pointeralias.h \ - $${PWD}/vf_reverse.h \ - $${PWD}/vf_rightshift.h \ - $${PWD}/vf_sameexpressions.h \ - $${PWD}/vf_settokenvalue.h \ - $${PWD}/vf_string.h \ - $${PWD}/vf_switchvariable.h \ - $${PWD}/vf_symbolicinfer.h \ - $${PWD}/vf_symbolicoperators.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_analyzers.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_conditionexpressions.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_infercondition.cpp \ - $${PWD}/vf_iteratorinfer.cpp \ - $${PWD}/vf_iterators.cpp \ - $${PWD}/vf_number.cpp \ - $${PWD}/vf_pointeralias.cpp \ - $${PWD}/vf_reverse.cpp \ - $${PWD}/vf_rightshift.cpp \ - $${PWD}/vf_sameexpressions.cpp \ - $${PWD}/vf_settokenvalue.cpp \ - $${PWD}/vf_string.cpp \ - $${PWD}/vf_switchvariable.cpp \ - $${PWD}/vf_symbolicinfer.cpp \ - $${PWD}/vf_symbolicoperators.cpp \ - $${PWD}/vf_unknownfunctionreturn.cpp \ - $${PWD}/vfvalue.cpp diff --git a/lib/pcrerules.pri b/lib/pcrerules.pri deleted file mode 100644 index 267b54ab34d..00000000000 --- 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 12f6e5df536..efeeb01d894 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 Cppcheck 2.16. 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 06b24b7f0a5..6d99d199d4f 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 27770202fbd..e731873ba3e 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 ffee14f39fd..b78e908c566 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -20,4 +20,4 @@ Deprecations: Other: - "missingInclude" is no longer implicitly enabled with "information" - you need to enable it explicitly now. -- +- Removed deperecated support for builds via qmake. diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp index 8be9fc3a6f3..026d61c8e8a 100644 --- a/tools/dmake/dmake.cpp +++ b/tools/dmake/dmake.cpp @@ -549,30 +549,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 c26029fd705..fbe1975b779 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 dc32e70bec8..00000000000 --- 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