Use the new macros for disabling warnings in qtdeclarative
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 31 Oct 2014 05:58:18 +0000 (22:58 -0700)
committerThiago Macieira <thiago.macieira@intel.com>
Tue, 28 Jul 2015 23:59:04 +0000 (23:59 +0000)
Change-Id: I476da50ba23598c7ca98651477fb701f74053b82
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
src/qml/jsruntime/qv4numberobject.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqml.h

index 89ff110b201a9cf32a951243a8000137a5f58c5c..4a1a94e872cf0b8aaf774c6538074ed1ef3b5bc9 100644 (file)
@@ -75,14 +75,10 @@ void NumberPrototype::init(ExecutionEngine *engine, Object *ctor)
     ctor->defineReadonlyProperty(QStringLiteral("POSITIVE_INFINITY"), Primitive::fromDouble(qInf()));
     ctor->defineReadonlyProperty(QStringLiteral("MAX_VALUE"), Primitive::fromDouble(1.7976931348623158e+308));
 
-#ifdef __INTEL_COMPILER
-# pragma warning( push )
-# pragma warning(disable: 239)
-#endif
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_INTEL(239)
     ctor->defineReadonlyProperty(QStringLiteral("MIN_VALUE"), Primitive::fromDouble(5e-324));
-#ifdef __INTEL_COMPILER
-# pragma warning( pop )
-#endif
+QT_WARNING_POP
 
     defineDefaultProperty(QStringLiteral("constructor"), (o = ctor));
     defineDefaultProperty(engine->id_toString, method_toString);
index 1e4718c2082d1285dd49ab846dc9e3cf282f3279..0a1aa56aab2c1e86a970238895327c4145646cb5 100644 (file)
 
 QT_BEGIN_NAMESPACE
 
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
 // The code in this file does not violate strict aliasing, but GCC thinks it does
 // so turn off the warnings for us to have a clean build
-#  pragma GCC diagnostic ignored "-Wstrict-aliasing"
-# endif
-#endif
-
+QT_WARNING_DISABLE_GCC("-Wstrict-aliasing")
 
 using namespace QV4;
 
index d6fd7b96f61f8eeb1a8f30edfa371f75199efd58..23cb69e2f1943ff69b3ea7f10eca0cc18e12d86e 100644 (file)
@@ -502,17 +502,13 @@ namespace QtQml {
 }
 #endif
 
-#if defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wheader-hygiene"
-#endif
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
 
 // This is necessary to allow for QtQuick1 and QtQuick2 scenes in a single application.
 using namespace QtQml;
 
-#if defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
-#pragma clang diagnostic pop
-#endif
+QT_WARNING_POP
 
 //The C++ version of protected namespaces in qmldir
 Q_QML_EXPORT bool qmlProtectModule(const char* uri, int majVersion);