diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-19 19:54:59 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-22 17:00:34 +0000 |
commit | 024daeb08c77b75638843f6b3d5a93129ffcb0eb (patch) | |
tree | 68aff6dc937bff5cf43b16be26983b9b833bdc1c /tests | |
parent | 76dfda1ad12cc42cdd832aed1edbe5f76b0cbb2d (diff) |
tst_QGraphicsItem: stabilize cursor() test
The cursor test sometimes fails due to the fact that the topLevel widget
has not yet reached it's fullscreen geometry. This means the
QGraphicsView is to small and the test will fail.
Avoid it by simply removing the topLevel widget since it's not used at
all.
Change-Id: Ia7b34f283a917a35b6665e6333a01378575a5a04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 5f269bd520..9a75774927 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -4148,11 +4148,9 @@ void tst_QGraphicsItem::ensureVisible() void tst_QGraphicsItem::cursor() { QGraphicsScene scene; - QWidget topLevel; - QGraphicsView view(&scene,&topLevel); - topLevel.showMaximized(); - QVERIFY(QTest::qWaitForWindowExposed(&topLevel)); - view.setFixedSize(topLevel.size()); + QGraphicsView view(&scene); + view.showFullScreen(); + QVERIFY(QTest::qWaitForWindowExposed(&view)); QGraphicsRectItem *item1 = scene.addRect(QRectF(-100, 0, 50, 50)); QGraphicsRectItem *item2 = scene.addRect(QRectF(50, 0, 50, 50)); |