Initial conversion for TQT_THREAD_SUPPORT->!TQT_NO_THREAD

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
fix/no-thread
Alexander Golubev 8 months ago
parent 3ee3f6480f
commit fa4475f36d

2
configure vendored

@ -2580,6 +2580,8 @@ fi
if [ "$CFG_THREAD" = "yes" ]; then
QMAKE_OUTDIR="${QMAKE_OUTDIR}-mt"
QMAKE_CONFIG="$QMAKE_CONFIG thread"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS TQT_NO_THREAD"
fi
if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QNX" = "yes" ]; then
QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"

@ -36,7 +36,7 @@ CXXFLAGS= @QMAKE_CXXFLAGS@ \
-I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac \
-I@BUILD_PATH@/include/qmake -I@BUILD_PATH@/include -I@SOURCE_PATH@/include \
-DTQT_NO_TEXTCODEC -DTQT_NO_UNICODETABLES -DTQT_NO_COMPONENT -DTQT_NO_STL \
-DTQT_NO_COMPRESS -I@QMAKESPEC@ -DHAVE_QCONFIG_CPP
-DTQT_NO_COMPRESS -DTQT_NO_THREAD -I@QMAKESPEC@ -DHAVE_QCONFIG_CPP
LFLAGS=@QMAKE_LFLAGS@
tqmake: $(OBJS) $(QOBJS)

@ -5,7 +5,7 @@ CXX = g++
CFLAGS = -c -o$@ -O \
-I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -I..\include -I..\src\tools \
-I..\mkspecs\win32-g++ \
-DUNICODE -DTQT_NO_TEXTCODEC -DQT_LITE_COMPONENT -DQT_NODLL -DTQT_NO_STL -DTQT_NO_COMPRESS
-DUNICODE -DTQT_NO_TEXTCODEC -DQT_LITE_COMPONENT -DQT_NODLL -DTQT_NO_STL -DTQT_NO_COMPRESS -DTQT_NO_THREAD
CXXFLAGS = $(CFLAGS)
LFLAGS =
LIBS = -lole32 -luuid

@ -228,8 +228,6 @@ UnixMakefileGenerator::init()
if ( project->isActiveConfig("dylib") )
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_DYNLOAD"];
if ( project->isActiveConfig("thread") ) {
if(project->isActiveConfig("qt"))
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT");
if ( !project->isEmpty("QMAKE_CFLAGS_THREAD")) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_THREAD"];
project->variables()["PRL_EXPORT_CFLAGS"] += project->variables()["QMAKE_CFLAGS_THREAD"];

@ -426,8 +426,6 @@ BorlandMakefileGenerator::init()
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_ON"];
}
if(project->isActiveConfig("qt")) {
if ( project->isActiveConfig("thread") )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT");
if ( project->isActiveConfig("accessibility" ) )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_ACCESSIBILITY_SUPPORT");
if ( project->isActiveConfig("tablet") )

@ -428,7 +428,6 @@ MingwMakefileGenerator::init()
project->variables()["CONFIG"].append("dll");
}
if ( project->isActiveConfig("thread") ) {
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT");
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_THREAD"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_THREAD"];
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_THREAD"];

@ -746,8 +746,6 @@ DspMakefileGenerator::init()
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_OPENGL"];
}
if ( thread ) {
if(project->isActiveConfig("qt"))
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT" );
if ( project->isActiveConfig("dll") || project->first("TARGET") == "qtmain"
|| !project->variables()["QMAKE_QT_DLL"].isEmpty() ) {
project->variables()["MSVCDSP_MTDEFD"] += project->variables()["QMAKE_CXXFLAGS_MT_DLLDBG"];

@ -511,8 +511,6 @@ NmakeMakefileGenerator::init()
if ( is_qt && !project->variables()["QMAKE_LIB_FLAG"].isEmpty() )
project->variables()["CONFIG"].append("dll");
}
if ( project->isActiveConfig("thread") )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT");
if ( project->isActiveConfig("accessibility" ) )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_ACCESSIBILITY_SUPPORT");
if ( project->isActiveConfig("tablet") )

@ -483,7 +483,6 @@ void VcprojGenerator::init()
}
if( project->isActiveConfig("thread") ) {
project->variables()["DEFINES"] += "TQT_THREAD_SUPPORT";
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"];
} else {
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT"];
@ -1208,8 +1207,6 @@ void VcprojGenerator::initOld()
// THREAD --------------------------------------------------------
if ( project->isActiveConfig("thread") ) {
if(project->isActiveConfig("qt"))
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT" );
if ( !project->variables()["DEFINES"].contains("QT_DLL") && is_qt
&& project->first("TARGET") != "qtmain" )
project->variables()["QMAKE_LFLAGS"].append("/NODEFAULTLIB:libc");

@ -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;

@ -36,6 +36,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#ifdef TQT_THREAD_SUPPORT
#include "qplatformdefs.h"

@ -36,6 +36,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#if defined(TQT_THREAD_SUPPORT)
#include "qplatformdefs.h"

@ -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

@ -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

@ -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)

@ -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:

@ -36,6 +36,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#if defined(TQT_THREAD_SUPPORT)
#include "qt_windows.h"

@ -54,6 +54,8 @@
//
//
#include "ntqglobal.h"
#if defined(TQT_THREAD_SUPPORT)
#if defined(TQ_WS_WIN)

@ -38,6 +38,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#if defined(TQT_THREAD_SUPPORT)
#include "qplatformdefs.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:

@ -38,6 +38,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#if defined(TQT_THREAD_SUPPORT)
#include "ntqsemaphore.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

@ -36,6 +36,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#ifdef TQT_THREAD_SUPPORT
#include "qplatformdefs.h"

@ -38,6 +38,8 @@
**
**********************************************************************/
#include "ntqglobal.h"
#if defined(TQT_THREAD_SUPPORT)
#include "qplatformdefs.h"

Loading…
Cancel
Save