From b367ddfed778ac2f3ce28e39ba83bbe3c1e1437c Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 12 Jun 2019 19:30:44 +0200 Subject: Convert uses of QTime as a timer to QElapsedTimer One was an easy replacement, the other changes its reference time, which isn't supported by QElapsedTimer. However, it was easy enough to reimplement in terms of QDateTime::currentMSecsSinceEpoch(); and, as it was previously using QTime as timer, this is presumably good enough (although a proper monotonic timer would be better). Change-Id: I90f8e08635e7d2bc364755efd93fce008b6a62c0 Reviewed-by: Friedemann Kleint Reviewed-by: Eirik Aavitsland --- examples/svg/embedded/fluidlauncher/pictureflow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/svg/embedded/fluidlauncher/pictureflow.cpp b/examples/svg/embedded/fluidlauncher/pictureflow.cpp index 191ff2e..b0657a2 100644 --- a/examples/svg/embedded/fluidlauncher/pictureflow.cpp +++ b/examples/svg/embedded/fluidlauncher/pictureflow.cpp @@ -85,7 +85,7 @@ #include #include #include -#include +#include #include @@ -376,7 +376,7 @@ public: int singlePressThreshold; QPoint firstPress; QPoint previousPos; - QTime previousPosTimestamp; + QElapsedTimer previousPosTimestamp; int pixelDistanceMoved; int pixelsToMovePerSlide; @@ -1397,7 +1397,7 @@ void PictureFlow::timerEvent(QTimerEvent* event) { if(event->timerId() == d->animateTimer.timerId()) { -// QTime now = QTime::currentTime(); +// QElapsedTimer now; now.start(); d->updateAnimation(); // d->animateTimer.start(qMax(0, 30-now.elapsed() ), this); } -- cgit v1.2.1