Am 04.03.2019 um 19:28 schrieb Thiago Macieira:
On Monday, 4 March 2019 09:58:40 PST Edward Welbourne wrote:
Christian Ehrlicher (4 March 2019 17:51) wrote
So what's the correct way to deprecate a function and not forgetting
about QT_DEPRECATED later on as it happened with a lot of functions
during Qt4 times?
Isn't that what
#if QT_DEPRECATED_SINCE(5, 13)
is for ?
The point raised by hjk is that this causes warnings to anyone compiling code
that needs to retain compatibility. There's no grace period. This is probably
why we only documented the functions were deprecated with \obsolete, but never
enabled warnings (except for Qt4-compat things). In that scheme, finding
deprecated functions is done by raising QT_DEPRECATED_SINCE in your
buildsystem and see what fails, instead of having warnings printed at you.
Should we go back to this?
You know what happens in this case - nothing since noone notices... see
all the usages of deprecated functions within QtBase which have been
unrecognized for ages.
Lars mentioned a new macro Q_WARN_DEPRECATED_SINCE(major, minor) here:
https://codereview.qt-project.org/#/c/254857/ - maybe this could help here?
Christian
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development