summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-10-08 11:36:58 +0100
committerMike Krus <mike.krus@kdab.com>2019-10-14 19:56:26 +0100
commit0ce9f6a41571a938dde47f7f068d7fce76288813 (patch)
treea55516ec4c880c44f28a02131ffa3e8d1a84186e
parente8ef2e3e75278f18abe977927393c819d3880618 (diff)
Restore use of Added/Removed messages for aspects not supporting sync
If (third party) aspects don't support direct sync, restore use of PropertyValueAdded and PropertyValueRemoved messages so avoid breaking existing code Change-Id: Icac717583a8fe72acdb0cf599981251e310734bd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--src/animation/frontend/qchannelmapper.cpp5
-rw-r--r--src/input/frontend/qabstractphysicaldevice.cpp4
-rw-r--r--src/input/frontend/qaction.cpp4
-rw-r--r--src/input/frontend/qaxis.cpp4
-rw-r--r--src/input/frontend/qinputchord.cpp4
-rw-r--r--src/input/frontend/qinputsequence.cpp4
-rw-r--r--src/input/frontend/qlogicaldevice.cpp8
-rw-r--r--src/render/framegraph/qlayerfilter.cpp4
-rw-r--r--src/render/framegraph/qrenderpassfilter.cpp8
-rw-r--r--src/render/framegraph/qrenderstateset.cpp4
-rw-r--r--src/render/framegraph/qtechniquefilter.cpp8
-rw-r--r--src/render/frontend/qrendertarget.cpp4
-rw-r--r--src/render/geometry/qgeometry.cpp4
-rw-r--r--src/render/materialsystem/qeffect.cpp8
-rw-r--r--src/render/materialsystem/qmaterial.cpp4
-rw-r--r--src/render/materialsystem/qrenderpass.cpp12
-rw-r--r--src/render/materialsystem/qtechnique.cpp12
17 files changed, 51 insertions, 50 deletions
diff --git a/src/animation/frontend/qchannelmapper.cpp b/src/animation/frontend/qchannelmapper.cpp
index 2146290e4..ab98039b4 100644
--- a/src/animation/frontend/qchannelmapper.cpp
+++ b/src/animation/frontend/qchannelmapper.cpp
@@ -36,6 +36,7 @@
#include "qchannelmapper.h"
#include "qchannelmapper_p.h"
+#include <Qt3DCore/qscenechange.h>
#include <Qt3DAnimation/qchannelmapping.h>
QT_BEGIN_NAMESPACE
@@ -85,7 +86,7 @@ void QChannelMapper::addMapping(QAbstractChannelMapping *mapping)
if (!mapping->parent())
mapping->setParent(this);
- d->update();
+ d->updateNode(mapping, "mappings", Qt3DCore::PropertyValueAdded);
}
}
@@ -94,7 +95,7 @@ void QChannelMapper::removeMapping(QAbstractChannelMapping *mapping)
Q_ASSERT(mapping);
Q_D(QChannelMapper);
d->m_mappings.removeOne(mapping);
- d->update();
+ d->updateNode(mapping, "mappings", Qt3DCore::PropertyValueRemoved);
// Remove bookkeeping connection
d->unregisterDestructionHelper(mapping);
}
diff --git a/src/input/frontend/qabstractphysicaldevice.cpp b/src/input/frontend/qabstractphysicaldevice.cpp
index 8cadf95a1..33c86f7b8 100644
--- a/src/input/frontend/qabstractphysicaldevice.cpp
+++ b/src/input/frontend/qabstractphysicaldevice.cpp
@@ -165,7 +165,7 @@ void QAbstractPhysicalDevice::addAxisSetting(QAxisSetting *axisSetting)
{
Q_D(QAbstractPhysicalDevice);
if (axisSetting && !d->m_axisSettings.contains(axisSetting)) {
- d->update();
+ d->updateNode(axisSetting, "axisSettings", Qt3DCore::PropertyValueAdded);
d->m_axisSettings.push_back(axisSetting);
}
}
@@ -177,7 +177,7 @@ void QAbstractPhysicalDevice::removeAxisSetting(QAxisSetting *axisSetting)
{
Q_D(QAbstractPhysicalDevice);
if (axisSetting && d->m_axisSettings.contains(axisSetting)) {
- d->update();
+ d->updateNode(axisSetting, "axisSettings", Qt3DCore::PropertyValueRemoved);
d->m_axisSettings.removeOne(axisSetting);
}
}
diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp
index 8eccec9e4..c835062a2 100644
--- a/src/input/frontend/qaction.cpp
+++ b/src/input/frontend/qaction.cpp
@@ -119,7 +119,7 @@ void QAction::addInput(QAbstractActionInput *input)
// Ensures proper bookkeeping
d->registerDestructionHelper(input, &QAction::removeInput, d->m_inputs);
- d->update();
+ d->updateNode(input, "inputs", Qt3DCore::PropertyValueAdded);
}
}
@@ -131,7 +131,7 @@ void QAction::removeInput(QAbstractActionInput *input)
Q_D(QAction);
if (d->m_inputs.contains(input)) {
- d->update();
+ d->updateNode(input, "inputs", Qt3DCore::PropertyValueRemoved);
d->m_inputs.removeOne(input);
diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp
index 7c9998776..b6018c887 100644
--- a/src/input/frontend/qaxis.cpp
+++ b/src/input/frontend/qaxis.cpp
@@ -115,7 +115,7 @@ void QAxis::addInput(QAbstractAxisInput *input)
// Ensures proper bookkeeping
d->registerDestructionHelper(input, &QAxis::removeInput, d->m_inputs);
- d->update();
+ d->updateNode(input, "input", Qt3DCore::PropertyValueAdded);
}
}
@@ -137,7 +137,7 @@ void QAxis::removeInput(QAbstractAxisInput *input)
Q_D(QAxis);
if (d->m_inputs.contains(input)) {
- d->update();
+ d->updateNode(input, "input", Qt3DCore::PropertyValueRemoved);
d->m_inputs.removeOne(input);
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp
index a64cc8961..0c4d15190 100644
--- a/src/input/frontend/qinputchord.cpp
+++ b/src/input/frontend/qinputchord.cpp
@@ -154,7 +154,7 @@ void QInputChord::addChord(QAbstractActionInput *input)
if (!input->parent())
input->setParent(this);
- d->update();
+ d->updateNode(input, "input", Qt3DCore::PropertyValueAdded);
}
}
@@ -167,7 +167,7 @@ void QInputChord::removeChord(QAbstractActionInput *input)
{
Q_D(QInputChord);
if (d->m_chords.contains(input)) {
- d->update();
+ d->updateNode(input, "input", Qt3DCore::PropertyValueRemoved);
d->m_chords.removeOne(input);
diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp
index 5e0e36aba..d59ebc0f3 100644
--- a/src/input/frontend/qinputsequence.cpp
+++ b/src/input/frontend/qinputsequence.cpp
@@ -207,7 +207,7 @@ void QInputSequence::addSequence(QAbstractActionInput *input)
if (!input->parent())
input->setParent(this);
- d->update();
+ d->updateNode(input, "input", Qt3DCore::PropertyValueAdded);
}
}
@@ -220,7 +220,7 @@ void QInputSequence::removeSequence(QAbstractActionInput *input)
{
Q_D(QInputSequence);
if (d->m_sequences.contains(input)) {
- d->update();
+ d->updateNode(input, "input", Qt3DCore::PropertyValueRemoved);
d->m_sequences.removeOne(input);
diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp
index 2069be633..44e04baa8 100644
--- a/src/input/frontend/qlogicaldevice.cpp
+++ b/src/input/frontend/qlogicaldevice.cpp
@@ -173,7 +173,7 @@ void QLogicalDevice::addAction(QAction *action)
// Ensures proper bookkeeping
d->registerDestructionHelper(action, &QLogicalDevice::removeAction, d->m_actions);
- d->update();
+ d->updateNode(action, "action", Qt3DCore::PropertyValueAdded);
}
}
@@ -184,7 +184,7 @@ void QLogicalDevice::removeAction(QAction *action)
{
Q_D(QLogicalDevice);
if (d->m_actions.contains(action)) {
- d->update();
+ d->updateNode(action, "action", Qt3DCore::PropertyValueRemoved);
d->m_actions.removeOne(action);
@@ -224,7 +224,7 @@ void QLogicalDevice::addAxis(QAxis *axis)
// Ensures proper bookkeeping
d->registerDestructionHelper(axis, &QLogicalDevice::removeAxis, d->m_axes);
- d->update();
+ d->updateNode(axis, "axis", Qt3DCore::PropertyValueAdded);
}
}
@@ -235,7 +235,7 @@ void QLogicalDevice::removeAxis(QAxis *axis)
{
Q_D(QLogicalDevice);
if (d->m_axes.contains(axis)) {
- d->update();
+ d->updateNode(axis, "axis", Qt3DCore::PropertyValueRemoved);
d->m_axes.removeOne(axis);
diff --git a/src/render/framegraph/qlayerfilter.cpp b/src/render/framegraph/qlayerfilter.cpp
index 5080012fd..8bad46f5d 100644
--- a/src/render/framegraph/qlayerfilter.cpp
+++ b/src/render/framegraph/qlayerfilter.cpp
@@ -203,7 +203,7 @@ void QLayerFilter::addLayer(QLayer *layer)
if (!layer->parent())
layer->setParent(this);
- d->update();
+ d->updateNode(layer, "layer", Qt3DCore::PropertyValueAdded);
}
}
@@ -214,7 +214,7 @@ void QLayerFilter::removeLayer(QLayer *layer)
{
Q_ASSERT(layer);
Q_D(QLayerFilter);
- d->update();
+ d->updateNode(layer, "layer", Qt3DCore::PropertyValueRemoved);
d->m_layers.removeOne(layer);
// Remove bookkeeping connection
d->unregisterDestructionHelper(layer);
diff --git a/src/render/framegraph/qrenderpassfilter.cpp b/src/render/framegraph/qrenderpassfilter.cpp
index 778d3fa1f..952657eb6 100644
--- a/src/render/framegraph/qrenderpassfilter.cpp
+++ b/src/render/framegraph/qrenderpassfilter.cpp
@@ -139,7 +139,7 @@ void QRenderPassFilter::addMatch(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- d->update();
+ d->updateNode(filterKey, "match", Qt3DCore::PropertyValueAdded);
}
}
@@ -151,7 +151,7 @@ void QRenderPassFilter::removeMatch(QFilterKey *filterKey)
Q_ASSERT(filterKey);
Q_D(QRenderPassFilter);
- d->update();
+ d->updateNode(filterKey, "match", Qt3DCore::PropertyValueRemoved);
d->m_matchList.removeOne(filterKey);
// Remove bookkeeping connection
d->unregisterDestructionHelper(filterKey);
@@ -177,7 +177,7 @@ void QRenderPassFilter::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueAdded);
}
}
@@ -189,7 +189,7 @@ void QRenderPassFilter::removeParameter(QParameter *parameter)
Q_ASSERT(parameter);
Q_D(QRenderPassFilter);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
d->m_parameters.removeOne(parameter);
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
diff --git a/src/render/framegraph/qrenderstateset.cpp b/src/render/framegraph/qrenderstateset.cpp
index 8c2c6ee7f..5341b3c7d 100644
--- a/src/render/framegraph/qrenderstateset.cpp
+++ b/src/render/framegraph/qrenderstateset.cpp
@@ -191,7 +191,7 @@ void QRenderStateSet::addRenderState(QRenderState *state)
if (!state->parent())
state->setParent(this);
- d->update();
+ d->updateNode(state, "renderState", Qt3DCore::PropertyValueAdded);
}
}
@@ -203,7 +203,7 @@ void QRenderStateSet::removeRenderState(QRenderState *state)
Q_ASSERT(state);
Q_D(QRenderStateSet);
- d->update();
+ d->updateNode(state, "renderState", Qt3DCore::PropertyValueRemoved);
d->m_renderStates.removeOne(state);
// Remove bookkeeping connection
d->unregisterDestructionHelper(state);
diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp
index 03e6a8ca7..c22e83381 100644
--- a/src/render/framegraph/qtechniquefilter.cpp
+++ b/src/render/framegraph/qtechniquefilter.cpp
@@ -144,7 +144,7 @@ void QTechniqueFilter::addMatch(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- d->update();
+ d->updateNode(filterKey, "matchAll", Qt3DCore::PropertyValueAdded);
}
}
@@ -155,7 +155,7 @@ void QTechniqueFilter::removeMatch(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QTechniqueFilter);
- d->update();
+ d->updateNode(filterKey, "matchAll", Qt3DCore::PropertyValueRemoved);
d->m_matchList.removeOne(filterKey);
// Remove bookkeeping connection
d->unregisterDestructionHelper(filterKey);
@@ -181,7 +181,7 @@ void QTechniqueFilter::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueAdded);
}
}
@@ -192,7 +192,7 @@ void QTechniqueFilter::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QTechniqueFilter);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
d->m_parameters.removeOne(parameter);
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp
index 7269a8067..57eecd795 100644
--- a/src/render/frontend/qrendertarget.cpp
+++ b/src/render/frontend/qrendertarget.cpp
@@ -123,7 +123,7 @@ void QRenderTarget::addOutput(QRenderTargetOutput *output)
if (!output->parent())
output->setParent(this);
- d->update();
+ d->updateNode(output, "output", Qt3DCore::PropertyValueAdded);
}
}
@@ -134,7 +134,7 @@ void QRenderTarget::removeOutput(QRenderTargetOutput *output)
{
Q_D(QRenderTarget);
- d->update();
+ d->updateNode(output, "output", Qt3DCore::PropertyValueRemoved);
d->m_outputs.removeOne(output);
// Remove bookkeeping connection
d->unregisterDestructionHelper(output);
diff --git a/src/render/geometry/qgeometry.cpp b/src/render/geometry/qgeometry.cpp
index 4b0bca3b3..48f054bce 100644
--- a/src/render/geometry/qgeometry.cpp
+++ b/src/render/geometry/qgeometry.cpp
@@ -194,7 +194,7 @@ void QGeometry::addAttribute(QAttribute *attribute)
if (!attribute->parent())
attribute->setParent(this);
- d->update();
+ d->updateNode(attribute, "attribute", Qt3DCore::PropertyValueAdded);
}
}
@@ -209,7 +209,7 @@ void QGeometry::removeAttribute(QAttribute *attribute)
d->m_attributes.removeOne(attribute);
// Remove bookkeeping connection
d->unregisterDestructionHelper(attribute);
- d->update();
+ d->updateNode(attribute, "attribute", Qt3DCore::PropertyValueRemoved);
}
void QGeometry::setBoundingVolumePositionAttribute(QAttribute *boundingVolumePositionAttribute)
diff --git a/src/render/materialsystem/qeffect.cpp b/src/render/materialsystem/qeffect.cpp
index 35f4d64a9..bac7972b6 100644
--- a/src/render/materialsystem/qeffect.cpp
+++ b/src/render/materialsystem/qeffect.cpp
@@ -188,7 +188,7 @@ void QEffect::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueAdded);
}
}
@@ -202,7 +202,7 @@ void QEffect::removeParameter(QParameter *parameter)
d->m_parameters.removeOne(parameter);
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
}
/*!
@@ -234,7 +234,7 @@ void QEffect::addTechnique(QTechnique *t)
if (!t->parent())
t->setParent(this);
- d->update();
+ d->updateNode(t, "technique", Qt3DCore::PropertyValueAdded);
}
}
@@ -245,7 +245,7 @@ void QEffect::removeTechnique(QTechnique *t)
{
Q_D(QEffect);
if (t)
- d->update();
+ d->updateNode(t, "technique", Qt3DCore::PropertyValueRemoved);
d->m_techniques.removeOne(t);
// Remove bookkeeping connection
d->unregisterDestructionHelper(t);
diff --git a/src/render/materialsystem/qmaterial.cpp b/src/render/materialsystem/qmaterial.cpp
index db286de6b..edd227500 100644
--- a/src/render/materialsystem/qmaterial.cpp
+++ b/src/render/materialsystem/qmaterial.cpp
@@ -272,7 +272,7 @@ void QMaterial::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueAdded);
}
}
@@ -283,7 +283,7 @@ void QMaterial::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QMaterial);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
d->m_parameters.removeOne(parameter);
}
diff --git a/src/render/materialsystem/qrenderpass.cpp b/src/render/materialsystem/qrenderpass.cpp
index e9dd50325..dcb831b13 100644
--- a/src/render/materialsystem/qrenderpass.cpp
+++ b/src/render/materialsystem/qrenderpass.cpp
@@ -274,7 +274,7 @@ void QRenderPass::addFilterKey(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- d->update();
+ d->updateNode(filterKey, "filterKeys", Qt3DCore::PropertyValueAdded);
}
}
@@ -285,7 +285,7 @@ void QRenderPass::removeFilterKey(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QRenderPass);
- d->update();
+ d->updateNode(filterKey, "filterKeys", Qt3DCore::PropertyValueRemoved);
d->m_filterKeyList.removeOne(filterKey);
// Remove bookkeeping connection
d->unregisterDestructionHelper(filterKey);
@@ -322,7 +322,7 @@ void QRenderPass::addRenderState(QRenderState *state)
if (!state->parent())
state->setParent(this);
- d->update();
+ d->updateNode(state, "renderState", Qt3DCore::PropertyValueAdded);
}
}
@@ -333,7 +333,7 @@ void QRenderPass::removeRenderState(QRenderState *state)
{
Q_ASSERT(state);
Q_D(QRenderPass);
- d->update();
+ d->updateNode(state, "renderState", Qt3DCore::PropertyValueRemoved);
d->m_renderStates.removeOne(state);
// Remove bookkeeping connection
d->unregisterDestructionHelper(state);
@@ -369,7 +369,7 @@ void QRenderPass::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueAdded);
}
}
@@ -380,7 +380,7 @@ void QRenderPass::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QRenderPass);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
d->m_parameters.removeOne(parameter);
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
diff --git a/src/render/materialsystem/qtechnique.cpp b/src/render/materialsystem/qtechnique.cpp
index 2b96aa285..bbf29df22 100644
--- a/src/render/materialsystem/qtechnique.cpp
+++ b/src/render/materialsystem/qtechnique.cpp
@@ -254,7 +254,7 @@ void QTechnique::addFilterKey(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- d->update();
+ d->updateNode(filterKey, "filterKeys", Qt3DCore::PropertyValueAdded);
}
}
@@ -265,7 +265,7 @@ void QTechnique::removeFilterKey(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QTechnique);
- d->update();
+ d->updateNode(filterKey, "filterKeys", Qt3DCore::PropertyValueRemoved);
d->m_filterKeys.removeOne(filterKey);
// Remove bookkeeping connection
d->unregisterDestructionHelper(filterKey);
@@ -301,7 +301,7 @@ void QTechnique::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueAdded);
}
}
@@ -312,7 +312,7 @@ void QTechnique::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QTechnique);
- d->update();
+ d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
d->m_parameters.removeOne(parameter);
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
@@ -338,7 +338,7 @@ void QTechnique::addRenderPass(QRenderPass *pass)
if (!pass->parent())
pass->setParent(this);
- d->update();
+ d->updateNode(pass, "pass", Qt3DCore::PropertyValueAdded);
}
}
@@ -349,7 +349,7 @@ void QTechnique::removeRenderPass(QRenderPass *pass)
{
Q_ASSERT(pass);
Q_D(QTechnique);
- d->update();
+ d->updateNode(pass, "pass", Qt3DCore::PropertyValueAdded);
d->m_renderPasses.removeOne(pass);
// Remove bookkeeping connection
d->unregisterDestructionHelper(pass);