summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp6
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa_p.h2
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 *);