summaryrefslogtreecommitdiff
path: root/tests/auto/sensors2qmlapi/sensors2qmlapi.pro
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-12-02 15:00:16 +0100
committerAndy Shaw <andy.shaw@qt.io>2020-02-12 21:49:31 +0000
commit4fe529cc793305c24f58c4c32d57f2923ff7750a (patch)
tree5c36417a6855f2205b00c02820bf1d4c5a13ef18 /tests/auto/sensors2qmlapi/sensors2qmlapi.pro
parentc39e6eb10105a2bb0847129bfb1f7dcdc7dd5cf5 (diff)
downloadqtsensors-4fe529cc793305c24f58c4c32d57f2923ff7750a.tar.gz
Fix QML API for sensor ranges
Previously the QQmlListProperties were constructed on stack-allocated lists, which immediately turned into dangling pointers on return. Also, none of the sensor ranges was ever deleted. Keep the sensor ranges in persistent lists in the private object, parent them to the main QmlSensor object, and add some tests for them. Fixes: QTBUG-79224 Change-Id: Ie61d0aaeaaaf998c1d1f46f60c81848ae48659d6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit f6b550ea5eae80124576766fe1a9609ae5aba1e3)
Diffstat (limited to 'tests/auto/sensors2qmlapi/sensors2qmlapi.pro')
-rw-r--r--tests/auto/sensors2qmlapi/sensors2qmlapi.pro4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/sensors2qmlapi/sensors2qmlapi.pro b/tests/auto/sensors2qmlapi/sensors2qmlapi.pro
index 3d5e237..7438866 100644
--- a/tests/auto/sensors2qmlapi/sensors2qmlapi.pro
+++ b/tests/auto/sensors2qmlapi/sensors2qmlapi.pro
@@ -5,12 +5,16 @@ CONFIG += testcase
QT = core testlib sensors-private qml
SOURCES += tst_sensors2qmlapi.cpp \
+ ./../../../src/imports/sensors/qmlsensor.cpp \
./../../../src/imports/sensors/qmlsensorgesture.cpp \
+ ./../../../src/imports/sensors/qmlsensorrange.cpp \
qtemplategestureplugin.cpp \
qtemplaterecognizer.cpp
HEADERS += \
+ ./../../../src/imports/sensors/qmlsensor.h \
./../../../src/imports/sensors/qmlsensorgesture.h \
+ ./../../../src/imports/sensors/qmlsensorrange.h \
qtemplategestureplugin.h \
qtemplaterecognizer.h