Details
-
Task
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
6.3
-
None
-
Da Vinci sprint 44
Description
QDoc provides a pair of commands, oldcode and newcode, that are used "to show how to port a snippet of code to a new version of an API".
A usage of the commands-pair resolves to the equivalent of two code-blocks with some text before the first code-block and in-between the two-codeblocks.
For example:
\oldcode if (printer->setup(parent)) ... \newcode QPrintDialog dialog(printer, parent); if (dialog.exec()) ... \endcode
Would be equivalent to:
For example, if you have code like \code if (printer->setup(parent)) ... \endcode you can rewrite it as \code QPrintDialog dialog(printer, parent); if (dialog.exec()) ... \endcode
This feature isn't particularly used.
Indeed, only 15 cases were identified in the current documentation across Qt.
As the feature has a low usage statistic while being of an arguable utility considering the triviality of producing a similar effect manually, it was marked for removal.
Hence, deprecate the feature in QDoc and produce a warning for its usage notifying the user that it will be removed in the near future.
Furthermore, the known usage should be converted to the equivalent non \oldcode-\newcode version.
Attachments
Issue Links
- relates to
-
QTBUG-98500 Remove the `\oldcode` and `\newcode` commands
- Closed