summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp2
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.h2
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp2
-rw-r--r--examples/widgets/graphicsview/chip/view.h2
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.cpp2
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.h2
-rw-r--r--examples/widgets/painting/affine/xform.cpp2
-rw-r--r--examples/widgets/painting/affine/xform.h2
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.cpp2
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.h2
-rw-r--r--src/gui/kernel/qevent.cpp8
-rw-r--r--src/gui/kernel/qevent.h2
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
-rw-r--r--src/gui/kernel/qwindow.cpp6
-rw-r--r--src/gui/kernel/qwindow.h4
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm6
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.h2
-rw-r--r--src/widgets/itemviews/qlistview.cpp4
-rw-r--r--src/widgets/itemviews/qlistview.h2
-rw-r--r--src/widgets/kernel/qapplication.cpp8
-rw-r--r--src/widgets/kernel/qapplication.h4
-rw-r--r--src/widgets/kernel/qapplication_p.h2
-rw-r--r--src/widgets/kernel/qwidget.cpp8
-rw-r--r--src/widgets/kernel/qwidget.h2
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp6
-rw-r--r--src/widgets/kernel/qwidgetwindow_p.h2
-rw-r--r--src/widgets/statemachine/qguistatemachine.cpp4
-rw-r--r--src/widgets/util/qsystemtrayicon_x11.cpp2
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp2
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp4
-rw-r--r--src/widgets/widgets/qabstractscrollarea.h2
-rw-r--r--src/widgets/widgets/qabstractslider.cpp4
-rw-r--r--src/widgets/widgets/qabstractslider.h2
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp2
-rw-r--r--src/widgets/widgets/qabstractspinbox.h2
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp4
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.h2
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp2
-rw-r--r--src/widgets/widgets/qdatetimeedit.h2
-rw-r--r--src/widgets/widgets/qmenu.cpp2
-rw-r--r--src/widgets/widgets/qmenu.h2
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp2
-rw-r--r--src/widgets/widgets/qplaintextedit.h2
-rw-r--r--src/widgets/widgets/qscrollbar.cpp2
-rw-r--r--src/widgets/widgets/qscrollbar.h2
-rw-r--r--src/widgets/widgets/qtabbar.cpp4
-rw-r--r--src/widgets/widgets/qtabbar.h2
-rw-r--r--src/widgets/widgets/qtextedit.cpp2
-rw-r--r--src/widgets/widgets/qtextedit.h2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp10
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp6
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp10
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp6
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp6
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp8
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp6
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp4
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp4
63 files changed, 110 insertions, 110 deletions
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp b/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp
index 8b11c20972..fd0060d8a9 100644
--- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp
@@ -171,7 +171,7 @@ void MandelbrotWidget::keyPressEvent(QKeyEvent *event)
}
//! [11]
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
//! [12]
void MandelbrotWidget::wheelEvent(QWheelEvent *event)
{
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
index cbacc2cdd0..a04bfa6e81 100644
--- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
@@ -68,7 +68,7 @@ protected:
void paintEvent(QPaintEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent *event) override;
#endif
void mousePressEvent(QMouseEvent *event) override;
diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp
index 79b173bec7..491f1a54cf 100644
--- a/examples/widgets/graphicsview/chip/view.cpp
+++ b/examples/widgets/graphicsview/chip/view.cpp
@@ -64,7 +64,7 @@
#endif
#include <qmath.h>
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void GraphicsView::wheelEvent(QWheelEvent *e)
{
if (e->modifiers() & Qt::ControlModifier) {
diff --git a/examples/widgets/graphicsview/chip/view.h b/examples/widgets/graphicsview/chip/view.h
index 2d174250c2..89b2e813f1 100644
--- a/examples/widgets/graphicsview/chip/view.h
+++ b/examples/widgets/graphicsview/chip/view.h
@@ -69,7 +69,7 @@ public:
GraphicsView(View *v) : QGraphicsView(), view(v) { }
protected:
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent *) override;
#endif
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
index 8b2f0a0629..844c8f8aac 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
@@ -184,7 +184,7 @@ void GraphWidget::timerEvent(QTimerEvent *event)
}
//! [4]
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
//! [5]
void GraphWidget::wheelEvent(QWheelEvent *event)
{
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.h b/examples/widgets/graphicsview/elasticnodes/graphwidget.h
index 79acb89985..5ed6aed452 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.h
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.h
@@ -73,7 +73,7 @@ public slots:
protected:
void keyPressEvent(QKeyEvent *event) override;
void timerEvent(QTimerEvent *event) override;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent *event) override;
#endif
void drawBackground(QPainter *painter, const QRectF &rect) override;
diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp
index e48c101262..e47bc9d251 100644
--- a/examples/widgets/painting/affine/xform.cpp
+++ b/examples/widgets/painting/affine/xform.cpp
@@ -260,7 +260,7 @@ void XFormView::timerEvent(QTimerEvent *e)
}
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void XFormView::wheelEvent(QWheelEvent *e)
{
m_scale += e->delta() / qreal(600);
diff --git a/examples/widgets/painting/affine/xform.h b/examples/widgets/painting/affine/xform.h
index f2eed99b4f..1dce3b26da 100644
--- a/examples/widgets/painting/affine/xform.h
+++ b/examples/widgets/painting/affine/xform.h
@@ -125,7 +125,7 @@ signals:
protected:
void timerEvent(QTimerEvent *e) override;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent *) override;
#endif
diff --git a/examples/widgets/widgets/mousebuttons/buttontester.cpp b/examples/widgets/widgets/mousebuttons/buttontester.cpp
index 3faf6e3553..6653221698 100644
--- a/examples/widgets/widgets/mousebuttons/buttontester.cpp
+++ b/examples/widgets/widgets/mousebuttons/buttontester.cpp
@@ -89,7 +89,7 @@ void ButtonTester::mouseDoubleClickEvent(QMouseEvent *e)
this->setText(result);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void ButtonTester::wheelEvent (QWheelEvent *e)
{
QString result;
diff --git a/examples/widgets/widgets/mousebuttons/buttontester.h b/examples/widgets/widgets/mousebuttons/buttontester.h
index cd05171d86..d99dcceb18 100644
--- a/examples/widgets/widgets/mousebuttons/buttontester.h
+++ b/examples/widgets/widgets/mousebuttons/buttontester.h
@@ -64,7 +64,7 @@ protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent * event) override;
#endif
int buttonByNumber(const Qt::MouseButton button);
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<const QWheelEvent *>(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<QWheelEvent*>(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 <QtCore/qglobal.h>
+#include <QtGui/qtguiglobal.h>
#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<QWidget> 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<QWidget *>(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<QWidget> 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<QResizeEvent *>(event));
return true;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
handleWheelEvent(static_cast<QWheelEvent *>(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<QWheelEvent*>(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
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 65c9938f89..e49cd87941 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -112,7 +112,7 @@ private slots:
void resizeEvent_data();
void resizeEvent();
void paintEvent();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
void sizeHint_data();
@@ -254,7 +254,7 @@ public:
int focusOut;
};
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
class WheelWidget : public QWidget
{
public:
@@ -264,7 +264,7 @@ public:
bool wheelEventCalled;
};
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
// This will be called before the first test function is executed.
// It is only called once.
@@ -1297,7 +1297,7 @@ void tst_QGraphicsProxyWidget::paintEvent()
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QGraphicsProxyWidget::wheelEvent()
{
QGraphicsScene scene;
@@ -1321,7 +1321,7 @@ void tst_QGraphicsProxyWidget::wheelEvent()
QVERIFY(event.isAccepted());
QVERIFY(wheelWidget->wheelEventCalled);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
Q_DECLARE_METATYPE(Qt::SizeHint)
void tst_QGraphicsProxyWidget::sizeHint_data()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 1a96180c05..121836234d 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -199,7 +199,7 @@ private slots:
void mapFromScenePoly();
void mapFromScenePath();
void sendEvent();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
#ifndef QT_NO_CURSOR
@@ -2188,7 +2188,7 @@ void tst_QGraphicsView::sendEvent()
QCOMPARE(item->events.last(), QEvent::KeyPress);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
class MouseWheelScene : public QGraphicsScene
{
public:
@@ -2245,7 +2245,7 @@ void tst_QGraphicsView::wheelEvent()
QCOMPARE(spy.count(), 2);
QVERIFY(widget->hasFocus());
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
#ifndef QT_NO_CURSOR
void tst_QGraphicsView::cursor()
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index cf8ee310d3..5c0bb67825 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -180,7 +180,7 @@ private slots:
void task191545_dragSelectRows();
void taskQTBUG_5062_spansInconsistency();
void taskQTBUG_4516_clickOnRichTextLabel();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void taskQTBUG_5237_wheelEventOnHeader();
#endif
void taskQTBUG_8585_crashForNoGoodReason();
@@ -190,7 +190,7 @@ private slots:
void taskQTBUG_30653_doItemsLayout();
void taskQTBUG_50171_selectRowAfterSwapColumns();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void mouseWheel_data();
void mouseWheel();
#endif
@@ -3966,7 +3966,7 @@ void tst_QTableView::task248688_autoScrollNavigation()
}
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QTableView::mouseWheel_data()
{
QTest::addColumn<int>("scrollMode");
@@ -4019,7 +4019,7 @@ void tst_QTableView::mouseWheel()
QApplication::sendEvent(view.viewport(), &verticalEvent);
QVERIFY(qAbs(view.verticalScrollBar()->value() - verticalPosition) < 15);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QTableView::addColumnWhileEditing()
{
@@ -4283,7 +4283,7 @@ void tst_QTableView::changeHeaderData()
QVERIFY(view.verticalHeader()->width() > textWidth);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QTableView::taskQTBUG_5237_wheelEventOnHeader()
{
QTableView view;
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index b98cc048c8..6ff38abdb8 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -140,7 +140,7 @@ private slots:
void execAfterExit();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelScrollLines();
#endif
@@ -1773,7 +1773,7 @@ void tst_QApplication::execAfterExit()
QCOMPARE(exitCode, 0);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QApplication::wheelScrollLines()
{
int argc = 1;
@@ -1781,7 +1781,7 @@ void tst_QApplication::wheelScrollLines()
// If wheelScrollLines returns 0, the mose wheel will be disabled.
QVERIFY(app.wheelScrollLines() > 0);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QApplication::style()
{
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 17a5320433..f0d74e7797 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -74,7 +74,7 @@ private slots:
void minimum_maximum();
void keyPressed_data();
void keyPressed();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent_data();
void wheelEvent();
void fineGrainedWheelEvent_data();
@@ -690,7 +690,7 @@ void tst_QAbstractSlider::keyPressed()
QCOMPARE(slider->sliderPosition(), expectedSliderPositionVerticalInverted);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QAbstractSlider::wheelEvent_data()
{
QTest::addColumn<int>("initialSliderPosition");
@@ -941,7 +941,7 @@ void tst_QAbstractSlider::fineGrainedWheelEvent()
QCOMPARE(slider->sliderPosition(), 1);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QAbstractSlider::sliderPressedReleased_data()
{
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index b882055888..bf190cf60a 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -120,11 +120,11 @@ private slots:
void flaggedItems_data();
void flaggedItems();
void pixmapIcon();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void mouseWheel_data();
void mouseWheel();
void popupWheelHandling();
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void layoutDirection();
void itemListPosition();
void separatorItem_data();
@@ -2036,7 +2036,7 @@ void tst_QComboBox::pixmapIcon()
QCOMPARE( box.itemIcon(1).isNull(), false );
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
// defined to be 120 by the wheel mouse vendors according to the docs
#define WHEEL_DELTA 120
@@ -2133,7 +2133,7 @@ void tst_QComboBox::popupWheelHandling()
QVERIFY(comboBox->view()->isVisible());
QCOMPARE(comboBox->view()->pos(), popupPos);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QComboBox::layoutDirection()
{
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 9ab755c5f1..94e4fc005c 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -205,7 +205,7 @@ private slots:
void reverseTest();
void ddMMMMyyyy();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
@@ -2998,7 +2998,7 @@ void tst_QDateTimeEdit::ddMMMMyyyy()
QCOMPARE(testWidget->lineEdit()->text(), "01." + QDate::longMonthName(1) + ".200");
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QDateTimeEdit::wheelEvent()
{
testWidget->setDisplayFormat("dddd/MM");
@@ -3011,7 +3011,7 @@ void tst_QDateTimeEdit::wheelEvent()
qApp->sendEvent(testWidget, &w);
QCOMPARE(testWidget->date(), QDate(2000, 3, 22));
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QDateTimeEdit::specialValueCornerCase()
{
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 08ef96bf1b..5238eea592 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -50,7 +50,7 @@ class tst_QScrollBar : public QObject
private slots:
void scrollSingleStep();
void task_209492();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void QTBUG_27308();
#endif
void QTBUG_42871();
@@ -143,7 +143,7 @@ void tst_QScrollBar::task_209492()
QCOMPARE(spy.count(), 1);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
#define WHEEL_DELTA 120 // copied from tst_QAbstractSlider / tst_QComboBox
void tst_QScrollBar::QTBUG_27308()
{
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index 808c7f9d3d..07a2fd859d 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -69,7 +69,7 @@ public:
{
return QSpinBox::valueFromText(text);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent *event)
{
QSpinBox::wheelEvent(event);
@@ -1218,7 +1218,7 @@ void tst_QSpinBox::setGroupSeparatorShown()
void tst_QSpinBox::wheelEvents()
{
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
SpinBox spinBox;
spinBox.setRange(-20, 20);
spinBox.setValue(0);
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index bc94e2a05b..55ef44f4e0 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -199,7 +199,7 @@ private slots:
void findWithRegExpReturnsFalseIfNoMoreResults();
#endif
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
@@ -2566,7 +2566,7 @@ void tst_QTextEdit::findWithRegExpReturnsFalseIfNoMoreResults()
}
#endif
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
class TextEdit : public QTextEdit
{