summaryrefslogtreecommitdiff
path: root/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 0e86c0ab48..f943daf411 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -118,10 +118,8 @@ private slots:
void focusNextPrevChild();
void focusOutEvent_data();
void focusOutEvent();
-#if !defined(Q_OS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR))
void hoverEnterLeaveEvent_data();
void hoverEnterLeaveEvent();
-#endif
void hoverMoveEvent_data();
void hoverMoveEvent();
void keyPressEvent_data();
@@ -159,9 +157,7 @@ private slots:
void setFocus_complexTwoWidgets();
void popup_basic();
void popup_subwidget();
-#if !defined(QT_NO_CURSOR) && (!defined(Q_OS_WINCE) || defined(GWES_ICONCURS))
void changingCursor_basic();
-#endif
void tooltip_basic();
void childPos_data();
void childPos();
@@ -944,8 +940,6 @@ protected:
}
};
-// protected void hoverEnterEvent(QGraphicsSceneHoverEvent* event)
-#if !defined(Q_OS_WINCE) || (defined(GWES_ICONCURS) && !defined(QT_NO_CURSOR))
void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent_data()
{
QTest::addColumn<bool>("hasWidget");
@@ -956,11 +950,16 @@ void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent_data()
QTest::newRow("no widget, hover") << false << true;
}
+// protected void hoverEnterEvent(QGraphicsSceneHoverEvent* event)
void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent()
{
QFETCH(bool, hasWidget);
QFETCH(bool, hoverEnabled);
+#if defined(Q_OS_WINCE) && (!defined(GWES_ICONCURS) || defined(QT_NO_CURSOR))
+ QSKIP("hover events not supported on this platform");
+#endif
+
// proxy should translate this into events that the widget would expect
QGraphicsScene scene;
@@ -1007,7 +1006,6 @@ void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent()
if (!hasWidget)
delete widget;
}
-#endif
void tst_QGraphicsProxyWidget::hoverMoveEvent_data()
{
@@ -2548,9 +2546,12 @@ void tst_QGraphicsProxyWidget::popup_subwidget()
QCOMPARE(popup->size(), child->size().toSize());
}
-#if !defined(QT_NO_CURSOR) && (!defined(Q_OS_WINCE) || defined(GWES_ICONCURS))
void tst_QGraphicsProxyWidget::changingCursor_basic()
{
+#if defined(Q_OS_WINCE) && (!defined(GWES_ICONCURS) || defined(QT_NO_CURSOR))
+ QSKIP("hover events not supported on this platform");
+#endif
+#ifndef QT_NO_CURSOR
// Confirm that mouse events are working properly by checking that
// when moving the mouse over a line edit it will change the cursor into the I
QGraphicsScene scene;
@@ -2576,8 +2577,8 @@ void tst_QGraphicsProxyWidget::changingCursor_basic()
QTest::mouseMove(view.viewport(), QPoint(1, 1));
sendMouseMove(view.viewport(), QPoint(1, 1));
QTRY_COMPARE(view.viewport()->cursor().shape(), Qt::ArrowCursor);
-}
#endif
+}
void tst_QGraphicsProxyWidget::tooltip_basic()
{