summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qmutex_unix.cpp1
-rw-r--r--src/tools/qthreadinstance_p.h6
-rw-r--r--src/tools/qucom.cpp24
-rw-r--r--src/tools/qucom_p.h4
4 files changed, 33 insertions, 2 deletions
diff --git a/src/tools/qmutex_unix.cpp b/src/tools/qmutex_unix.cpp
index b69661ad1..7d22798cc 100644
--- a/src/tools/qmutex_unix.cpp
+++ b/src/tools/qmutex_unix.cpp
@@ -74,7 +74,6 @@ typedef pthread_mutex_t Q_MUTEX_T;
#include <errno.h>
#include <string.h>
-
// Private class declarations
class TQRealMutexPrivate : public TQMutexPrivate {
diff --git a/src/tools/qthreadinstance_p.h b/src/tools/qthreadinstance_p.h
index 62c569c42..98ef3d95b 100644
--- a/src/tools/qthreadinstance_p.h
+++ b/src/tools/qthreadinstance_p.h
@@ -62,8 +62,12 @@
#include <pthread.h>
#endif
+class TQThread;
+class TQEventLoop;
+
class TQThreadInstance {
public:
+ static void setCurrentThread(TQThread *thread);
static TQThreadInstance *current();
void init(unsigned int stackSize);
@@ -95,6 +99,8 @@ public:
static unsigned int __stdcall start( void * );
static void finish( TQThreadInstance * );
#endif // Q_OS_WIN32
+
+ TQEventLoop* eventLoop;
};
#endif // QT_THREAD_SUPPORT
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;
+}
diff --git a/src/tools/qucom_p.h b/src/tools/qucom_p.h
index 0814e18d7..f4f7ea81b 100644
--- a/src/tools/qucom_p.h
+++ b/src/tools/qucom_p.h
@@ -127,7 +127,7 @@ extern Q_EXPORT TQUType_Null static_QUType_Null;
struct Q_EXPORT TQUObject
{
public: // scary MSVC bug makes this necessary
- TQUObject() : type( &static_QUType_Null ) {}
+ TQUObject() : type( &static_QUType_Null ), isLastObject(false) {}
~TQUObject() { type->clear( this ); }
TQUType *type;
@@ -184,6 +184,8 @@ public: // scary MSVC bug makes this necessary
} payload;
+ TQUObject* deepCopy(TQUObject*);
+ bool isLastObject;
};