From 7d29807296cb7ccc7f3459e106d74f93a321c493 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 3 Jul 2019 13:28:58 +0200 Subject: Finish deprecating obsolete members of QWheelEvent In Qt 5.0, delta() and orientation() were already marked obsolete, but Widgets and tests have kept on depending on them all this time. We now start using alternative API so they can really be deprecated. All constructors except the newest one are also deprecated. The plan is for all events from pointing devices to have QPointF position() and globalPosition(), so we deprecate the other position accessors. [ChangeLog][QtGui] Obsolete constructors and accessors in QWheelEvent now have proper deprecation macros. What is left is intended to be compatible with planned changes in Qt 6. Change-Id: I26250dc90922b60a6ed20d7f65f38019da3e139e Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qcalendarwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qcalendarwidget.cpp') diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index 510b34cb18..f07b42c181 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -1418,7 +1418,7 @@ void QCalendarView::keyPressEvent(QKeyEvent *event) #if QT_CONFIG(wheelevent) void QCalendarView::wheelEvent(QWheelEvent *event) { - const int numDegrees = event->delta() / 8; + const int numDegrees = event->angleDelta().y() / 8; const int numSteps = numDegrees / 15; const QModelIndex index = currentIndex(); QDate currentDate = static_cast(model())->dateForCell(index.row(), index.column()); -- cgit v1.2.3