Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72675

QtRemoteObjects doesn't follow the coding conventions when including headers

    XMLWordPrintable

Details

    • a6df9c84a667e89bcdf215c7ac21b943b07991bd (qt/qtremoteobjects/5.12)

    Description

      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>
      

      QtRemoteObjects doesn't follow these conventions. See e.g.:

      ./src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp:45:#include <QDebug>
      ./src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp:46:#include <QRect>
      ./src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp:47:#include <QPoint>
      

      That is just one example. Some headers are incorrectly included throughout the QtRemoteObjects code. All those includes should be changed to follow the coding conventions, since it prohibits the inclusion of the binary compatibility tests to QtRemoteObjects among other things, since the script that generates the text files chokes on those incorrect includes.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              bstottle Brett Stottlemyer
              mipohjan Milla Pohjanheimo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes