aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleksei German <[email protected]>2020-05-29 17:02:53 +0200
committerAleksei German <[email protected]>2020-06-02 09:28:39 +0000
commit95c4da7dd0d29a7955b2a83ec9fcdfe9dc71ce71 (patch)
treed70348dfad6695c00be80b113e232ee8157febd7 /src
parent0e1fb1cf06d74910fe135b0cf609949e6b3f2df1 (diff)
QmlDesigner: Dynamic properties in Bindind Editor
Change-Id: Iaf0b78546905cacbc7e1a5524aaf918f253e0131 Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp
index fe3871c6c16..82947e8c981 100644
--- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp
+++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp
@@ -35,6 +35,9 @@
#include <nodelistproperty.h>
#include <propertyeditorvalue.h>
+#include <bindingproperty.h>
+#include <variantproperty.h>
+
namespace QmlDesigner {
static BindingEditor *s_lastBindingEditor = nullptr;
@@ -172,6 +175,26 @@ void BindingEditor::prepareBindings()
binding.properties.append(QString::fromUtf8(propertyName));
}
+ //dynamic properties:
+ for (const BindingProperty &bindingProperty : objnode.bindingProperties()) {
+ if (bindingProperty.isValid()) {
+ if (bindingProperty.isDynamic()) {
+ if (bindingProperty.dynamicTypeName() == m_backendValueTypeName) {
+ binding.properties.append(QString::fromUtf8(bindingProperty.name()));
+ }
+ }
+ }
+ }
+ for (const VariantProperty &variantProperty : objnode.variantProperties()) {
+ if (variantProperty.isValid()) {
+ if (variantProperty.isDynamic()) {
+ if (variantProperty.dynamicTypeName() == m_backendValueTypeName) {
+ binding.properties.append(QString::fromUtf8(variantProperty.name()));
+ }
+ }
+ }
+ }
+
if (!binding.properties.isEmpty() && objnode.hasId()) {
binding.item = objnode.displayName();
bindings.append(binding);