diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 04:19:28 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 04:19:28 (GMT) |
commit | 76f5e9e7d1eea8d688d5459b7b7b2bfa3f9057ed (patch) | |
tree | 864d46ad7d17073038c42fec9d202c86a9100948 /src | |
parent | 948263bf4bdfec1383f22fc0db50bafca2f8b5c8 (diff) | |
download | Qt-76f5e9e7d1eea8d688d5459b7b7b2bfa3f9057ed.zip Qt-76f5e9e7d1eea8d688d5459b7b7b2bfa3f9057ed.tar.gz Qt-76f5e9e7d1eea8d688d5459b7b7b2bfa3f9057ed.tar.bz2 |
Don't optimized extended type construction
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativemetatype.cpp | 7 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativemetatype_p.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b12d6f4..f20ffa6 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -882,7 +882,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj) // Create the object if (obj->custom.isEmpty() && output->types.at(obj->type).type && - obj != compileState.root) { + !output->types.at(obj->type).type->isExtendedType() && obj != compileState.root) { QDeclarativeInstruction create; create.type = QDeclarativeInstruction::CreateSimpleObject; diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 56cc219..7b71608 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -328,6 +328,13 @@ bool QDeclarativeType::isCreatable() const return d->m_newFunc != 0; } +bool QDeclarativeType::isExtendedType() const +{ + d->init(); + + return !d->m_metaObjects.isEmpty(); +} + bool QDeclarativeType::isInterface() const { return d->m_isInterface; diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index 96e3c74..70b7c90 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -122,6 +122,7 @@ public: QDeclarativeCustomParser *customParser() const; bool isCreatable() const; + bool isExtendedType() const; bool isInterface() const; int typeId() const; |