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

Teach qdoc to pull out deprecation messages from QT_DEPRECATED_X

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Documentation
    • None

    Description

      It would be great if qdoc could pull out the deprecation messages from QT_DEPRECATED_X, e.g.:

       QT_DEPRECATED_X("Use QGuiApplication::primaryScreen()") int primaryScreen() const;
      

      That way the message wouldn't need to be duplicated in the documentation for \obsolete as well.

      See e.g. the duplication in https://codereview.qt-project.org/#/c/205020/

      In general, we use QT_DEPRECATED too much, and should prefer QT_DEPRECATED_X, so that the compiler will emit a deprecation warning with an explanation of what to use instead. One good way to get to more QT_DEPRECATED_X use, would be if qdoc would then automatically do the doc parts for you.

      On clang, QT_DEPRECATED expands to_attribute_ ((_deprecated)) and QT_DEPRECATED_X expands to __attribute_ ((_deprecated_(text))), which should be possible to pull out from clang-qdoc.

      Attachments

        Issue Links

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

          Activity

            People

              docinfrastructure Documentation Infrastructure Team
              vestbo Tor Arne Vestbø
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes