<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><span class="tab">    <br></span><div><span class="tab">    OK, so if I understand correctly, lists of shared classes should use the value list marshaller while all others (such as lists of QPrinterInfo)</span> should use the pointer <span class="tab">list marshaller?</span><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">    Dimitar</span><span class="tab"><br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times,
 serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> David Lechner <david@lechnology.com><br> <b><span style="font-weight: bold;">To:</span></b> kde-bindings@kde.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, February 20, 2013 8:33 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Kde-bindings] [Qyoto] crash when using QList returned by QMimeData.Urls<br> </font> </div> <br>
OK, I figured out why QUrl was treated differently by QList.<br><br>From http://qt-project.org/doc/qt-4.8/qlist.html#details<br>> Internally, QList<T> is represented as an array of pointers to items<br>> of type T. If T is itself a pointer type or a basic type that is no<br>> larger than a pointer, or if T is one of Qt's shared classes, then<br>> QList<T> stores the items directly in the pointer array.<br><br>Even better, there is a list of those classes here: http://qt-project.org/doc/qt-4.8/implicit-sharing.html#shared-classes<br><br>Also, if I am interpreting this correctly, QVector<T> should use the value rather than the pointer too.<br><br>I have attached a patch based on this info.<br><br>Still have the destructor issue though.<br><br>_______________________________________________<br>Kde-bindings mailing list<br><a ymailto="mailto:Kde-bindings@kde.org" href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br><a
 href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br><br><br> </div> </div>  </div></body></html>