summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/sensors/simulator/simulatoraccelerometer.cpp4
-rw-r--r--src/plugins/sensors/simulator/simulatorambientlightsensor.cpp4
-rw-r--r--src/plugins/sensors/simulator/simulatorcompass.cpp4
-rw-r--r--src/plugins/sensors/simulator/simulatorirproximitysensor.cpp4
-rw-r--r--src/plugins/sensors/simulator/simulatorlightsensor.cpp4
-rw-r--r--src/plugins/sensors/simulator/simulatormagnetometer.cpp4
-rw-r--r--src/plugins/sensors/simulator/simulatorproximitysensor.cpp4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/sensors/simulator/simulatoraccelerometer.cpp b/src/plugins/sensors/simulator/simulatoraccelerometer.cpp
index 481128f4..280fc7ee 100644
--- a/src/plugins/sensors/simulator/simulatoraccelerometer.cpp
+++ b/src/plugins/sensors/simulator/simulatoraccelerometer.cpp
@@ -54,9 +54,9 @@ void SimulatorAccelerometer::poll()
QtMobility::QAccelerometerReadingData data = SensorsConnection::instance()->qtAccelerometerData;
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch()) / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch());
if (m_reading.x() != data.x
|| m_reading.y() != data.y
|| m_reading.z() != data.z) {
diff --git a/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp b/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp
index 177684fe..5d84b36c 100644
--- a/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp
+++ b/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp
@@ -76,9 +76,9 @@ void SimulatorAmbientLightSensor::poll()
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch()) / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch());
if (m_reading.lightLevel() != convertedLightLevel) {
m_reading.setTimestamp(newTimestamp);
m_reading.setLightLevel(convertedLightLevel);
diff --git a/src/plugins/sensors/simulator/simulatorcompass.cpp b/src/plugins/sensors/simulator/simulatorcompass.cpp
index fc68c513..e9d0f1d7 100644
--- a/src/plugins/sensors/simulator/simulatorcompass.cpp
+++ b/src/plugins/sensors/simulator/simulatorcompass.cpp
@@ -54,9 +54,9 @@ void SimulatorCompass::poll()
QtMobility::QCompassReadingData data = SensorsConnection::instance()->qtCompassData;
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch()) / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch());
if (m_reading.azimuth() != data.azimuth
|| m_reading.calibrationLevel() != data.calibrationLevel) {
m_reading.setTimestamp(newTimestamp);
diff --git a/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp b/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp
index 4499128f..d041a86d 100644
--- a/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp
+++ b/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp
@@ -54,9 +54,9 @@ void SimulatorIRProximitySensor::poll()
QtMobility::QIRProximityReadingData data = SensorsConnection::instance()->qtIRProximityData;
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch()) / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch());
if (m_reading.reflectance() != data.irProximity) {
m_reading.setTimestamp(newTimestamp);
m_reading.setReflectance(data.irProximity);
diff --git a/src/plugins/sensors/simulator/simulatorlightsensor.cpp b/src/plugins/sensors/simulator/simulatorlightsensor.cpp
index 40d9edbd..bb4dd94d 100644
--- a/src/plugins/sensors/simulator/simulatorlightsensor.cpp
+++ b/src/plugins/sensors/simulator/simulatorlightsensor.cpp
@@ -54,9 +54,9 @@ void SimulatorLightSensor::poll()
QtMobility::QLightReadingData data = SensorsConnection::instance()->qtLightData;
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch()) / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch());
if (m_reading.lux() != data.lux) {
m_reading.setTimestamp(newTimestamp);
m_reading.setLux(data.lux);
diff --git a/src/plugins/sensors/simulator/simulatormagnetometer.cpp b/src/plugins/sensors/simulator/simulatormagnetometer.cpp
index 64a31776..b54525ab 100644
--- a/src/plugins/sensors/simulator/simulatormagnetometer.cpp
+++ b/src/plugins/sensors/simulator/simulatormagnetometer.cpp
@@ -54,9 +54,9 @@ void SimulatorMagnetometer::poll()
QtMobility::QMagnetometerReadingData data = SensorsConnection::instance()->qtMagnetometerData;
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch()) / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch());
if (m_reading.x() != data.x
|| m_reading.y() != data.y
|| m_reading.z() != data.z
diff --git a/src/plugins/sensors/simulator/simulatorproximitysensor.cpp b/src/plugins/sensors/simulator/simulatorproximitysensor.cpp
index b4430959..6a28ce52 100644
--- a/src/plugins/sensors/simulator/simulatorproximitysensor.cpp
+++ b/src/plugins/sensors/simulator/simulatorproximitysensor.cpp
@@ -54,9 +54,9 @@ void SimulatorProximitySensor::poll()
QtMobility::QProximityReadingData data = SensorsConnection::instance()->qtProximityData;
quint64 newTimestamp;
if (!data.timestamp.isValid())
- newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000;
+ newTimestamp = static_cast<quint64>(QDateTime::currentMSecsSinceEpoch() / 1000;
else
- newTimestamp = data.timestamp.toTime_t();
+ newTimestamp = static_cast<quint64>(data.timestamp.toSecsSinceEpoch();
if (m_reading.close() != data.close) {
m_reading.setTimestamp(newTimestamp);
m_reading.setClose(data.close);