summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2014-01-12 19:10:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-21 18:37:43 +0100
commit5b570c287f0ddd8897a22acc53416b1f89c11da7 (patch)
treed36adac85a619c1f9c2bcfc385279999e5be3737
parentf58dff46f59555bbd6a6ae96bb1d1439f8c4feca (diff)
Conditionally disable deprecated warnings
Warning C4786 has been removed from MSVC2013. Warning C4231 has been removed since MSVC2003 .net. Added #ifdef statements to only suppress these warnings when the compiler versions supports them. Change-Id: I47d6116bc02cdeef6b2172be0b09d105af9d0059 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/global/qglobal.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 9bba21210c..30db4e75cf 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -826,9 +826,13 @@ Q_CORE_EXPORT void qFreeAligned(void *ptr);
# pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */
# pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
# pragma warning(disable: 4706) /* assignment within conditional expression */
-# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
+# if _MSC_VER <= 1310 // MSVC 2003
+# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
+# endif
# pragma warning(disable: 4355) /* 'this' : used in base member initializer list */
-# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
+# if _MSC_VER < 1800 // MSVC 2013
+# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
+# endif
# pragma warning(disable: 4710) /* function not inlined */
# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */
# elif defined(Q_CC_BOR)