diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-12-19 16:18:52 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-20 15:44:48 +0100 |
commit | 920b949e5185258baabfb3f738b660b3c0f002e3 (patch) | |
tree | 702fa5cb06854a1c213e896fd38edbcf912d4731 /tests/auto/qml/qqmlinstruction | |
parent | ad821a63bf4075f2b18ec9eaa6d58f8fd721269a (diff) |
Fix compiler warnings in declarative tests.
- Unused variables
- Missing enumeration values in switch
- truncation from double to float
- truncation from size_t to int
- Missing initializers
- Mix of operator & and bool |
Change-Id: Ib212aeea41befef193f12300a1d9814a60f183af
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlinstruction')
-rw-r--r-- | tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp index 7d27751e77..591d4722e2 100644 --- a/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp +++ b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp @@ -128,14 +128,14 @@ void tst_qqmlinstruction::dump() { QQmlCompiledData::Instruction::StoreFloat i; i.propertyIndex = 3; - i.value = 11.3; + i.value = 11.3f; data->addInstruction(i); } { QQmlCompiledData::Instruction::StoreDouble i; i.propertyIndex = 4; - i.value = 14.8; + i.value = 14.8f; data->addInstruction(i); } @@ -676,8 +676,8 @@ void tst_qqmlinstruction::vector3d() QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeVector3D::QVector3D), Q_ALIGNOF(QVector3D)); QQmlInstruction i; - i.storeVector3D.vector.xp = 8.2; - i.storeVector3D.vector.yp = 99.3; + i.storeVector3D.vector.xp = 8.2f; + i.storeVector3D.vector.yp = 99.3f; i.storeVector3D.vector.zp = 12.0; const QVector3D &vector = (const QVector3D &)(i.storeVector3D.vector); @@ -692,10 +692,10 @@ void tst_qqmlinstruction::vector4d() QCOMPARE(Q_ALIGNOF(QQmlInstruction::instr_storeVector4D::QVector4D), Q_ALIGNOF(QVector4D)); QQmlInstruction i; - i.storeVector4D.vector.xp = 8.2; - i.storeVector4D.vector.yp = 99.3; + i.storeVector4D.vector.xp = 8.2f; + i.storeVector4D.vector.yp = 99.3f; i.storeVector4D.vector.zp = 12.0; - i.storeVector4D.vector.wp = 121.1; + i.storeVector4D.vector.wp = 121.1f; const QVector4D &vector = (const QVector4D &)(i.storeVector4D.vector); QCOMPARE(vector.x(), (qreal)(float)8.2); |