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

qdoc fails to evaluate preprocessor directives with conditionals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.6.1
    • 5.6.0 RC
    • Build tools: qdoc
    • None

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes