Commit b00a7f03 authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann

QmlDesigner: Fix attached properties call

Accessible.role for example was not found.

Change-Id: Ibd2f47d43705d5d450e572cbb9c786c75f7912b3
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 73bcbdfc
......@@ -199,7 +199,8 @@ NodeInstanceMetaObject::~NodeInstanceMetaObject()
void NodeInstanceMetaObject::createNewProperty(const QString &name)
{
int id = createProperty(name.toUtf8(), 0);
int id = m_type->createProperty(name.toUtf8());
copyTypeMetaObject();
setValue(id, QVariant());
Q_ASSERT(id >= 0);
Q_UNUSED(id);
......@@ -214,13 +215,6 @@ void NodeInstanceMetaObject::createNewProperty(const QString &name)
Q_ASSERT(property.isValid());
}
int NodeInstanceMetaObject::createProperty(const char *name, const char *)
{
int id = m_type->createProperty(name);
copyTypeMetaObject();
return id;
}
void NodeInstanceMetaObject::setValue(int id, const QVariant &value)
{
QPair<QVariant, bool> &prop = m_data->getDataRef(id);
......
......@@ -63,7 +63,6 @@ protected:
int metaCall(QMetaObject::Call _c, int _id, void **_a);
void notifyPropertyChange(int id);
void setValue(int id, const QVariant &value);
int createProperty(const char *, const char *);
QVariant propertyWriteValue(int, const QVariant &);
QObject *myObject() const { return QQmlVMEMetaObject::object; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment