Replace the deprecated QWheelEvent::delta() -> QWheelEvent::angleDelta()

Replaced the usages of deprecated QWheelEvent::delta() with
QWheelEvent::angleDelta().y(), assuming that it's acceptable to use only the
vertical component of angle delta.

Task-number: QTBUG-76491
Change-Id: I4aa0a5a0e9ba7f33321bdb879b66ffb589b53e42
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sona Kurazyan
2019-08-30 10:12:38 +02:00
parent 8e31932c29
commit 66435024a4
9 changed files with 10 additions and 10 deletions

View File

@@ -310,7 +310,7 @@ bool FunctionHintProposalWidget::eventFilter(QObject *obj, QEvent *e)
if (d->m_popupFrame && !d->m_popupFrame->isAncestorOf(widget)) {
abort();
} else if (e->type() == QEvent::Wheel) {
if (static_cast<QWheelEvent*>(e)->delta() > 0)
if (static_cast<QWheelEvent*>(e)->angleDelta().y() > 0)
previousPage();
else
nextPage();