diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-07 09:41:10 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-07 09:44:04 (GMT) |
commit | 90e009e9e273a4fea5166007e4c2b0638c6588cd (patch) | |
tree | 69934c951bac5db28d8c09f4177e340d1ad272ad /tests/auto/qtransform | |
parent | 6c5a6ed08d0aa470daf46c9b5d9a2ce02bbb222f (diff) | |
download | Qt-90e009e9e273a4fea5166007e4c2b0638c6588cd.zip Qt-90e009e9e273a4fea5166007e4c2b0638c6588cd.tar.gz Qt-90e009e9e273a4fea5166007e4c2b0638c6588cd.tar.bz2 |
Fix QTransform::map(const QPainterPath &) not working with paths that
have only one element
Replaced the isEmpty() check for the shortcut in map() with elementCount() == 0
Task-number: QTBUG-11264
Reviewed-by: Samuel
Diffstat (limited to 'tests/auto/qtransform')
-rw-r--r-- | tests/auto/qtransform/tst_qtransform.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qtransform/tst_qtransform.cpp b/tests/auto/qtransform/tst_qtransform.cpp index a3ded8e..c784b3a 100644 --- a/tests/auto/qtransform/tst_qtransform.cpp +++ b/tests/auto/qtransform/tst_qtransform.cpp @@ -85,6 +85,7 @@ private slots: void inverted(); void projectivePathMapping(); void mapInt(); + void mapPathWithPoint(); private: void mapping_data(); @@ -793,6 +794,13 @@ void tst_QTransform::mapInt() QCOMPARE(y, 10); } +void tst_QTransform::mapPathWithPoint() +{ + QPainterPath p(QPointF(10, 10)); + p = QTransform::fromTranslate(10, 10).map(p); + QCOMPARE(p.currentPosition(), QPointF(20, 20)); +} + QTEST_APPLESS_MAIN(tst_QTransform) |