diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-02-27 10:22:36 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-03-03 13:30:39 +0000 |
commit | 877032bfdf0376cb5e438b3abe3fe5f45ce982c0 (patch) | |
tree | 1399f8841235294384c1cd04056f2307e0b5f01d /tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | |
parent | 34a58b0eb7c0c40be87e62251bc714d63293d51a (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/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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() |