[Kde-bindings] [Qyoto] crash when using QList returned by QMimeData.Urls
Dimitar Dobrev
dpldobrev at yahoo.com
Wed Feb 20 09:16:03 UTC 2013
OK, so if I understand correctly, lists of shared classes should use the value list marshaller while all others (such as lists of QPrinterInfo) should use the pointer list marshaller?
Dimitar
________________________________
From: David Lechner <david at lechnology.com>
To: kde-bindings at kde.org
Sent: Wednesday, February 20, 2013 8:33 AM
Subject: Re: [Kde-bindings] [Qyoto] crash when using QList returned by QMimeData.Urls
OK, I figured out why QUrl was treated differently by QList.
From http://qt-project.org/doc/qt-4.8/qlist.html#details
> Internally, QList<T> is represented as an array of pointers to items
> of type T. If T is itself a pointer type or a basic type that is no
> larger than a pointer, or if T is one of Qt's shared classes, then
> QList<T> stores the items directly in the pointer array.
Even better, there is a list of those classes here: http://qt-project.org/doc/qt-4.8/implicit-sharing.html#shared-classes
Also, if I am interpreting this correctly, QVector<T> should use the value rather than the pointer too.
I have attached a patch based on this info.
Still have the destructor issue though.
_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130220/c8727f68/attachment.html>
More information about the Kde-bindings
mailing list