summaryrefslogtreecommitdiffstats
path: root/tests/auto/input/action/tst_action.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-04-22 15:15:46 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-04-27 11:18:05 +0000
commit5a3e1ba26cf715c58ba2a6fc28983f4e1a808a0a (patch)
tree1e666f9fc25e7bff215f9e857cb8f180d67bfe79 /tests/auto/input/action/tst_action.cpp
parent6eaf0bbc7454b82138e6a6340aff481b6d38029e (diff)
QAction/Action use new added/removed change types
Change-Id: Ibd36a71ac89a9db75560ee8f74ca1b44b8e08e21 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/input/action/tst_action.cpp')
-rw-r--r--tests/auto/input/action/tst_action.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/input/action/tst_action.cpp b/tests/auto/input/action/tst_action.cpp
index 83189a3fa..e187647a2 100644
--- a/tests/auto/input/action/tst_action.cpp
+++ b/tests/auto/input/action/tst_action.cpp
@@ -30,6 +30,8 @@
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qscene_p.h>
#include <Qt3DCore/qnodepropertychange.h>
+#include <Qt3DCore/qnodeaddedpropertychange.h>
+#include <Qt3DCore/qnoderemovedpropertychange.h>
#include <Qt3DInput/private/action_p.h>
#include <Qt3DInput/QActionInput>
#include <Qt3DInput/QAction>
@@ -112,20 +114,18 @@ private Q_SLOTS:
// WHEN
Qt3DCore::QNodeId inputId = Qt3DCore::QNodeId::createId();
- updateChange.reset(new Qt3DCore::QNodePropertyChange(Qt3DCore::NodeAdded, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
- updateChange->setPropertyName("input");
- updateChange->setValue(QVariant::fromValue(inputId));
- backendAction.sceneChangeEvent(updateChange);
+ const auto nodeAddedChange = Qt3DCore::QNodeAddedPropertyChangePtr::create(Qt3DCore::QNodeId(), inputId);
+ nodeAddedChange->setPropertyName("input");
+ backendAction.sceneChangeEvent(nodeAddedChange);
// THEN
QCOMPARE(backendAction.inputs().size(), 1);
QCOMPARE(backendAction.inputs().first(), inputId);
// WHEN
- updateChange.reset(new Qt3DCore::QNodePropertyChange(Qt3DCore::NodeRemoved, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
- updateChange->setPropertyName("input");
- updateChange->setValue(QVariant::fromValue(inputId));
- backendAction.sceneChangeEvent(updateChange);
+ const auto nodeRemovedChange = Qt3DCore::QNodeRemovedPropertyChangePtr::create(Qt3DCore::QNodeId(), inputId);
+ nodeRemovedChange->setPropertyName("input");
+ backendAction.sceneChangeEvent(nodeRemovedChange);
// THEN
QCOMPARE(backendAction.inputs().size(), 0);