diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-13 13:56:09 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-13 13:56:09 +0200 |
commit | 829675b65b8a9d661828b18bbd2703744d4c3db7 (patch) | |
tree | 9ed2b9fd867e34ef534f79f10e3493a17bd24b76 /src/animation | |
parent | e9642824244fa9fe55dca2cef8e002192a4f1b17 (diff) | |
parent | 2b0f52bd4c2c9035d5ca1672e4ce4229490eb655 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
tests/auto/render/shaderbuilder/tst_shaderbuilder.cpp
Change-Id: I27de9b83fa6ef6bb319e4b11c932f91f9ff92dc3
Diffstat (limited to 'src/animation')
-rw-r--r-- | src/animation/backend/animationutils.cpp | 2 | ||||
-rw-r--r-- | src/animation/backend/channelmapping.cpp | 5 | ||||
-rw-r--r-- | src/animation/backend/channelmapping_p.h | 4 | ||||
-rw-r--r-- | src/animation/frontend/qchannelmapping.cpp | 6 | ||||
-rw-r--r-- | src/animation/frontend/qchannelmapping_p.h | 1 |
5 files changed, 6 insertions, 12 deletions
diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp index 17826e946..01484476d 100644 --- a/src/animation/backend/animationutils.cpp +++ b/src/animation/backend/animationutils.cpp @@ -526,7 +526,7 @@ QVector<MappingData> buildPropertyMappings(const QVector<ChannelMapping*> &chann if (mappingData.type == static_cast<int>(QVariant::Invalid)) { qWarning() << "Unknown type for node id =" << mappingData.targetId - << "and property =" << mapping->property() + << "and property =" << mapping->propertyName() << "and callback =" << mapping->callback(); continue; } diff --git a/src/animation/backend/channelmapping.cpp b/src/animation/backend/channelmapping.cpp index d8572a074..2323182c6 100644 --- a/src/animation/backend/channelmapping.cpp +++ b/src/animation/backend/channelmapping.cpp @@ -53,7 +53,6 @@ ChannelMapping::ChannelMapping() : BackendNode(ReadOnly) , m_channelName() , m_targetId() - , m_property() , m_type(static_cast<int>(QVariant::Invalid)) , m_componentCount(0) , m_propertyName(nullptr) @@ -73,7 +72,6 @@ void ChannelMapping::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePt const auto &data = typedChange->data; m_channelName = data.channelName; m_targetId = data.targetId; - m_property = data.property; m_type = data.type; m_componentCount = data.componentCount; m_propertyName = data.propertyName; @@ -107,7 +105,6 @@ void ChannelMapping::cleanup() setEnabled(false); m_channelName.clear(); m_targetId = Qt3DCore::QNodeId(); - m_property.clear(); m_type = static_cast<int>(QVariant::Invalid); m_propertyName = nullptr; m_componentCount = 0; @@ -125,8 +122,6 @@ void ChannelMapping::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) m_channelName = change->value().toString(); else if (change->propertyName() == QByteArrayLiteral("target")) m_targetId = change->value().value<Qt3DCore::QNodeId>(); - else if (change->propertyName() == QByteArrayLiteral("property")) - m_property = change->value().toString(); else if (change->propertyName() == QByteArrayLiteral("type")) m_type = change->value().toInt(); else if (change->propertyName() == QByteArrayLiteral("propertyName")) diff --git a/src/animation/backend/channelmapping_p.h b/src/animation/backend/channelmapping_p.h index 5159adae2..aa30e84ee 100644 --- a/src/animation/backend/channelmapping_p.h +++ b/src/animation/backend/channelmapping_p.h @@ -84,9 +84,6 @@ public: void setTargetId(Qt3DCore::QNodeId targetId) { m_targetId = targetId; } Qt3DCore::QNodeId targetId() const { return m_targetId; } - void setProperty(const QString &property) { m_property = property; } - QString property() const { return m_property; } - void setType(int type) { m_type = type; } int type() const { return m_type; } @@ -115,7 +112,6 @@ private: // Properties from QChannelMapping QString m_channelName; Qt3DCore::QNodeId m_targetId; - QString m_property; int m_type; int m_componentCount; const char *m_propertyName; diff --git a/src/animation/frontend/qchannelmapping.cpp b/src/animation/frontend/qchannelmapping.cpp index 0dbe68c8c..8f6ebe9ab 100644 --- a/src/animation/frontend/qchannelmapping.cpp +++ b/src/animation/frontend/qchannelmapping.cpp @@ -257,7 +257,12 @@ void QChannelMapping::setProperty(const QString &property) return; d->m_property = property; + + // The backend uses propertyName instead of property + const bool blocked = blockNotifications(true); emit propertyChanged(property); + blockNotifications(blocked); + d->updatePropertyNameTypeAndComponentCount(); } @@ -268,7 +273,6 @@ Qt3DCore::QNodeCreatedChangeBasePtr QChannelMapping::createNodeCreationChange() Q_D(const QChannelMapping); data.channelName = d->m_channelName; data.targetId = Qt3DCore::qIdForNode(d->m_target); - data.property = d->m_property; data.type = d->m_type; data.componentCount = d->m_componentCount; data.propertyName = d->m_propertyName; diff --git a/src/animation/frontend/qchannelmapping_p.h b/src/animation/frontend/qchannelmapping_p.h index 6a3f1afc5..0ab66a7f7 100644 --- a/src/animation/frontend/qchannelmapping_p.h +++ b/src/animation/frontend/qchannelmapping_p.h @@ -77,7 +77,6 @@ struct QChannelMappingData { QString channelName; Qt3DCore::QNodeId targetId; - QString property; int type; int componentCount; const char *propertyName; |