diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-04-20 10:30:24 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-04-27 11:08:45 +0000 |
commit | 9b478e9179522315ea53fe10ec1278a1f77753f8 (patch) | |
tree | 2beb18c8d2493b636842db4e4093bd0d8da1bcf4 /src/input/frontend | |
parent | 7a79da942468621c58251f6daca1a00ca99d970a (diff) |
Fix build for -no-feature-wheelevent
Change-Id: I72591f43c0e2c4cc6e3e589f8d8e52fbb1041666
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/input/frontend')
-rw-r--r-- | src/input/frontend/qmouseevent.cpp | 2 | ||||
-rw-r--r-- | src/input/frontend/qmouseevent.h | 5 | ||||
-rw-r--r-- | src/input/frontend/qmousehandler.cpp | 2 | ||||
-rw-r--r-- | src/input/frontend/qmousehandler.h | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/src/input/frontend/qmouseevent.cpp b/src/input/frontend/qmouseevent.cpp index b1574f623..62f7a097e 100644 --- a/src/input/frontend/qmouseevent.cpp +++ b/src/input/frontend/qmouseevent.cpp @@ -455,6 +455,7 @@ QMouseEvent::Modifiers QMouseEvent::modifiers() const * Returns the QEvent::Type of the event. */ +#if QT_CONFIG(wheelevent) /*! * Constructs a new QWheelEvent instance from the QWheelEvent \a e. */ @@ -497,6 +498,7 @@ QWheelEvent::Modifiers QWheelEvent::modifiers() const return QWheelEvent::NoModifier; } } +#endif // QT_CONFIG(wheelevent) } // namespace Qt3DInput diff --git a/src/input/frontend/qmouseevent.h b/src/input/frontend/qmouseevent.h index de11c84a2..63786ac28 100644 --- a/src/input/frontend/qmouseevent.h +++ b/src/input/frontend/qmouseevent.h @@ -106,6 +106,7 @@ private: typedef QSharedPointer<QMouseEvent> QMouseEventPtr; +#if QT_CONFIG(wheelevent) class QT3DINPUTSHARED_EXPORT QWheelEvent : public QObject { Q_OBJECT @@ -154,12 +155,16 @@ private: }; typedef QSharedPointer<QWheelEvent> QWheelEventPtr; +#endif } // namespace Qt3DInput QT_END_NAMESPACE Q_DECLARE_METATYPE(Qt3DInput::QMouseEvent*) // LCOV_EXCL_LINE + +#if QT_CONFIG(wheelevent) Q_DECLARE_METATYPE(Qt3DInput::QWheelEvent*) // LCOV_EXCL_LINE +#endif #endif // QT3DINPUT_QMOUSEEVENT_H diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp index fef56810c..419052d8a 100644 --- a/src/input/frontend/qmousehandler.cpp +++ b/src/input/frontend/qmousehandler.cpp @@ -313,9 +313,11 @@ void QMouseHandler::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) if (e->propertyName() == QByteArrayLiteral("mouse")) { QMouseEventPtr ev = e->value().value<QMouseEventPtr>(); d->mouseEvent(ev); +#if QT_CONFIG(wheelevent) } else if (e->propertyName() == QByteArrayLiteral("wheel")) { QWheelEventPtr ev = e->value().value<QWheelEventPtr>(); emit wheel(ev.data()); +#endif } } } diff --git a/src/input/frontend/qmousehandler.h b/src/input/frontend/qmousehandler.h index 750ed394d..ef4267c5c 100644 --- a/src/input/frontend/qmousehandler.h +++ b/src/input/frontend/qmousehandler.h @@ -82,7 +82,9 @@ Q_SIGNALS: void pressAndHold(Qt3DInput::QMouseEvent *mouse); void positionChanged(Qt3DInput::QMouseEvent *mouse); +#if QT_CONFIG(wheelevent) void wheel(Qt3DInput::QWheelEvent *wheel); +#endif protected: void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE; |