diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-03 13:27:13 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-03 13:27:13 +0100 |
commit | f2244103ff7a9b61fc7bcb7e920d8cc6b2f5f226 (patch) | |
tree | 8fe753743c46d4a652f582a7a2a49e5709eaa6e0 /src/qml/qml/v8 | |
parent | 57430b2bdad32150e0ed8ceb6893430363ee6670 (diff) | |
parent | 164af37710e5721cbc7d79a0af20f2387181c59c (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
tools/qmlprofiler/qmlprofilerclient.cpp
Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 89088e5b3e..3acabe390f 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1013,8 +1013,13 @@ ReturnedValue QtObject::method_createQmlObject(CallContext *ctx) if (!parentArg) V4THROW_ERROR("Qt.createQmlObject(): Missing parent object"); + QQmlTypeData *typeData = QQmlEnginePrivate::get(engine)->typeLoader.getType( + qml.toUtf8(), url, QQmlTypeLoader::Synchronous); + Q_ASSERT(typeData->isCompleteOrError()); QQmlComponent component(engine); - component.setData(qml.toUtf8(), url); + QQmlComponentPrivate *componentPrivate = QQmlComponentPrivate::get(&component); + componentPrivate->fromTypeData(typeData); + componentPrivate->progress = 1.0; if (component.isError()) { ScopedValue v(scope, Error::create(ctx->d()->engine, component.errors())); |