diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-11 21:20:42 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2024-03-14 00:11:47 +0300 |
commit | fa4475f36d6404a70d760ca95ac6a986a8846a3f (patch) | |
tree | 9e9094c93f1051700062407ae417b3f29ec546b5 /src | |
parent | 3ee3f6480fd72a586e45e7e7eb9dc1990779a851 (diff) | |
download | tqt3-fa4475f36d6404a70d760ca95ac6a986a8846a3f.tar.gz tqt3-fa4475f36d6404a70d760ca95ac6a986a8846a3f.zip |
Initial conversion for TQT_THREAD_SUPPORT->!TQT_NO_THREAD
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/ntqthread.h | 4 | ||||
-rw-r--r-- | src/kernel/qthread.cpp | 2 | ||||
-rw-r--r-- | src/kernel/qthread_unix.cpp | 2 | ||||
-rw-r--r-- | src/moc/moc.pro | 2 | ||||
-rw-r--r-- | src/qt.pro | 3 | ||||
-rw-r--r-- | src/tools/ntqglobal.h | 6 | ||||
-rw-r--r-- | src/tools/ntqthreadstorage.h | 4 | ||||
-rw-r--r-- | src/tools/qcriticalsection_p.cpp | 2 | ||||
-rw-r--r-- | src/tools/qcriticalsection_p.h | 2 | ||||
-rw-r--r-- | src/tools/qmutex_unix.cpp | 2 | ||||
-rw-r--r-- | src/tools/qmutexpool_p.h | 4 | ||||
-rw-r--r-- | src/tools/qsemaphore.cpp | 2 | ||||
-rw-r--r-- | src/tools/qthreadinstance_p.h | 4 | ||||
-rw-r--r-- | src/tools/qthreadstorage_unix.cpp | 2 | ||||
-rw-r--r-- | src/tools/qwaitcondition_unix.cpp | 2 |
15 files changed, 33 insertions, 10 deletions
diff --git a/src/kernel/ntqthread.h b/src/kernel/ntqthread.h index 695a61fb7..6f72e67c1 100644 --- a/src/kernel/ntqthread.h +++ b/src/kernel/ntqthread.h @@ -41,12 +41,12 @@ #ifndef TQTHREAD_H #define TQTHREAD_H -#if defined(TQT_THREAD_SUPPORT) - #ifndef QT_H #include "ntqwindowdefs.h" #endif // QT_H +#if defined(TQT_THREAD_SUPPORT) + #include <limits.h> class TQThreadInstance; diff --git a/src/kernel/qthread.cpp b/src/kernel/qthread.cpp index bb51e41fc..185921c70 100644 --- a/src/kernel/qthread.cpp +++ b/src/kernel/qthread.cpp @@ -36,6 +36,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #ifdef TQT_THREAD_SUPPORT #include "qplatformdefs.h" diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index 7a6bc3393..501471fec 100644 --- a/src/kernel/qthread_unix.cpp +++ b/src/kernel/qthread_unix.cpp @@ -36,6 +36,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #if defined(TQT_THREAD_SUPPORT) #include "qplatformdefs.h" diff --git a/src/moc/moc.pro b/src/moc/moc.pro index c8abcf0d7..3e9cb1b59 100644 --- a/src/moc/moc.pro +++ b/src/moc/moc.pro @@ -3,7 +3,7 @@ TARGET = tqmoc CONFIG = console release qtinc yacc lex_included yacc_no_name_mangle DEFINES += QT_MOC TQT_NO_CODECS QT_LITE_UNICODE TQT_NO_COMPONENT \ - TQT_NO_STL TQT_NO_COMPRESS + TQT_NO_STL TQT_NO_COMPRESS TQT_NO_THREAD win32:DEFINES += QT_NODLL DESTDIR = ../../bin diff --git a/src/qt.pro b/src/qt.pro index 84482686b..e9c005987 100644 --- a/src/qt.pro +++ b/src/qt.pro @@ -121,7 +121,8 @@ thread { !win32-borland:TARGET = tqt-mt win32-borland:TARGET = qtmt embedded:TARGET = qte-mt - DEFINES += TQT_THREAD_SUPPORT +} else { + DEFINES += TQT_NO_THREAD } !cups:DEFINES += TQT_NO_CUPS diff --git a/src/tools/ntqglobal.h b/src/tools/ntqglobal.h index f83da9d79..4805869a8 100644 --- a/src/tools/ntqglobal.h +++ b/src/tools/ntqglobal.h @@ -822,6 +822,12 @@ class TQString; #include "ntqfeatures.h" #endif /* QT_H */ +// Keep the old flag for thread support in sync with the new one +#ifndef TQT_NO_THREAD +# define TQT_THREAD_SUPPORT +#else +# undef TQT_THREAD_SUPPORT +#endif // // Create TQt DLL if QT_DLL is defined (Windows only) diff --git a/src/tools/ntqthreadstorage.h b/src/tools/ntqthreadstorage.h index 588621237..b9e0e11bb 100644 --- a/src/tools/ntqthreadstorage.h +++ b/src/tools/ntqthreadstorage.h @@ -39,12 +39,12 @@ #ifndef TQTHREADSTORAGE_H #define TQTHREADSTORAGE_H -#ifdef TQT_THREAD_SUPPORT - #ifndef QT_H #include "ntqglobal.h" #endif // QT_H +#ifdef TQT_THREAD_SUPPORT + class TQ_EXPORT TQThreadStorageData { public: diff --git a/src/tools/qcriticalsection_p.cpp b/src/tools/qcriticalsection_p.cpp index 20c2127b0..534960952 100644 --- a/src/tools/qcriticalsection_p.cpp +++ b/src/tools/qcriticalsection_p.cpp @@ -36,6 +36,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #if defined(TQT_THREAD_SUPPORT) #include "qt_windows.h" diff --git a/src/tools/qcriticalsection_p.h b/src/tools/qcriticalsection_p.h index 330e141e1..0c362bc71 100644 --- a/src/tools/qcriticalsection_p.h +++ b/src/tools/qcriticalsection_p.h @@ -54,6 +54,8 @@ // // +#include "ntqglobal.h" + #if defined(TQT_THREAD_SUPPORT) #if defined(TQ_WS_WIN) diff --git a/src/tools/qmutex_unix.cpp b/src/tools/qmutex_unix.cpp index 597d3e628..3c568dbb8 100644 --- a/src/tools/qmutex_unix.cpp +++ b/src/tools/qmutex_unix.cpp @@ -38,6 +38,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #if defined(TQT_THREAD_SUPPORT) #include "qplatformdefs.h" diff --git a/src/tools/qmutexpool_p.h b/src/tools/qmutexpool_p.h index a0bb28562..7f5ecabea 100644 --- a/src/tools/qmutexpool_p.h +++ b/src/tools/qmutexpool_p.h @@ -51,13 +51,13 @@ // // -#ifdef TQT_THREAD_SUPPORT - #ifndef QT_H #include "ntqmutex.h" #include "ntqmemarray.h" #endif // QT_H +#ifdef TQT_THREAD_SUPPORT + class TQ_EXPORT TQMutexPool { public: diff --git a/src/tools/qsemaphore.cpp b/src/tools/qsemaphore.cpp index 810837b4c..394834fdd 100644 --- a/src/tools/qsemaphore.cpp +++ b/src/tools/qsemaphore.cpp @@ -38,6 +38,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #if defined(TQT_THREAD_SUPPORT) #include "ntqsemaphore.h" diff --git a/src/tools/qthreadinstance_p.h b/src/tools/qthreadinstance_p.h index 14f0de591..57244452c 100644 --- a/src/tools/qthreadinstance_p.h +++ b/src/tools/qthreadinstance_p.h @@ -51,13 +51,13 @@ // // -#ifdef TQT_THREAD_SUPPORT - #ifndef QT_H #include "ntqmutex.h" #include "ntqwindowdefs.h" #endif // QT_H +#ifdef TQT_THREAD_SUPPORT + #ifdef Q_OS_UNIX #include <pthread.h> #endif diff --git a/src/tools/qthreadstorage_unix.cpp b/src/tools/qthreadstorage_unix.cpp index d53f6fb6e..7e34690b1 100644 --- a/src/tools/qthreadstorage_unix.cpp +++ b/src/tools/qthreadstorage_unix.cpp @@ -36,6 +36,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #ifdef TQT_THREAD_SUPPORT #include "qplatformdefs.h" diff --git a/src/tools/qwaitcondition_unix.cpp b/src/tools/qwaitcondition_unix.cpp index 62038bae5..866c524fd 100644 --- a/src/tools/qwaitcondition_unix.cpp +++ b/src/tools/qwaitcondition_unix.cpp @@ -38,6 +38,8 @@ ** **********************************************************************/ +#include "ntqglobal.h" + #if defined(TQT_THREAD_SUPPORT) #include "qplatformdefs.h" |