Fix build with QT_NO_WHEELEVENT.
authorSérgio Martins <sergio.martins@kdab.com>
Thu, 6 Sep 2012 11:06:04 +0000 (12:06 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 10 Sep 2012 12:09:45 +0000 (14:09 +0200)
Change-Id: I80c64183677a5f518e2c637f4c1ff4004e3010c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/widgets/kernel/qwidgetwindow.cpp
src/widgets/kernel/qwidgetwindow_qpa_p.h

index 81a341c..855c350 100644 (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)
index f9cd539..798d78e 100644 (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 *);