Quiet several more warnings about QWheelEvent deprecations
We want to ensure that the qt4D and qt4O members are still initialized the same way whenever deprecated constructors are used; and we want to be able to verify it using qDebug. So we merely suppress these warnings. Change-Id: Ic2e5f0dd6feeabe81f06f9c31693c550ac0781e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
c8b07f7da3
commit
ad86c2f0ab
|
|
@ -791,37 +791,44 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, int delta
|
|||
\obsolete
|
||||
This constructor has been deprecated.
|
||||
*/
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
|
||||
QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation,
|
||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
|
||||
: QWheelEvent(pos, globalPos, pixelDelta, angleDelta, qt4Delta, qt4Orientation,
|
||||
buttons, modifiers, Qt::NoScrollPhase)
|
||||
{}
|
||||
QT_WARNING_POP
|
||||
|
||||
/*!
|
||||
\obsolete
|
||||
This constructor has been deprecated.
|
||||
*/
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QWheelEvent::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)
|
||||
: QWheelEvent(pos, globalPos, pixelDelta, angleDelta, qt4Delta, qt4Orientation,
|
||||
buttons, modifiers, phase, Qt::MouseEventNotSynthesized)
|
||||
{}
|
||||
QT_WARNING_POP
|
||||
|
||||
/*!
|
||||
\obsolete
|
||||
This constructor has been deprecated.
|
||||
*/
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QWheelEvent::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)
|
||||
: QWheelEvent(pos, globalPos, pixelDelta, angleDelta, qt4Delta, qt4Orientation,
|
||||
buttons, modifiers, phase, source, false)
|
||||
{}
|
||||
QT_WARNING_POP
|
||||
|
||||
/*!
|
||||
\obsolete
|
||||
|
|
@ -3930,12 +3937,15 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
|||
case QEvent::Wheel: {
|
||||
const QWheelEvent *we = static_cast<const QWheelEvent *>(e);
|
||||
dbg << "QWheelEvent(" << we->phase();
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED // delta() and orientation()
|
||||
if (!we->pixelDelta().isNull() || !we->angleDelta().isNull())
|
||||
dbg << ", pixelDelta=" << we->pixelDelta() << ", angleDelta=" << we->angleDelta();
|
||||
#if QT_DEPRECATED_SINCE(5, 14)
|
||||
else if (int qt4Delta = we->delta())
|
||||
dbg << ", delta=" << qt4Delta << ", orientation=" << we->orientation();
|
||||
#endif
|
||||
QT_WARNING_POP
|
||||
dbg << ')';
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2245,8 +2245,11 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
|
|||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 14)
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QWheelEvent ev(localPoint, globalPoint, e->pixelDelta, e->angleDelta, e->qt4Delta, e->qt4Orientation,
|
||||
mouse_buttons, e->modifiers, e->phase, e->source, e->inverted);
|
||||
QT_WARNING_POP
|
||||
#else
|
||||
QWheelEvent ev(localPoint, globalPoint, e->pixelDelta, e->angleDelta,
|
||||
mouse_buttons, e->modifiers, e->phase, e->inverted, e->source);
|
||||
|
|
|
|||
|
|
@ -3224,8 +3224,11 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
QApplicationPrivate::giveFocusAccordingToFocusPolicy(w, e, relpos);
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 14)
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),
|
||||
wheel->modifiers(), phase, wheel->source(), wheel->inverted());
|
||||
QT_WARNING_POP
|
||||
#else
|
||||
QWheelEvent we(relpos, wheel->globalPosition(), wheel->pixelDelta(), wheel->angleDelta(), wheel->buttons(),
|
||||
wheel->modifiers(), phase, wheel->inverted(), wheel->source());
|
||||
|
|
@ -3266,8 +3269,11 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
// the end of the natural scrolling sequence.
|
||||
const QPoint &relpos = QApplicationPrivate::wheel_widget->mapFromGlobal(wheel->globalPosition().toPoint());
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),
|
||||
wheel->modifiers(), wheel->phase(), wheel->source());
|
||||
QT_WARNING_POP
|
||||
#else
|
||||
QWheelEvent we(relpos, wheel->globalPosition(), wheel->pixelDelta(), wheel->angleDelta(), wheel->buttons(),
|
||||
wheel->modifiers(), wheel->phase(), wheel->inverted(), wheel->source());
|
||||
|
|
|
|||
Loading…
Reference in New Issue