diff --git a/cfg/qt.cfg b/cfg/qt.cfg index 74fa18536..408ee1c30 100644 --- a/cfg/qt.cfg +++ b/cfg/qt.cfg @@ -1137,6 +1137,18 @@ + + + + false + + + + + + + + diff --git a/test/cfg/qt.cpp b/test/cfg/qt.cpp index 849c5b3f8..5b24fcdb9 100644 --- a/test/cfg/qt.cpp +++ b/test/cfg/qt.cpp @@ -10,6 +10,7 @@ #include #include #include +#include void QString1(QString s) @@ -36,3 +37,18 @@ public: explicit MacroTest1(QObject *parent = 0); ~MacroTest1(); }; + +void validCode() +{ + if (QFile::exists("test")) + {} +} + +void ignoredReturnValue() +{ + // cppcheck-suppress ignoredReturnValue + QFile::exists("test"); + QFile file1("test"); + // cppcheck-suppress ignoredReturnValue + file1.exists(); +}