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..5fcb803e372 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 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; +} + 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