Fix bug#508 - "qmltopy1 crashes when setContextProperty is called twice without keeping a reference"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
39d61bdc05
commit
8974ff4abd
1 changed files with 5 additions and 3 deletions
|
|
@ -69,9 +69,11 @@
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QDeclarativeContext">
|
<object-type name="QDeclarativeContext">
|
||||||
<modify-function signature="setContextProperty(const QString &, QObject*)">
|
<modify-function signature="setContextProperty(const QString &, QObject*)">
|
||||||
<modify-argument index="2">
|
<inject-code class="target" position="end">
|
||||||
<reference-count action="add"/>
|
QByteArray key("%FUNCTION_NAME_");
|
||||||
</modify-argument>
|
key.append(%1.toLocal8Bit());
|
||||||
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(%PYSELF), key.constData(), %PYARG_2);
|
||||||
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue