summaryrefslogtreecommitdiffstats
path: root/src/kernel/qapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r--src/kernel/qapplication.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index a8500c0..d87d2e5 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -65,11 +65,11 @@
#endif
#include "qfontdata_p.h"
-#if defined(TQT_THREAD_SUPPORT)
+#if defined(QT_THREAD_SUPPORT)
# include "qmutex.h"
# include "qthread.h"
# include <private/qthreadinstance_p.h>
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
#include <stdlib.h>
@@ -375,7 +375,7 @@ QStringList *QApplication::app_libpaths = 0;
bool QApplication::metaComposeUnicode = FALSE;
int QApplication::composedUnicode = 0;
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_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 // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
-#ifndef TQT_THREAD_SUPPORT
+#ifndef QT_THREAD_SUPPORT
QEventLoop *QApplication::eventloop = 0; // application event loop
#endif
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
QMutexLocker locker( postevent_mutex );
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
if (!globalPostedEvents) {
return 0;
@@ -1035,7 +1035,7 @@ QApplication::QApplication(Display *dpy, int argc, char **argv,
#endif // Q_WS_X11
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_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 // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
app_argc = argc;
app_argv = argv;
@@ -1226,12 +1226,12 @@ QApplication::~QApplication()
app_libpaths = 0;
#endif
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
delete qt_mutex;
qt_mutex = 0;
delete postevent_mutex;
postevent_mutex = 0;
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
if( qApp == this ) {
if ( postedEvents )
@@ -1254,7 +1254,7 @@ QApplication::~QApplication()
session_key = 0;
#endif //QT_NO_SESSIONMANAGER
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_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 // TQT_THREAD_SUPPORT
+#endif // QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
QMutexLocker locker( postevent_mutex );
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_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(TQT_THREAD_SUPPORT)
+#if defined(QT_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(TQT_THREAD_SUPPORT)
+#if defined(QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
QMutexLocker locker( postevent_mutex );
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
QMutexLocker locker( postevent_mutex );
#endif
@@ -3571,9 +3571,9 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type )
}
}
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
if ( locker.mutex() ) locker.mutex()->unlock();
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
if ( locker.mutex() ) locker.mutex()->lock();
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
QMutexLocker locker( postevent_mutex );
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_THREAD_SUPPORT
QMutexLocker locker( postevent_mutex );
-#endif // TQT_THREAD_SUPPORT
+#endif // QT_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 TQT_THREAD_SUPPORT
+#ifdef QT_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 // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
}
/*!\internal
@@ -3831,14 +3831,14 @@ void qThreadTerminationHandlerRecursive( QObject* object, QThread* originThread,
for thread destruction.
*/
void QApplication::threadTerminationHandler( QThread *originThread ) {
-#ifdef TQT_THREAD_SUPPORT
+#ifdef QT_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 // TQT_THREAD_SUPPORT
+#endif // QT_THREAD_SUPPORT
}
/*!\internal
@@ -4190,7 +4190,7 @@ bool QApplication::desktopSettingsAware()
\sa lock(), unlock() \link threads.html Thread Support in Qt\endlink
*/
-#if defined(TQT_THREAD_SUPPORT)
+#if defined(QT_THREAD_SUPPORT)
void QApplication::lock()
{
qt_mutex->lock();