diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-28 18:13:38 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-28 19:51:58 +0900 |
| commit | 0b8fe7da6fe7441e08ab69a1e21ad1bf2833c474 (patch) | |
| tree | ca21b8626422f6ff75c02a6bb368f3fb3c0c68e1 | |
| parent | be6b00dc63593828b349bdeae33554ad8fecee0a (diff) | |
| download | tqt-0b8fe7da6fe7441e08ab69a1e21ad1bf2833c474.tar.gz tqt-0b8fe7da6fe7441e08ab69a1e21ad1bf2833c474.zip | |
Remove Q_NO_BOOL_TYPE define.
We are using c++17 compilers, so bool is always available.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
| -rw-r--r-- | doc/html/tqglobal-h.html | 55 | ||||
| -rw-r--r-- | doc/html/tqsettings-h.html | 2 | ||||
| -rw-r--r-- | mkspecs/irix-cc-64/qmake.conf | 10 | ||||
| -rw-r--r-- | mkspecs/irix-cc/qmake.conf | 10 | ||||
| -rw-r--r-- | src/tools/tqglobal.h | 32 | ||||
| -rw-r--r-- | src/tools/tqsettings.cpp | 2 | ||||
| -rw-r--r-- | src/tools/tqsettings.h | 2 | ||||
| -rw-r--r-- | src/tools/tqsettings_p.h | 2 |
8 files changed, 0 insertions, 115 deletions
diff --git a/doc/html/tqglobal-h.html b/doc/html/tqglobal-h.html index ea6951cc1..834389c50 100644 --- a/doc/html/tqglobal-h.html +++ b/doc/html/tqglobal-h.html @@ -251,7 +251,6 @@ body { background: #ffffff; color: black; } #elif defined(applec) # define Q_CC_MPW -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD @@ -282,7 +281,6 @@ body { background: #ffffff; color: black; } # if defined(Q_OS_QNX4) /* compiler flags */ # define TQ_TYPENAME -# define Q_NO_BOOL_TYPE # define Q_CANNOT_DELETE_CONSTANT # define mutable /* no template classes in TQVariant */ @@ -352,7 +350,6 @@ body { background: #ffffff; color: black; } # define Q_CC_XLC # define TQ_FULL_TEMPLATE_INSTANTIATION # if __xlC__ < 0x400 -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD # define TQ_TYPENAME @@ -365,16 +362,6 @@ body { background: #ffffff; color: black; } __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ #elif defined(__EDG) || defined(__EDG__) # define Q_CC_EDG -/* From the EDG documentation (does not seem to apply to Compaq C++): - _BOOL - Defined in C++ mode when bool is a keyword. The name of this - predefined macro is specified by a configuration flag. _BOOL - is the default. - __BOOL_DEFINED - Defined in Microsoft C++ mode when bool is a keyword. */ -# if !defined(_BOOL) && !defined(__BOOL_DEFINED) -# define Q_NO_BOOL_TYPE -# endif /* The Comeau compiler is based on EDG and does define __EDG__ */ # if defined(__COMO__) @@ -445,7 +432,6 @@ body { background: #ffffff; color: black; } #elif defined(__USLC__) # define Q_CC_USLC # define TQ_TYPENAME -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD # define TQ_INLINE_TEMPLATES inline @@ -456,21 +442,13 @@ body { background: #ffffff; color: black; } #elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) # define Q_CC_SUN -/* 5.0 compiler or better - 'bool' is enabled by default but can be disabled using -features=nobool - in which case _BOOL is not defined - this is the default in 4.2 compatibility mode triggered by -compat=4 */ # if __SUNPRO_CC >= 0x500 -# if !defined(_BOOL) -# define Q_NO_BOOL_TYPE -# endif # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) # define Q_NO_USING_KEYWORD # endif # define Q_C_CALLBACKS /* 4.2 compiler or older */ # else -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD # endif @@ -481,7 +459,6 @@ body { background: #ffffff; color: black; } # define Q_CC_HPACC # else # define Q_CC_HP -# define Q_NO_BOOL_TYPE # define TQ_FULL_TEMPLATE_INSTANTIATION # define Q_NO_EXPLICIT_KEYWORD # endif @@ -558,15 +535,6 @@ body { background: #ffffff; color: black; } // Useful type definitions for TQt // -#if defined(Q_NO_BOOL_TYPE) -#if defined(Q_CC_HP) -// bool is an unsupported reserved keyword in later versions -#define bool int -#else -typedef int bool; -#endif -#endif - typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned uint; @@ -577,29 +545,6 @@ typedef const char *pcchar; // -// Constant bool values -// - -#ifndef true -const bool false = 0; -const bool true = !0; -#endif -#if defined(__WATCOMC__) -# if defined(Q_OS_QNX4) -const bool false = false; -const bool true = true; -# endif -#endif - -// -// Proper for-scoping -// ### turn on in 4.0 - -#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) -# define for if(0){}else for -#endif - -// // Use the "explicit" keyword on platforms that support it. // diff --git a/doc/html/tqsettings-h.html b/doc/html/tqsettings-h.html index b8d7fd80a..733a426eb 100644 --- a/doc/html/tqsettings-h.html +++ b/doc/html/tqsettings-h.html @@ -108,9 +108,7 @@ public: ~TQSettings(); -#if !defined(Q_NO_BOOL_TYPE) bool writeEntry( const TQString &, bool ); -#endif bool writeEntry( const TQString &, double ); bool writeEntry( const TQString &, int ); bool writeEntry( const TQString &, const char * ); diff --git a/mkspecs/irix-cc-64/qmake.conf b/mkspecs/irix-cc-64/qmake.conf index 4f167c254..11d18976f 100644 --- a/mkspecs/irix-cc-64/qmake.conf +++ b/mkspecs/irix-cc-64/qmake.conf @@ -18,16 +18,6 @@ # is OFF, which is the ARM behavior (the scope of the name # declared extends to the end of the block enclosing the for # statement). -# bool [ = ( ON|OFF ) ] -# Enables or disables the predefined bool data type, along -# with the predefined values true and false. Use this option -# only to suppress this type in old code that defines bool -# itself. Because this option changes the mangling of function -# names with bool parameters, all files comprising a program -# should be compiled with consistent options. -# Default is ON. -# The _BOOL feature macro can be used in #ifdefs to do conditional -# compilation based on whether or not this option is enabled. # std # Enables use of the standard C++ library and standard- # conforming iostream library. Specifying this flag also diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf index b2978fd24..be826006f 100644 --- a/mkspecs/irix-cc/qmake.conf +++ b/mkspecs/irix-cc/qmake.conf @@ -18,16 +18,6 @@ # is OFF, which is the ARM behavior (the scope of the name # declared extends to the end of the block enclosing the for # statement). -# bool [ = ( ON|OFF ) ] -# Enables or disables the predefined bool data type, along -# with the predefined values true and false. Use this option -# only to suppress this type in old code that defines bool -# itself. Because this option changes the mangling of function -# names with bool parameters, all files comprising a program -# should be compiled with consistent options. -# Default is ON. -# The _BOOL feature macro can be used in #ifdefs to do conditional -# compilation based on whether or not this option is enabled. # std # Enables use of the standard C++ library and standard- # conforming iostream library. Specifying this flag also diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h index 68aa31308..4060ebe52 100644 --- a/src/tools/tqglobal.h +++ b/src/tools/tqglobal.h @@ -218,7 +218,6 @@ #elif defined(applec) # define Q_CC_MPW -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD @@ -249,7 +248,6 @@ # if defined(Q_OS_QNX4) /* compiler flags */ # define TQ_TYPENAME -# define Q_NO_BOOL_TYPE # define Q_CANNOT_DELETE_CONSTANT # define mutable /* no template classes in TQVariant */ @@ -319,7 +317,6 @@ # define Q_CC_XLC # define TQ_FULL_TEMPLATE_INSTANTIATION # if __xlC__ < 0x400 -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD # define TQ_TYPENAME @@ -332,16 +329,6 @@ __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ #elif defined(__EDG) || defined(__EDG__) # define Q_CC_EDG -/* From the EDG documentation (does not seem to apply to Compaq C++): - _BOOL - Defined in C++ mode when bool is a keyword. The name of this - predefined macro is specified by a configuration flag. _BOOL - is the default. - __BOOL_DEFINED - Defined in Microsoft C++ mode when bool is a keyword. */ -# if !defined(_BOOL) && !defined(__BOOL_DEFINED) -# define Q_NO_BOOL_TYPE -# endif /* The Comeau compiler is based on EDG and does define __EDG__ */ # if defined(__COMO__) @@ -412,7 +399,6 @@ #elif defined(__USLC__) # define Q_CC_USLC # define TQ_TYPENAME -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD # define TQ_INLINE_TEMPLATES inline @@ -423,21 +409,13 @@ #elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) # define Q_CC_SUN -/* 5.0 compiler or better - 'bool' is enabled by default but can be disabled using -features=nobool - in which case _BOOL is not defined - this is the default in 4.2 compatibility mode triggered by -compat=4 */ # if __SUNPRO_CC >= 0x500 -# if !defined(_BOOL) -# define Q_NO_BOOL_TYPE -# endif # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) # define Q_NO_USING_KEYWORD # endif # define Q_C_CALLBACKS /* 4.2 compiler or older */ # else -# define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD # endif @@ -448,7 +426,6 @@ # define Q_CC_HPACC # else # define Q_CC_HP -# define Q_NO_BOOL_TYPE # define TQ_FULL_TEMPLATE_INSTANTIATION # define Q_NO_EXPLICIT_KEYWORD # endif @@ -525,15 +502,6 @@ // Useful type definitions for TQt // -#if defined(Q_NO_BOOL_TYPE) -#if defined(Q_CC_HP) -// bool is an unsupported reserved keyword in later versions -#define bool int -#else -typedef int bool; -#endif -#endif - typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned uint; diff --git a/src/tools/tqsettings.cpp b/src/tools/tqsettings.cpp index 2f846731d..76b3faa61 100644 --- a/src/tools/tqsettings.cpp +++ b/src/tools/tqsettings.cpp @@ -1324,7 +1324,6 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o } -#if !defined(Q_NO_BOOL_TYPE) /*! Writes the boolean entry \a value into key \a key. The \a key is created if it doesn't exist. Any previous value is overwritten by \a @@ -1356,7 +1355,6 @@ bool TQSettings::writeEntry(const TQString &key, bool value) TQString s(value ? "true" : "false"); return writeEntry(key, s); } -#endif /*! diff --git a/src/tools/tqsettings.h b/src/tools/tqsettings.h index 82966746e..440e16d6f 100644 --- a/src/tools/tqsettings.h +++ b/src/tools/tqsettings.h @@ -73,9 +73,7 @@ public: ~TQSettings(); -#if !defined(Q_NO_BOOL_TYPE) bool writeEntry( const TQString &, bool ); -#endif bool writeEntry( const TQString &, double ); bool writeEntry( const TQString &, int ); bool writeEntry( const TQString &, const char * ); diff --git a/src/tools/tqsettings_p.h b/src/tools/tqsettings_p.h index 75318492d..fffeb3256 100644 --- a/src/tools/tqsettings_p.h +++ b/src/tools/tqsettings_p.h @@ -116,9 +116,7 @@ public: void sysInit(); void sysClear(); -#if !defined(Q_NO_BOOL_TYPE) bool sysWriteEntry( const TQString &, bool ); -#endif bool sysWriteEntry( const TQString &, double ); bool sysWriteEntry( const TQString &, int ); bool sysWriteEntry( const TQString &, const TQString & ); |
