Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
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
- relates to
-
QTBUG-92481 [QDoc] Warn if a member is marked \obsolete but does not have QT_DEPRECATED_SINCE()
-
- Open
-