From 5ede5706a8b8052280981aa1d9c42999a24b74b5 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 30 May 2017 22:22:22 +0200 Subject: Convert features.wheelevent to QT_CONFIG Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen --- src/gui/kernel/qevent.cpp | 8 ++++---- src/gui/kernel/qevent.h | 2 +- src/gui/kernel/qguiapplication.cpp | 4 ++-- src/gui/kernel/qwindow.cpp | 6 +++--- src/gui/kernel/qwindow.h | 4 ++-- src/plugins/platforms/cocoa/qnsview.mm | 6 +++--- src/widgets/graphicsview/qgraphicsproxywidget.cpp | 2 +- src/widgets/graphicsview/qgraphicsproxywidget.h | 2 +- src/widgets/graphicsview/qgraphicsview.cpp | 4 ++-- src/widgets/graphicsview/qgraphicsview.h | 2 +- src/widgets/itemviews/qlistview.cpp | 4 ++-- src/widgets/itemviews/qlistview.h | 2 +- src/widgets/kernel/qapplication.cpp | 8 ++++---- src/widgets/kernel/qapplication.h | 4 ++-- src/widgets/kernel/qapplication_p.h | 2 +- src/widgets/kernel/qwidget.cpp | 8 ++++---- src/widgets/kernel/qwidget.h | 2 +- src/widgets/kernel/qwidgetwindow.cpp | 6 +++--- src/widgets/kernel/qwidgetwindow_p.h | 2 +- src/widgets/statemachine/qguistatemachine.cpp | 4 ++-- src/widgets/util/qsystemtrayicon_x11.cpp | 2 +- src/widgets/widgets/qabstractbutton.cpp | 2 +- src/widgets/widgets/qabstractscrollarea.cpp | 4 ++-- src/widgets/widgets/qabstractscrollarea.h | 2 +- src/widgets/widgets/qabstractslider.cpp | 4 ++-- src/widgets/widgets/qabstractslider.h | 2 +- src/widgets/widgets/qabstractspinbox.cpp | 2 +- src/widgets/widgets/qabstractspinbox.h | 2 +- src/widgets/widgets/qcalendarwidget.cpp | 4 ++-- src/widgets/widgets/qcombobox.cpp | 2 +- src/widgets/widgets/qcombobox.h | 2 +- src/widgets/widgets/qdatetimeedit.cpp | 2 +- src/widgets/widgets/qdatetimeedit.h | 2 +- src/widgets/widgets/qmenu.cpp | 2 +- src/widgets/widgets/qmenu.h | 2 +- src/widgets/widgets/qplaintextedit.cpp | 2 +- src/widgets/widgets/qplaintextedit.h | 2 +- src/widgets/widgets/qscrollbar.cpp | 2 +- src/widgets/widgets/qscrollbar.h | 2 +- src/widgets/widgets/qtabbar.cpp | 4 ++-- src/widgets/widgets/qtabbar.h | 2 +- src/widgets/widgets/qtextedit.cpp | 2 +- src/widgets/widgets/qtextedit.h | 2 +- 43 files changed, 68 insertions(+), 68 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 2777e408c1..12ac7323a6 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -767,7 +767,7 @@ QHoverEvent::~QHoverEvent() \sa pos(), pixelDelta(), angleDelta() */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) QWheelEvent::QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient) @@ -952,7 +952,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, invertedScrolling(inverted) {} -#endif // QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! \fn QPoint QWheelEvent::pixelDelta() const @@ -3956,13 +3956,13 @@ QDebug operator<<(QDebug dbg, const QEvent *e) dbg << ')'; } break; -# ifndef QT_NO_WHEELEVENT +# if QT_CONFIG(wheelevent) case QEvent::Wheel: { const QWheelEvent *we = static_cast(e); dbg << "QWheelEvent(" << "pixelDelta=" << we->pixelDelta() << ", angleDelta=" << we->angleDelta() << ')'; } break; -# endif // !QT_NO_WHEELEVENT +# endif // QT_CONFIG(wheelevent) case QEvent::KeyPress: case QEvent::KeyRelease: case QEvent::ShortcutOverride: diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index cfc3b842d7..95de600012 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -169,7 +169,7 @@ protected: QPointF p, op; }; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) class Q_GUI_EXPORT QWheelEvent : public QInputEvent { public: diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index c0b0acbda6..8cbf0a457d 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1997,7 +1997,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e) { -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) QWindow *window = e->window.data(); QPointF globalPoint = e->globalPos; QPointF localPoint = e->localPos; @@ -2027,7 +2027,7 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh QGuiApplication::sendSpontaneousEvent(window, &ev); #else Q_UNUSED(e); -#endif /* ifndef QT_NO_WHEELEVENT */ +#endif // QT_CONFIG(wheelevent) } // Remember, Qt convention is: keyboard state is state *before* diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 519d749b8a..8048a397e8 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2220,7 +2220,7 @@ bool QWindow::event(QEvent *ev) #endif break; } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: wheelEvent(static_cast(ev)); break; @@ -2418,7 +2418,7 @@ void QWindow::mouseMoveEvent(QMouseEvent *ev) ev->ignore(); } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) /*! Override this to handle mouse wheel or other wheel events (\a ev). */ @@ -2426,7 +2426,7 @@ void QWindow::wheelEvent(QWheelEvent *ev) { ev->ignore(); } -#endif //QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! Override this to handle touch events (\a ev). diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 2883749d2e..748c3ee707 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -71,7 +71,7 @@ class QShowEvent; class QHideEvent; class QKeyEvent; class QMouseEvent; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) class QWheelEvent; #endif class QTouchEvent; @@ -344,7 +344,7 @@ protected: virtual void mouseReleaseEvent(QMouseEvent *); virtual void mouseDoubleClickEvent(QMouseEvent *); virtual void mouseMoveEvent(QMouseEvent *); -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) virtual void wheelEvent(QWheelEvent *); #endif virtual void touchEvent(QTouchEvent *); diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 2c9157c4ec..e6d513bb89 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include +#include #include "qnsview.h" #include "qcocoawindow.h" @@ -1388,7 +1388,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) } #endif // QT_NO_GESTURES -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) - (void)scrollWheel:(NSEvent *)theEvent { if (!m_platformWindow) @@ -1469,7 +1469,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source, isInverted); } -#endif //QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) - (int) convertKeyCode : (QChar)keyChar { diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index 0b9e6e7216..eface182ae 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -1273,7 +1273,7 @@ void QGraphicsProxyWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event /*! \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QGraphicsProxyWidget::wheelEvent(QGraphicsSceneWheelEvent *event) { Q_D(QGraphicsProxyWidget); diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.h b/src/widgets/graphicsview/qgraphicsproxywidget.h index 8112c65d63..c1564cba34 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.h +++ b/src/widgets/graphicsview/qgraphicsproxywidget.h @@ -103,7 +103,7 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QGraphicsSceneWheelEvent *event) Q_DECL_OVERRIDE; #endif diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 9d7412340f..f5f24649c2 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -3409,7 +3409,7 @@ void QGraphicsView::mouseReleaseEvent(QMouseEvent *event) #endif } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) /*! \reimp */ @@ -3437,7 +3437,7 @@ void QGraphicsView::wheelEvent(QWheelEvent *event) if (!event->isAccepted()) QAbstractScrollArea::wheelEvent(event); } -#endif // QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! \reimp diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h index 64d5f5b430..fb975b9d71 100644 --- a/src/widgets/graphicsview/qgraphicsview.h +++ b/src/widgets/graphicsview/qgraphicsview.h @@ -259,7 +259,7 @@ protected: void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; #endif void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index e7a3c11b44..93b2b0b5e0 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -801,7 +801,7 @@ void QListView::mouseReleaseEvent(QMouseEvent *e) } } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) /*! \reimp */ @@ -828,7 +828,7 @@ void QListView::wheelEvent(QWheelEvent *e) QApplication::sendEvent(d->hbar, e); } } -#endif // QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) /*! \reimp diff --git a/src/widgets/itemviews/qlistview.h b/src/widgets/itemviews/qlistview.h index e918e66d38..6b164aeec8 100644 --- a/src/widgets/itemviews/qlistview.h +++ b/src/widgets/itemviews/qlistview.h @@ -153,7 +153,7 @@ protected: void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE; #endif diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 4ab43628b9..6ef9c1da51 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -407,7 +407,7 @@ QWidget *QApplicationPrivate::main_widget = 0; // main application widget QWidget *QApplicationPrivate::focus_widget = 0; // has keyboard input focus QWidget *QApplicationPrivate::hidden_focus_widget = 0; // will get keyboard input focus after show() QWidget *QApplicationPrivate::active_window = 0; // toplevel with keyboard focus -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) QPointer QApplicationPrivate::wheel_widget; #endif bool qt_in_tab_key_event = false; @@ -2984,7 +2984,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) case QEvent::KeyPress: case QEvent::KeyRelease: case QEvent::MouseMove: -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: #endif case QEvent::TouchBegin: @@ -3227,7 +3227,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) d->hoverGlobalPos = mouse->globalPos(); } break; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: { QWidget* w = static_cast(receiver); @@ -4041,7 +4041,7 @@ int QApplication::keyboardInputInterval() \sa QStyleHints::wheelScrollLines() */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) int QApplication::wheelScrollLines() { return styleHints()->wheelScrollLines(); diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h index be5ec2ad05..396d0c9474 100644 --- a/src/widgets/kernel/qapplication.h +++ b/src/widgets/kernel/qapplication.h @@ -76,7 +76,7 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication Q_PROPERTY(int cursorFlashTime READ cursorFlashTime WRITE setCursorFlashTime) Q_PROPERTY(int doubleClickInterval READ doubleClickInterval WRITE setDoubleClickInterval) Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval WRITE setKeyboardInputInterval) -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) Q_PROPERTY(int wheelScrollLines READ wheelScrollLines WRITE setWheelScrollLines) #endif Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut) @@ -154,7 +154,7 @@ public: static void setKeyboardInputInterval(int); static int keyboardInputInterval(); -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) static void setWheelScrollLines(int); static int wheelScrollLines(); #endif diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 271844a23e..1a189cb2b9 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -195,7 +195,7 @@ public: static QWidget *focus_widget; static QWidget *hidden_focus_widget; static QWidget *active_window; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) static int wheel_scroll_lines; static QPointer wheel_widget; #endif diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index f467bcfff5..b710d13e67 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -8777,7 +8777,7 @@ bool QWidget::event(QEvent *event) case QEvent::ContextMenu: case QEvent::KeyPress: case QEvent::KeyRelease: -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: #endif return false; @@ -8801,7 +8801,7 @@ bool QWidget::event(QEvent *event) case QEvent::MouseButtonDblClick: mouseDoubleClickEvent((QMouseEvent*)event); break; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: wheelEvent((QWheelEvent*)event); break; @@ -9418,7 +9418,7 @@ void QWidget::mouseDoubleClickEvent(QMouseEvent *event) mousePressEvent(event); } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) /*! This event handler, for event \a event, can be reimplemented in a subclass to receive wheel events for the widget. @@ -9437,7 +9437,7 @@ void QWidget::wheelEvent(QWheelEvent *event) { event->ignore(); } -#endif // QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) #ifndef QT_NO_TABLETEVENT /*! diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 1c378924a0..ef456ef1da 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -613,7 +613,7 @@ protected: virtual void mouseReleaseEvent(QMouseEvent *event); virtual void mouseDoubleClickEvent(QMouseEvent *event); virtual void mouseMoveEvent(QMouseEvent *event); -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) virtual void wheelEvent(QWheelEvent *event); #endif virtual void keyPressEvent(QKeyEvent *event); diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 6741555c0c..f9f67cb449 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -265,7 +265,7 @@ bool QWidgetWindow::event(QEvent *event) handleResizeEvent(static_cast(event)); return true; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: handleWheelEvent(static_cast(event)); return true; @@ -778,7 +778,7 @@ void QWidgetWindow::handleCloseEvent(QCloseEvent *event) event->setAccepted(is_closing); } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QWidgetWindow::handleWheelEvent(QWheelEvent *event) { @@ -808,7 +808,7 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event) QGuiApplication::sendSpontaneousEvent(widget, &translated); } -#endif // QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) #ifndef QT_NO_DRAGANDDROP diff --git a/src/widgets/kernel/qwidgetwindow_p.h b/src/widgets/kernel/qwidgetwindow_p.h index a81355160e..944f845e3c 100644 --- a/src/widgets/kernel/qwidgetwindow_p.h +++ b/src/widgets/kernel/qwidgetwindow_p.h @@ -89,7 +89,7 @@ protected: void handleTouchEvent(QTouchEvent *); void handleMoveEvent(QMoveEvent *); void handleResizeEvent(QResizeEvent *); -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void handleWheelEvent(QWheelEvent *); #endif #ifndef QT_NO_DRAGANDDROP diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp index 8d722a4475..a0ae614a03 100644 --- a/src/widgets/statemachine/qguistatemachine.cpp +++ b/src/widgets/statemachine/qguistatemachine.cpp @@ -100,10 +100,10 @@ static QEvent *cloneEvent(QEvent *e) return new QEvent(*e); case QEvent::HideToParent: return new QEvent(*e); -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: return new QWheelEvent(*static_cast(e)); -#endif //QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) case QEvent::WindowTitleChange: return new QEvent(*e); case QEvent::WindowIconChange: diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp index cbd5d9eb80..fd9fdfb507 100644 --- a/src/widgets/util/qsystemtrayicon_x11.cpp +++ b/src/widgets/util/qsystemtrayicon_x11.cpp @@ -210,7 +210,7 @@ bool QSystemTrayIconSys::event(QEvent *e) case QEvent::ToolTip: QApplication::sendEvent(q, e); break; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: return QApplication::sendEvent(q, e); #endif diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index 77fb203b82..e65613d5cd 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -935,7 +935,7 @@ bool QAbstractButton::event(QEvent *e) case QEvent::HoverEnter: case QEvent::HoverLeave: case QEvent::ContextMenu: -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: #endif return true; diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp index abdd946c49..673983d575 100644 --- a/src/widgets/widgets/qabstractscrollarea.cpp +++ b/src/widgets/widgets/qabstractscrollarea.cpp @@ -1188,7 +1188,7 @@ bool QAbstractScrollArea::viewportEvent(QEvent *e) case QEvent::TouchEnd: case QEvent::MouseMove: case QEvent::ContextMenu: -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) case QEvent::Wheel: #endif #ifndef QT_NO_DRAGANDDROP @@ -1305,7 +1305,7 @@ void QAbstractScrollArea::mouseMoveEvent(QMouseEvent *e) \sa QWidget::wheelEvent() */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QAbstractScrollArea::wheelEvent(QWheelEvent *e) { Q_D(QAbstractScrollArea); diff --git a/src/widgets/widgets/qabstractscrollarea.h b/src/widgets/widgets/qabstractscrollarea.h index 476914b781..193fabce56 100644 --- a/src/widgets/widgets/qabstractscrollarea.h +++ b/src/widgets/widgets/qabstractscrollarea.h @@ -116,7 +116,7 @@ protected: void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; void mouseDoubleClickEvent(QMouseEvent *) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; #endif #ifndef QT_NO_CONTEXTMENU diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp index 0ea9250695..99ee1eccb7 100644 --- a/src/widgets/widgets/qabstractslider.cpp +++ b/src/widgets/widgets/qabstractslider.cpp @@ -710,7 +710,7 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb // offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can // only scroll whole lines, so we keep the reminder until next event. qreal stepsToScrollF = -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) QApplication::wheelScrollLines() * #endif offset * effectiveSingleStep(); @@ -759,7 +759,7 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb /*! \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QAbstractSlider::wheelEvent(QWheelEvent * e) { Q_D(QAbstractSlider); diff --git a/src/widgets/widgets/qabstractslider.h b/src/widgets/widgets/qabstractslider.h index 8979685724..d26d6a879c 100644 --- a/src/widgets/widgets/qabstractslider.h +++ b/src/widgets/widgets/qabstractslider.h @@ -146,7 +146,7 @@ protected: void keyPressEvent(QKeyEvent *ev) Q_DECL_OVERRIDE; void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE; #endif void changeEvent(QEvent *e) Q_DECL_OVERRIDE; diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp index 501d9560d9..4a3abe0c32 100644 --- a/src/widgets/widgets/qabstractspinbox.cpp +++ b/src/widgets/widgets/qabstractspinbox.cpp @@ -1119,7 +1119,7 @@ void QAbstractSpinBox::keyReleaseEvent(QKeyEvent *event) \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QAbstractSpinBox::wheelEvent(QWheelEvent *event) { Q_D(QAbstractSpinBox); diff --git a/src/widgets/widgets/qabstractspinbox.h b/src/widgets/widgets/qabstractspinbox.h index b60178b94c..d81cbfdc34 100644 --- a/src/widgets/widgets/qabstractspinbox.h +++ b/src/widgets/widgets/qabstractspinbox.h @@ -137,7 +137,7 @@ protected: void resizeEvent(QResizeEvent *event) override; void keyPressEvent(QKeyEvent *event) override; void keyReleaseEvent(QKeyEvent *event) override; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *event) override; #endif void focusInEvent(QFocusEvent *event) override; diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index f81377a85c..c5db3a7c9a 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -957,7 +957,7 @@ protected: void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; #endif void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; @@ -1412,7 +1412,7 @@ void QCalendarView::keyPressEvent(QKeyEvent *event) QTableView::keyPressEvent(event); } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QCalendarView::wheelEvent(QWheelEvent *event) { const int numDegrees = event->delta() / 8; diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 45dfffe8bd..5520e9d28f 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -3285,7 +3285,7 @@ void QComboBox::keyReleaseEvent(QKeyEvent *e) /*! \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QComboBox::wheelEvent(QWheelEvent *e) { #ifdef Q_OS_DARWIN diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h index 2da1ceb047..8f99594a76 100644 --- a/src/widgets/widgets/qcombobox.h +++ b/src/widgets/widgets/qcombobox.h @@ -234,7 +234,7 @@ protected: void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE; void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE; #endif #ifndef QT_NO_CONTEXTMENU diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp index 2e0a8a3cd7..e136363b17 100644 --- a/src/widgets/widgets/qdatetimeedit.cpp +++ b/src/widgets/widgets/qdatetimeedit.cpp @@ -1194,7 +1194,7 @@ void QDateTimeEdit::keyPressEvent(QKeyEvent *event) \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QDateTimeEdit::wheelEvent(QWheelEvent *event) { QAbstractSpinBox::wheelEvent(event); diff --git a/src/widgets/widgets/qdatetimeedit.h b/src/widgets/widgets/qdatetimeedit.h index b54b0e7cf0..30e4a58bb3 100644 --- a/src/widgets/widgets/qdatetimeedit.h +++ b/src/widgets/widgets/qdatetimeedit.h @@ -177,7 +177,7 @@ public Q_SLOTS: protected: void keyPressEvent(QKeyEvent *event) override; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *event) override; #endif void focusInEvent(QFocusEvent *event) override; diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 5732131578..95bb976566 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2797,7 +2797,7 @@ void QMenu::paintEvent(QPaintEvent *e) style()->drawControl(QStyle::CE_MenuEmptyArea, &menuOpt, &p, this); } -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) /*! \reimp */ diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index e9a5db1112..9d1a17a5b3 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -237,7 +237,7 @@ protected: void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; #endif void enterEvent(QEvent *) Q_DECL_OVERRIDE; diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index 746dc20122..173be7aa88 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -2296,7 +2296,7 @@ void QPlainTextEdit::changeEvent(QEvent *e) /*! \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QPlainTextEdit::wheelEvent(QWheelEvent *e) { Q_D(QPlainTextEdit); diff --git a/src/widgets/widgets/qplaintextedit.h b/src/widgets/widgets/qplaintextedit.h index 432ec85a57..d773c4791c 100644 --- a/src/widgets/widgets/qplaintextedit.h +++ b/src/widgets/widgets/qplaintextedit.h @@ -250,7 +250,7 @@ protected: virtual void focusOutEvent(QFocusEvent *e) Q_DECL_OVERRIDE; virtual void showEvent(QShowEvent *) Q_DECL_OVERRIDE; virtual void changeEvent(QEvent *e) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) virtual void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE; #endif diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp index 66f1a4c689..a98f3fe085 100644 --- a/src/widgets/widgets/qscrollbar.cpp +++ b/src/widgets/widgets/qscrollbar.cpp @@ -493,7 +493,7 @@ bool QScrollBar::event(QEvent *event) /*! \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QScrollBar::wheelEvent(QWheelEvent *event) { event->ignore(); diff --git a/src/widgets/widgets/qscrollbar.h b/src/widgets/widgets/qscrollbar.h index b99ad219eb..963ae4263b 100644 --- a/src/widgets/widgets/qscrollbar.h +++ b/src/widgets/widgets/qscrollbar.h @@ -64,7 +64,7 @@ public: bool event(QEvent *event) Q_DECL_OVERRIDE; protected: -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; #endif void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 4cd9522bfb..b9020253a5 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -2181,7 +2181,7 @@ void QTabBar::keyPressEvent(QKeyEvent *event) /*!\reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QTabBar::wheelEvent(QWheelEvent *event) { #ifndef Q_OS_MAC @@ -2193,7 +2193,7 @@ void QTabBar::wheelEvent(QWheelEvent *event) Q_UNUSED(event) #endif } -#endif //QT_NO_WHEELEVENT +#endif // QT_CONFIG(wheelevent) void QTabBarPrivate::setCurrentNextEnabledIndex(int offset) { diff --git a/src/widgets/widgets/qtabbar.h b/src/widgets/widgets/qtabbar.h index 71ca58c993..c7d9f95d93 100644 --- a/src/widgets/widgets/qtabbar.h +++ b/src/widgets/widgets/qtabbar.h @@ -203,7 +203,7 @@ protected: void mousePressEvent (QMouseEvent *) Q_DECL_OVERRIDE; void mouseMoveEvent (QMouseEvent *) Q_DECL_OVERRIDE; void mouseReleaseEvent (QMouseEvent *) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; #endif void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp index 1abc9bef8e..6973cec429 100644 --- a/src/widgets/widgets/qtextedit.cpp +++ b/src/widgets/widgets/qtextedit.cpp @@ -1831,7 +1831,7 @@ void QTextEdit::changeEvent(QEvent *e) /*! \reimp */ -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) void QTextEdit::wheelEvent(QWheelEvent *e) { Q_D(QTextEdit); diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h index b0e19193a9..745b644511 100644 --- a/src/widgets/widgets/qtextedit.h +++ b/src/widgets/widgets/qtextedit.h @@ -288,7 +288,7 @@ protected: virtual void focusOutEvent(QFocusEvent *e) Q_DECL_OVERRIDE; virtual void showEvent(QShowEvent *) Q_DECL_OVERRIDE; virtual void changeEvent(QEvent *e) Q_DECL_OVERRIDE; -#ifndef QT_NO_WHEELEVENT +#if QT_CONFIG(wheelevent) virtual void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE; #endif -- cgit v1.2.3