From f610c11869e67d9c79be696de5d5ed69a4761b1b Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Tue, 12 Mar 2024 01:44:49 +0300 Subject: [PATCH] TQT_THREAD_SUPPORT->!TQT_NO_THREAD: update documentation Signed-off-by: Alexander Golubev --- doc/html/qapplication-h.html | 10 +++++----- doc/html/qeventloop-h.html | 4 ++-- doc/html/qmake-manual-6.html | 12 ++++++------ doc/html/qmutex-h.html | 2 +- doc/html/qsemaphore-h.html | 2 +- doc/html/qthread-h.html | 4 ++-- doc/html/qthreadstorage-h.html | 4 ++-- doc/html/qwaitcondition-h.html | 2 +- doc/html/threads.html | 16 ++++++---------- doc/threads.doc | 18 ++++++------------ qmake/book/qmake-advanced.leaf | 12 ++++++------ 11 files changed, 38 insertions(+), 48 deletions(-) diff --git a/doc/html/qapplication-h.html b/doc/html/qapplication-h.html index d2911b40..bd959e38 100644 --- a/doc/html/qapplication-h.html +++ b/doc/html/qapplication-h.html @@ -94,9 +94,9 @@ class TQEventLoop; class TQWSDecoration; #endif -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD class TQMutex; -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD class TQApplication; @@ -316,7 +316,7 @@ public: static bool x11_apply_settings(); #endif void wakeUpGuiThread(); -#if defined(TQT_THREAD_SUPPORT) +#ifndef TQT_NO_THREAD void lock(); void unlock(bool wakeUpGui = TRUE); bool locked(); @@ -367,9 +367,9 @@ private: friend void tqt_init(int *, char **, TQApplication::Type); #endif -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD static TQMutex *tqt_mutex; -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD int app_argc; char **app_argv; diff --git a/doc/html/qeventloop-h.html b/doc/html/qeventloop-h.html index 7ddf52e3..711863a7 100644 --- a/doc/html/qeventloop-h.html +++ b/doc/html/qeventloop-h.html @@ -88,9 +88,9 @@ struct timeval; //stdc struct struct TimerInfo; //internal structure (qeventloop_mac.cpp) #endif -#if defined(TQT_THREAD_SUPPORT) +#ifndef TQT_NO_THREAD class TQMutex; -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD class TQ_EXPORT TQEventLoop : public TQObject diff --git a/doc/html/qmake-manual-6.html b/doc/html/qmake-manual-6.html index cea91e19..227f34c7 100644 --- a/doc/html/qmake-manual-6.html +++ b/doc/html/qmake-manual-6.html @@ -101,22 +101,22 @@ body { background: #ffffff; color: black; }
     win32 {
         thread {
-            DEFINES += TQT_THREAD_SUPPORT
+            DEFINES += ENABLE_THREAD_SUPPORT
         }
     }
 

To save writing many nested scopes, you can nest scopes using a colon like this:

     win32:thread {
-        DEFINES += TQT_THREAD_SUPPORT
+        DEFINES += ENABLE_THREAD_SUPPORT
     }
 

Once a test has been performed you may also do else/elseif operations. With this you may easily write complicated tests. This can be done with the special 'else' scope, it can be combined with other scopes (separated by colons as above) for example:

     win32:thread {
-        DEFINES += TQT_THREAD_SUPPORT
+        DEFINES += ENABLE_THREAD_SUPPORT
     } else:debug {
-        DEFINES += QT_NOTHREAD_DEBUG
+        DEFINES += NOTHREAD_DEBUG
     } else {
         message("Unknown configuration")
     }
@@ -166,10 +166,10 @@ body { background: #ffffff; color: black; }
 

If value is in the list of values stored in the variable called variablename, then the settings inside the scope will be processed. For example:

     contains( CONFIG, thread ) {
-        DEFINES += TQT_THREAD_SUPPORT
+        DEFINES += ENABLE_THREAD_SUPPORT
     }
 
-

If thread is in the list of values for the CONFIG variable, then TQT_THREAD_SUPPORT will be added to the list of values in the DEFINES variable.

+

If thread is in the list of values for the CONFIG variable, then ENABLE_THREAD_SUPPORT will be added to the list of values in the DEFINES variable.

count( variablename, number )

If number matches the number of values stored in the variable called variablename, then the settings inside the scope will be processed. For example:

diff --git a/doc/html/qmutex-h.html b/doc/html/qmutex-h.html
index 8f9eba58..3a8b9d66 100644
--- a/doc/html/qmutex-h.html
+++ b/doc/html/qmutex-h.html
@@ -81,7 +81,7 @@ body { background: #ffffff; color: black; }
 #include "ntqglobal.h"
 #endif // QT_H
 
-#if defined(TQT_THREAD_SUPPORT)
+#ifndef TQT_NO_THREAD
 
 class TQMutexPrivate;
 
diff --git a/doc/html/qsemaphore-h.html b/doc/html/qsemaphore-h.html
index a80c1de1..1f4d0956 100644
--- a/doc/html/qsemaphore-h.html
+++ b/doc/html/qsemaphore-h.html
@@ -81,7 +81,7 @@ body { background: #ffffff; color: black; }
 #include "ntqglobal.h"
 #endif // QT_H
 
-#if defined(TQT_THREAD_SUPPORT)
+#ifndef TQT_NO_THREAD
 
 class TQSemaphorePrivate;
 
diff --git a/doc/html/qthread-h.html b/doc/html/qthread-h.html
index cbde3d13..86dea0f6 100644
--- a/doc/html/qthread-h.html
+++ b/doc/html/qthread-h.html
@@ -77,7 +77,7 @@ body { background: #ffffff; color: black; }
 #ifndef TQTHREAD_H
 #define TQTHREAD_H
 
-#if defined(TQT_THREAD_SUPPORT)
+#ifndef TQT_NO_THREAD
 
 #ifndef QT_H
 #include "ntqwindowdefs.h"
@@ -152,7 +152,7 @@ private:
 #endif // TQ_DISABLE_COPY
 };
 
-#endif // TQT_THREAD_SUPPORT
+#endif // TQT_NO_THREAD
 
 #endif // TQTHREAD_H
 
diff --git a/doc/html/qthreadstorage-h.html b/doc/html/qthreadstorage-h.html index 7efc0555..629de64c 100644 --- a/doc/html/qthreadstorage-h.html +++ b/doc/html/qthreadstorage-h.html @@ -75,7 +75,7 @@ body { background: #ffffff; color: black; } #ifndef TQTHREADSTORAGE_H #define TQTHREADSTORAGE_H -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD #ifndef QT_H #include "ntqglobal.h" @@ -126,7 +126,7 @@ public: { (void) d.set( t ); } }; -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD #endif // TQTHREADSTORAGE_H
diff --git a/doc/html/qwaitcondition-h.html b/doc/html/qwaitcondition-h.html index 06589092..5779eda8 100644 --- a/doc/html/qwaitcondition-h.html +++ b/doc/html/qwaitcondition-h.html @@ -81,7 +81,7 @@ body { background: #ffffff; color: black; } #include "ntqglobal.h" #endif // QT_H -#if defined(TQT_THREAD_SUPPORT) +#ifndef TQT_NO_THREAD #include <limits.h> diff --git a/doc/html/threads.html b/doc/html/threads.html index 6e13f248..8d84c897 100644 --- a/doc/html/threads.html +++ b/doc/html/threads.html @@ -74,16 +74,12 @@ threading see our Recommended Reading list.

When TQt is installed on Windows, thread support is an option on some compilers. -

On Mac OS X and Unix, thread support is enabled by adding the --thread option when running the configure script. On Unix -platforms where multithreaded programs must be linked in special ways, -such as with a special libc, installation will create a separate -library, libtqt-mt and hence threaded programs must be linked -against this library (with -ltqt-mt) rather than the standard TQt -library. -

On both platforms, you should compile with the macro TQT_THREAD_SUPPORT defined (e.g. compile with --DTQT_THREAD_SUPPORT). On Windows, this is usually done by an -entry in ntqconfig.h. +

On Mac OS X and Unix, thread support is enabled by default on platforms which +support it. It might be disabled by adding the -no-thread option when +running the configure script. Due to historical reasons on Unix platforms, +installation will create a separate library, libtqt-mt and hence threaded +programs must be linked against this library (with -ltqt-mt) rather than +the standard libtqt library.

The Thread Classes

These classes are built into the TQt library when thread support is enabled: diff --git a/doc/threads.doc b/doc/threads.doc index 951656b7..2a81a9ef 100644 --- a/doc/threads.doc +++ b/doc/threads.doc @@ -60,18 +60,12 @@ threading see our \link #reading Recommended Reading\endlink list. When TQt is installed on Windows, thread support is an option on some compilers. -On Mac OS X and Unix, thread support is enabled by adding the -\c{-thread} option when running the \c{configure} script. On Unix -platforms where multithreaded programs must be linked in special ways, -such as with a special libc, installation will create a separate -library, \c{libtqt-mt} and hence threaded programs must be linked -against this library (with \c{-ltqt-mt}) rather than the standard Qt -library. - -On both platforms, you should compile with the macro \c -TQT_THREAD_SUPPORT defined (e.g. compile with -\c{-DTQT_THREAD_SUPPORT}). On Windows, this is usually done by an -entry in \c{ntqconfig.h}. +On Mac OS X and Unix, thread support is enabled by default on platforms which +support it. It might be disabled by adding the \c{-no-thread} option when +running the \c{configure} script. Due to historical reasons on Unix platforms, +installation will create a separate library, \c{libtqt-mt} and hence threaded +programs must be linked against this library (with \c{-ltqt-mt}) rather than +the standard \c{libtqt} library. \section1 The Thread Classes diff --git a/qmake/book/qmake-advanced.leaf b/qmake/book/qmake-advanced.leaf index e4d7621b..2b5bb8ac 100644 --- a/qmake/book/qmake-advanced.leaf +++ b/qmake/book/qmake-advanced.leaf @@ -141,7 +141,7 @@ this: \code win32 { thread { - DEFINES += TQT_THREAD_SUPPORT + DEFINES += ENABLE_THREAD_SUPPORT } } \endcode @@ -151,7 +151,7 @@ like this: \code win32:thread { - DEFINES += TQT_THREAD_SUPPORT + DEFINES += ENABLE_THREAD_SUPPORT } \endcode @@ -162,9 +162,9 @@ colons as above) for example: \code win32:thread { - DEFINES += TQT_THREAD_SUPPORT + DEFINES += ENABLE_THREAD_SUPPORT } else:debug { - DEFINES += QT_NOTHREAD_DEBUG + DEFINES += NOTHREAD_DEBUG } else { message("Unknown configuration") } @@ -276,12 +276,12 @@ For example: \code contains( CONFIG, thread ) { - DEFINES += TQT_THREAD_SUPPORT + DEFINES += ENABLE_THREAD_SUPPORT } \endcode If \e thread is in the list of values for the \e CONFIG variable, then -TQT_THREAD_SUPPORT will be added to the list of values in the \e +ENABLE_THREAD_SUPPORT will be added to the list of values in the \e DEFINES variable. \section2 count( variablename, number )