[Development] How to deprecate enum values (was: "Deprecated/Obsolete API that survived the transition from Qt 5 to Qt 6")

Sze Howe Koh szehowe.koh at gmail.com
Thu Apr 8 12:00:00 CEST 2021

On Thu, 8 Apr 2021 at 04:43, Volker Hilsheimer <volker.hilsheimer at qt.io> wrote:
> without compile time warning those methods will still be in use, so we can’t remove them.

Is there a way to generate compile-time warnings for _enum values_?

Here are some existing flags that were missed during the Qt 6.0 cull:
* Code comments -- QLocale::ImperialSystem is commented as "// Qt 4
compatibility" [1]
* QDoc free-form text -- QLocale::Uigur is documented as "Obsolete,
please use Uyghur" [2]
* QDoc commands -- Qt::Desktop (from Qt::WindowType) is hidden with
the "\omitvalue" command [3] (although a QDoc bug made it partially
visible still [4])


[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/text/qlocale.h#n880
[2] https://doc.qt.io/qt-6/qlocale.html#Language-enum
[3] https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qnamespace.qdoc#n2179
[4] https://bugreports.qt.io/browse/QTBUG-92386

More information about the Development mailing list