diff options
author | Robert Loehning <robert.loehning@qt.io> | 2017-11-03 18:20:45 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2017-11-06 08:45:37 +0000 |
commit | 3e5dde4766780665c1030003e3af3aefb75c5dbf (patch) | |
tree | fa9bc4523dc931a2fb2a283e49ad01bf5edf0923 /src/testlib | |
parent | 8ba1f91d4eed03be09046bf4ef81944787316ef9 (diff) |
Testlib: Fix developer-build with clang 4v5.10.0-beta4
"implicit conversion increases floating-point precision: 'float' to
'double'"
Change-Id: Id6f4315316e63c849f1a5ddb6c77abc2bab0b2a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtest_gui.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index 2b486aae5d..d4b2de2214 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -122,25 +122,25 @@ template<> inline char *toString(const QRegion ®ion) #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 |