diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-26 10:45:26 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-27 07:46:35 +0000 |
commit | a28678b83ac3a5a7530026027e2c16a23379168a (patch) | |
tree | aeb68e3cec1735987f91d2b4506c9b0b2ab7605b /examples/sensors/grue | |
parent | 6a8e8a64d3473c5ff890c022b738862a704516dc (diff) |
Remove usages of deprecated APIs from QDateTime
- Replaced QTime by QElapsedTimer, because of the usage of
QTime::start() and QTime::elapsed() methods, which are deprecated.
- Replaced the deprecated QDateTime::toTime_t() with
QDateTime::toSecsSinceEpoch().
Task-number: QTBUG-76491
Change-Id: I625ce6bbc2718cd3c1b4905fecef9d75fdbab618
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'examples/sensors/grue')
-rw-r--r-- | examples/sensors/grue/plugin/gruesensorimpl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/sensors/grue/plugin/gruesensorimpl.h b/examples/sensors/grue/plugin/gruesensorimpl.h index 0847ed9c..8a4a9565 100644 --- a/examples/sensors/grue/plugin/gruesensorimpl.h +++ b/examples/sensors/grue/plugin/gruesensorimpl.h @@ -54,7 +54,7 @@ #include <qsensorbackend.h> #include "gruesensor.h" #include <qambientlightsensor.h> -#include <QTime> +#include <QElapsedTimer> QT_BEGIN_NAMESPACE class QTimer; @@ -79,7 +79,7 @@ private: GrueSensorReading m_reading; QAmbientLightSensor *lightSensor; QTimer *darkTimer; - QTime timer; + QElapsedTimer timer; QAmbientLightReading::LightLevel lightLevel; }; |