[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2006-03-01 12:49:18
Message-ID: 1141217358.258959.23108.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 514775 by goutte:

Simply #define KDE_DEPRECATED as being Q_DECL_DEPRECATED and let Qt4 do the
hard task of knowing which compiler needs what to issue a deprecated warning.


 M  +13 -17    kdemacros.h.in  


--- trunk/KDE/kdelibs/kdemacros.h.in #514774:514775
@@ -96,16 +96,16 @@
  * 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 the very end of the
- * function declaration, right before the semicolon:
+ * For non-inline functions, the macro gets inserted at front of the
+ * function declaration, right before the return type:
  *
  * \code
- * DeprecatedConstructor() KDE_DEPRECATED;
- * void deprecatedFunctionA() KDE_DEPRECATED;
- * int deprecatedFunctionB() const KDE_DEPRECATED;
+ * KDE_DEPRECATED DeprecatedConstructor();
+ * KDE_DEPRECATED void deprecatedFunctionA();
+ * KDE_DEPRECATED int deprecatedFunctionB() const;
  * \endcode
  *
- * Functions which are implemented inline are handled differently: for them,
+ * For functions which are implemented inline,
  * the KDE_DEPRECATED macro is inserted at the front, right before the return
  * type, but after "static" or "virtual":
  *
@@ -127,8 +127,8 @@
  * \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'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
+ * 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
@@ -140,18 +140,14 @@
  * 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.
  */
 
 #ifndef KDE_DEPRECATED
-# if defined(__GNUC__) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))
-  /* gcc >= 3.2 */
-#  define KDE_DEPRECATED __attribute__ ((deprecated))
-# elif defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400)
-  /* msvc >= 7 */
-#  define KDE_DEPRECATED __declspec(deprecated)
-# else
-#  define KDE_DEPRECATED
-# endif
+# define KDE_DEPRECATED Q_DECL_DEPRECATED
 #endif
 
 /**
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic