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

qdoc fails to evaluate preprocessor directives with conditionals

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.6.0 RC
    • Fix Version/s: 5.6.1
    • Component/s: Build tools: qdoc
    • Labels:
      None

      Description

      Especially this is used in many places in public header files:

      #if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
      

      but QDoc evaluates it to true, sometimes leading to APIs 'from the future' to be documented.

      Case in point:

      http://doc-snapshots.qt.io/qt5-5.6/qquickimageprovider.html
      QQuickImageProvider should have these virtual functions documented:

      QImage QQuickImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
      
      QPixmap QQuickImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
      
      QQuickTextureFactory *QQuickImageProvider::requestTexture(const QString &id, QSize *size, const QSize &requestedSize)
      

      But QDoc doesn't see the correct versions of the declarations because of the incorrect evaluation for the Qt version check.

        Attachments

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

          Activity

            People

            Assignee:
            treinio Topi Reiniƶ
            Reporter:
            treinio Topi Reiniƶ
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes