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 6035d6622..d3b26c3f9 100644
--- a/src/tools/qucom.cpp
+++ b/src/tools/qucom.cpp
@@ -39,6 +39,9 @@
**********************************************************************/
#include "qucom_p.h"
+#include "qucomextra_p.h"
+
+#include "ntqvariant.h"
// Standard types
@@ -545,3 +548,24 @@ void TQUType_TQString::clear( TQUObject *o )
delete (TQString*)o->payload.ptr;
o->payload.ptr = 0;
}
+
+TQUObject* TQUObject::deepCopy(TQUObject* newLocation) {
+ TQUObject* ret;
+ if (newLocation) {
+ ret = new(newLocation) TQUObject(*this);
+ }
+ else {
+ ret = new TQUObject(*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_TQString) {
+ static_QUType_TQString.set( ret, (TQString)static_QUType_TQString.get(this) );
+ }
+ if (*(type->uuid()) == TID_QUType_TQVariant) {
+ static_QUType_TQVariant.set( ret, (TQVariant)static_QUType_TQVariant.get(this) );
+ }
+ return ret;
+}