summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-06-16 10:54:52 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2021-06-22 13:45:41 +0300
commit89905b1ea1c81013d21093c95f6fee2665fdaa69 (patch)
tree42da5f372296faa3461378d0fe5bcf4bb2e64aa0 /tests
parent8ca52678587e2c7e7bc45bf205a734aad72e3008 (diff)
downloadqtsensors-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.cpp5
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(); }