[SailfishDevel] Ho to analyse app crash when re-starting app fails

Tomasz Sterna tomek at xiaoka.com
Wed Jul 23 06:29:46 UTC 2014


Dnia 2014-07-23, śro o godzinie 09:23 +0600, Dmitriy Purgin pisze:
> QML did somehow destroy my object

Are you aware of QQmlEngine::ObjectOwnership [1]?
"QML uses a heuristic to set the default object ownership. By default,
an object that is created by QML has JavaScriptOwnership."
"Objects not-created by QML have CppOwnership by default. The exception
to this is objects returned from C++ method calls;"

As with any heuristic, your object might get "suddenly" destroyed if it
does not have parent() after passing to QML, unless you set CppOwnership
explicitly.


[1] http://qt-project.org/doc/qt-5/qqmlengine.html#ObjectOwnership-enum

-- 
Tomasz Sterna                           :(){ :|:&};:
Instant Messaging Consultant   Open Source Developer 
http://abadcafe.pl/      http://xiaoka.com/portfolio

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140723/6e5844d0/attachment.pgp>


More information about the Devel mailing list