summaryrefslogtreecommitdiffstats
path: root/src/tools/qucom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qucom.cpp')
-rw-r--r--src/tools/qucom.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tools/qucom.cpp b/src/tools/qucom.cpp
index f210318..c48e166 100644
--- a/src/tools/qucom.cpp
+++ b/src/tools/qucom.cpp
@@ -39,6 +39,9 @@
**********************************************************************/
#include "qucom_p.h"
+#include "qucomextra_p.h"
+
+#include "qvariant.h"
// Standard types
@@ -545,3 +548,24 @@ void QUType_QString::clear( QUObject *o )
delete (QString*)o->payload.ptr;
o->payload.ptr = 0;
}
+
+QUObject* QUObject::deepCopy(QUObject* newLocation) {
+ QUObject* ret;
+ if (newLocation) {
+ ret = new(newLocation) QUObject(*this);
+ }
+ else {
+ ret = new QUObject(*this);
+ }
+ // Any type that has a clear() method must be copied here!
+ if (*(type->uuid()) == TID_QUType_charstar) {
+ static_QUType_charstar.set( ret, (const char *)static_QUType_charstar.get(this), true );
+ }
+ if (*(type->uuid()) == TID_QUType_QString) {
+ static_QUType_QString.set( ret, (QString)static_QUType_QString.get(this) );
+ }
+ if (*(type->uuid()) == TID_QUType_QVariant) {
+ static_QUType_QVariant.set( ret, (QVariant)static_QUType_QVariant.get(this) );
+ }
+ return ret;
+}