summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kdab.com>2017-09-06 10:45:01 +0300
committerBogDan Vatra <bogdan@kdab.com>2017-09-10 15:48:30 +0000
commitf56c797ef97d035ebcb59311bfc35207846de9e7 (patch)
treef4b35032d44f7f789650bf6e0f291d2faeee0773
parente0b7de5dffbf96258488cfa8e8867da8d6757fcc (diff)
Android: clang fix implicit conversion warning
The error message was: error: implicit conversion increases floating-point precision: 'float' to 'double' [-Werror,-Wdouble-promotion] Change-Id: I2cbf035d4e7b223d1280d53255d54b2a6c48ea37 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
-rw-r--r--src/testlib/qtest_gui.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h
index d848f08d55..4e9ce0d0f6 100644
--- a/src/testlib/qtest_gui.h
+++ b/src/testlib/qtest_gui.h
@@ -122,25 +122,25 @@ template<> inline char *toString(const QRegion &region)
#ifndef QT_NO_VECTOR2D
template<> inline char *toString(const QVector2D &v)
{
- QByteArray result = "QVector2D(" + QByteArray::number(v.x()) + ", "
- + QByteArray::number(v.y()) + ')';
+ QByteArray result = "QVector2D(" + QByteArray::number(double(v.x())) + ", "
+ + QByteArray::number(double(v.y())) + ')';
return qstrdup(result.constData());
}
#endif // !QT_NO_VECTOR2D
#ifndef QT_NO_VECTOR3D
template<> inline char *toString(const QVector3D &v)
{
- QByteArray result = "QVector3D(" + QByteArray::number(v.x()) + ", "
- + QByteArray::number(v.y()) + ", " + QByteArray::number(v.z()) + ')';
+ QByteArray result = "QVector3D(" + QByteArray::number(double(v.x())) + ", "
+ + QByteArray::number(double(v.y())) + ", " + QByteArray::number(double(v.z())) + ')';
return qstrdup(result.constData());
}
#endif // !QT_NO_VECTOR3D
#ifndef QT_NO_VECTOR4D
template<> inline char *toString(const QVector4D &v)
{
- QByteArray result = "QVector4D(" + QByteArray::number(v.x()) + ", "
- + QByteArray::number(v.y()) + ", " + QByteArray::number(v.z())
- + ", " + QByteArray::number(v.w()) + ')';
+ QByteArray result = "QVector4D(" + QByteArray::number(double(v.x())) + ", "
+ + QByteArray::number(double(v.y())) + ", " + QByteArray::number(double(v.z()))
+ + ", " + QByteArray::number(double(v.w())) + ')';
return qstrdup(result.constData());
}
#endif // !QT_NO_VECTOR4D