TQT_THREAD_SUPPORT->!TQT_NO_THREAD: update documentation

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
fix/no-thread
Alexander Golubev 3 months ago
parent 558bc78e5b
commit f610c11869

@ -94,9 +94,9 @@ class TQEventLoop;
class TQWSDecoration; class TQWSDecoration;
#endif #endif
#ifdef TQT_THREAD_SUPPORT #ifndef TQT_NO_THREAD
class TQMutex; class TQMutex;
#endif // TQT_THREAD_SUPPORT #endif // TQT_NO_THREAD
class TQApplication; class TQApplication;
@ -316,7 +316,7 @@ public:
static bool x11_apply_settings(); static bool x11_apply_settings();
#endif #endif
void wakeUpGuiThread(); void wakeUpGuiThread();
#if defined(TQT_THREAD_SUPPORT) #ifndef TQT_NO_THREAD
void lock(); void lock();
void unlock(bool wakeUpGui = TRUE); void unlock(bool wakeUpGui = TRUE);
bool locked(); bool locked();
@ -367,9 +367,9 @@ private:
friend void tqt_init(int *, char **, TQApplication::Type); friend void tqt_init(int *, char **, TQApplication::Type);
#endif #endif
#ifdef TQT_THREAD_SUPPORT #ifndef TQT_NO_THREAD
static TQMutex *tqt_mutex; static TQMutex *tqt_mutex;
#endif // TQT_THREAD_SUPPORT #endif // TQT_NO_THREAD
int app_argc; int app_argc;
char **app_argv; char **app_argv;

@ -88,9 +88,9 @@ struct timeval; //stdc struct
struct TimerInfo; //internal structure (qeventloop_mac.cpp) struct TimerInfo; //internal structure (qeventloop_mac.cpp)
#endif #endif
#if defined(TQT_THREAD_SUPPORT) #ifndef TQT_NO_THREAD
class TQMutex; class TQMutex;
#endif // TQT_THREAD_SUPPORT #endif // TQT_NO_THREAD
class TQ_EXPORT TQEventLoop : public TQObject class TQ_EXPORT TQEventLoop : public TQObject

@ -101,22 +101,22 @@ body { background: #ffffff; color: black; }
<pre> <pre>
win32 { win32 {
thread { thread {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} }
} }
</pre> </pre>
<p>To save writing many nested scopes, you can nest scopes using a colon like this:</p> <p>To save writing many nested scopes, you can nest scopes using a colon like this:</p>
<pre> <pre>
win32:thread { win32:thread {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} }
</pre> </pre>
<p>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:</p> <p>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:</p>
<pre> <pre>
win32:thread { win32:thread {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} else:debug { } else:debug {
DEFINES += QT_NOTHREAD_DEBUG DEFINES += NOTHREAD_DEBUG
} else { } else {
message("Unknown configuration") message("Unknown configuration")
} }
@ -166,10 +166,10 @@ body { background: #ffffff; color: black; }
<p>If <em>value</em> is in the list of values stored in the variable called <em>variablename</em>, then the settings inside the scope will be processed. For example:</p> <p>If <em>value</em> is in the list of values stored in the variable called <em>variablename</em>, then the settings inside the scope will be processed. For example:</p>
<pre> <pre>
contains( CONFIG, thread ) { contains( CONFIG, thread ) {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} }
</pre> </pre>
<p>If <em>thread</em> is in the list of values for the <em>CONFIG</em> variable, then TQT_THREAD_SUPPORT will be added to the list of values in the <em>DEFINES</em> variable.</p> <p>If <em>thread</em> is in the list of values for the <em>CONFIG</em> variable, then ENABLE_THREAD_SUPPORT will be added to the list of values in the <em>DEFINES</em> variable.</p>
<h4><a name="5-2"></a>count( variablename, number )</h4> <h4><a name="5-2"></a>count( variablename, number )</h4>
<p>If <em>number</em> matches the number of values stored in the variable called <em>variablename</em>, then the settings inside the scope will be processed. For example:</p> <p>If <em>number</em> matches the number of values stored in the variable called <em>variablename</em>, then the settings inside the scope will be processed. For example:</p>
<pre> <pre>

@ -81,7 +81,7 @@ body { background: #ffffff; color: black; }
#include "ntqglobal.h" #include "ntqglobal.h"
#endif // QT_H #endif // QT_H
#if defined(TQT_THREAD_SUPPORT) #ifndef TQT_NO_THREAD
class TQMutexPrivate; class TQMutexPrivate;

@ -81,7 +81,7 @@ body { background: #ffffff; color: black; }
#include "ntqglobal.h" #include "ntqglobal.h"
#endif // QT_H #endif // QT_H
#if defined(TQT_THREAD_SUPPORT) #ifndef TQT_NO_THREAD
class TQSemaphorePrivate; class TQSemaphorePrivate;

@ -77,7 +77,7 @@ body { background: #ffffff; color: black; }
#ifndef TQTHREAD_H #ifndef TQTHREAD_H
#define TQTHREAD_H #define TQTHREAD_H
#if defined(TQT_THREAD_SUPPORT) #ifndef TQT_NO_THREAD
#ifndef QT_H #ifndef QT_H
#include "ntqwindowdefs.h" #include "ntqwindowdefs.h"
@ -152,7 +152,7 @@ private:
#endif // TQ_DISABLE_COPY #endif // TQ_DISABLE_COPY
}; };
#endif // TQT_THREAD_SUPPORT #endif // TQT_NO_THREAD
#endif // TQTHREAD_H #endif // TQTHREAD_H
</pre> </pre>

@ -75,7 +75,7 @@ body { background: #ffffff; color: black; }
#ifndef TQTHREADSTORAGE_H #ifndef TQTHREADSTORAGE_H
#define TQTHREADSTORAGE_H #define TQTHREADSTORAGE_H
#ifdef TQT_THREAD_SUPPORT #ifndef TQT_NO_THREAD
#ifndef QT_H #ifndef QT_H
#include "ntqglobal.h" #include "ntqglobal.h"
@ -126,7 +126,7 @@ public:
{ (void) d.set( t ); } { (void) d.set( t ); }
}; };
#endif // TQT_THREAD_SUPPORT #endif // TQT_NO_THREAD
#endif // TQTHREADSTORAGE_H #endif // TQTHREADSTORAGE_H
</pre> </pre>

@ -81,7 +81,7 @@ body { background: #ffffff; color: black; }
#include "ntqglobal.h" #include "ntqglobal.h"
#endif // QT_H #endif // QT_H
#if defined(TQT_THREAD_SUPPORT) #ifndef TQT_NO_THREAD
#include &lt;limits.h&gt; #include &lt;limits.h&gt;

@ -74,16 +74,12 @@ threading see our <a href="#reading">Recommended Reading</a> list.
</h2> </h2>
<a name="2"></a><p> When TQt is installed on Windows, thread support is an option on some <a name="2"></a><p> When TQt is installed on Windows, thread support is an option on some
compilers. compilers.
<p> On Mac OS X and Unix, thread support is enabled by adding the <p> On Mac OS X and Unix, thread support is enabled by default on platforms which
<tt>-thread</tt> option when running the <tt>configure</tt> script. On Unix support it. It might be disabled by adding the <tt>-no-thread</tt> option when
platforms where multithreaded programs must be linked in special ways, running the <tt>configure</tt> script. Due to historical reasons on Unix platforms,
such as with a special libc, installation will create a separate installation will create a separate library, <tt>libtqt-mt</tt> and hence threaded
library, <tt>libtqt-mt</tt> and hence threaded programs must be linked programs must be linked against this library (with <tt>-ltqt-mt</tt>) rather than
against this library (with <tt>-ltqt-mt</tt>) rather than the standard TQt the standard <tt>libtqt</tt> library.
library.
<p> On both platforms, you should compile with the macro <tt>TQT_THREAD_SUPPORT</tt> defined (e.g. compile with
<tt>-DTQT_THREAD_SUPPORT</tt>). On Windows, this is usually done by an
entry in <tt>ntqconfig.h</tt>.
<p> <h2> The Thread Classes <p> <h2> The Thread Classes
</h2> </h2>
<a name="3"></a><p> These classes are built into the TQt library when thread support is enabled: <a name="3"></a><p> These classes are built into the TQt library when thread support is enabled:

@ -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 When TQt is installed on Windows, thread support is an option on some
compilers. compilers.
On Mac OS X and Unix, thread support is enabled by adding the On Mac OS X and Unix, thread support is enabled by default on platforms which
\c{-thread} option when running the \c{configure} script. On Unix support it. It might be disabled by adding the \c{-no-thread} option when
platforms where multithreaded programs must be linked in special ways, running the \c{configure} script. Due to historical reasons on Unix platforms,
such as with a special libc, installation will create a separate installation will create a separate library, \c{libtqt-mt} and hence threaded
library, \c{libtqt-mt} and hence threaded programs must be linked programs must be linked against this library (with \c{-ltqt-mt}) rather than
against this library (with \c{-ltqt-mt}) rather than the standard Qt the standard \c{libtqt} library.
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}.
\section1 The Thread Classes \section1 The Thread Classes

@ -141,7 +141,7 @@ this:
\code \code
win32 { win32 {
thread { thread {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} }
} }
\endcode \endcode
@ -151,7 +151,7 @@ like this:
\code \code
win32:thread { win32:thread {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} }
\endcode \endcode
@ -162,9 +162,9 @@ colons as above) for example:
\code \code
win32:thread { win32:thread {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} else:debug { } else:debug {
DEFINES += QT_NOTHREAD_DEBUG DEFINES += NOTHREAD_DEBUG
} else { } else {
message("Unknown configuration") message("Unknown configuration")
} }
@ -276,12 +276,12 @@ For example:
\code \code
contains( CONFIG, thread ) { contains( CONFIG, thread ) {
DEFINES += TQT_THREAD_SUPPORT DEFINES += ENABLE_THREAD_SUPPORT
} }
\endcode \endcode
If \e thread is in the list of values for the \e CONFIG variable, then 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. DEFINES variable.
\section2 count( variablename, number ) \section2 count( variablename, number )

Loading…
Cancel
Save