Hi Daniel,
so I was finally able to introduce cppcheck to my sw-team.
One thing that is bugging me, is on how can I disable/ignore these Q_OBJECT related noise. I do already invoke cppcheck with --library=qt.
But I also run cppcheck with the compile_comands.json.
here is the full command:
cppcheck.exe --library=windows --library=qt --library=opencv2 --library=boost --project=./compile_commands.json --suppress=*:*libs_external* --suppress=*:*Qt* --suppress=*:*\\nsfqt\\com\\* --enable=all -j 32 -D_MSC_VER=1925 -DWIN32 -D_WIN32=1 -D_WIN64=1 -D__amd64 > ./cppcheck-console-output.txt
And here an example of the "noise". Every file being a QObject has a Q_OBJECT macro defined, which yields this kind of messages
widget_image_area_qt.hpp:45:3: note: Function in derived class Q_OBJECT ^ widget_image_area_qt.hpp:45:3: style: The function 'qt_metacall' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] Q_OBJECT ^
It's hard to say. I have the feeling that you somehow get internal Qt code in your analysis.
I do not get such warnings when I check our GUI code and that is based on Qt.
Alright thank you. But this might give me already an angle to investigate.
I'll update this thread if I have any news.
so I updated to version 2.3 and my issues are gone. Without looking into the reason why, I'm very happy :-) thank you
Log in to post a comment.
Hi Daniel,
so I was finally able to introduce cppcheck to my sw-team.
One thing that is bugging me, is on how can I disable/ignore these Q_OBJECT related noise.
I do already invoke cppcheck with --library=qt.
But I also run cppcheck with the compile_comands.json.
here is the full command:
And here an example of the "noise".
Every file being a QObject has a Q_OBJECT macro defined, which yields this kind of messages
It's hard to say. I have the feeling that you somehow get internal Qt code in your analysis.
I do not get such warnings when I check our GUI code and that is based on Qt.
Alright thank you.
But this might give me already an angle to investigate.
I'll update this thread if I have any news.
Hi Daniel,
so I updated to version 2.3 and my issues are gone.
Without looking into the reason why, I'm very happy :-) thank you