summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-06-12 18:06:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-14 10:42:33 +0200
commit84e89c1e9e00d4fab576b876cfa80e92b5602982 (patch)
treebbe8c928a20bdbf71c3bf6305e64fa46f6c9d16c /examples/widgets
parentfeb06decfe5355a14c982f7ddb427a262ad2b393 (diff)
Convert uses of QTime as a timer to QElapsedTimer
Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/graphicsview/boxes/scene.cpp2
-rw-r--r--examples/widgets/graphicsview/boxes/scene.h2
-rw-r--r--examples/widgets/painting/deform/pathdeform.h4
3 files changed, 3 insertions, 5 deletions
diff --git a/examples/widgets/graphicsview/boxes/scene.cpp b/examples/widgets/graphicsview/boxes/scene.cpp
index 7f62ac894b..d51124aed7 100644
--- a/examples/widgets/graphicsview/boxes/scene.cpp
+++ b/examples/widgets/graphicsview/boxes/scene.cpp
@@ -533,8 +533,6 @@ Scene::Scene(int width, int height, int maxTextureSize)
m_timer->setInterval(20);
connect(m_timer, &QTimer::timeout, this, [this](){ update(); });
m_timer->start();
-
- m_time.start();
}
Scene::~Scene()
diff --git a/examples/widgets/graphicsview/boxes/scene.h b/examples/widgets/graphicsview/boxes/scene.h
index ccb6f368cd..ffff01358f 100644
--- a/examples/widgets/graphicsview/boxes/scene.h
+++ b/examples/widgets/graphicsview/boxes/scene.h
@@ -220,7 +220,7 @@ private:
void initGL();
QPointF pixelPosToViewPos(const QPointF& p);
- QTime m_time;
+ QTime m_time; // ### Qt 6: remove (unused)
int m_lastTime;
int m_mouseEventTime;
int m_distExp;
diff --git a/examples/widgets/painting/deform/pathdeform.h b/examples/widgets/painting/deform/pathdeform.h
index b7c7386e2a..af869badc9 100644
--- a/examples/widgets/painting/deform/pathdeform.h
+++ b/examples/widgets/painting/deform/pathdeform.h
@@ -54,7 +54,7 @@
#include "arthurwidgets.h"
#include <QBasicTimer>
-#include <QDateTime>
+#include <QElapsedTimer>
#include <QPainterPath>
class PathDeformRenderer : public ArthurFrame
@@ -103,7 +103,7 @@ private:
QBasicTimer m_repaintTimer;
// QBasicTimer m_fpsTimer;
// int m_fpsCounter;
- QTime m_repaintTracker;
+ QElapsedTimer m_repaintTracker;
QVector<QPainterPath> m_paths;
QVector<QPointF> m_advances;