Fix build with QT_NO_WHEELEVENT.

Change-Id: I80c64183677a5f518e2c637f4c1ff4004e3010c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Sérgio Martins 2012-09-06 12:06:04 +01:00 committed by Qt by Nokia
parent 6753865709
commit ed6ee1b2ee
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -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 *);