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

QtLottie doesn't follow the coding conventions when including headers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.13.0
    • Fix Version/s: None
    • Component/s: Lottie
    • Labels:

      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>
      

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

      ./src/imports/rasterrenderer/batchrenderer.cpp:32:#include <QImage>
      ./src/imports/rasterrenderer/batchrenderer.cpp:33:#include <QPainter>
      ./src/imports/rasterrenderer/batchrenderer.cpp:34:#include <QHash>
      ./src/imports/rasterrenderer/batchrenderer.cpp:35:#include <QMutexLocker>
      ./src/imports/rasterrenderer/batchrenderer.cpp:36:#include <QLoggingCategory>
      ./src/imports/rasterrenderer/batchrenderer.cpp:37:#include <QThread>
      ./src/imports/rasterrenderer/batchrenderer.cpp:39:#include <QJsonDocument>
      ./src/imports/rasterrenderer/batchrenderer.cpp:40:#include <QJsonArray>
      
      

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

      Please find attached grep from all #include's.

       

        Attachments

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

          Activity

            People

            Assignee:
            reworled Rebecca Worledge
            Reporter:
            mipohjan Milla Pohjanheimo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes