diff options
author | Paul Lemire <paul.lemire350@gmail.com> | 2017-01-25 22:15:40 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2017-01-26 07:09:46 +0000 |
commit | 2027879e93e1097092237ed94a149efcbb756bac (patch) | |
tree | c07969a134d8571eb6a2f3a5eb5f75d59215302a /tests/auto/input | |
parent | 393ab950be4a622dc2616c061eeb4f2194991093 (diff) |
Set the final flag on scene changes coming from the backend
This fixes a regression introduced by the patch introducing property tracking.
Change-Id: Ib2e41183ea1ff389e6bad97cfa308311ee024541
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/auto/input')
4 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/input/action/tst_action.cpp b/tests/auto/input/action/tst_action.cpp index ab191be22..da27446f6 100644 --- a/tests/auto/input/action/tst_action.cpp +++ b/tests/auto/input/action/tst_action.cpp @@ -37,6 +37,7 @@ #include <Qt3DInput/QActionInput> #include <Qt3DInput/QAction> #include <Qt3DCore/private/qbackendnode_p.h> +#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h> #include "testpostmanarbiter.h" class DummyActionInput : public Qt3DInput::QActionInput @@ -159,6 +160,8 @@ private Q_SLOTS: Qt3DCore::QPropertyUpdatedChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>(); QCOMPARE(change->propertyName(), "active"); QCOMPARE(change->value().toBool(), backendAction.actionTriggered()); + QCOMPARE(Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(change.data())->m_isFinal, true); + arbiter.events.clear(); diff --git a/tests/auto/input/axis/tst_axis.cpp b/tests/auto/input/axis/tst_axis.cpp index dc8b225ba..90f774489 100644 --- a/tests/auto/input/axis/tst_axis.cpp +++ b/tests/auto/input/axis/tst_axis.cpp @@ -38,6 +38,7 @@ #include <Qt3DInput/QAnalogAxisInput> #include <Qt3DInput/QAxis> #include <Qt3DCore/private/qbackendnode_p.h> +#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h> #include "testpostmanarbiter.h" class DummyAxisInput : public Qt3DInput::QAbstractAxisInput @@ -159,6 +160,7 @@ private Q_SLOTS: Qt3DCore::QPropertyUpdatedChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>(); QCOMPARE(change->propertyName(), "value"); QCOMPARE(change->value().toFloat(), backendAxis.axisValue()); + QCOMPARE(Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(change.data())->m_isFinal, true); arbiter.events.clear(); diff --git a/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp b/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp index 94cb71030..9728ac0d0 100644 --- a/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp +++ b/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp @@ -41,6 +41,7 @@ #include <Qt3DInput/QAxis> #include <Qt3DInput/QAxisAccumulator> #include <Qt3DCore/private/qbackendnode_p.h> +#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h> #include "testpostmanarbiter.h" class tst_AxisAccumulator: public Qt3DCore::QBackendNodeTester @@ -169,6 +170,7 @@ private Q_SLOTS: Qt3DCore::QPropertyUpdatedChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>(); QCOMPARE(change->propertyName(), "value"); QCOMPARE(change->value().toFloat(), backendAxisAccumulator.value()); + QCOMPARE(Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(change.data())->m_isFinal, true); arbiter.events.clear(); @@ -191,6 +193,7 @@ private Q_SLOTS: Qt3DCore::QPropertyUpdatedChangePtr velocityChange = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>(); QCOMPARE(velocityChange->propertyName(), "velocity"); QCOMPARE(velocityChange->value().toFloat(), backendAxisAccumulator.velocity()); + QCOMPARE(Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(change.data())->m_isFinal, true); arbiter.events.clear(); diff --git a/tests/auto/input/physicaldeviceproxy/tst_physicaldeviceproxy.cpp b/tests/auto/input/physicaldeviceproxy/tst_physicaldeviceproxy.cpp index e4d384dba..a5f54aec9 100644 --- a/tests/auto/input/physicaldeviceproxy/tst_physicaldeviceproxy.cpp +++ b/tests/auto/input/physicaldeviceproxy/tst_physicaldeviceproxy.cpp @@ -34,10 +34,12 @@ #include <Qt3DInput/private/inputmanagers_p.h> #include <Qt3DCore/qpropertyupdatedchange.h> #include <Qt3DCore/private/qbackendnode_p.h> +#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h> #include "qbackendnodetester.h" #include "testdeviceproxy.h" #include "testpostmanarbiter.h" + class tst_PhysicalDeviceProxy : public Qt3DCore::QBackendNodeTester { Q_OBJECT @@ -126,6 +128,7 @@ private Q_SLOTS: QCOMPARE(change->value().value<Qt3DInput::QAbstractPhysicalDevice *>(), &physicalDevice); QCOMPARE(change->subjectId(), backendPhysicalDeviceProxy.peerId()); QCOMPARE(backendPhysicalDeviceProxy.physicalDeviceId(), physicalDevice.id()); + QCOMPARE(Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(change.data())->m_isFinal, true); } void checkCleanupState() |