diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-09-18 01:13:31 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-09-18 01:13:31 +0900 |
commit | f849f22528ee9eb5eeb1f9aa92822846b2b3e01f (patch) | |
tree | 0ec893f6112e8abf121bb35b9755a43e2db99833 /src/kernel | |
parent | 2848b517a64d4ad5424af224772cea26bdbf375c (diff) | |
download | qt3-f849f22528ee9eb5eeb1f9aa92822846b2b3e01f.tar.gz qt3-f849f22528ee9eb5eeb1f9aa92822846b2b3e01f.zip |
QT_THREAD_SUPPORT -> TQT_THREAD_SUPPORT conversion to align to updated admin module
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/qapplication.cpp | 74 | ||||
-rw-r--r-- | src/kernel/qapplication.h | 18 | ||||
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 8 | ||||
-rw-r--r-- | src/kernel/qeventloop.cpp | 6 | ||||
-rw-r--r-- | src/kernel/qeventloop.h | 4 | ||||
-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/qgplugin.h | 2 | ||||
-rw-r--r-- | src/kernel/qmetaobject.cpp | 24 | ||||
-rw-r--r-- | src/kernel/qobject.cpp | 162 | ||||
-rw-r--r-- | src/kernel/qobject.h | 6 | ||||
-rw-r--r-- | src/kernel/qthread.cpp | 8 | ||||
-rw-r--r-- | src/kernel/qthread.h | 4 | ||||
-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/qapplication.cpp b/src/kernel/qapplication.cpp index d87d2e5..a8500c0 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 "qmutex.h" # include "qthread.h" # include <private/qthreadinstance_p.h> -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #include <stdlib.h> @@ -375,7 +375,7 @@ QStringList *QApplication::app_libpaths = 0; bool QApplication::metaComposeUnicode = FALSE; int QApplication::composedUnicode = 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutex *QApplication::qt_mutex = 0; QMutex *qt_sharedStringMutex = 0; Q_EXPORT QMutex * qt_sharedMetaObjectMutex = 0; @@ -388,13 +388,13 @@ Q_EXPORT Qt::HANDLE qt_get_application_thread_id() { return qt_application_thread_id; } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT -#ifndef QT_THREAD_SUPPORT +#ifndef TQT_THREAD_SUPPORT QEventLoop *QApplication::eventloop = 0; // application event loop #endif -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QEventLoop* QApplication::currentEventLoop() { QThread* thread = QThread::currentThreadObject(); if (thread) { @@ -541,7 +541,7 @@ QClipboard *qt_clipboard = 0; // global clipboard object #endif QWidgetList * qt_modal_stack=0; // stack of modal widgets -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT // thread wrapper for the main() thread class QCoreApplicationThread : public QThread { @@ -605,9 +605,9 @@ static QPostEventList *globalPostedEvents = 0; // list of posted events uint qGlobalPostedEventsCount() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (!globalPostedEvents) { return 0; @@ -1035,7 +1035,7 @@ QApplication::QApplication(Display *dpy, int argc, char **argv, #endif // Q_WS_X11 -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QThread* QApplication::guiThread() { return mainThread(); } @@ -1069,7 +1069,7 @@ void QApplication::init_precmdline() void QApplication::initialize( int argc, char **argv, bool enable_sm ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT qt_mutex = new QMutex( TRUE ); qt_sharedStringMutex = new QMutex( TRUE ); qt_sharedMetaObjectMutex = new QMutex( TRUE ); @@ -1078,7 +1078,7 @@ void QApplication::initialize( int argc, char **argv, bool enable_sm ) #endif // QT_USE_GLIBMAINLOOP postevent_mutex = new QMutex( TRUE ); qt_application_thread_id = QThread::currentThread(); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT app_argc = argc; app_argv = argv; @@ -1226,12 +1226,12 @@ QApplication::~QApplication() app_libpaths = 0; #endif -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT delete qt_mutex; qt_mutex = 0; delete postevent_mutex; postevent_mutex = 0; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if( qApp == this ) { if ( postedEvents ) @@ -1254,7 +1254,7 @@ QApplication::~QApplication() session_key = 0; #endif //QT_NO_SESSIONMANAGER -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT delete qt_sharedMetaObjectMutex; qt_sharedMetaObjectMutex = 0; delete qt_sharedStringMutex; @@ -1263,7 +1263,7 @@ QApplication::~QApplication() delete qt_timerListMutex; qt_timerListMutex = 0; #endif // QT_USE_GLIBMAINLOOP -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT qt_explicit_app_style = FALSE; qt_app_has_font = FALSE; @@ -2521,9 +2521,9 @@ bool QApplication::notify( QObject *receiver, QEvent *e ) } if ( e->type() == QEvent::ChildRemoved && receiver->postedEvents) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (globalPostedEvents) { // the QObject destructor calls QObject::removeChild, which calls @@ -2868,7 +2868,7 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e) } if (!handled) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) int locklevel = 0; int llcount; if (QApplication::qt_mutex) { @@ -2881,7 +2881,7 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e) } #endif consumed = receiver->event( e ); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (QApplication::qt_mutex) { for (llcount=0; llcount<locklevel; llcount++) { QApplication::qt_mutex->lock(); @@ -3365,9 +3365,9 @@ void QApplication::postEvent( QObject *receiver, QEvent *event ) return; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !globalPostedEvents ) { // create list globalPostedEvents = new QPostEventList; @@ -3461,7 +3461,7 @@ void QApplication::postEvent( QObject *receiver, QEvent *event ) l->append( pe ); globalPostedEvents->append( pe ); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT // Wake up the receiver thread event loop QThread* thread = receiver->contextThreadObject(); if (thread) { @@ -3514,7 +3514,7 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type ) sendPostedEvents( 0, QEvent::ChildInserted ); } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( postevent_mutex ); #endif @@ -3571,9 +3571,9 @@ void QApplication::sendPostedEvents( QObject *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() == QEvent::Paint && r->isWidgetType() ) { QWidget * w = (QWidget*)r; @@ -3585,9 +3585,9 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type ) sent = TRUE; QApplication::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 QApplication::removePostedEvents( QObject *receiver, int event_type ) return; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT // the QObject destructor calls this function directly. this can // happen while the event loop is in the middle of posting events, @@ -3699,9 +3699,9 @@ void QApplication::removePostedEvent( QEvent * event ) return; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( postevent_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !globalPostedEvents ) { #if defined(QT_DEBUG) @@ -3797,7 +3797,7 @@ void QApplication::removePostedEvent( QEvent * event ) } void qThreadTerminationHandlerRecursive( QObject* object, QThread* originThread, QThread* destinationThread ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QThread* objectThread = object->contextThreadObject(); if (objectThread && (objectThread == originThread)) { QThread::CleanupType cleanupType = objectThread->cleanupType(); @@ -3822,7 +3822,7 @@ void qThreadTerminationHandlerRecursive( QObject* object, QThread* originThread, for ( childObject = children.first(); childObject; childObject = children.next() ) { qThreadTerminationHandlerRecursive(childObject, originThread, destinationThread); } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } /*!\internal @@ -3831,14 +3831,14 @@ void qThreadTerminationHandlerRecursive( QObject* object, QThread* originThread, for thread destruction. */ void QApplication::threadTerminationHandler( QThread *originThread ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( qt_mutex ); QThread* destinationThread = guiThread(); const QObjectList* objects = QObject::objectTrees(); for ( QObjectListIt objectit( *objects ) ; *objectit; ++objectit ) { qThreadTerminationHandlerRecursive((*objectit), originThread, destinationThread); } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT } /*!\internal @@ -4190,7 +4190,7 @@ bool QApplication::desktopSettingsAware() \sa lock(), unlock() \link threads.html Thread Support in Qt\endlink */ -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) void QApplication::lock() { qt_mutex->lock(); diff --git a/src/kernel/qapplication.h b/src/kernel/qapplication.h index dca2138..bc24bc6 100644 --- a/src/kernel/qapplication.h +++ b/src/kernel/qapplication.h @@ -61,10 +61,10 @@ class QIMEvent; class QWSDecoration; #endif -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT class QMutex; class QThread; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT class QApplication; @@ -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 QMutex *qt_mutex; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT private: int app_argc; @@ -372,7 +372,7 @@ private: #ifndef QT_NO_CURSOR static QCursor *app_cursor; #endif -#ifndef QT_THREAD_SUPPORT +#ifndef TQT_THREAD_SUPPORT static QEventLoop* eventloop; #endif static int app_tracking; @@ -436,9 +436,9 @@ private: friend class QDialog; friend class QAccelManager; friend class QEvent; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT friend class QThread; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT friend class QTranslator; friend class QEventLoop; friend Q_EXPORT void qt_ucm_initialize( QApplication * ); @@ -458,7 +458,7 @@ private: static QEventLoop* currentEventLoop(); public: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT static QThread* guiThread(); static void threadTerminationHandler( QThread * ); #endif diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index c93c60f..35abe06 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 "qthread.h" #endif @@ -1645,7 +1645,7 @@ void qt_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 (( qt_is_gui_used ) && ( !display )) { // If Qt is running standalone with a GUI, initialize X11 threading XInitThreads(); @@ -2210,7 +2210,7 @@ void qt_init_internal( int *argcptr, char **argv, QPainter::initialize(); } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) QThread::initialize(); #endif @@ -2498,7 +2498,7 @@ void qt_cleanup() QColor::cleanup(); QSharedDoubleBuffer::cleanup(); } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) QThread::cleanup(); #endif diff --git a/src/kernel/qeventloop.cpp b/src/kernel/qeventloop.cpp index 82ff666..dd88e78 100644 --- a/src/kernel/qeventloop.cpp +++ b/src/kernel/qeventloop.cpp @@ -41,7 +41,7 @@ #include "qapplication.h" #include "qdatetime.h" -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT # include "qthread.h" # include "private/qthreadinstance_p.h" #endif @@ -116,7 +116,7 @@ QEventLoop::QEventLoop( QObject *parent, const char *name ) init(); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QThread* thread = QThread::currentThreadObject(); if (thread) { if (thread->d) { @@ -135,7 +135,7 @@ QEventLoop::~QEventLoop() { cleanup(); delete d; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QThread* thread = QThread::currentThreadObject(); if (thread) { if (thread->d) { diff --git a/src/kernel/qeventloop.h b/src/kernel/qeventloop.h index a3ee01d..4aaee26 100644 --- a/src/kernel/qeventloop.h +++ b/src/kernel/qeventloop.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 QMutex; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT class Q_EXPORT QEventLoop : public QObject diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp index c41acce..a71807a 100644 --- a/src/kernel/qeventloop_unix_glib.cpp +++ b/src/kernel/qeventloop_unix_glib.cpp @@ -46,7 +46,7 @@ #include "qbitarray.h" #include "qmutex.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #include "qthread.h" #endif @@ -55,11 +55,11 @@ #include <glib.h> -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #ifdef QT_USE_GLIBMAINLOOP extern QMutex *qt_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) qt_timerListMutex->lock(); #endif TimerInfo *t = timerList->first(); @@ -209,7 +209,7 @@ static void insertTimer( const TimerInfo *ti ) // insert timer info into list qDebug( "QObject: %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) qt_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) qt_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) qt_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) qt_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) qt_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) qt_timerListMutex->unlock(); #endif return &tm; } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) qt_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) qt_timerListMutex = new QMutex(true); #endif Q_CHECK_PTR( timerList ); @@ -336,18 +336,18 @@ void cleanupTimers() // Main timer functions for starting and killing timers int qStartTimer( int interval, QObject *obj ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->lock(); #endif if ( !timerList ) { // initialize timer data initTimers(); -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_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 (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return 0; @@ -363,7 +363,7 @@ int qStartTimer( int interval, QObject *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 (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return id; @@ -371,12 +371,12 @@ int qStartTimer( int interval, QObject *obj ) bool qKillTimer( int id ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_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 (qt_timerListMutex) qt_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 (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return ret; } else { // id not found -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return FALSE; @@ -404,12 +404,12 @@ bool qKillTimer( int id ) bool qKillTimer( QObject *obj ) { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->lock(); #endif register TimerInfo *t; if ( !timerList ) { // not initialized -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return FALSE; @@ -425,7 +425,7 @@ bool qKillTimer( QObject *obj ) t = timerList->next(); } } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return TRUE; @@ -632,11 +632,11 @@ int QEventLoop::timeToWait() const int QEventLoop::activateTimers() { -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->lock(); #endif if ( !timerList || !timerList->count() ) { // no timers -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return 0; @@ -682,11 +682,11 @@ int QEventLoop::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 (qt_timerListMutex) qt_timerListMutex->unlock(); #endif QTimerEvent 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) || (QThread::currentThreadObject() && QThread::currentThreadObject()->threadPostedEventsDisabled()) || @@ -696,17 +696,17 @@ int QEventLoop::activateTimers() else { QApplication::postEvent( t->obj, new QTimerEvent(e) ); // post event to correct thread } -#else // defined(QT_THREAD_SUPPORT) +#else // defined(TQT_THREAD_SUPPORT) QApplication::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 (qt_timerListMutex) qt_timerListMutex->lock(); #endif if ( timerList->findRef( begin ) == -1 ) { begin = 0; } } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (qt_timerListMutex) qt_timerListMutex->unlock(); #endif return n_act; @@ -731,7 +731,7 @@ int QEventLoop::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) || (QThread::currentThreadObject() && QThread::currentThreadObject()->threadPostedEventsDisabled()) || @@ -741,9 +741,9 @@ int QEventLoop::activateSocketNotifiers() else { QApplication::postEvent( sn->obj, new QEvent(event) ); // post event to correct thread } -#else // defined(QT_THREAD_SUPPORT) +#else // defined(TQT_THREAD_SUPPORT) QApplication::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 2839ca0..cb019d3 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 "qmutex.h" -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #include <errno.h> @@ -138,7 +138,7 @@ bool QEventLoop::processEvents( ProcessEventsFlags flags ) XEvent event; int nevents = 0; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) QMutexLocker locker( QApplication::qt_mutex ); #endif @@ -283,7 +283,7 @@ bool QEventLoop::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 QEventLoop::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 2bf1f63..5c38c7b 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 "qmutex.h" # include "qthread.h" -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #include <errno.h> @@ -295,7 +295,7 @@ bool QEventLoop::processX11Events() XEvent event; int nevents = 0; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) QMutexLocker locker( QApplication::qt_mutex ); #endif @@ -383,7 +383,7 @@ bool QEventLoop::gsourcePrepare(GSource *gs, int * timeout) ProcessEventsFlags flags = d->pev_flags; -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) QMutexLocker locker( QApplication::qt_mutex ); #endif @@ -535,10 +535,10 @@ bool QEventLoop::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) QMutexLocker locker( QApplication::qt_mutex ); #endif -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) if (locker.mutex()) locker.mutex()->lock(); #endif @@ -608,13 +608,13 @@ bool QEventLoop::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 QEventLoop::gsourceDispatch(GSource *gs) { bool QEventLoop::hasPendingEvents() const { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( QApplication::qt_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT extern uint qGlobalPostedEventsCount(); // from qapplication.cpp return ( qGlobalPostedEventsCount() || ( (qt_is_gui_used && QApplication::isGuiThread()) ? XPending( QPaintDevice::x11AppDisplay() ) : 0)); diff --git a/src/kernel/qfont_x11.cpp b/src/kernel/qfont_x11.cpp index fea0b58..477cd33 100644 --- a/src/kernel/qfont_x11.cpp +++ b/src/kernel/qfont_x11.cpp @@ -269,13 +269,13 @@ void QFont::initialize() QString 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/qgplugin.h b/src/kernel/qgplugin.h index 5ebcc5d..fc36be0 100644 --- a/src/kernel/qgplugin.h +++ b/src/kernel/qgplugin.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/qmetaobject.cpp b/src/kernel/qmetaobject.cpp index ba12615..1bc0499 100644 --- a/src/kernel/qmetaobject.cpp +++ b/src/kernel/qmetaobject.cpp @@ -41,9 +41,9 @@ #include "qmetaobject.h" #include "qasciidict.h" -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #include <private/qmutexpool_p.h> -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT /*! \class QMetaData qmetaobject.h @@ -282,10 +282,10 @@ QMetaObject::~QMetaObject() delete slotDict; // delete dicts delete signalDict; delete d; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker( qt_global_mutexpool ? qt_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 @@ QMetaObject *QMetaObject::metaObject( const char *class_name ) { if ( !qt_metaobjects ) return 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker( qt_global_mutexpool ? qt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT QtStaticMetaObjectFunction func = (QtStaticMetaObjectFunction)qt_metaobjects->find( class_name ); if ( func ) return func(); @@ -814,10 +814,10 @@ bool QMetaObject::hasMetaObject( const char *class_name ) { if ( !qt_metaobjects ) return FALSE; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker( qt_global_mutexpool ? qt_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 QMetaProperty::reset( QObject* o ) const QMetaObjectCleanUp::QMetaObjectCleanUp( const char *mo_name, QtStaticMetaObjectFunction func ) : metaObject( 0 ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker( qt_global_mutexpool ? qt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( !qt_metaobjects ) qt_metaobjects = new QAsciiDict<void>( 257 ); qt_metaobjects->insert( mo_name, (void*)func ); @@ -1226,10 +1226,10 @@ QMetaObjectCleanUp::QMetaObjectCleanUp() QMetaObjectCleanUp::~QMetaObjectCleanUp() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker( qt_global_mutexpool ? qt_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 b48531e..607a035 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -52,7 +52,7 @@ // QStyleControlElementData #include "qstyle.h" -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT #include "qmutex.h" #include <private/qmutexpool_p.h> #include "qthread.h" @@ -130,16 +130,16 @@ QStyleControlElementDataPrivate* QObject::controlElementDataPrivateObject() { return d->controlElementDataPrivate; } -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) void QObject::moveToThread_helper(QThread *targetThread) { QEvent e(QEvent::ThreadChange); QApplication::sendEvent(this, &e); -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (childObjects) { QObject *child; @@ -155,9 +155,9 @@ void QObject::setThreadObject_helper(QThread *targetThread) { d->ownThread = targetThread; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (childObjects) { QObject *child; @@ -185,9 +185,9 @@ void QObject::setThreadObject_helper(QThread *targetThread) */ void QObject::moveToThread(QThread *targetThread) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( QApplication::qt_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if (parentObj) { #if defined(QT_DEBUG) @@ -491,7 +491,7 @@ void *qt_find_obj_child( QObject *parent, const char *type, const char *name ) return 0; } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT /*! Returns a pointer to the QThread* associated with @@ -530,12 +530,12 @@ static void qt_spy_signal( QObject* sender, int signal, QUObject* o ) s.sprintf( "%s_%s", mo->className(), sigData->name ); int slot = qt_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; QMutexLocker locker( qt_global_mutexpool ? qt_global_mutexpool->get( address ) : 0 ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT QObject* old_sender = qt_spy_signal_sender; qt_spy_signal_sender = sender; @@ -554,7 +554,7 @@ static void qt_spy_signal( QObject* sender, int signal, QUObject* o ) static QObjectList* object_trees = 0; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT static QMutex *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( QObject* obj ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT if ( !obj_trees_mutex ) obj_trees_mutex = new QMutex(); QMutexLocker locker( obj_trees_mutex ); @@ -589,7 +589,7 @@ static void insert_tree( QObject* obj ) static void remove_tree( QObject* obj ) { if ( object_trees ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( obj_trees_mutex ); #endif object_trees->removeRef( obj ); @@ -780,10 +780,10 @@ QObject::~QObject() 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 QObject::event( QEvent *e ) QSenderObjectList* sol; QObject* 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 QUObject *o = metaEvent->data(); if (metaEvent->type() == QMetaCallEvent::MetaCallEmit) { qt_emit( metaEvent->id(), o ); @@ -1097,9 +1097,9 @@ bool QObject::event( QEvent *e ) if (metaEvent->type() == QMetaCallEvent::MetaCallInvoke) { qt_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 QObject::event( QEvent *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 { qWarning("QObject: Ignoring metacall event from non-owning thread"); @@ -1617,9 +1617,9 @@ QConnectionList *QObject::receivers( int signal ) const void QObject::insertChild( QObject *obj ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( obj->isTree ) { remove_tree( obj ); @@ -1663,9 +1663,9 @@ void QObject::insertChild( QObject *obj ) void QObject::removeChild( QObject *obj ) { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( d->childObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT if ( childObjects && childObjects->removeRef(obj) ) { obj->parentObj = 0; @@ -1903,12 +1903,12 @@ const QObject *QObject::sender() { #ifndef QT_NO_PRELIMINARY_SIGNAL_SPY if ( this == qt_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; QMutexLocker locker( qt_global_mutexpool ? qt_global_mutexpool->get( address ) : 0 ); -# endif // QT_THREAD_SUPPORT +# endif // TQT_THREAD_SUPPORT return qt_spy_signal_sender; } #endif @@ -2252,24 +2252,24 @@ void QObject::connectInternal( const QObject *sender, int signal_index, const QO Q_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 QSenderObjectList; -#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 QObject::disconnectInternal( const QObject *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 QObject::disconnectInternal( const QObject *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 QObject::activate_signal( QConnectionList *clist, QUObject *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 QObject::activate_signal( QConnectionList *clist, QUObject *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->qt_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 QObject::activate_signal( QConnectionList *clist, QUObject *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->qt_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 QObject::activate_signal( QConnectionList *clist, QUObject *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 { QConnection *cd = 0; QConnectionListIt it(*clist); @@ -2845,9 +2845,9 @@ void QObject::activate_signal( QConnectionList *clist, QUObject *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 QObject::activate_signal( QConnectionList *clist, QUObject *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->qt_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 QObject::activate_signal( QConnectionList *clist, QUObject *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->qt_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 QObject::activate_signal( QConnectionList *clist, QUObject *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 QObject::dumpObjectTree() void QObject::dumpObjectInfo() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( d->senderObjectListMutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #if defined(QT_DEBUG) qDebug( "OBJECT %s::%s", className(), name( "unnamed" ) ); diff --git a/src/kernel/qobject.h b/src/kernel/qobject.h index 3a86cb9..1cdc677 100644 --- a/src/kernel/qobject.h +++ b/src/kernel/qobject.h @@ -64,7 +64,7 @@ class QObjectUserData; #endif struct QUObject; -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT class QThread; #endif @@ -230,14 +230,14 @@ private: // Disabled copy constructor and operator= #endif public: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QThread* contextThreadObject() const; void moveToThread(QThread *targetThread); void disableThreadPostedEvents(bool disable); #endif private: -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT void moveToThread_helper(QThread *targetThread); void setThreadObject_helper(QThread *targetThread); #endif diff --git a/src/kernel/qthread.cpp b/src/kernel/qthread.cpp index 4eeb823..9cab1f5 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 @@ QThread::QThread() { -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT QMutexLocker locker( QApplication::qt_mutex ); -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT d = new QThreadInstance; d->init(0); @@ -282,4 +282,4 @@ void QEventLoopThread::run() if (eventLoop) eventLoop->exec(); } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT diff --git a/src/kernel/qthread.h b/src/kernel/qthread.h index 675e3a3..2dae5ab 100644 --- a/src/kernel/qthread.h +++ b/src/kernel/qthread.h @@ -41,7 +41,7 @@ #ifndef QTHREAD_H #define QTHREAD_H -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #ifndef QT_H #include "qwindowdefs.h" @@ -150,6 +150,6 @@ class Q_EXPORT QEventLoopThread : public QThread virtual void run(); }; -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT #endif // QTHREAD_H diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index 1358250..4d70385 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 @@ QThread *QThread::currentThreadObject() } -#endif // QT_THREAD_SUPPORT +#endif // TQT_THREAD_SUPPORT diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index 461c7f3..1f24dc5 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -56,7 +56,7 @@ #include "qstyle.h" #include "qmetaobject.h" #include "qguardedptr.h" -#if defined(QT_THREAD_SUPPORT) +#if defined(TQT_THREAD_SUPPORT) #include "qthread.h" #endif #if defined(QT_ACCESSIBILITY_SUPPORT) @@ -890,7 +890,7 @@ QWidget::QWidget( QWidget *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 (QThread::currentThreadObject() != QApplication::guiThread()) { qFatal( "QWidget: Cannot create a QWidget outside of the main GUI thread" ); } |