From 877032bfdf0376cb5e438b3abe3fe5f45ce982c0 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 27 Feb 2015 10:22:36 +0100 Subject: 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 --- .../graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/widgets/graphicsview/qgraphicsproxywidget') diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index c1027dac18..f8d852888c 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -123,7 +123,9 @@ private slots: void resizeEvent_data(); void resizeEvent(); void paintEvent(); +#ifndef QT_NO_WHEELEVENT void wheelEvent(); +#endif void sizeHint_data(); void sizeHint(); void sizePolicy(); @@ -260,6 +262,7 @@ public: int focusOut; }; +#ifndef QT_NO_WHEELEVENT class WheelWidget : public QWidget { public: @@ -269,6 +272,7 @@ public: bool wheelEventCalled; }; +#endif // !QT_NO_WHEELEVENT // This will be called before the first test function is executed. // It is only called once. @@ -1308,6 +1312,7 @@ void tst_QGraphicsProxyWidget::paintEvent() } +#ifndef QT_NO_WHEELEVENT void tst_QGraphicsProxyWidget::wheelEvent() { QGraphicsScene scene; @@ -1331,6 +1336,7 @@ void tst_QGraphicsProxyWidget::wheelEvent() QVERIFY(event.isAccepted()); QVERIFY(wheelWidget->wheelEventCalled); } +#endif // !QT_NO_WHEELEVENT Q_DECLARE_METATYPE(Qt::SizeHint) void tst_QGraphicsProxyWidget::sizeHint_data() -- cgit v1.2.3