diff options
Diffstat (limited to 'src/input/backend/mouseeventdispatcherjob.cpp')
-rw-r--r-- | src/input/backend/mouseeventdispatcherjob.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/input/backend/mouseeventdispatcherjob.cpp b/src/input/backend/mouseeventdispatcherjob.cpp index 77eb69712..11653d8a8 100644 --- a/src/input/backend/mouseeventdispatcherjob.cpp +++ b/src/input/backend/mouseeventdispatcherjob.cpp @@ -50,13 +50,18 @@ namespace Qt3DInput { namespace Input { MouseEventDispatcherJob::MouseEventDispatcherJob(Qt3DCore::QNodeId input, - const QList<QT_PREPEND_NAMESPACE (QMouseEvent)> &mouseEvents, - const QList<QT_PREPEND_NAMESPACE (QWheelEvent)> &wheelEvents) + const QList<QT_PREPEND_NAMESPACE (QMouseEvent)> &mouseEvents +#if QT_CONFIG(wheelevent) + , const QList<QT_PREPEND_NAMESPACE (QWheelEvent)> &wheelEvents +#endif + ) : QAspectJob() , m_inputHandler(nullptr) , m_mouseInput(input) , m_mouseEvents(mouseEvents) +#if QT_CONFIG(wheelevent) , m_wheelEvents(wheelEvents) +#endif { SET_JOB_RUN_STAT_TYPE(this, JobTypes::MouseEventDispatcher, 0); } @@ -73,8 +78,10 @@ void MouseEventDispatcherJob::run() // Send mouse and wheel events to frontend for (const QT_PREPEND_NAMESPACE(QMouseEvent) &e : m_mouseEvents) input->mouseEvent(QMouseEventPtr(new QMouseEvent(e))); +#if QT_CONFIG(wheelevent) for (const QT_PREPEND_NAMESPACE(QWheelEvent) &e : m_wheelEvents) input->wheelEvent(QWheelEventPtr(new QWheelEvent(e))); +#endif } } |