diff options
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index ded0cc7965..ad204f231d 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -187,10 +187,8 @@ private slots: void mapFromScenePath(); void sendEvent(); void wheelEvent(); -#if !defined(QT_NO_CURSOR) && !defined(Q_OS_WINCE) void cursor(); void cursor2(); -#endif void transformationAnchor(); void resizeAnchor(); void viewportUpdateMode(); @@ -244,16 +242,12 @@ private slots: void task239047_fitInViewSmallViewport(); void task245469_itemsAtPointWithClip(); void task253415_reconnectUpdateSceneOnSceneChanged(); -#ifndef Q_OS_WINCE void task255529_transformationAnchorMouseAndViewportMargins(); -#endif void task259503_scrollingArtifacts(); void QTBUG_4151_clipAndIgnore_data(); void QTBUG_4151_clipAndIgnore(); void QTBUG_5859_exposedRect(); -#if !defined(QT_NO_CURSOR) && !defined(Q_OS_WINCE) void QTBUG_7438_cursor(); -#endif void hoverLeave(); void QTBUG_16063_microFocusRect(); @@ -2057,10 +2051,12 @@ void tst_QGraphicsView::wheelEvent() QVERIFY(widget->hasFocus()); } -// Qt/CE does not have regular cursor support. -#if !defined(QT_NO_CURSOR) && !defined(Q_OS_WINCE) void tst_QGraphicsView::cursor() { +#ifndef QT_NO_CURSOR +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE does not have regular cursor support"); +#endif if (PlatformQuirks::haveMouseCursor()) QSKIP("The Platform does not have regular cursor support"); @@ -2082,13 +2078,17 @@ void tst_QGraphicsView::cursor() sendMouseMove(view.viewport(), QPoint(5, 5)); QCOMPARE(view.viewport()->cursor().shape(), Qt::PointingHandCursor); -} #endif +} // Qt/CE does not have regular cursor support. #if !defined(QT_NO_CURSOR) && !defined(Q_OS_WINCE) void tst_QGraphicsView::cursor2() { +#ifndef QT_NO_CURSOR +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE does not have regular cursor support"); +#endif if (PlatformQuirks::haveMouseCursor()) QSKIP("The Platform does not have regular cursor support"); @@ -2154,8 +2154,8 @@ void tst_QGraphicsView::cursor2() QCOMPARE(view.viewport()->cursor().shape(), Qt::IBeamCursor); sendMouseMove(view.viewport(), view.mapFromScene(-15, -15)); QCOMPARE(view.viewport()->cursor().shape(), Qt::SizeAllCursor); -} #endif +} void tst_QGraphicsView::transformationAnchor() { @@ -4252,10 +4252,11 @@ void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged() QVERIFY(wasConnected2); } -// Qt/CE does not implement mouse tracking at this point. -#ifndef Q_OS_WINCE void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins() { +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE does not implement mouse tracking at this point"); +#endif QGraphicsScene scene(-100, -100, 200, 200); scene.addRect(QRectF(-50, -50, 100, 100), QPen(Qt::black), QBrush(Qt::blue)); @@ -4289,8 +4290,8 @@ void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins() QEXPECT_FAIL("", "QTBUG-22455", Abort); QVERIFY(qAbs(newMouseScenePos.x() - mouseScenePos.x()) < slack); QVERIFY(qAbs(newMouseScenePos.y() - mouseScenePos.y()) < slack); -} #endif +} void tst_QGraphicsView::task259503_scrollingArtifacts() { @@ -4439,10 +4440,12 @@ void tst_QGraphicsView::QTBUG_5859_exposedRect() QCOMPARE(item.lastExposedRect, scene.lastBackgroundExposedRect); } -// Qt/CE does not have regular cursor support. -#if !defined(QT_NO_CURSOR) && !defined(Q_OS_WINCE) void tst_QGraphicsView::QTBUG_7438_cursor() { +#ifndef QT_NO_CURSOR +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE does not have regular cursor support"); +#endif QGraphicsScene scene; QGraphicsItem *item = scene.addRect(QRectF(-10, -10, 20, 20)); item->setFlag(QGraphicsItem::ItemIsMovable); @@ -4461,8 +4464,8 @@ void tst_QGraphicsView::QTBUG_7438_cursor() QCOMPARE(view.viewport()->cursor().shape(), Qt::PointingHandCursor); sendMouseRelease(view.viewport(), view.mapFromScene(0, 0)); QCOMPARE(view.viewport()->cursor().shape(), Qt::PointingHandCursor); -} #endif +} class GraphicsItemWithHover : public QGraphicsRectItem { |