Clone object

Forum for posting problems using QxOrm library

Clone object

Postby mtfk » Mon May 09, 2011 9:20 am

Hi,

Problem:
Clone object from database and save it with diffrent id as new object.

Question:
There is other possibility to do that then use qx::clone?
Because this works only with boost::shared_ptr and I have QSharedPointer.
How can I do this using QSharedPointer?

Thanks a lot for any proposition.
mtfk
 

Re: Clone object

Postby QxOrm admin » Mon May 09, 2011 10:48 am

Hi,

"qx::clone() " function returns a "boost::shared_ptr<T>" object.

If you want a "QSharedPointer<T>" object, you can use this function : "qx::clone_to_qt_shared_ptr()".
If you don't want a smart-pointer, you can use this function : "qx::clone_to_nude_ptr()".
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 7 guests

cron