From 9ca4af5c5901a3d0abb0010e21fab0925573cf00 Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Fri, 13 Jan 2012 18:34:47 +0000 Subject: [PATCH] Fix compilation on QNX. Change-Id: I5e01cad23066a645c1434ce1463d370733f53e4f Reviewed-by: Alan Alpert --- src/3rdparty/javascriptcore/DateMath.cpp | 7 +++++++ src/qml/qml/ftw/qhashedstring_p.h | 4 ++++ src/qml/qml/ftw/qqmlpool.cpp | 4 ++++ src/qml/qml/qqmlaccessors_p.h | 4 ++++ src/qml/qml/v8/qjsconverter_impl_p.h | 4 ++++ src/quick/items/context2d/qquickcontext2d.cpp | 4 ++++ src/quick/particles/qquickangledirection.cpp | 3 +++ src/quick/particles/qquickellipseextruder.cpp | 5 +++++ src/quick/scenegraph/coreapi/qsggeometry.cpp | 4 ++++ 9 files changed, 39 insertions(+) diff --git a/src/3rdparty/javascriptcore/DateMath.cpp b/src/3rdparty/javascriptcore/DateMath.cpp index 9f66d91013..be99d2ca25 100644 --- a/src/3rdparty/javascriptcore/DateMath.cpp +++ b/src/3rdparty/javascriptcore/DateMath.cpp @@ -345,8 +345,15 @@ double timeClip(double t) return NaN; return t >= 0 ? floor(t) : ceil(t); #else + +#if defined(__QNXNTO__) + if (!isfinite(t) || fabs(t) > maxECMAScriptTime) + return NaN; +#else if (!std::isfinite(t) || fabs(t) > maxECMAScriptTime) return NaN; +#endif + return trunc(t); #endif } diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h index f575285ff6..f058f21e98 100644 --- a/src/qml/qml/ftw/qhashedstring_p.h +++ b/src/qml/qml/ftw/qhashedstring_p.h @@ -59,6 +59,10 @@ #include +#if defined(Q_OS_QNX) +#include +#endif + QT_BEGIN_NAMESPACE // Enable this to debug hash linking assumptions. diff --git a/src/qml/qml/ftw/qqmlpool.cpp b/src/qml/qml/ftw/qqmlpool.cpp index 6fd11d4b1e..64df87ada5 100644 --- a/src/qml/qml/ftw/qqmlpool.cpp +++ b/src/qml/qml/ftw/qqmlpool.cpp @@ -41,6 +41,10 @@ #include "qqmlpool_p.h" +#ifdef Q_OS_QNX +#include +#endif + // #define POOL_DEBUG QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlaccessors_p.h b/src/qml/qml/qqmlaccessors_p.h index a603bede9f..8e67a58511 100644 --- a/src/qml/qml/qqmlaccessors_p.h +++ b/src/qml/qml/qqmlaccessors_p.h @@ -47,6 +47,10 @@ #include #include +#ifdef Q_OS_QNX +#include +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/v8/qjsconverter_impl_p.h b/src/qml/qml/v8/qjsconverter_impl_p.h index 10b8ab5fae..c2775df7f5 100644 --- a/src/qml/qml/v8/qjsconverter_impl_p.h +++ b/src/qml/qml/v8/qjsconverter_impl_p.h @@ -44,6 +44,10 @@ #ifndef QJSCONVERTER_IMPL_P_H #define QJSCONVERTER_IMPL_P_H +#ifdef Q_OS_QNX +#include +#endif + QT_BEGIN_NAMESPACE extern char *qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **digits_str); diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index f8e5e3c57f..a605b9ce6d 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -63,6 +63,10 @@ #include #include +#ifdef Q_OS_QNX +#include +#endif + QT_BEGIN_NAMESPACE /*! \qmlclass Context2D QQuickContext2D diff --git a/src/quick/particles/qquickangledirection.cpp b/src/quick/particles/qquickangledirection.cpp index a3bd45e0bf..e77c47362c 100644 --- a/src/quick/particles/qquickangledirection.cpp +++ b/src/quick/particles/qquickangledirection.cpp @@ -42,6 +42,9 @@ #include "qquickangledirection_p.h" #include #include +#ifdef Q_OS_QNX +#include +#endif QT_BEGIN_NAMESPACE const qreal CONV = 0.017453292519943295; /*! diff --git a/src/quick/particles/qquickellipseextruder.cpp b/src/quick/particles/qquickellipseextruder.cpp index 3eb547fd2f..083564e5cb 100644 --- a/src/quick/particles/qquickellipseextruder.cpp +++ b/src/quick/particles/qquickellipseextruder.cpp @@ -42,6 +42,11 @@ #include "qquickellipseextruder_p.h" #include #include + +#ifdef Q_OS_QNX +#include +#endif + QT_BEGIN_NAMESPACE /*! \qmlclass EllipseShape QQuickEllipseExtruder diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index dbac95acd1..cf39c308e7 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -46,6 +46,10 @@ #include #include +#ifdef Q_OS_QNX +#include +#endif + QT_BEGIN_NAMESPACE