From ed6ee1b2eea1e0c07bea3c18cee74ffbdc231465 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9rgio=20Martins?= Date: Thu, 6 Sep 2012 12:06:04 +0100 Subject: [PATCH] Fix build with QT_NO_WHEELEVENT. Change-Id: I80c64183677a5f518e2c637f4c1ff4004e3010c0 Reviewed-by: Thiago Macieira --- src/widgets/kernel/qwidgetwindow.cpp | 6 ++++++ src/widgets/kernel/qwidgetwindow_qpa_p.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 81a341c..855c350 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -159,9 +159,11 @@ bool QWidgetWindow::event(QEvent *event) handleResizeEvent(static_cast(event)); return true; +#ifndef QT_NO_WHEELEVENT case QEvent::Wheel: handleWheelEvent(static_cast(event)); return true; +#endif #ifndef QT_NO_DRAGANDDROP case QEvent::DragEnter: @@ -411,6 +413,8 @@ void QWidgetWindow::handleCloseEvent(QCloseEvent *) m_widget->d_func()->close_helper(QWidgetPrivate::CloseWithSpontaneousEvent); } +#ifndef QT_NO_WHEELEVENT + void QWidgetWindow::handleWheelEvent(QWheelEvent *event) { if (QApplicationPrivate::instance()->modalState() && !qt_try_modal(m_widget, event->type())) @@ -428,6 +432,8 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event) QGuiApplication::sendSpontaneousEvent(widget, &translated); } +#endif // QT_NO_WHEELEVENT + #ifndef QT_NO_DRAGANDDROP void QWidgetWindow::handleDragEnterMoveEvent(QDragMoveEvent *event) diff --git a/src/widgets/kernel/qwidgetwindow_qpa_p.h b/src/widgets/kernel/qwidgetwindow_qpa_p.h index f9cd539..798d78e 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa_p.h +++ b/src/widgets/kernel/qwidgetwindow_qpa_p.h @@ -78,7 +78,9 @@ protected: void handleTouchEvent(QTouchEvent *); void handleMoveEvent(QMoveEvent *); void handleResizeEvent(QResizeEvent *); +#ifndef QT_NO_WHEELEVENT void handleWheelEvent(QWheelEvent *); +#endif #ifndef QT_NO_DRAGANDDROP void handleDragEnterMoveEvent(QDragMoveEvent *); void handleDragLeaveEvent(QDragLeaveEvent *); -- 2.7.4