diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-06-12 19:30:44 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-13 08:32:51 +0200 |
commit | b367ddfed778ac2f3ce28e39ba83bbe3c1e1437c (patch) | |
tree | d6fe2b6f9fca94df39995fe124366c824408b334 /src/svg/qsvgtinydocument_p.h | |
parent | 14fa4591eb34a35cf3d485fd901e3f1e2caa7770 (diff) | |
download | qtsvg-b367ddfed778ac2f3ce28e39ba83bbe3c1e1437c.tar.gz |
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 <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/svg/qsvgtinydocument_p.h')
-rw-r--r-- | src/svg/qsvgtinydocument_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svg/qsvgtinydocument_p.h b/src/svg/qsvgtinydocument_p.h index 5f5d06b..404587d 100644 --- a/src/svg/qsvgtinydocument_p.h +++ b/src/svg/qsvgtinydocument_p.h @@ -132,7 +132,7 @@ private: QHash<QString, QSvgNode *> m_namedNodes; QHash<QString, QSvgRefCounter<QSvgFillStyleProperty> > m_namedStyles; - QTime m_time; + qint64 m_time; bool m_animated; int m_animationDuration; int m_fps; @@ -189,7 +189,7 @@ inline bool QSvgTinyDocument::preserveAspectRatio() const inline int QSvgTinyDocument::currentElapsed() const { - return m_time.elapsed(); + return QDateTime::currentMSecsSinceEpoch() - m_time; } inline int QSvgTinyDocument::animationDuration() const |