diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-04-16 11:29:12 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-04-17 09:18:11 +0200 |
commit | 6a4aa096e9b9af08a81fe020d7f2ec8ceab7dfa6 (patch) | |
tree | 6f1947836a76418943b1d9e2596026e2e9c8e85b /examples/widgets/touch/fingerpaint/scribblearea.cpp | |
parent | 7709463b55636305e6b35dccaf6c403fa5c3d72d (diff) |
Port examples away from deprecated QTouchEvent APIs
Use the QEventPoints API instead.
Change-Id: I7310fd34df110cad508f6188a41ad452a3cf848d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/widgets/touch/fingerpaint/scribblearea.cpp')
-rw-r--r-- | examples/widgets/touch/fingerpaint/scribblearea.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/touch/fingerpaint/scribblearea.cpp b/examples/widgets/touch/fingerpaint/scribblearea.cpp index 7af565ff30..2e6e532afb 100644 --- a/examples/widgets/touch/fingerpaint/scribblearea.cpp +++ b/examples/widgets/touch/fingerpaint/scribblearea.cpp @@ -196,11 +196,11 @@ bool ScribbleArea::event(QEvent *event) case QEvent::TouchEnd: { const QTouchEvent *touch = static_cast<QTouchEvent *>(event); - const QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints(); + const auto touchPoints = static_cast<QTouchEvent *>(event)->points(); for (const QTouchEvent::TouchPoint &touchPoint : touchPoints) { switch (touchPoint.state()) { - case Qt::TouchPointStationary: - case Qt::TouchPointReleased: + case QEventPoint::Stationary: + case QEventPoint::Released: // don't do anything if this touch point hasn't moved or has been released continue; default: |