summaryrefslogtreecommitdiffstats
path: root/examples/svg/embedded
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-06-08 10:55:59 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-06-09 08:51:59 +0200
commitb0229253846ee7757c608182a8a9327e44686793 (patch)
tree1dbdbe1f1df5e7c88202962825487cbd739e5b41 /examples/svg/embedded
parent74cf1f940c2f21c5e1dc01f8b57ddd7ea022aec1 (diff)
Replace calls to deprecated QEvent accessor functions
Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qtsvg $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: I33c38042d0489134567045c759e125c7f540ce7d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/svg/embedded')
-rw-r--r--examples/svg/embedded/fluidlauncher/pictureflow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/svg/embedded/fluidlauncher/pictureflow.cpp b/examples/svg/embedded/fluidlauncher/pictureflow.cpp
index 93b83d6..5c0b217 100644
--- a/examples/svg/embedded/fluidlauncher/pictureflow.cpp
+++ b/examples/svg/embedded/fluidlauncher/pictureflow.cpp
@@ -1263,7 +1263,7 @@ void PictureFlow::keyPressEvent(QKeyEvent* event)
void PictureFlow::mouseMoveEvent(QMouseEvent* event)
{
- int distanceMovedSinceLastEvent = event->pos().x() - d->previousPos.x();
+ int distanceMovedSinceLastEvent = event->position().toPoint().x() - d->previousPos.x();
// Check to see if we need to switch from single press mode to a drag mode
if (d->singlePress)
@@ -1287,7 +1287,7 @@ void PictureFlow::mouseMoveEvent(QMouseEvent* event)
speed = SPEED_LOWER_THRESHOLD;
else
{
- speed = ((qAbs(event->pos().x()-d->previousPos.x())*1000) / d->previousPosTimestamp.elapsed())
+ speed = ((qAbs(event->position().toPoint().x()-d->previousPos.x())*1000) / d->previousPosTimestamp.elapsed())
/ (d->buffer.width() / 10);
if (speed < SPEED_LOWER_THRESHOLD)
@@ -1339,7 +1339,7 @@ void PictureFlow::mouseMoveEvent(QMouseEvent* event)
}
}
- d->previousPos = event->pos();
+ d->previousPos = event->position().toPoint();
d->previousPosTimestamp.restart();
emit inputReceived();
@@ -1347,8 +1347,8 @@ void PictureFlow::mouseMoveEvent(QMouseEvent* event)
void PictureFlow::mousePressEvent(QMouseEvent* event)
{
- d->firstPress = event->pos();
- d->previousPos = event->pos();
+ d->firstPress = event->position().toPoint();
+ d->previousPos = event->position().toPoint();
d->previousPosTimestamp.start();
d->singlePress = true; // Initially assume a single press
// d->dragStartSlide = d->getTarget();
@@ -1363,10 +1363,10 @@ void PictureFlow::mouseReleaseEvent(QMouseEvent* event)
if (d->singlePress)
{
- if (event->x() < sideWidth )
+ if (event->position().toPoint().x() < sideWidth )
{
showPrevious();
- } else if ( event->x() > sideWidth + slideSize().width() ) {
+ } else if ( event->position().toPoint().x() > sideWidth + slideSize().width() ) {
showNext();
} else {
emit itemActivated(d->getTarget());