diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-06-13 14:33:07 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-06-14 14:38:17 +0300 |
commit | 768e8ba4cc6d1a23d94f4aee87b76b214e73603a (patch) | |
tree | e34b5d14338fe6407c07a6ccb3fb7584dfbf6500 /tests | |
parent | 394b155234e256cf774f107178bc04cbaaedfc1d (diff) |
Remove datainput control bindings from map on deleteElement
Update internal datainput control map when dynamically created elements
are deleted. This avoids leaving invalid entries to performance-critical
map lookups. Also fix typo in test code.
Change-Id: I2b6490bf6de607d303fe0f94496b5b0cfff4c463
Task-id: QT3DS-3635
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/viewer/tst_qt3dsviewer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/viewer/tst_qt3dsviewer.cpp b/tests/auto/viewer/tst_qt3dsviewer.cpp index c9787fd..2273f89 100644 --- a/tests/auto/viewer/tst_qt3dsviewer.cpp +++ b/tests/auto/viewer/tst_qt3dsviewer.cpp @@ -226,7 +226,7 @@ void tst_qt3dsviewer::testCreateElement() data.insert(QStringLiteral("position"), QVariant::fromValue<QVector3D>(QVector3D(200, 300, 200))); data.insert(QStringLiteral("opacity"), 20.0); - data.insert(QStringLiteral("controlledproperty"), QStringLiteral("@newDataInput opacity")); + data.insert(QStringLiteral("controlledproperty"), QStringLiteral("$newDataInput opacity")); createElement(QStringLiteral("Scene.Layer"), QStringLiteral("Slide1"), data); @@ -284,6 +284,8 @@ void tst_qt3dsviewer::testCreateElement() data.insert(QStringLiteral("endtime"), 10000); data.insert(QStringLiteral("position"), QVariant::fromValue<QVector3D>(QVector3D(-100, -100, 0))); + // Test that this datainput control entry is removed at element delete + data.insert(QStringLiteral("controlledproperty"), QStringLiteral("$newDataInput opacity")); createElement(QStringLiteral("Scene.Layer"), QStringLiteral("Slide2"), data); |