diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-30 16:42:12 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-23 21:51:43 +0200 |
commit | 1b7ce85a606261936efd3b3c7d73a71b5884e426 (patch) | |
tree | f76713753768436ba14a98f01874456dc65bf8b0 /examples/corelib/threads/mandelbrot | |
parent | 5d94aac2bae8bdbf8de7cebeb6a1a17a81685f0a (diff) |
Remove usages of deprecated APIs of QWheelEvent
- Replaced the usages of deprecated QWheelEvent::delta() and
QWheelEvent::orientation() with QWheelEvent::angleDelta().
In most of the examples it is acceptable to use only the vertical
component of angle delta.
- Made the docs APIs to build conditionally, based on the
deprecation version.
Task-number: QTBUG-76491
Task-number: QTBUG-76540
Change-Id: Id4230d483f724af49e4b6349b44881c3944de2a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/corelib/threads/mandelbrot')
-rw-r--r-- | examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp b/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp index 71d0abb09f..822791533b 100644 --- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp +++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp @@ -176,7 +176,7 @@ void MandelbrotWidget::keyPressEvent(QKeyEvent *event) //! [12] void MandelbrotWidget::wheelEvent(QWheelEvent *event) { - int numDegrees = event->delta() / 8; + int numDegrees = event->angleDelta().y() / 8; double numSteps = numDegrees / 15.0f; zoom(pow(ZoomInFactor, numSteps)); } |