summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/generic
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-07-11 09:59:57 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-18 02:15:40 +0200
commita72d15c8a7ca8b89b2160f4e48af5cf69e2a31e7 (patch)
treedd1b0ec088e23556b0a6b9b80130d35b48c8c0ec /src/plugins/sensors/generic
parent5464963f9afae3bf7329d9b0ea7102231125f794 (diff)
Introduce QRotationReading::setFromEuler() in favor of set{X/Y/Z}()
In preparation of adding new representations to the reading (QTBUG-25840), the setX(), setY() and setZ() setters were removed, as these don't set the representation atomically, and don't provide a single point where a conversion to matrix or quaternion can occur. These setters were only supposed to be used by the backends, and all backends are ported in this commit. Change-Id: Ib652520578d293687fc8515d226f1f61aa2f2def Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/plugins/sensors/generic')
-rw-r--r--src/plugins/sensors/generic/genericrotationsensor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/sensors/generic/genericrotationsensor.cpp b/src/plugins/sensors/generic/genericrotationsensor.cpp
index 7142227c..dddacb24 100644
--- a/src/plugins/sensors/generic/genericrotationsensor.cpp
+++ b/src/plugins/sensors/generic/genericrotationsensor.cpp
@@ -107,9 +107,7 @@ bool genericrotationsensor::filter(QSensorReading *reading)
}
m_reading.setTimestamp(ar->timestamp());
- m_reading.setX(pitch);
- m_reading.setY(roll);
- m_reading.setZ(0);
+ m_reading.setFromEuler(pitch, roll, 0);
newReadingAvailable();
return false;
}