summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire350@gmail.com>2016-02-25 19:38:47 +0100
committerPaul Lemire <paul.lemire@kdab.com>2016-02-29 14:51:44 +0000
commit7d6ae77f4076a716d2dc07302b0fda155757fa37 (patch)
treeea4af59454fa94b9b16dd1720dbd7db3f45afb0a /tests
parentc3f21b4e2834fd257157728e306aef11f06e01d8 (diff)
QAction: remove name property
Change-Id: I77acc4a91067525eab4a32a64efd810a9b5863ac Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/input/action/tst_action.cpp15
-rw-r--r--tests/auto/input/qaction/tst_qaction.cpp18
2 files changed, 2 insertions, 31 deletions
diff --git a/tests/auto/input/action/tst_action.cpp b/tests/auto/input/action/tst_action.cpp
index 6e0d50e26..c9162625b 100644
--- a/tests/auto/input/action/tst_action.cpp
+++ b/tests/auto/input/action/tst_action.cpp
@@ -50,7 +50,6 @@ private Q_SLOTS:
Qt3DInput::QActionInput actionInput;
action.addInput(&actionInput);
- action.setName(QStringLiteral("L88"));
// WHEN
backendAction.setPeer(&action);
@@ -58,7 +57,6 @@ private Q_SLOTS:
// THEN
QCOMPARE(backendAction.peerUuid(), action.id());
QCOMPARE(backendAction.isEnabled(), action.isEnabled());
- QCOMPARE(backendAction.name(), action.name());
QCOMPARE(backendAction.inputs().size(), action.inputs().size());
const int inputsCount = backendAction.inputs().size();
@@ -75,7 +73,6 @@ private Q_SLOTS:
// THEN
QVERIFY(backendAction.peerUuid().isNull());
- QVERIFY(backendAction.name().isEmpty());
QCOMPARE(backendAction.actionTriggered(), false);
QCOMPARE(backendAction.isEnabled(), false);
QCOMPARE(backendAction.inputs().size(), 0);
@@ -85,7 +82,6 @@ private Q_SLOTS:
Qt3DInput::QActionInput axisInput;
axis.addInput(&axisInput);
- axis.setName(QStringLiteral("L88"));
// WHEN
backendAction.updateFromPeer(&axis);
@@ -94,7 +90,6 @@ private Q_SLOTS:
// THEN
QVERIFY(backendAction.peerUuid().isNull());
- QVERIFY(backendAction.name().isEmpty());
QCOMPARE(backendAction.actionTriggered(), false);
QCOMPARE(backendAction.isEnabled(), false);
QCOMPARE(backendAction.inputs().size(), 0);
@@ -104,15 +99,7 @@ private Q_SLOTS:
{
// GIVEN
Qt3DInput::Input::Action backendAction;
-
- // WHEN
- Qt3DCore::QScenePropertyChangePtr updateChange(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
- updateChange->setValue(QStringLiteral("LT1"));
- updateChange->setPropertyName("name");
- backendAction.sceneChangeEvent(updateChange);
-
- // THEN
- QCOMPARE(backendAction.name(), QStringLiteral("LT1"));
+ Qt3DCore::QScenePropertyChangePtr updateChange;
// WHEN
updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
diff --git a/tests/auto/input/qaction/tst_qaction.cpp b/tests/auto/input/qaction/tst_qaction.cpp
index 206a1d13a..adf8a0c46 100644
--- a/tests/auto/input/qaction/tst_qaction.cpp
+++ b/tests/auto/input/qaction/tst_qaction.cpp
@@ -61,14 +61,12 @@ private Q_SLOTS:
QTest::newRow("defaultConstructed") << defaultConstructed;
Qt3DInput::QAction *namedaction = new Qt3DInput::QAction();
- namedaction->setName(QStringLiteral("fire"));
QTest::newRow("namedAction") << namedaction;
Qt3DInput::QAction *namedactionWithInputs = new Qt3DInput::QAction();
Qt3DInput::QActionInput *actionInput1 = new Qt3DInput::QActionInput();
Qt3DInput::QActionInput *actionInput2 = new Qt3DInput::QActionInput();
Qt3DInput::QActionInput *actionInput3 = new Qt3DInput::QActionInput();
- namedactionWithInputs->setName("accelerate");
namedactionWithInputs->addInput(actionInput1);
namedactionWithInputs->addInput(actionInput2);
namedactionWithInputs->addInput(actionInput3);
@@ -87,7 +85,6 @@ private Q_SLOTS:
// THEN
QVERIFY(clone != Q_NULLPTR);
QCOMPARE(action->id(), clone->id());
- QCOMPARE(action->name(), clone->name());
QCOMPARE(action->inputs().count(), clone->inputs().count());
QCOMPARE(action->isActive(), clone->isActive());
@@ -104,26 +101,13 @@ private Q_SLOTS:
TestArbiter arbiter(action.data());
// WHEN
- action->setName(QStringLiteral("454"));
- QCoreApplication::processEvents();
-
- // THEN
- QCOMPARE(arbiter.events.size(), 1);
- Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
- QCOMPARE(change->propertyName(), "name");
- QCOMPARE(change->value().toString(), QStringLiteral("454"));
- QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
-
- arbiter.events.clear();
-
- // WHEN
Qt3DInput::QActionInput *input = new Qt3DInput::QActionInput();
action->addInput(input);
QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "input");
QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), input->id());
QCOMPARE(change->type(), Qt3DCore::NodeAdded);