summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlparser.cpp')
-rw-r--r--src/declarative/qml/qmlparser.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp
index 54db32e..ecb6f0b 100644
--- a/src/declarative/qml/qmlparser.cpp
+++ b/src/declarative/qml/qmlparser.cpp
@@ -55,8 +55,8 @@
#include <qmlbasicscript.h>
#include "private/qmetaobjectbuilder_p.h"
#include <private/qmlvmemetaobject_p.h>
-#include "private/qmlxmlparser_p.h"
#include <private/qmlcompiler_p.h>
+#include <QtDebug>
QT_BEGIN_NAMESPACE
@@ -70,16 +70,16 @@ QmlParser::Object::Object()
QmlParser::Object::~Object()
{
- if(defaultProperty) defaultProperty->release();
+ if (defaultProperty) defaultProperty->release();
foreach(Property *prop, properties)
prop->release();
- if(dynamicPropertiesProperty) dynamicPropertiesProperty->release();
- if(dynamicSignalsProperty) dynamicSignalsProperty->release();
+ if (dynamicPropertiesProperty) dynamicPropertiesProperty->release();
+ if (dynamicSignalsProperty) dynamicSignalsProperty->release();
}
const QMetaObject *Object::metaObject() const
{
- if(extObject && metatype)
+ if (extObject && metatype)
return extObject;
else
return metatype;
@@ -87,15 +87,15 @@ const QMetaObject *Object::metaObject() const
QmlParser::Property *Object::getDefaultProperty()
{
- if(!defaultProperty)
+ if (!defaultProperty)
defaultProperty = new Property;
return defaultProperty;
}
Property *QmlParser::Object::getProperty(const QByteArray &name, bool create)
{
- if(!properties.contains(name)) {
- if(create)
+ if (!properties.contains(name)) {
+ if (create)
properties.insert(name, new Property(name));
else
return 0;
@@ -140,17 +140,23 @@ QmlParser::Property::~Property()
{
foreach(Value *value, values)
value->release();
- if(value) value->release();
+ if (value) value->release();
}
Object *QmlParser::Property::getValue()
{
- if(!value) value = new Object;
+ if (!value) value = new Object;
return value;
}
void QmlParser::Property::addValue(Value *v)
{
+ if (::getenv("DUI_DEBUG")) {
+ if (v->object)
+ qDebug() << "Property" << name << "addValue Object(" << v->object->typeName << ")";
+ else
+ qDebug() << "Property" << name << "addValue" << v->primitive;
+ }
values << v;
}
@@ -161,7 +167,7 @@ QmlParser::Value::Value()
QmlParser::Value::~Value()
{
- if(object) object->release();
+ if (object) object->release();
}
QT_END_NAMESPACE