Hi, 2015-09-13 14:39 GMT+03:00 Reinhardt Behm <[email protected]>:
> On Sunday 13 September 2015 14:31:07 Igor Mironchik wrote: > > Hi, > > > > How to serialize/deserialize pointers to/from QDataStream correctly? > > Just don't do it. > > The main reason to serialize data is to store it in some file and later > retrieve it, possibly with another program. > Even when retrieving a pointer with the same program running as a new > instance > the value (address) of a pointer has no meaning, since that address will > not > be pointing to valid memory. > I need this serializtion only in one instance of the running application. I will not deserialize pointer when application restarted and so on. I realy need it to handle Drag&Drop in QListView... But I want some protection that pointer is serialized in the same app. How to be sure that pointer was serialized exactly in this app? Or I have to serialize qApp for checking it? Is it safe to cast pointer to/drom quint64? Will it work on all platforms? > > -- > Best Regards > > Reinhardt Behm > > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
