Handle null input devices in WheelEvent
The X11 backend calls some pointer input redirection code without providing a valid input device.
This commit is contained in:
parent
9ef65cbe03
commit
c342d57116
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ MouseEvent::MouseEvent(QEvent::Type type, const QPointF &pos, Qt::MouseButton bu
|
||||||
WheelEvent::WheelEvent(const QPointF &pos, qreal delta, qint32 deltaV120, Qt::Orientation orientation,
|
WheelEvent::WheelEvent(const QPointF &pos, qreal delta, qint32 deltaV120, Qt::Orientation orientation,
|
||||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, InputRedirection::PointerAxisSource source,
|
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, InputRedirection::PointerAxisSource source,
|
||||||
std::chrono::microseconds timestamp, InputDevice *device)
|
std::chrono::microseconds timestamp, InputDevice *device)
|
||||||
: QWheelEvent(pos, pos, QPoint(), (orientation == Qt::Horizontal) ? QPoint(delta, 0) : QPoint(0, delta), buttons, modifiers, Qt::NoScrollPhase, device->isNaturalScroll())
|
: QWheelEvent(pos, pos, QPoint(), (orientation == Qt::Horizontal) ? QPoint(delta, 0) : QPoint(0, delta), buttons, modifiers, Qt::NoScrollPhase, device ? device->isNaturalScroll() : false)
|
||||||
, m_device(device)
|
, m_device(device)
|
||||||
, m_orientation(orientation)
|
, m_orientation(orientation)
|
||||||
, m_delta(delta)
|
, m_delta(delta)
|
||||||
|
|
Loading…
Reference in a new issue