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

trouble documenting private enums exported publically to QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.1
    • 5.2.0 RC1
    • Documentation
    • None
    • d15309edeed53da021d058218e4c739e5903d8fd

    Description

      See https://codereview.qt-project.org/#patch,all,70927,3 for details. In this case qquickdialogassets_p.h contains the QQuickStandardButton class which exists only for the purpose of exposing a private enum StandardButton to QML, via

      qmlRegisterUncreatableType<QQuickStandardButton>(uri, 1, 1, "StandardButton",
                  QLatin1String("Do not create objects of type StandardButton"));
      

      There is no .cpp file because the class has no methods. So I put this in qquickplatformmessagedialog.cpp alongside all the other documentation

          \enum QQuickStandardButton::StandardButton
      

      and get this error

      qquickplatformmessagedialog.cpp:325: warning: Cannot find 'QQuickStandardButton::StandardButton' specified with '\enum' in any header file

      Perhaps because of that, the table explaining how the enums are used looks weird too: MessageDialog::StandardButton.Ok instead of just StandardButton.Ok, and no known value for it because it didn't "see" the enum itself.

      Attachments

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

        Activity

          People

            treinio Topi Reiniƶ
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes