diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-10-28 16:56:06 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2014-10-30 14:54:05 +0100 |
commit | 76cb03cb603e377d43fd959c21d928ef7cb2748f (patch) | |
tree | 5e366345ad82de79b35f095504a782813687c90b /src/libs/installer/scriptengine.cpp | |
parent | 624adb3699af26b1bd371cccced8fcc80a9450fb (diff) |
Fix regression after porting to QJSEngine.
Setting a dynamic property of a dynamic page from JS doesn't have
any effect anymore, as the properties are not synced. Now we define
the property directly on the JavaScript object and connect it to
corresponding C++ page with static Qt properties.
Task-number: QTIFW-562
Change-Id: If95222a94ebee7f8bb455792eab96c5e9bc19b86
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/scriptengine.cpp')
-rw-r--r-- | src/libs/installer/scriptengine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 38bf84d72..33ce6f3a0 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -302,6 +302,7 @@ void ScriptEngine::addQObjectChildren(QObject *root) const QObjectList children = root->children(); QJSValue jsParent = newQObject(root); + QQmlEngine::setObjectOwnership(root, QQmlEngine::CppOwnership); m_engine.globalObject().setProperty(root->objectName(), jsParent); foreach (QObject *const child, children) { |