diff options
author | Juha Vuolle <juha.vuolle@insta.fi> | 2021-06-16 10:54:52 +0300 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@insta.fi> | 2021-06-22 13:45:41 +0300 |
commit | 89905b1ea1c81013d21093c95f6fee2665fdaa69 (patch) | |
tree | 42da5f372296faa3461378d0fe5bcf4bb2e64aa0 /tests | |
parent | 8ca52678587e2c7e7bc45bf205a734aad72e3008 (diff) | |
download | qtsensors-89905b1ea1c81013d21093c95f6fee2665fdaa69.tar.gz |
Remove unused QmlSensorReading constructor parameter
The ctor parameter is not used. For clarity it should be mentioned
that the memory management of the created 'reading' is done by
explicitly parenting the 'reading' in the qmlsensor baseclass.
Pick-to: 6.2
Task-number: QTBUG-92505
Change-Id: I4e50bcafa7789f7400364078302339915473a3b1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp b/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp index 4b81aad..d266649 100644 --- a/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp +++ b/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp @@ -351,8 +351,7 @@ class QmlDummySensorReading : public QmlSensorReading { Q_OBJECT public: - QmlDummySensorReading(QSensor *sensor) : - QmlSensorReading(sensor), + QmlDummySensorReading() : m_reading(new QDummySensorReading(this)) {} @@ -376,7 +375,7 @@ public: } QSensor *sensor() const override { return m_sensor; } - QmlSensorReading *createReading() const override { return new QmlDummySensorReading(m_sensor); } + QmlSensorReading *createReading() const override { return new QmlDummySensorReading(); } void componentComplete() override { QmlSensor::componentComplete(); } |