avoid deprecated methods
Zack Rusin
kde-optimize@mail.kde.org
Tue, 11 Feb 2003 14:02:14 -0500
On Tuesday 11 February 2003 13:46, Benjamin Meyer wrote:
> No matter what we do do it would be a good idea to have a common way
> of specifing things that are deprecated so when we do break binary
> compatibility (down the line) we will have a nice big list of old
> deprecated functions to prune. Is "@deprecated" in the header the
> correct way of doing this?
For now that's the only way. We may add something like:
#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 2
# define KDE_DEPRECATED __attribute__((deprecated))
#else
# define KDE_DEPRECATED
#endif
and then uses of methods like:
void someMethod() KDE_DEPRECATED;
would be caught at compile time. It won't work all that well for slots
though because the metacompiler will use them anyway but for normal
methods it would work rather nicely.
Zack
--
The answer to the Question of Life, the Universe and Everything
is... 42