Skip to content

Commit

Permalink
qt.cfg: Added support for QRectF
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy committed Mar 16, 2024
1 parent 0cc47a9 commit 96c560f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cfg/qt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
<!-- QMetaObject::Connection QObject::connect(const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type = Qt::AutoConnection) // static -->
<function name="QObject::connect">
<noreturn>false</noreturn>
<leak-ignore/>
<leak-ignore/>
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
Expand Down Expand Up @@ -5186,13 +5186,14 @@
<type-checks>
<unusedvar>
<suppress>QApplication</suppress>
<suppress>QMutexLocker</suppress>
<suppress>QMutexLocker</suppress>
<check>QRectF</check>
</unusedvar>
<operatorEqVarError>
<suppress>QMutex</suppress>
<suppress>QRecursiveMutex</suppress>
<suppress>QSemaphore</suppress>
<suppress>QReadWriteLock</suppress>
<suppress>QMutex</suppress>
<suppress>QRecursiveMutex</suppress>
<suppress>QSemaphore</suppress>
<suppress>QReadWriteLock</suppress>
</operatorEqVarError>
</type-checks>
<!-- Treat QStringList as QList<QString> since we can't remove the template parameter when we inherit. -->
Expand Down
5 changes: 5 additions & 0 deletions test/cfg/qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
#include <QCoreApplication>
#include <QLoggingCategory>
#include <QTest>
#include <QRectF>

void unreadVariable_QRectF() {
// cppcheck-suppress unreadVariable
QRectF rect(0.0, 0.0, 100.0, 50.0);
}

void QString1(QString s)
{
Expand Down

0 comments on commit 96c560f

Please sign in to comment.