From 5b570c287f0ddd8897a22acc53416b1f89c11da7 Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Sun, 12 Jan 2014 19:10:30 +0100 Subject: 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 --- src/corelib/global/qglobal.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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) -- cgit v1.2.3