diff options
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 98473fb5cc..e1ed9f5e23 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -468,10 +468,12 @@ void tst_QGraphicsView::interactive() QCOMPARE(item->events.size(), i * 5 + 5); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GraphicsSceneMouseRelease); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::UngrabMouse); +#ifndef QT_NO_CONTEXTMENU QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, itemPoint, view.mapToGlobal(itemPoint)); QApplication::sendEvent(view.viewport(), &contextEvent); QCOMPARE(item->events.size(), i * 5 + 6); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); +#endif // QT_NO_CONTEXTMENU } view.setInteractive(false); @@ -483,10 +485,12 @@ void tst_QGraphicsView::interactive() sendMouseRelease(view.viewport(), itemPoint); QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); +#ifndef QT_NO_CONTEXTMENU QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, itemPoint, view.mapToGlobal(itemPoint)); QApplication::sendEvent(view.viewport(), &contextEvent); QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); +#endif // QT_NO_CONTEXTMENU } } @@ -1391,8 +1395,8 @@ void tst_QGraphicsView::fitInView() items[2]->setPos(-100, 100); items[3]->setPos(100, 100); - items[0]->rotate(30); - items[1]->rotate(-30); + items[0]->setTransform(QTransform().rotate(30), true); + items[1]->setTransform(QTransform().rotate(-30), true); #if defined(Q_OS_WINCE) //Is the standard scrollbar size @@ -2888,9 +2892,6 @@ void tst_QGraphicsView::scrollBarRanges() QFETCH(ExpectedValueDescription, vmax); QFETCH(bool, useStyledPanel); - if (style == QLatin1String("GTK+") && useStyledPanel) - QSKIP("GTK + style test skipped, see QTBUG-29002"); - if (useStyledPanel && style == QStringLiteral("Macintosh") && platformName == QStringLiteral("cocoa")) QSKIP("Insignificant on OSX"); QGraphicsScene scene; @@ -3506,7 +3507,7 @@ void tst_QGraphicsView::embeddedViews() SpyItem *item = new SpyItem; v2->scene()->addItem(item); - proxy->translate(5, 5); + proxy->setTransform(QTransform::fromTranslate(5, 5), true); QImage actual(64, 64, QImage::Format_ARGB32_Premultiplied); actual.fill(0); |