QmlPuppet: Introduce DesignerCustomObjectData

This class holds the additional data we use to annotate QObject.
At the moment we store the default values and bindings there.
I also moved the code to populate and read the hashes
into that class.

Change-Id: Ib5e4b5291cfd2bf5555a896bf42578d07f2c6253
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2015-05-19 16:11:35 +02:00
committed by Thomas Hartmann
parent 7b0ae1ad0a
commit a54bdf3dc7
7 changed files with 353 additions and 88 deletions
@@ -150,7 +150,6 @@ public:
void populateResetHashes();
bool hasValidResetBinding(const PropertyName &propertyName) const;
QQmlAbstractBinding *resetBinding(const PropertyName &propertyName) const;
QVariant resetValue(const PropertyName &propertyName) const;
QObject *object() const;
@@ -163,7 +162,7 @@ public:
void setInLayoutable(bool isInLayoutable);
virtual void refreshLayoutable();
bool hasBindingForProperty(const PropertyName &name, bool *hasChanged = 0) const;
bool hasBindingForProperty(const PropertyName &propertyName, bool *hasChanged = 0) const;
QQmlContext *context() const;
QQmlEngine *engine() const;
@@ -199,9 +198,6 @@ protected:
static QVariant enumationValue(const Enumeration &enumeration);
private:
QHash<PropertyName, QVariant> m_resetValueHash;
QHash<PropertyName, QWeakPointer<QQmlAbstractBinding> > m_resetBindingHash;
mutable QHash<PropertyName, bool> m_hasBindingHash;
QString m_id;
QPointer<NodeInstanceServer> m_nodeInstanceServer;