diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-03-30 23:08:03 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-03-30 23:58:30 (GMT) |
commit | 068652a52f0554b5ceb56798fe5ac4e5049bb9e3 (patch) | |
tree | a8a5a1276ecd42edc07a9a68f205c0e8449048c5 /tests | |
parent | 462429f5692f810bdd4e04b916db5f9af428d9e4 (diff) | |
download | Qt-068652a52f0554b5ceb56798fe5ac4e5049bb9e3.zip Qt-068652a52f0554b5ceb56798fe5ac4e5049bb9e3.tar.gz Qt-068652a52f0554b5ceb56798fe5ac4e5049bb9e3.tar.bz2 |
Rotation transform with NaN angle can cause crash
When used in conjunction with Text resulted in massive memory
consunmption.
Change-Id: I5e19cb54bcd57b1ea32d17641f976f8288611a9e
Task-number: QTBUG-18386
Reviewed-by: Charles Yin
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp index 79f2213..d2b6022 100644 --- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp +++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp @@ -215,6 +215,10 @@ void tst_QGraphicsTransform::rotation() rotation.setAngle(90); QCOMPARE(transform2D(rotation).map(QPointF(10, 10)), QPointF(10, 10)); QCOMPARE(transform2D(rotation).map(QPointF(20, 10)), QPointF(10, 20)); + + rotation.setOrigin(QVector3D(0, 0, 0)); + rotation.setAngle(qQNaN()); + QCOMPARE(transform2D(rotation).map(QPointF(20, 10)), QPointF(20, 10)); } Q_DECLARE_METATYPE(Qt::Axis); |