diff options
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r-- | src/kernel/qapplication.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
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(); |