diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-06-03 16:48:01 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-06-03 16:48:01 +0200 |
commit | ee2b8bf7e68c5e755dc6be3a39d9a09788cdad28 (patch) | |
tree | e61f050de4bc1e30cff22d15dded5676108b3e02 | |
parent | 71d10a1f41f500a5950003ddfadbcc3803324229 (diff) |
change ownership of the C++ object
The cheap way for now.
-rw-r--r-- | generator/typesystem_gui-qtscript.xml | 13 | ||||
-rw-r--r-- | generator/typesystem_gui.xml | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/generator/typesystem_gui-qtscript.xml b/generator/typesystem_gui-qtscript.xml index 1cc6ac6..cedec2b 100644 --- a/generator/typesystem_gui-qtscript.xml +++ b/generator/typesystem_gui-qtscript.xml @@ -66,6 +66,19 @@ </extra-includes> </object-type> + <object-type name="QGraphicsScene"> + <modify-function signature="addWidget(QWidget*,QFlags<Qt::WindowType>)"> + <modify-argument index="1"> + <conversion-rule class="native"> + QScriptValue %out%_orig = %in%; + QWidget* %out% = qscriptvalue_cast<QWidget*>(%out%_orig); + if (%out% != 0) + context->engine()->newQObject(%out%_orig, %out%, QScriptEngine::QtOwnership); + </conversion-rule> + </modify-argument> + </modify-function> + </object-type> + <value-type name="QFontInfo"> <modify-function signature="QFontInfo(QFontInfo)"> <modify-argument index="1"> diff --git a/generator/typesystem_gui.xml b/generator/typesystem_gui.xml index a540c13..33bdd28 100644 --- a/generator/typesystem_gui.xml +++ b/generator/typesystem_gui.xml @@ -3193,6 +3193,17 @@ <reference-count action="set" variable-name="__rcFocusItem"/> </modify-argument> </modify-function> + + <modify-function signature="addWidget(QWidget*,QFlags<Qt::WindowType>)"> + <modify-argument index="1"> + <conversion-rule class="native"> + QScriptValue %out%_orig = %in%; + QWidget* %out% = qscriptvalue_cast<QWidget*>(%out%_orig); + if (%out% != 0) + context->engine()->newQObject(%out%_orig, %out%, QScriptEngine::QtOwnership); + </conversion-rule> + </modify-argument> + </modify-function> </object-type> |