summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecomponent.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-09-06 12:54:55 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-09-06 12:54:55 (GMT)
commit4b68c14af425a3f8441ae0377c178d398192d45a (patch)
treec6f1fe35f946fde9e0f276d7e3b2c00386fd471d /src/declarative/qml/qdeclarativecomponent.cpp
parent5cfc65d04858563e53987b224f36ee71356aa73c (diff)
parentb3de9c2ee4c9f36a6133fc78109909c3ee6317fd (diff)
downloadQt-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.cpp8
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();