summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2015-02-27 10:22:36 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-03-03 13:30:39 +0000
commit877032bfdf0376cb5e438b3abe3fe5f45ce982c0 (patch)
tree1399f8841235294384c1cd04056f2307e0b5f01d /tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
parent34a58b0eb7c0c40be87e62251bc714d63293d51a (diff)
autotests: fix the build in case of QT_NO_WHEELEVENT
Wheel event tests aren't possible if there's no wheel event. Change-Id: Ibe380c01fbf6cebfd2f43c6ecb52863134ea3c01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 783395fed4..119e9dfecb 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -198,7 +198,9 @@ private slots:
void mapFromScenePoly();
void mapFromScenePath();
void sendEvent();
+#ifndef QT_NO_WHEELEVENT
void wheelEvent();
+#endif
#ifndef QTEST_NO_CURSOR
void cursor();
void cursor2();
@@ -2172,6 +2174,7 @@ void tst_QGraphicsView::sendEvent()
QCOMPARE(item->events.last(), QEvent::KeyPress);
}
+#ifndef QT_NO_WHEELEVENT
class MouseWheelScene : public QGraphicsScene
{
public:
@@ -2228,6 +2231,7 @@ void tst_QGraphicsView::wheelEvent()
QCOMPARE(spy.count(), 2);
QVERIFY(widget->hasFocus());
}
+#endif // !QT_NO_WHEELEVENT
#ifndef QTEST_NO_CURSOR
void tst_QGraphicsView::cursor()