|
|
|
@ -69,39 +69,39 @@
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The KDE_DEPRECATED macro can be used to trigger compile-time warnings
|
|
|
|
|
* The TDE_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 the very end of the
|
|
|
|
|
* function declaration, right before the semicolon:
|
|
|
|
|
*
|
|
|
|
|
* \code
|
|
|
|
|
* DeprecatedConstructor() KDE_DEPRECATED;
|
|
|
|
|
* void deprecatedFunctionA() KDE_DEPRECATED;
|
|
|
|
|
* int deprecatedFunctionB() const KDE_DEPRECATED;
|
|
|
|
|
* DeprecatedConstructor() TDE_DEPRECATED;
|
|
|
|
|
* void deprecatedFunctionA() TDE_DEPRECATED;
|
|
|
|
|
* int deprecatedFunctionB() const TDE_DEPRECATED;
|
|
|
|
|
* \endcode
|
|
|
|
|
*
|
|
|
|
|
* Functions which are implemented inline are handled differently: for them,
|
|
|
|
|
* the KDE_DEPRECATED macro is inserted at the front, right before the return
|
|
|
|
|
* the TDE_DEPRECATED macro is inserted at the front, right before the return
|
|
|
|
|
* type, but after "static" or "virtual":
|
|
|
|
|
*
|
|
|
|
|
* \code
|
|
|
|
|
* KDE_DEPRECATED void deprecatedInlineFunctionA() { .. }
|
|
|
|
|
* virtual KDE_DEPRECATED int deprecatedInlineFunctionB() { .. }
|
|
|
|
|
* static KDE_DEPRECATED bool deprecatedInlineFunctionC() { .. }
|
|
|
|
|
* TDE_DEPRECATED void deprecatedInlineFunctionA() { .. }
|
|
|
|
|
* virtual TDE_DEPRECATED int deprecatedInlineFunctionB() { .. }
|
|
|
|
|
* static TDE_DEPRECATED bool deprecatedInlineFunctionC() { .. }
|
|
|
|
|
* \end
|
|
|
|
|
*
|
|
|
|
|
* You can also mark whole structs or classes as deprecated, by inserting the
|
|
|
|
|
* KDE_DEPRECATED macro after the struct/class keyword, but before the
|
|
|
|
|
* TDE_DEPRECATED macro after the struct/class keyword, but before the
|
|
|
|
|
* name of the struct/class:
|
|
|
|
|
*
|
|
|
|
|
* \code
|
|
|
|
|
* class KDE_DEPRECATED DeprecatedClass { };
|
|
|
|
|
* struct KDE_DEPRECATED DeprecatedStruct { };
|
|
|
|
|
* class TDE_DEPRECATED DeprecatedClass { };
|
|
|
|
|
* struct TDE_DEPRECATED DeprecatedStruct { };
|
|
|
|
|
* \endcode
|
|
|
|
|
*
|
|
|
|
|
* \note
|
|
|
|
|
* It does not make much sense to use the KDE_DEPRECATED keyword for a TQt signal;
|
|
|
|
|
* It does not make much sense to use the TDE_DEPRECATED keyword for a TQt signal;
|
|
|
|
|
* this is because usually get called by the class which they belong to,
|
|
|
|
|
* and one'd assume that a class author doesn't use deprecated methods of his
|
|
|
|
|
* own class. The only exception to this are signals which are connected to
|
|
|
|
@ -112,21 +112,21 @@
|
|
|
|
|
* 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
|
|
|
|
|
* Also note that it is not possible to use TDE_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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef KDE_DEPRECATED
|
|
|
|
|
#ifndef TDE_DEPRECATED
|
|
|
|
|
#if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)
|
|
|
|
|
/* gcc >= 3.2 */
|
|
|
|
|
# define KDE_DEPRECATED __attribute__ ((deprecated))
|
|
|
|
|
# define TDE_DEPRECATED __attribute__ ((deprecated))
|
|
|
|
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
|
|
|
|
/* msvc >= 7 */
|
|
|
|
|
# define KDE_DEPRECATED __declspec(deprecated)
|
|
|
|
|
# define TDE_DEPRECATED __declspec(deprecated)
|
|
|
|
|
#else
|
|
|
|
|
# define KDE_DEPRECATED
|
|
|
|
|
# define TDE_DEPRECATED
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|