From 13983a3c9d005b12a4bcea60ae9693ca419fdc44 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 18 Mar 2024 20:31:37 +0100 Subject: [PATCH 1/4] qt.cfg: Added support for QtRegion --- cfg/qt.cfg | 1 + test/cfg/qt.cpp | 42 +++++++++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/cfg/qt.cfg b/cfg/qt.cfg index bcc24ae4b1b..9ceff9140d3 100644 --- a/cfg/qt.cfg +++ b/cfg/qt.cfg @@ -5242,6 +5242,7 @@ QRect QSize QPoint + QRegion QMutex diff --git a/test/cfg/qt.cpp b/test/cfg/qt.cpp index 1c4556051a9..bb3eef0a51c 100644 --- a/test/cfg/qt.cpp +++ b/test/cfg/qt.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,24 @@ #include +void unreadVariable_QRegion(const int x, const QRegion::RegionType t type, const QPolygon &polygon, const QBitmap &bm, const QRegion ®ion, const Qt::FillRule fillRule) +{ + // cppcheck-suppress unreadVariable + QRegion a; + // cppcheck-suppress unreadVariable + QRegion b{}; + // cppcheck-suppress unreadVariable + QRegion c{x,x,x,x}; + // cppcheck-suppress unreadVariable + QRegion d{x,x,x,x, type}; + // cppcheck-suppress unreadVariable + QRegion e{polygon, fillRule}; + // cppcheck-suppress unreadVariable + QRegion f{bm}; + // cppcheck-suppress unreadVariable + QRegion g{region}; +} + void unreadVariable_QPoint(const QPoint &s) { // cppcheck-suppress unreadVariable @@ -721,14 +740,15 @@ bool knownConditionTrueFalse_QString_count(const QString& s) // #11036 void unusedVariable_qtContainers() // #10689 { - // cppcheck-suppress unusedVariable - QMap qm; - // cppcheck-suppress unusedVariable - QSet qs; - // cppcheck-suppress unusedVariable - QMultiMap qmm; - // cppcheck-suppress unusedVariable - QQueue qq; - // cppcheck-suppress unusedVariable - QLatin1String ql1s; -} \ No newline at end of file + // cppcheck-suppress unusedVariable + QMap qm; + // cppcheck-suppress unusedVariable + QSet qs; + // cppcheck-suppress unusedVariable + QMultiMap qmm; + // cppcheck-suppress unusedVariable + QQueue qq; + // cppcheck-suppress unusedVariable + QLatin1String ql1s; +} + From 255542b99f439d55a76882773fcf6adbb58ad3fe Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 18 Mar 2024 21:12:25 +0100 Subject: [PATCH 2/4] Attempt to fix missing dependency --- .github/workflows/CI-unixish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index f0393093701..9a460a63179 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -128,7 +128,7 @@ jobs: sudo apt-get update # qt6-tools-dev-tools for lprodump # qt6-l10n-tools for lupdate - sudo apt-get install libxml2-utils qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev + sudo apt-get install libxml2-utils qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev libqt6gui6 # coreutils contains "nproc" - name: Install missing software on macos From badf81563d9cd337d03f567fe56f780357ce9e78 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 18 Mar 2024 21:15:36 +0100 Subject: [PATCH 3/4] Added 'Qt5Gui' to the list of components in qt_fn() in runtests.sh. --- .github/workflows/CI-unixish.yml | 2 +- test/cfg/runtests.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index 9a460a63179..f0393093701 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -128,7 +128,7 @@ jobs: sudo apt-get update # qt6-tools-dev-tools for lprodump # qt6-l10n-tools for lupdate - sudo apt-get install libxml2-utils qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev libqt6gui6 + sudo apt-get install libxml2-utils qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev # coreutils contains "nproc" - name: Install missing software on macos diff --git a/test/cfg/runtests.sh b/test/cfg/runtests.sh index 00cc18cd843..744d9aa7284 100755 --- a/test/cfg/runtests.sh +++ b/test/cfg/runtests.sh @@ -65,9 +65,9 @@ function gnu_fn { # qt.cpp function qt_fn { if [ $HAS_PKG_CONFIG -eq 1 ]; then - QTCONFIG=$(get_pkg_config_cflags Qt5Core Qt5Test) + QTCONFIG=$(get_pkg_config_cflags Qt5Core Qt5Test Qt5Gui) if [ -n "$QTCONFIG" ]; then - QTBUILDCONFIG=$(pkg-config --variable=qt_config Qt5Core Qt5Test) + QTBUILDCONFIG=$(pkg-config --variable=qt_config Qt5Core Qt5Test Qt5Gui) [[ $QTBUILDCONFIG =~ (^|[[:space:]])reduce_relocations($|[[:space:]]) ]] && QTCONFIG="${QTCONFIG} -fPIC" # TODO: get rid of the error enabling/disabling? set +e From 4284172e3c2ad6beec00cf3772d93e90c3e17969 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 18 Mar 2024 21:39:04 +0100 Subject: [PATCH 4/4] Fixed syntax error in test case --- test/cfg/qt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cfg/qt.cpp b/test/cfg/qt.cpp index bb3eef0a51c..5fcb803e372 100644 --- a/test/cfg/qt.cpp +++ b/test/cfg/qt.cpp @@ -33,7 +33,7 @@ #include -void unreadVariable_QRegion(const int x, const QRegion::RegionType t type, const QPolygon &polygon, const QBitmap &bm, const QRegion ®ion, const Qt::FillRule fillRule) +void unreadVariable_QRegion(const int x, const QRegion::RegionType type, const QPolygon &polygon, const QBitmap &bm, const QRegion ®ion, const Qt::FillRule fillRule) { // cppcheck-suppress unreadVariable QRegion a;