diff options
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 1abc4d3609..ac671743f4 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3675,6 +3675,7 @@ void tst_QGraphicsProxyWidget::mapToGlobal() // QTBUG-41135 const QSize size = availableGeometry.size() / 5; QGraphicsScene scene; QGraphicsView view(&scene); + view.setTransform(QTransform::fromScale(2, 2)); // QTBUG-50136, use transform. view.setWindowTitle(QTest::currentTestFunction()); view.resize(size); view.move(availableGeometry.bottomRight() - QPoint(size.width(), size.height()) - QPoint(100, 100)); @@ -3697,10 +3698,15 @@ void tst_QGraphicsProxyWidget::mapToGlobal() // QTBUG-41135 QVERIFY2((viewCenter - embeddedCenterGlobal).manhattanLength() <= 2, msgPointMismatch(embeddedCenterGlobal, viewCenter).constData()); - // Same test with child centered on embeddedWidget + // Same test with child centered on embeddedWidget. The correct + // mapping is not implemented yet, but at least make sure + // the roundtrip maptoGlobal()/mapFromGlobal() returns the same + // point since that is important for mouse event handling (QTBUG-50030, + // QTBUG-50136). const QPoint childCenter = childWidget->rect().center(); const QPoint childCenterGlobal = childWidget->mapToGlobal(childCenter); QCOMPARE(childWidget->mapFromGlobal(childCenterGlobal), childCenter); + QEXPECT_FAIL("", "Not implemented for child widgets of embedded widgets", Continue); QVERIFY2((viewCenter - childCenterGlobal).manhattanLength() <= 4, msgPointMismatch(childCenterGlobal, viewCenter).constData()); } |