-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6, 5.7, 5.8
-
None
In https://wiki.qt.io/Coding_Conventions it says:
Including headers In public header files, always use this form to include Qt headers: #include <QtCore/qwhatever.h>. The library prefix is neccessary for Mac OS X frameworks and is very convenient for non-qmake projects. In source files, include specialized headers first, then generic headers. Separate the categories with empty lines. #include <qstring.h> // Qt class #include <new> // STL stuff #include <limits.h> // system stuff If you need to include qplatformdefs.h, always include it as the first header file. If you need to include private headers, be careful. Use the following syntax, irrespective of which module or directory whatever_p.h is in. #include <private/whatever_p.h>
E.g in qt3d/src/core/qscenechange.h there is:
#include <Qt3DCore/qt3dcore_global.h> #include <QSharedPointer>
That is just one example. Some headers are incorrectly included throughout the Qt3D code. All those includes should be changed to follow the coding conventions, since it prohibits the inclusion of the binary compatibility tests to Qt3D among other things, since the script that generates the text files chokes on those incorrect includes.