Skip to content

Commit 6c6b544

Browse files
Update qt.cpp
1 parent 1010665 commit 6c6b544

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

test/cfg/qt.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <QPointF>
3333
#include <QRegion>
3434
#include <QTransform>
35+
#include <QDir>
3536

3637
// TODO: this is actually avilable via Core5Compat but I could not get it to work with pkg-config
3738
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
@@ -54,6 +55,27 @@ int ignoredReturnValue_QSize_width(const QSize &s)
5455
return s.width();
5556
}
5657

58+
59+
void ignoredReturnValue_QDir(const QString& dirname)
60+
{
61+
// cppcheck-suppress ignoredReturnValue
62+
QDir::exists(dirname);
63+
64+
// cppcheck-suppress ignoredReturnValue
65+
QDir::mkdir(dirname);
66+
67+
QDir dir(dirname);
68+
// cppcheck-suppress ignoredReturnValue
69+
dir.count();
70+
71+
// cppcheck-suppress ignoredReturnValue
72+
dir.filePath("abc");
73+
74+
// cppcheck-suppress ignoredReturnValue
75+
dir.entryList();
76+
}
77+
78+
5779
void unusedVariable_QTransform()
5880
{
5981
// cppcheck-suppress unusedVariable

0 commit comments

Comments
 (0)