I'm using CppCheck (version 1.69) on linux to check code quality for a project depending on Qt.
My problem is that when my class extends Qt class (QMainWindow, QWidget, QDialog, ...), CppCheck fail to report some rules, like "functionConst" for instance.
I try to use the option "--library=qt.cfg" but it works only for macros definitions. I try to include Qt headers (with --force because of many config), but it still not works. Maybe it's due to missing system include, but cppcheck try to find includes from all Qt supported OS (winbase.h for instance).
Did you have any idea on how I could deal with Qt includes.
Thanks for your great job,
Have a nice day,
Julien
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure how this is configured properly. I feel skeptic about including the qt headers.. and you also said it doesn't help. but that is what you should do and we may need to fix some problem with that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm using CppCheck (version 1.69) on linux to check code quality for a project depending on Qt.
My problem is that when my class extends Qt class (QMainWindow, QWidget, QDialog, ...), CppCheck fail to report some rules, like "functionConst" for instance.
Example:
I try to use the option "--library=qt.cfg" but it works only for macros definitions. I try to include Qt headers (with --force because of many config), but it still not works. Maybe it's due to missing system include, but cppcheck try to find includes from all Qt supported OS (winbase.h for instance).
Did you have any idea on how I could deal with Qt includes.
Thanks for your great job,
Have a nice day,
Julien
when QMainWindow is unknown it is assumed that f is virtual.
You get a warning for this code:
I am not sure how this is configured properly. I feel skeptic about including the qt headers.. and you also said it doesn't help. but that is what you should do and we may need to fix some problem with that.