diff options
author | David Boddie <david.boddie@nokia.com> | 2010-09-06 12:54:55 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-09-06 12:54:55 (GMT) |
commit | 4b68c14af425a3f8441ae0377c178d398192d45a (patch) | |
tree | c6f1fe35f946fde9e0f276d7e3b2c00386fd471d /src/declarative/qml/qdeclarativecomponent.cpp | |
parent | 5cfc65d04858563e53987b224f36ee71356aa73c (diff) | |
parent | b3de9c2ee4c9f36a6133fc78109909c3ee6317fd (diff) | |
download | Qt-4b68c14af425a3f8441ae0377c178d398192d45a.zip Qt-4b68c14af425a3f8441ae0377c178d398192d45a.tar.gz Qt-4b68c14af425a3f8441ae0377c178d398192d45a.tar.bz2 |
Merge branch '4.7' into qmldocs
Diffstat (limited to 'src/declarative/qml/qdeclarativecomponent.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 73d4d2e..7f58166 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -607,10 +607,11 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent) ctxt = d->engine->rootContext(); if (!ctxt) return QScriptValue(QScriptValue::NullValue); - QObject* ret = create(ctxt); - if (!ret) + QObject* ret = beginCreate(ctxt); + if (!ret) { + completeCreate(); return QScriptValue(QScriptValue::NullValue); - + } if (parent) { ret->setParent(parent); @@ -631,6 +632,7 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent) if (needParent) qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene."); } + completeCreate(); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(d->engine); QDeclarativeData::get(ret, true)->setImplicitDestructible(); |