diff options
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/ntqapplication.h | 18 | ||||
-rw-r--r-- | src/kernel/ntqeventloop.h | 4 | ||||
-rw-r--r-- | src/kernel/ntqgplugin.h | 2 | ||||
-rw-r--r-- | src/kernel/ntqobject.h | 6 | ||||
-rw-r--r-- | src/kernel/ntqthread.h | 4 | ||||
-rw-r--r-- | src/kernel/qapplication.cpp | 74 | ||||
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 8 | ||||
-rw-r--r-- | src/kernel/qeventloop.cpp | 6 | ||||
-rw-r--r-- | src/kernel/qeventloop_unix_glib.cpp | 68 | ||||
-rw-r--r-- | src/kernel/qeventloop_x11.cpp | 10 | ||||
-rw-r--r-- | src/kernel/qeventloop_x11_glib.cpp | 20 | ||||
-rw-r--r-- | src/kernel/qfont_x11.cpp | 4 | ||||
-rw-r--r-- | src/kernel/qmetaobject.cpp | 24 | ||||
-rw-r--r-- | src/kernel/qobject.cpp | 162 | ||||
-rw-r--r-- | src/kernel/qthread.cpp | 8 | ||||
-rw-r--r-- | src/kernel/qthread_unix.cpp | 4 | ||||
-rw-r--r-- | src/kernel/qwidget.cpp | 4 |
17 files changed, 213 insertions, 213 deletions
diff --git a/src/kernel/ntqapplication.h b/src/kernel/ntqapplication.h index 3618bf3bf..f50606130 100644 --- a/src/kernel/ntqapplication.h +++ b/src/kernel/ntqapplication.h @@ -61,10 +61,10 @@ class TQIMEvent; class TQWSDecoration; #endif -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT class TQMutex; class TQThread; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT class TQApplication; @@ -297,7 +297,7 @@ public: static bool x11_apply_settings(); #endif void wakeUpGuiThread(); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) void lock(); void unlock(bool wakeUpGui = TRUE); bool locked(); @@ -354,9 +354,9 @@ private slots: #endif public: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT static TQMutex *tqt_mutex; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT private: int app_argc; @@ -372,7 +372,7 @@ private: #ifndef QT_NO_CURSOR static TQCursor *app_cursor; #endif -#ifndef QT_THREAD_SUPPORT +#ifndef TQT_THREAD_SUPPORT static TQEventLoop* eventloop; #endif static int app_tracking; @@ -436,9 +436,9 @@ private: friend class TQDialog; friend class TQAccelManager; friend class TQEvent; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT friend class TQThread; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT friend class TQTranslator; friend class TQEventLoop; friend Q_EXPORT void tqt_ucm_initialize( TQApplication * ); @@ -458,7 +458,7 @@ private: static TQEventLoop* currentEventLoop(); public: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT static TQThread* guiThread(); static void threadTerminationHandler( TQThread * ); #endif diff --git a/src/kernel/ntqeventloop.h b/src/kernel/ntqeventloop.h index f4d78bf20..cc76fb75b 100644 --- a/src/kernel/ntqeventloop.h +++ b/src/kernel/ntqeventloop.h @@ -59,9 +59,9 @@ struct timeval; //stdc struct struct TimerInfo; //internal structure (qeventloop_mac.cpp) #endif -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) class TQMutex; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT class Q_EXPORT TQEventLoop : public TQObject diff --git a/src/kernel/ntqgplugin.h b/src/kernel/ntqgplugin.h index 135e6b811..7300c0f3e 100644 --- a/src/kernel/ntqgplugin.h +++ b/src/kernel/ntqgplugin.h @@ -66,7 +66,7 @@ #endif #ifndef Q_EXPORT_PLUGIN -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #define QT_THREADED_BUILD 1 #define Q_PLUGIN_FLAGS_STRING "11" #else diff --git a/src/kernel/ntqobject.h b/src/kernel/ntqobject.h index b2c9b2f55..c81dc9d31 100644 --- a/src/kernel/ntqobject.h +++ b/src/kernel/ntqobject.h @@ -64,7 +64,7 @@ class TQObjectUserData; #endif struct TQUObject; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT class TQThread; #endif @@ -230,14 +230,14 @@ private: // Disabled copy constructor and operator= #endif public: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQThread* contextThreadObject() const; void moveToThread(TQThread *targetThread); void disableThreadPostedEvents(bool disable); #endif private: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT void moveToThread_helper(TQThread *targetThread); void setThreadObject_helper(TQThread *targetThread); #endif diff --git a/src/kernel/ntqthread.h b/src/kernel/ntqthread.h index 04684ac0a..a38a2dfa1 100644 --- a/src/kernel/ntqthread.h +++ b/src/kernel/ntqthread.h @@ -41,7 +41,7 @@ #ifndef TQTHREAD_H #define TQTHREAD_H -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #ifndef QT_H #include "ntqwindowdefs.h" @@ -150,6 +150,6 @@ class Q_EXPORT TQEventLoopThread : public TQThread virtual void run(); }; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #endif // TQTHREAD_H diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index f090e748c..4ee67cd4d 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -65,11 +65,11 @@ #endif #include "qfontdata_p.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) # include "ntqmutex.h" # include "ntqthread.h" # include <private/qthreadinstance_p.h> -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #include <stdlib.h> @@ -375,7 +375,7 @@ TQStringList *TQApplication::app_libpaths = 0; bool TQApplication::metaComposeUnicode = FALSE; int TQApplication::composedUnicode = 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutex *TQApplication::tqt_mutex = 0; TQMutex *tqt_sharedStringMutex = 0; Q_EXPORT TQMutex * tqt_sharedMetaObjectMutex = 0; @@ -388,13 +388,13 @@ Q_EXPORT TQt::HANDLE tqt_get_application_thread_id() { return tqt_application_thread_id; } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT -#ifndef QT_THREAD_SUPPORT +#ifndef TQT_THREAD_SUPPORT TQEventLoop *TQApplication::eventloop = 0; // application event loop #endif -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQEventLoop* TQApplication::currentEventLoop() { TQThread* thread = TQThread::currentThreadObject(); if (thread) { @@ -541,7 +541,7 @@ TQClipboard *tqt_clipboard = 0; // global clipboard object #endif TQWidgetList * tqt_modal_stack=0; // stack of modal widgets -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT // thread wrapper for the main() thread class TQCoreApplicationThread : public TQThread { @@ -605,9 +605,9 @@ static TQPostEventList *globalPostedEvents = 0; // list of posted events uint qGlobalPostedEventsCount() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (!globalPostedEvents) { return 0; @@ -1035,7 +1035,7 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv, #endif // Q_WS_X11 -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQThread* TQApplication::guiThread() { return mainThread(); } @@ -1069,7 +1069,7 @@ void TQApplication::init_precmdline() void TQApplication::initialize( int argc, char **argv, bool enable_sm ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT tqt_mutex = new TQMutex( TRUE ); tqt_sharedStringMutex = new TQMutex( TRUE ); tqt_sharedMetaObjectMutex = new TQMutex( TRUE ); @@ -1078,7 +1078,7 @@ void TQApplication::initialize( int argc, char **argv, bool enable_sm ) #endif // QT_USE_GLIBMAINLOOP postevent_mutex = new TQMutex( TRUE ); tqt_application_thread_id = TQThread::currentThread(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT app_argc = argc; app_argv = argv; @@ -1226,12 +1226,12 @@ TQApplication::~TQApplication() app_libpaths = 0; #endif -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT delete tqt_mutex; tqt_mutex = 0; delete postevent_mutex; postevent_mutex = 0; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if( tqApp == this ) { if ( postedEvents ) @@ -1254,7 +1254,7 @@ TQApplication::~TQApplication() session_key = 0; #endif //QT_NO_SESSIONMANAGER -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT delete tqt_sharedMetaObjectMutex; tqt_sharedMetaObjectMutex = 0; delete tqt_sharedStringMutex; @@ -1263,7 +1263,7 @@ TQApplication::~TQApplication() delete tqt_timerListMutex; tqt_timerListMutex = 0; #endif // QT_USE_GLIBMAINLOOP -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT tqt_explicit_app_style = FALSE; tqt_app_has_font = FALSE; @@ -2521,9 +2521,9 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e ) } if ( e->type() == TQEvent::ChildRemoved && receiver->postedEvents) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (globalPostedEvents) { // the TQObject destructor calls TQObject::removeChild, which calls @@ -2868,7 +2868,7 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e) } if (!handled) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) int locklevel = 0; int llcount; if (TQApplication::tqt_mutex) { @@ -2881,7 +2881,7 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e) } #endif consumed = receiver->event( e ); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (TQApplication::tqt_mutex) { for (llcount=0; llcount<locklevel; llcount++) { TQApplication::tqt_mutex->lock(); @@ -3365,9 +3365,9 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event ) return; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !globalPostedEvents ) { // create list globalPostedEvents = new TQPostEventList; @@ -3461,7 +3461,7 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event ) l->append( pe ); globalPostedEvents->append( pe ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT // Wake up the receiver thread event loop TQThread* thread = receiver->contextThreadObject(); if (thread) { @@ -3514,7 +3514,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type ) sendPostedEvents( 0, TQEvent::ChildInserted ); } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( postevent_mutex ); #endif @@ -3571,9 +3571,9 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type ) } } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if ( locker.mutex() ) locker.mutex()->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT // after all that work, it's time to deliver the event. if ( e->type() == TQEvent::Paint && r->isWidgetType() ) { TQWidget * w = (TQWidget*)r; @@ -3585,9 +3585,9 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type ) sent = TRUE; TQApplication::sendEvent( r, e ); } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if ( locker.mutex() ) locker.mutex()->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT delete e; // careful when adding anything below this point - the @@ -3646,9 +3646,9 @@ void TQApplication::removePostedEvents( TQObject *receiver, int event_type ) return; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT // the TQObject destructor calls this function directly. this can // happen while the event loop is in the middle of posting events, @@ -3699,9 +3699,9 @@ void TQApplication::removePostedEvent( TQEvent * event ) return; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !globalPostedEvents ) { #if defined(QT_DEBUG) @@ -3797,7 +3797,7 @@ void TQApplication::removePostedEvent( TQEvent * event ) } void tqThreadTerminationHandlerRecursive( TQObject* object, TQThread* originThread, TQThread* destinationThread ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQThread* objectThread = object->contextThreadObject(); if (objectThread && (objectThread == originThread)) { TQThread::CleanupType cleanupType = objectThread->cleanupType(); @@ -3822,7 +3822,7 @@ void tqThreadTerminationHandlerRecursive( TQObject* object, TQThread* originThre for ( childObject = children.first(); childObject; childObject = children.next() ) { tqThreadTerminationHandlerRecursive(childObject, originThread, destinationThread); } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } /*!\internal @@ -3831,14 +3831,14 @@ void tqThreadTerminationHandlerRecursive( TQObject* object, TQThread* originThre for thread destruction. */ void TQApplication::threadTerminationHandler( TQThread *originThread ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( tqt_mutex ); TQThread* destinationThread = guiThread(); const TQObjectList* objects = TQObject::objectTrees(); for ( TQObjectListIt objectit( *objects ) ; *objectit; ++objectit ) { tqThreadTerminationHandlerRecursive((*objectit), originThread, destinationThread); } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } /*!\internal @@ -4190,7 +4190,7 @@ bool TQApplication::desktopSettingsAware() \sa lock(), unlock() \link threads.html Thread Support in TQt\endlink */ -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) void TQApplication::lock() { tqt_mutex->lock(); diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 84dcefb22..8e859349c 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -97,7 +97,7 @@ #endif // QT_NO_IM #include "qinternal_p.h" // shared double buffer cleanup -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) # include "ntqthread.h" #endif @@ -1645,7 +1645,7 @@ void tqt_init_internal( int *argcptr, char **argv, setlocale( LC_ALL, "" ); // use correct char set mapping setlocale( LC_NUMERIC, "C" ); // make sprintf()/scanf() work -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (( tqt_is_gui_used ) && ( !display )) { // If TQt is running standalone with a GUI, initialize X11 threading XInitThreads(); @@ -2210,7 +2210,7 @@ void tqt_init_internal( int *argcptr, char **argv, TQPainter::initialize(); } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) TQThread::initialize(); #endif @@ -2498,7 +2498,7 @@ void tqt_cleanup() TQColor::cleanup(); TQSharedDoubleBuffer::cleanup(); } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) TQThread::cleanup(); #endif diff --git a/src/kernel/qeventloop.cpp b/src/kernel/qeventloop.cpp index 985f3b3b4..94018fa5f 100644 --- a/src/kernel/qeventloop.cpp +++ b/src/kernel/qeventloop.cpp @@ -41,7 +41,7 @@ #include "ntqapplication.h" #include "ntqdatetime.h" -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT # include "ntqthread.h" # include "private/qthreadinstance_p.h" #endif @@ -116,7 +116,7 @@ TQEventLoop::TQEventLoop( TQObject *parent, const char *name ) init(); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQThread* thread = TQThread::currentThreadObject(); if (thread) { if (thread->d) { @@ -135,7 +135,7 @@ TQEventLoop::~TQEventLoop() { cleanup(); delete d; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQThread* thread = TQThread::currentThreadObject(); if (thread) { if (thread->d) { diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp index ceacd81b8..51c560a72 100644 --- a/src/kernel/qeventloop_unix_glib.cpp +++ b/src/kernel/qeventloop_unix_glib.cpp @@ -46,7 +46,7 @@ #include "ntqbitarray.h" #include "ntqmutex.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #include "ntqthread.h" #endif @@ -55,11 +55,11 @@ #include <glib.h> -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #ifdef QT_USE_GLIBMAINLOOP extern TQMutex *tqt_timerListMutex; #endif // QT_USE_GLIBMAINLOOP -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT /***************************************************************************** Timer handling; UNIX has no application timer support so we'll have to @@ -186,7 +186,7 @@ static int allocTimerId() // find avail timer identifier static void insertTimer( const TimerInfo *ti ) // insert timer info into list { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->lock(); #endif TimerInfo *t = timerList->first(); @@ -209,7 +209,7 @@ static void insertTimer( const TimerInfo *ti ) // insert timer info into list tqDebug( "TQObject: %d timers now exist for object %s::%s", dangerCount, ti->obj->className(), ti->obj->name() ); } #endif -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->unlock(); #endif } @@ -235,7 +235,7 @@ static inline void getTime( timeval &t ) // get time of day static void repairTimer( const timeval &time ) // repair broken timer { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->lock(); #endif timeval diff = watchtime - time; @@ -244,7 +244,7 @@ static void repairTimer( const timeval &time ) // repair broken timer t->timeout = t->timeout - diff; t = timerList->next(); } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->unlock(); #endif } @@ -262,7 +262,7 @@ static void repairTimer( const timeval &time ) // repair broken timer timeval *qt_wait_timer() { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->lock(); #endif static timeval tm; @@ -288,19 +288,19 @@ timeval *qt_wait_timer() if ( qt_wait_timer_max && *qt_wait_timer_max < tm ) { tm = *qt_wait_timer_max; } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->unlock(); #endif return &tm; } if ( qt_wait_timer_max ) { tm = *qt_wait_timer_max; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->unlock(); #endif return &tm; } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex->unlock(); #endif return 0; // no timers @@ -316,7 +316,7 @@ static void initTimers() // initialize timers timerBitVec->clearBit( i ); } timerList = new TimerList; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) tqt_timerListMutex = new TQMutex(true); #endif TQ_CHECK_PTR( timerList ); @@ -336,18 +336,18 @@ void cleanupTimers() // Main timer functions for starting and killing timers int qStartTimer( int interval, TQObject *obj ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->lock(); #endif if ( !timerList ) { // initialize timer data initTimers(); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->lock(); #endif } int id = allocTimerId(); // get free timer id if ( (id <= 0) || (id > (int)timerBitVec->size()) || (!obj) ) { // cannot create timer -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return 0; @@ -363,7 +363,7 @@ int qStartTimer( int interval, TQObject *obj ) t->timeout = currentTime + t->interval; t->obj = obj; insertTimer( t ); // put timer in list -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return id; @@ -371,12 +371,12 @@ int qStartTimer( int interval, TQObject *obj ) bool qKillTimer( int id ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->lock(); #endif register TimerInfo *t; if ( (!timerList) || (id <= 0) || (id > (int)timerBitVec->size()) || (!timerBitVec->testBit( id-1 )) ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return FALSE; // not init'd or invalid timer @@ -389,13 +389,13 @@ bool qKillTimer( int id ) bool ret; timerBitVec->clearBit( id-1 ); // set timer inactive ret = timerList->remove(); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return ret; } else { // id not found -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return FALSE; @@ -404,12 +404,12 @@ bool qKillTimer( int id ) bool qKillTimer( TQObject *obj ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->lock(); #endif register TimerInfo *t; if ( !timerList ) { // not initialized -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return FALSE; @@ -425,7 +425,7 @@ bool qKillTimer( TQObject *obj ) t = timerList->next(); } } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return TRUE; @@ -632,11 +632,11 @@ int TQEventLoop::timeToWait() const int TQEventLoop::activateTimers() { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->lock(); #endif if ( !timerList || !timerList->count() ) { // no timers -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return 0; @@ -682,11 +682,11 @@ int TQEventLoop::activateTimers() if ( t->interval.tv_usec > 0 || t->interval.tv_sec > 0 ) { n_act++; } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif TQTimerEvent e( t->id ); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) // Be careful...the current thread may not be the target object's thread! if ((!t->obj) || (TQThread::currentThreadObject() && TQThread::currentThreadObject()->threadPostedEventsDisabled()) || @@ -696,17 +696,17 @@ int TQEventLoop::activateTimers() else { TQApplication::postEvent( t->obj, new TQTimerEvent(e) ); // post event to correct thread } -#else // defined(QT_THREAD_SUPPORT) +#else // defined(TQT_THREAD_SUPPORT) TQApplication::sendEvent( t->obj, &e ); // send event -#endif // defined(QT_THREAD_SUPPORT) -#if defined(QT_THREAD_SUPPORT) +#endif // defined(TQT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->lock(); #endif if ( timerList->findRef( begin ) == -1 ) { begin = 0; } } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (tqt_timerListMutex) tqt_timerListMutex->unlock(); #endif return n_act; @@ -731,7 +731,7 @@ int TQEventLoop::activateSocketNotifiers() printf("activate sn : send event fd=%d\n", sn->gPollFD.fd ); #endif sn->pending = FALSE; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) // Be careful...the current thread may not be the target object's thread! if ((!sn->obj) || (TQThread::currentThreadObject() && TQThread::currentThreadObject()->threadPostedEventsDisabled()) || @@ -741,9 +741,9 @@ int TQEventLoop::activateSocketNotifiers() else { TQApplication::postEvent( sn->obj, new TQEvent(event) ); // post event to correct thread } -#else // defined(QT_THREAD_SUPPORT) +#else // defined(TQT_THREAD_SUPPORT) TQApplication::sendEvent( sn->obj, &event ); // send event -#endif // defined(QT_THREAD_SUPPORT) +#endif // defined(TQT_THREAD_SUPPORT) n_act++; } } diff --git a/src/kernel/qeventloop_x11.cpp b/src/kernel/qeventloop_x11.cpp index c63a491e1..1ba3b21df 100644 --- a/src/kernel/qeventloop_x11.cpp +++ b/src/kernel/qeventloop_x11.cpp @@ -43,9 +43,9 @@ #include "qcolor_p.h" #include "qt_x11_p.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) # include "ntqmutex.h" -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #include <errno.h> @@ -138,7 +138,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) XEvent event; int nevents = 0; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) TQMutexLocker locker( TQApplication::tqt_mutex ); #endif @@ -283,7 +283,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) // unlock the GUI mutex and select. when we return from this function, there is // something for us to do -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if ( locker.mutex() ) locker.mutex()->unlock(); else return false; #endif @@ -298,7 +298,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) } while (nsel == -1 && (errno == EINTR || errno == EAGAIN)); // relock the GUI mutex before processing any pending events -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if ( locker.mutex() ) locker.mutex()->lock(); else return false; #endif diff --git a/src/kernel/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp index df607ce78..4b44fe8f2 100644 --- a/src/kernel/qeventloop_x11_glib.cpp +++ b/src/kernel/qeventloop_x11_glib.cpp @@ -46,10 +46,10 @@ #include "qcolor_p.h" #include "qt_x11_p.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) # include "ntqmutex.h" # include "ntqthread.h" -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #include <errno.h> @@ -295,7 +295,7 @@ bool TQEventLoop::processX11Events() XEvent event; int nevents = 0; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) TQMutexLocker locker( TQApplication::tqt_mutex ); #endif @@ -383,7 +383,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) ProcessEventsFlags flags = d->pev_flags; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) TQMutexLocker locker( TQApplication::tqt_mutex ); #endif @@ -535,10 +535,10 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { Q_UNUSED(gs); // relock the GUI mutex before processing any pending events -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) TQMutexLocker locker( TQApplication::tqt_mutex ); #endif -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (locker.mutex()) locker.mutex()->lock(); #endif @@ -608,13 +608,13 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { // color approx. optimization - only on X11 qt_reset_color_avail(); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (locker.mutex()) locker.mutex()->unlock(); #endif processX11Events(); } else { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (locker.mutex()) locker.mutex()->unlock(); #endif } @@ -629,9 +629,9 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { bool TQEventLoop::hasPendingEvents() const { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( TQApplication::tqt_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT extern uint qGlobalPostedEventsCount(); // from qapplication.cpp return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isGuiThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); diff --git a/src/kernel/qfont_x11.cpp b/src/kernel/qfont_x11.cpp index 9baa6a5cf..6877c9a63 100644 --- a/src/kernel/qfont_x11.cpp +++ b/src/kernel/qfont_x11.cpp @@ -269,13 +269,13 @@ void TQFont::initialize() TQString sample; if ( ttmp != -1 ) { -#if defined(QT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) +#if defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant versions of localtime() where available tm res; tt = localtime_r( &ttmp, &res ); #else tt = localtime( &ttmp ); -#endif // QT_THREAD_SUPPORT && _POSIX_THREAD_SAFE_FUNCTIONS +#endif // TQT_THREAD_SUPPORT && _POSIX_THREAD_SAFE_FUNCTIONS if ( tt != 0 && strftime( samp, 64, "%A%B", tt ) > 0 ) if ( codec ) diff --git a/src/kernel/qmetaobject.cpp b/src/kernel/qmetaobject.cpp index df59af7fe..90a8efa49 100644 --- a/src/kernel/qmetaobject.cpp +++ b/src/kernel/qmetaobject.cpp @@ -41,9 +41,9 @@ #include "ntqmetaobject.h" #include "ntqasciidict.h" -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #include <private/qmutexpool_p.h> -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT /*! \class TQMetaData ntqmetaobject.h @@ -282,10 +282,10 @@ TQMetaObject::~TQMetaObject() delete slotDict; // delete dicts delete signalDict; delete d; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( qt_metaobjects ) { qt_metaobjects->remove( classname ); if ( qt_metaobjects->isEmpty() ) { @@ -799,10 +799,10 @@ TQMetaObject *TQMetaObject::metaObject( const char *class_name ) { if ( !qt_metaobjects ) return 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT TQtStaticMetaObjectFunction func = (TQtStaticMetaObjectFunction)qt_metaobjects->find( class_name ); if ( func ) return func(); @@ -814,10 +814,10 @@ bool TQMetaObject::hasMetaObject( const char *class_name ) { if ( !qt_metaobjects ) return FALSE; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT return !!qt_metaobjects->find( class_name ); } @@ -1204,10 +1204,10 @@ bool TQMetaProperty::reset( TQObject* o ) const TQMetaObjectCleanUp::TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction func ) : metaObject( 0 ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !qt_metaobjects ) qt_metaobjects = new TQAsciiDict<void>( 257 ); qt_metaobjects->insert( mo_name, (void*)func ); @@ -1226,10 +1226,10 @@ TQMetaObjectCleanUp::TQMetaObjectCleanUp() TQMetaObjectCleanUp::~TQMetaObjectCleanUp() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !--qt_metaobjects_count ) { delete qt_metaobjects; qt_metaobjects = 0; diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index 665aead21..7156df6be 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -52,7 +52,7 @@ // TQStyleControlElementData #include "ntqstyle.h" -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #include "ntqmutex.h" #include <private/qmutexpool_p.h> #include "ntqthread.h" @@ -130,16 +130,16 @@ TQStyleControlElementDataPrivate* TQObject::controlElementDataPrivateObject() { return d->controlElementDataPrivate; } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) void TQObject::moveToThread_helper(TQThread *targetThread) { TQEvent e(TQEvent::ThreadChange); TQApplication::sendEvent(this, &e); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (childObjects) { TQObject *child; @@ -155,9 +155,9 @@ void TQObject::setThreadObject_helper(TQThread *targetThread) { d->ownThread = targetThread; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (childObjects) { TQObject *child; @@ -185,9 +185,9 @@ void TQObject::setThreadObject_helper(TQThread *targetThread) */ void TQObject::moveToThread(TQThread *targetThread) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( TQApplication::tqt_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (parentObj) { #if defined(QT_DEBUG) @@ -491,7 +491,7 @@ void *tqt_find_obj_child( TQObject *parent, const char *type, const char *name ) return 0; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT /*! Returns a pointer to the TQThread* associated with @@ -530,12 +530,12 @@ static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o ) s.sprintf( "%s_%s", mo->className(), sigData->name ); int slot = tqt_preliminary_signal_spy->metaObject()->findSlot( s, TRUE ); if ( slot >= 0 ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT // protect access to qt_spy_signal_sender void * const address = &qt_spy_signal_sender; TQMutexLocker locker( tqt_global_mutexpool ? tqt_global_mutexpool->get( address ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT TQObject* old_sender = qt_spy_signal_sender; qt_spy_signal_sender = sender; @@ -554,7 +554,7 @@ static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o ) static TQObjectList* object_trees = 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT static TQMutex *obj_trees_mutex = 0; #endif @@ -562,7 +562,7 @@ static void cleanup_object_trees() { delete object_trees; object_trees = 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT delete obj_trees_mutex; obj_trees_mutex = 0; #endif @@ -576,7 +576,7 @@ static void ensure_object_trees() static void insert_tree( TQObject* obj ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if ( !obj_trees_mutex ) obj_trees_mutex = new TQMutex(); TQMutexLocker locker( obj_trees_mutex ); @@ -589,7 +589,7 @@ static void insert_tree( TQObject* obj ) static void remove_tree( TQObject* obj ) { if ( object_trees ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( obj_trees_mutex ); #endif object_trees->removeRef( obj ); @@ -780,10 +780,10 @@ TQObject::~TQObject() delete childObjects; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT delete d->childObjectListMutex; delete d->senderObjectListMutex; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT delete d; } @@ -1079,17 +1079,17 @@ bool TQObject::event( TQEvent *e ) TQSenderObjectList* sol; TQObject* oldSender = 0; sol = senderObjects; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( sol ) { oldSender = sol->currentSender; sol->ref(); sol->currentSender = metaEvent->sender(); } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT TQUObject *o = metaEvent->data(); if (metaEvent->type() == TQMetaCallEvent::MetaCallEmit) { tqt_emit( metaEvent->id(), o ); @@ -1097,9 +1097,9 @@ bool TQObject::event( TQEvent *e ) if (metaEvent->type() == TQMetaCallEvent::MetaCallInvoke) { tqt_invoke( metaEvent->id(), o ); } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (sol ) { sol->currentSender = oldSender; if ( sol->deref() ) { @@ -1108,9 +1108,9 @@ bool TQObject::event( TQEvent *e ) sol = NULL; } } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (sol) sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { tqWarning("TQObject: Ignoring metacall event from non-owning thread"); @@ -1617,9 +1617,9 @@ TQConnectionList *TQObject::receivers( int signal ) const void TQObject::insertChild( TQObject *obj ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( obj->isTree ) { remove_tree( obj ); @@ -1663,9 +1663,9 @@ void TQObject::insertChild( TQObject *obj ) void TQObject::removeChild( TQObject *obj ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( childObjects && childObjects->removeRef(obj) ) { obj->parentObj = 0; @@ -1903,12 +1903,12 @@ const TQObject *TQObject::sender() { #ifndef QT_NO_PRELIMINARY_SIGNAL_SPY if ( this == tqt_preliminary_signal_spy ) { -# ifdef QT_THREAD_SUPPORT +# ifdef TQT_THREAD_SUPPORT // protect access to qt_spy_signal_sender void * const address = &qt_spy_signal_sender; TQMutexLocker locker( tqt_global_mutexpool ? tqt_global_mutexpool->get( address ) : 0 ); -# endif // QT_THREAD_SUPPORT +# endif // TQT_THREAD_SUPPORT return qt_spy_signal_sender; } #endif @@ -2252,24 +2252,24 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const TQ_CHECK_PTR( c ); clist->append( c ); if ( !r->senderObjects ) { // create list of senders -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT r->d->senderObjectListMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT r->senderObjects = new TQSenderObjectList; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT r->senderObjects->listMutex->lock(); r->d->senderObjectListMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT r->senderObjects->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } r->senderObjects->append( s ); // add sender to list -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT r->senderObjects->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } @@ -2475,25 +2475,25 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index, c = clist->first(); while ( c ) { // for all receivers... if ( r == 0 ) { // remove all receivers -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT removeObjFromList( c->object()->senderObjects, s ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT success = TRUE; c = clist->next(); } else if ( r == c->object() && ( (member_index == -1) || ((member_index == c->member()) && (c->memberType() == membcode)) ) ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT removeObjFromList( c->object()->senderObjects, s, TRUE ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT success = TRUE; clist->remove(); c = clist->current(); @@ -2512,25 +2512,25 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index, c = clist->first(); while ( c ) { // for all receivers... if ( r == 0 ) { // remove all receivers -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT removeObjFromList( c->object()->senderObjects, s, TRUE ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT success = TRUE; c = clist->next(); } else if ( r == c->object() && ( (member_index == -1) || ((member_index == c->member()) && (c->memberType() == membcode)) ) ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT removeObjFromList( c->object()->senderObjects, s, TRUE ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT success = TRUE; clist->remove(); c = clist->current(); @@ -2772,9 +2772,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) c = clist->first(); object = c->object(); sol = object->senderObjects; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( sol ) { oldSender = sol->currentSender; sol->ref(); @@ -2785,13 +2785,13 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) (object->d->disableThreadPostedEvents) || (currentThread && currentThread->threadPostedEventsDisabled()) || (currentThread && object->d->ownThread == currentThread)) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT object->tqt_emit( c->member(), o ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { if (object->d->ownThread && !object->d->ownThread->finished()) { @@ -2807,13 +2807,13 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) (object->d->disableThreadPostedEvents) || (currentThread && currentThread->threadPostedEventsDisabled()) || (currentThread && object->d->ownThread == currentThread)) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT object->tqt_invoke( c->member(), o ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { if (object->d->ownThread && !object->d->ownThread->finished()) { @@ -2832,9 +2832,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) sol = NULL; } } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (sol) sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { TQConnection *cd = 0; TQConnectionListIt it(*clist); @@ -2845,9 +2845,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) cd = c; object = c->object(); sol = object->senderObjects; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( sol ) { oldSender = sol->currentSender; sol->ref(); @@ -2858,13 +2858,13 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) (object->d->disableThreadPostedEvents) || (currentThread && currentThread->threadPostedEventsDisabled()) || (currentThread && object->d->ownThread == currentThread)) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT object->tqt_emit( c->member(), o ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { if (object->d->ownThread && !object->d->ownThread->finished()) { @@ -2880,13 +2880,13 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) (object->d->disableThreadPostedEvents) || (currentThread && currentThread->threadPostedEventsDisabled()) || (currentThread && object->d->ownThread == currentThread)) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT object->tqt_invoke( c->member(), o ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT sol->listMutex->lock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } else { if (object->d->ownThread && !object->d->ownThread->finished()) { @@ -2905,9 +2905,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) sol = NULL; } } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if (sol) sol->listMutex->unlock(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } } } @@ -3046,9 +3046,9 @@ void TQObject::dumpObjectTree() void TQObject::dumpObjectInfo() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( d->senderObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #if defined(QT_DEBUG) tqDebug( "OBJECT %s::%s", className(), name( "unnamed" ) ); diff --git a/src/kernel/qthread.cpp b/src/kernel/qthread.cpp index 86accebba..d6cd01f6e 100644 --- a/src/kernel/qthread.cpp +++ b/src/kernel/qthread.cpp @@ -36,7 +36,7 @@ ** **********************************************************************/ -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #include "qplatformdefs.h" @@ -132,9 +132,9 @@ TQThread::TQThread() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT TQMutexLocker locker( TQApplication::tqt_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT d = new TQThreadInstance; d->init(0); @@ -282,4 +282,4 @@ void TQEventLoopThread::run() if (eventLoop) eventLoop->exec(); } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index c0f02464f..5a6ad877e 100644 --- a/src/kernel/qthread_unix.cpp +++ b/src/kernel/qthread_unix.cpp @@ -36,7 +36,7 @@ ** **********************************************************************/ -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #include "qplatformdefs.h" @@ -557,4 +557,4 @@ TQThread *TQThread::currentThreadObject() } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index e37fa303d..b3a630bcf 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -56,7 +56,7 @@ #include "ntqstyle.h" #include "ntqmetaobject.h" #include "ntqguardedptr.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #include "ntqthread.h" #endif #if defined(QT_ACCESSIBILITY_SUPPORT) @@ -890,7 +890,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n ) } #endif -#if defined(QT_THREAD_SUPPORT) && defined(QT_CHECK_STATE) +#if defined(TQT_THREAD_SUPPORT) && defined(QT_CHECK_STATE) if (TQThread::currentThreadObject() != TQApplication::guiThread()) { tqFatal( "TQWidget: Cannot create a TQWidget outside of the main GUI thread" ); } |