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

Teach qdoc to pull out deprecation messages from QT_DEPRECATED_X

XMLWordPrintable

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

      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.

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

            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

              Created:
              Updated:

                There are no open Gerrit changes