diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-12-19 14:03:14 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-12-19 14:03:14 -0600 |
commit | f8224f3a623495e4e1dbf852554d7601a6b7c4c4 (patch) | |
tree | d5583114ba48669960c9f7d68927687ea652a0b8 /src/tools/qucom.cpp | |
parent | 25240579092616b09d28705ac84e13e49b744707 (diff) | |
parent | e8cbbedf46da493d2c206444a7e18e5777402905 (diff) | |
download | tqt3-f8224f3a623495e4e1dbf852554d7601a6b7c4c4.tar.gz tqt3-f8224f3a623495e4e1dbf852554d7601a6b7c4c4.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/tools/qucom.cpp')
-rw-r--r-- | src/tools/qucom.cpp | 24 |
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; +} |