[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: DockWidget creation
From: Cyrille Berger <cberger () cberger ! net>
Date: 2007-01-17 8:38:58
Message-ID: 200701170938.58080.cberger () cberger ! net
[Download RAW message or body]
> I didn't know the KDE way of doing @deprecated.
It's by using KDE_DEPRECATED, couldn't find an online link on the tweaked
doxygen ouput of the KDE API :
/**
* @def KDE_DEPRECATED
*
* The KDE_DEPRECATED macro can be used to trigger compile-time warnings
* with newer compilers when deprecated functions are used.
*
* For non-inline functions, the macro gets inserted at front of the
* function declaration, right before the return type:
*
* \code
* KDE_DEPRECATED void deprecatedFunctionA();
* KDE_DEPRECATED int deprecatedFunctionB() const;
* \endcode
*
* For functions which are implemented inline,
* the KDE_DEPRECATED macro is inserted at the front, right before the return
* type, but after "static", "inline" or "virtual":
*
* \code
* KDE_DEPRECATED void deprecatedInlineFunctionA() { .. }
* virtual KDE_DEPRECATED int deprecatedInlineFunctionB() { .. }
* static KDE_DEPRECATED bool deprecatedInlineFunctionC() { .. }
* inline KDE_DEPRECATED bool deprecatedInlineFunctionD() { .. }
* \endcode
*
* You can also mark whole structs or classes as deprecated, by inserting the
* KDE_DEPRECATED macro after the struct/class keyword, but before the
* name of the struct/class:
*
* \code
* class KDE_DEPRECATED DeprecatedClass { };
* struct KDE_DEPRECATED DeprecatedStruct { };
* \endcode
*
* \note
* It does not make much sense to use the KDE_DEPRECATED keyword for a Qt
signal
;
* this is because usually get called by the class which they belong to,
* and one would assume that a class author does not use deprecated methods of
* his own class. The only exception to this are signals which are connected
to
* other signals; they get invoked from moc-generated code. In any case,
* printing a warning message in either case is not useful.
* For slots, it can make sense (since slots can be invoked directly) but be
* aware that if the slots get triggered by a signal, the will get called from
* moc code as well and thus the warnings are useless.
*
* \par
* Also note that it is not possible to use KDE_DEPRECATED for classes which
* use the k_dcop keyword (to indicate a DCOP interface declaration); this is
* because the dcopidl program would choke on the unexpected declaration
* syntax.
*
* \note
* KDE_DEPRECATED cannot be used at the end of the declaration anymore,
* unlike what is done for KDE3.
*
* \note
* KDE_DEPRECATED cannot be used for constructors,
* use KDE_CONSTRUCTOR_DEPRECATED instead.
*/
--
Cyrille Berger
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic