diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-03-12 11:10:08 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-03-23 17:28:17 +0000 |
commit | c08bf215cceda784cd02f8fa20e5b2431e0d9ef9 (patch) | |
tree | e35bd38872062366e03189f13e4f081342c7d278 /src/gui/kernel/qevent.h | |
parent | e8260edf87054bd52ce0a59013bfc0b79d955650 (diff) |
Add a legacy-free QWheelEvent constructor
qt4Delta and qt4Orientation have been "deprecated" ever since Qt 5.0
(even though widgets continue to depend on those properties). This
is mainly for use in Qt Quick right now, but can be used everywhere
later on.
Change-Id: If0b163766c8ad8efa268edaa4f1ac1e8926f9003
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r-- | src/gui/kernel/qevent.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index d95da40368..2a47afaa0b 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -193,6 +193,10 @@ public: QWheelEvent(const QPointF &pos, const QPointF &globalPos, QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source, bool inverted); + + QWheelEvent(QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta, + Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, + bool inverted, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); ~QWheelEvent(); @@ -225,8 +229,8 @@ protected: QPointF g; QPoint pixelD; QPoint angleD; - int qt4D; - Qt::Orientation qt4O; + int qt4D = 0; + Qt::Orientation qt4O = Qt::Vertical; Qt::MouseButtons mouseState; uint ph : 2; uint src: 2; |