diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-09-07 22:20:14 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-09-12 03:40:19 +0000 |
commit | a763d6a88be732de4beb3c28dbe2cde7a063c83a (patch) | |
tree | 2e0eba92a622be5e435307a10e50cf8580f10403 | |
parent | 9fd39f34f7512d199a1f68dcff4f50e469897e31 (diff) |
Add missing math.h include for math functions
On some platforms, math functions in the std namespace don't work even
if cmath is included.
Change-Id: Ia71d22b07f508e0584de5320f376fbf4b3a2887b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/qml/jsruntime/qv4mathobject.cpp | 1 | ||||
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 1 | ||||
-rw-r--r-- | tests/auto/quick/qquickgridview/tst_qquickgridview.cpp | 2 | ||||
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 2 |
4 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index 2d9d81c64b..109d6c38b5 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -45,6 +45,7 @@ #include <QtCore/private/qnumeric_p.h> #include <QtCore/qthreadstorage.h> +#include <math.h> #include <cmath> using namespace QV4; diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index c92d370a48..c75a682f4a 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -55,6 +55,7 @@ #include <QtCore/qmath.h> #include "qplatformdefs.h" +#include <math.h> #include <cmath> QT_BEGIN_NAMESPACE diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index b2d6584701..2b14842658 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -46,6 +46,8 @@ #include <QtGui/qguiapplication.h> #include "qplatformdefs.h" +#include <math.h> + Q_DECLARE_METATYPE(QQuickGridView::Flow) Q_DECLARE_METATYPE(Qt::LayoutDirection) Q_DECLARE_METATYPE(QQuickItemView::VerticalLayoutDirection) diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index b01d0c3cec..cbef0fcc8d 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -48,6 +48,8 @@ #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" +#include <math.h> + using namespace QQuickViewTestUtil; using namespace QQuickVisualTestUtil; |