diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2012-09-06 12:06:04 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-10 14:09:45 +0200 |
commit | ed6ee1b2eea1e0c07bea3c18cee74ffbdc231465 (patch) | |
tree | efd5be8ba5e1ba07f2a95190eb4f0ec7e55ec985 /src/widgets | |
parent | 6753865709cdcba869daf07eba2dc873fe72838d (diff) |
Fix build with QT_NO_WHEELEVENT.
Change-Id: I80c64183677a5f518e2c637f4c1ff4004e3010c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow_qpa_p.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 81a341c78c..855c35032f 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<QResizeEvent *>(event)); return true; +#ifndef QT_NO_WHEELEVENT case QEvent::Wheel: handleWheelEvent(static_cast<QWheelEvent *>(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 f9cd539dbc..798d78e3bd 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 *); |