From 13983a3c9d005b12a4bcea60ae9693ca419fdc44 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 18 Mar 2024 20:31:37 +0100 Subject: [PATCH] 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; +} +