diff options
-rw-r--r-- | src/qml/jsruntime/qv4numberobject.cpp | 10 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 7 | ||||
-rw-r--r-- | src/qml/qml/qqml.h | 10 |
3 files changed, 7 insertions, 20 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp index 89ff110b20..4a1a94e872 100644 --- a/src/qml/jsruntime/qv4numberobject.cpp +++ b/src/qml/jsruntime/qv4numberobject.cpp @@ -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); diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 1e4718c208..0a1aa56aab 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -70,14 +70,9 @@ 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; diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index d6fd7b96f6..23cb69e2f1 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -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); |