summaryrefslogtreecommitdiffstats
path: root/examples/corelib/threads
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-06-04 18:07:06 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-06-08 19:11:51 +0200
commita061a646429c6e9d695458fc0ecb0021a30e12ee (patch)
tree7ba6fce7ee7c8975b0c50e31195bd02c5419fc15 /examples/corelib/threads
parent24e52c10deedbaef833c0e2c3ee7bee03eacc4f5 (diff)
Replace calls to deprecated QEvent accessor functions
Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/corelib/threads')
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp b/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp
index f47c9c8a8b..9eda882347 100644
--- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp
@@ -190,7 +190,7 @@ void MandelbrotWidget::wheelEvent(QWheelEvent *event)
void MandelbrotWidget::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
- lastDragPos = event->pos();
+ lastDragPos = event->position().toPoint();
}
//! [13]
@@ -198,8 +198,8 @@ void MandelbrotWidget::mousePressEvent(QMouseEvent *event)
void MandelbrotWidget::mouseMoveEvent(QMouseEvent *event)
{
if (event->buttons() & Qt::LeftButton) {
- pixmapOffset += event->pos() - lastDragPos;
- lastDragPos = event->pos();
+ pixmapOffset += event->position().toPoint() - lastDragPos;
+ lastDragPos = event->position().toPoint();
update();
}
}
@@ -209,7 +209,7 @@ void MandelbrotWidget::mouseMoveEvent(QMouseEvent *event)
void MandelbrotWidget::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
- pixmapOffset += event->pos() - lastDragPos;
+ pixmapOffset += event->position().toPoint() - lastDragPos;
lastDragPos = QPoint();
const auto pixmapSize = pixmap.size() / pixmap.devicePixelRatioF();