summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-22 12:05:18 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-22 12:13:05 +0900
commita4ebd73f48610ed351c9c53f3646d0597f8ea7bc (patch)
tree2edd219eef4cb8f35bb3844d06902ae8b2fcb565 /src
parent7d612f7c91d55501276a385a30dbadb121e7bd9f (diff)
downloadtqt-rename/true-false-9.tar.gz
tqt-rename/true-false-9.zip
Replace TRUE/FALSE with boolean values true/false - part 9rename/true-false-9
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r--src/tools/tqasciicache.h6
-rw-r--r--src/tools/tqasciidict.h2
-rw-r--r--src/tools/tqbitarray.cpp28
-rw-r--r--src/tools/tqbuffer.cpp22
-rw-r--r--src/tools/tqcache.h6
-rw-r--r--src/tools/tqchar.cpp128
-rw-r--r--src/tools/tqchar.h2
-rw-r--r--src/tools/tqcleanuphandler.h2
-rw-r--r--src/tools/tqcomlibrary.cpp38
-rw-r--r--src/tools/tqcomponentfactory.cpp32
-rw-r--r--src/tools/tqcstring.cpp168
-rw-r--r--src/tools/tqcstring.h16
-rw-r--r--src/tools/tqdatastream.cpp34
-rw-r--r--src/tools/tqdatastream.h2
-rw-r--r--src/tools/tqdatetime.cpp154
-rw-r--r--src/tools/tqdict.h4
-rw-r--r--src/tools/tqdir.cpp114
-rw-r--r--src/tools/tqdir.h16
-rw-r--r--src/tools/tqdir_unix.cpp18
-rw-r--r--src/tools/tqfile.cpp18
-rw-r--r--src/tools/tqfile_unix.cpp54
-rw-r--r--src/tools/tqfileinfo.cpp50
-rw-r--r--src/tools/tqfileinfo.h8
-rw-r--r--src/tools/tqfileinfo_unix.cpp34
-rw-r--r--src/tools/tqgarray.cpp28
-rw-r--r--src/tools/tqgcache.cpp34
-rw-r--r--src/tools/tqgcache.h4
-rw-r--r--src/tools/tqgdict.cpp14
-rw-r--r--src/tools/tqglist.cpp62
-rw-r--r--src/tools/tqglist.h4
-rw-r--r--src/tools/tqglobal.cpp46
-rw-r--r--src/tools/tqglobal.h14
-rw-r--r--src/tools/tqgpluginmanager.cpp38
-rw-r--r--src/tools/tqgpluginmanager_p.h2
-rw-r--r--src/tools/tqgvector.cpp42
-rw-r--r--src/tools/tqintcache.h4
-rw-r--r--src/tools/tqiodevice.cpp74
-rw-r--r--src/tools/tqlibrary.cpp34
-rw-r--r--src/tools/tqlibrary_unix.cpp16
-rw-r--r--src/tools/tqlocale.cpp100
-rw-r--r--src/tools/tqmap.h12
-rw-r--r--src/tools/tqmutex.h2
-rw-r--r--src/tools/tqmutex_unix.cpp20
-rw-r--r--src/tools/tqmutexpool.cpp4
-rw-r--r--src/tools/tqmutexpool_p.h2
-rw-r--r--src/tools/tqpluginmanager_p.h2
-rw-r--r--src/tools/tqptrcollection.cpp8
-rw-r--r--src/tools/tqptrcollection.h6
-rw-r--r--src/tools/tqptrlist.h4
-rw-r--r--src/tools/tqregexp.cpp216
-rw-r--r--src/tools/tqregexp.h6
-rw-r--r--src/tools/tqsemaphore.cpp10
-rw-r--r--src/tools/tqsettings.cpp166
-rw-r--r--src/tools/tqsettings.h4
-rw-r--r--src/tools/tqstring.cpp270
-rw-r--r--src/tools/tqstring.h38
-rw-r--r--src/tools/tqstringlist.cpp16
-rw-r--r--src/tools/tqstringlist.h10
-rw-r--r--src/tools/tqstrlist.h6
-rw-r--r--src/tools/tqstrvec.h6
-rw-r--r--src/tools/tqtextstream.cpp140
-rw-r--r--src/tools/tqtextstream.h2
-rw-r--r--src/tools/tqthreadstorage_unix.cpp12
-rw-r--r--src/tools/tqtl.h8
-rw-r--r--src/tools/tqucom.cpp66
-rw-r--r--src/tools/tqucom_p.h6
-rw-r--r--src/tools/tqunicodetables_p.h6
-rw-r--r--src/tools/tquuid.cpp30
-rw-r--r--src/tools/tquuid.h12
-rw-r--r--src/tools/tqvaluelist.h12
-rw-r--r--src/tools/tqvaluevector.h4
-rw-r--r--src/tools/tqwaitcondition_unix.cpp12
-rw-r--r--src/tqmoc/tqmoc.y240
-rw-r--r--src/tqmoc/tqmoc_yacc.cpp240
74 files changed, 1532 insertions, 1538 deletions
diff --git a/src/tools/tqasciicache.h b/src/tools/tqasciicache.h
index 879e5b759..dff7aaec9 100644
--- a/src/tools/tqasciicache.h
+++ b/src/tools/tqasciicache.h
@@ -56,8 +56,8 @@ class TQAsciiCache
{
public:
TQAsciiCache( const TQAsciiCache<type> &c ) : TQGCache(c) {}
- TQAsciiCache( int maxCost=100, int size=17, bool caseSensitive=TRUE,
- bool copyKeys=TRUE )
+ TQAsciiCache( int maxCost=100, int size=17, bool caseSensitive=true,
+ bool copyKeys=true )
: TQGCache( maxCost, size, AsciiKey, caseSensitive, copyKeys ) {}
~TQAsciiCache() { clear(); }
TQAsciiCache<type> &operator=( const TQAsciiCache<type> &c )
@@ -75,7 +75,7 @@ public:
{ return TQGCache::remove_other(k); }
type *take( const char *k )
{ return (type *)TQGCache::take_other(k); }
- type *find( const char *k, bool ref=TRUE ) const
+ type *find( const char *k, bool ref=true ) const
{ return (type *)TQGCache::find_other(k,ref);}
type *operator[]( const char *k ) const
{ return (type *)TQGCache::find_other(k);}
diff --git a/src/tools/tqasciidict.h b/src/tools/tqasciidict.h
index 24c28894b..f285dd473 100644
--- a/src/tools/tqasciidict.h
+++ b/src/tools/tqasciidict.h
@@ -54,7 +54,7 @@ class TQAsciiDict
#endif
{
public:
- TQAsciiDict(int size=17, bool caseSensitive=TRUE, bool copyKeys=TRUE )
+ TQAsciiDict(int size=17, bool caseSensitive=true, bool copyKeys=true )
: TQGDict(size,AsciiKey,caseSensitive,copyKeys) {}
TQAsciiDict( const TQAsciiDict<type> &d ) : TQGDict(d) {}
~TQAsciiDict() { clear(); }
diff --git a/src/tools/tqbitarray.cpp b/src/tools/tqbitarray.cpp
index 5eb33b92b..9f8298253 100644
--- a/src/tools/tqbitarray.cpp
+++ b/src/tools/tqbitarray.cpp
@@ -199,8 +199,8 @@ void TQBitArray::pad0()
*/
/*!
- Resizes the bit array to \a size bits and returns TRUE if the bit
- array could be resized; otherwise returns FALSE. The array becomes
+ Resizes the bit array to \a size bits and returns true if the bit
+ array could be resized; otherwise returns false. The array becomes
a null array if \a size == 0.
If the array is expanded, the new bits are set to 0.
@@ -212,26 +212,26 @@ bool TQBitArray::resize( uint size )
{
uint s = this->size();
if ( !TQByteArray::resize( (size+7)/8 ) )
- return FALSE; // cannot resize
+ return false; // cannot resize
SHBLOCK->nbits = size;
if ( size != 0 ) { // not null array
int ds = (int)(size+7)/8 - (int)(s+7)/8;// number of bytes difference
if ( ds > 0 ) // expanding array
memset( data() + (s+7)/8, 0, ds ); // reset new data
}
- return TRUE;
+ return true;
}
/*!
- Fills the bit array with \a v (1's if \a v is TRUE, or 0's if \a v
- is FALSE).
+ Fills the bit array with \a v (1's if \a v is true, or 0's if \a v
+ is false).
fill() resizes the bit array to \a size bits if \a size is
nonnegative.
- Returns FALSE if a nonnegative \e size was specified and the bit
- array could not be resized; otherwise returns TRUE.
+ Returns false if a nonnegative \e size was specified and the bit
+ array could not be resized; otherwise returns true.
\sa resize()
*/
@@ -240,7 +240,7 @@ bool TQBitArray::fill( bool v, int size )
{
if ( size >= 0 ) { // resize first
if ( !resize( size ) )
- return FALSE; // cannot resize
+ return false; // cannot resize
} else {
size = this->size();
}
@@ -248,7 +248,7 @@ bool TQBitArray::fill( bool v, int size )
memset( data(), v ? 0xff : 0, (size + 7) / 8 );
if ( v )
pad0();
- return TRUE;
+ return true;
}
@@ -286,8 +286,8 @@ TQBitArray TQBitArray::copy() const
/*!
- Returns TRUE if the bit at position \a index is set, i.e. is 1;
- otherwise returns FALSE.
+ Returns true if the bit at position \a index is set, i.e. is 1;
+ otherwise returns false.
\sa setBit(), clearBit()
*/
@@ -297,7 +297,7 @@ bool TQBitArray::testBit( uint index ) const
#if defined(QT_CHECK_RANGE)
if ( index >= size() ) {
tqWarning( "TQBitArray::testBit: Index %d out of range", index );
- return FALSE;
+ return false;
}
#endif
return (*(data()+(index>>3)) & (1 << (index & 7))) != 0;
@@ -369,7 +369,7 @@ bool TQBitArray::toggleBit( uint index )
#if defined(QT_CHECK_RANGE)
if ( index >= size() ) {
tqWarning( "TQBitArray::toggleBit: Index %d out of range", index );
- return FALSE;
+ return false;
}
#endif
uchar *p = (uchar *)data() + (index>>3);
diff --git a/src/tools/tqbuffer.cpp b/src/tools/tqbuffer.cpp
index 827f5c187..3bf7f2f7f 100644
--- a/src/tools/tqbuffer.cpp
+++ b/src/tools/tqbuffer.cpp
@@ -135,9 +135,9 @@ TQBuffer::~TQBuffer()
/*!
- Replaces the buffer's contents with \a buf and returns TRUE.
+ Replaces the buffer's contents with \a buf and returns true.
- Does nothing (and returns FALSE) if isOpen() is TRUE.
+ Does nothing (and returns false) if isOpen() is true.
Note that if you open the buffer in write mode (\c IO_WriteOnly or
IO_ReadWrite) and write something into the buffer, \a buf is also
@@ -152,7 +152,7 @@ bool TQBuffer::setBuffer( TQByteArray buf )
#if defined(QT_CHECK_STATE)
tqWarning( "TQBuffer::setBuffer: Buffer is open" );
#endif
- return FALSE;
+ return false;
}
a = buf;
a_len = a.size();
@@ -160,7 +160,7 @@ bool TQBuffer::setBuffer( TQByteArray buf )
if ( a_inc < 16 )
a_inc = 16;
ioIndex = 0;
- return TRUE;
+ return true;
}
/*!
@@ -174,8 +174,8 @@ bool TQBuffer::setBuffer( TQByteArray buf )
/*!
\reimp
- Opens the buffer in mode \a m. Returns TRUE if successful;
- otherwise returns FALSE. The buffer must be opened before use.
+ Opens the buffer in mode \a m. Returns true if successful;
+ otherwise returns false. The buffer must be opened before use.
The mode parameter \a m must be a combination of the following flags.
\list
@@ -195,7 +195,7 @@ bool TQBuffer::open( int m )
#if defined(QT_CHECK_STATE)
tqWarning( "TQBuffer::open: Buffer already open" );
#endif
- return FALSE;
+ return false;
}
setMode( m );
if ( m & IO_Truncate ) { // truncate buffer
@@ -210,7 +210,7 @@ bool TQBuffer::open( int m )
a_inc = 16;
setState( IO_Open );
resetStatus();
- return TRUE;
+ return true;
}
/*!
@@ -263,17 +263,17 @@ bool TQBuffer::at( Offset pos )
#if defined(QT_CHECK_STATE)
if ( !isOpen() ) {
tqWarning( "TQBuffer::at: Buffer is not open" );
- return FALSE;
+ return false;
}
#endif
if ( pos > a_len ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQBuffer::at: Index %lu out of range", pos );
#endif
- return FALSE;
+ return false;
}
ioIndex = pos;
- return TRUE;
+ return true;
}
diff --git a/src/tools/tqcache.h b/src/tools/tqcache.h
index 8225d7fd1..d6f605203 100644
--- a/src/tools/tqcache.h
+++ b/src/tools/tqcache.h
@@ -55,8 +55,8 @@ class TQCache
{
public:
TQCache( const TQCache<type> &c ) : TQGCache(c) {}
- TQCache( int maxCost=100, int size=17, bool caseSensitive=TRUE )
- : TQGCache( maxCost, size, StringKey, caseSensitive, FALSE ) {}
+ TQCache( int maxCost=100, int size=17, bool caseSensitive=true )
+ : TQGCache( maxCost, size, StringKey, caseSensitive, false ) {}
~TQCache() { clear(); }
TQCache<type> &operator=( const TQCache<type> &c )
{ return (TQCache<type>&)TQGCache::operator=(c); }
@@ -73,7 +73,7 @@ public:
{ return TQGCache::remove_string(k); }
type *take( const TQString &k )
{ return (type *)TQGCache::take_string(k); }
- type *find( const TQString &k, bool ref=TRUE ) const
+ type *find( const TQString &k, bool ref=true ) const
{ return (type *)TQGCache::find_string(k,ref);}
type *operator[]( const TQString &k ) const
{ return (type *)TQGCache::find_string(k);}
diff --git a/src/tools/tqchar.cpp b/src/tools/tqchar.cpp
index ab83b7cc4..afe4bc9a6 100644
--- a/src/tools/tqchar.cpp
+++ b/src/tools/tqchar.cpp
@@ -63,10 +63,10 @@
The classification functions include functions like those in
ctype.h, but operating on the full range of Unicode characters.
- They all return TRUE if the character is a certain type of
- character; otherwise they return FALSE. These classification
- functions are isNull() (returns TRUE if the character is U+0000),
- isPrint() (TRUE if the character is any sort of printable
+ They all return true if the character is a certain type of
+ character; otherwise they return false. These classification
+ functions are isNull() (returns true if the character is U+0000),
+ isPrint() (true if the character is any sort of printable
character, including whitespace), isPunct() (any sort of
punctation), isMark() (Unicode Mark), isLetter (a letter),
isNumber() (any sort of numeric character), isLetterOrNumber(),
@@ -294,15 +294,15 @@
\obsolete
- Returns TRUE if this character is in network byte order (MSB
- first); otherwise returns FALSE. This is platform dependent.
+ Returns true if this character is in network byte order (MSB
+ first); otherwise returns false. This is platform dependent.
*/
/*!
\fn bool TQChar::isNull() const
- Returns TRUE if the character is the Unicode character 0x0000
- (ASCII NUL); otherwise returns FALSE.
+ Returns true if the character is the Unicode character 0x0000
+ (ASCII NUL); otherwise returns false.
*/
/*!
@@ -354,8 +354,8 @@
\relates TQChar
- Returns TRUE if \a c1 and \a c2 are the same Unicode character;
- otherwise returns FALSE.
+ Returns true if \a c1 and \a c2 are the same Unicode character;
+ otherwise returns false.
*/
/*!
@@ -364,8 +364,8 @@
\overload
\relates TQChar
- Returns TRUE if \a c is the ASCII/Latin-1 character \a ch;
- otherwise returns FALSE.
+ Returns true if \a c is the ASCII/Latin-1 character \a ch;
+ otherwise returns false.
*/
/*!
@@ -374,8 +374,8 @@
\overload
\relates TQChar
- Returns TRUE if \a c is the ASCII/Latin-1 character \a ch;
- otherwise returns FALSE.
+ Returns true if \a c is the ASCII/Latin-1 character \a ch;
+ otherwise returns false.
*/
/*!
@@ -383,8 +383,8 @@
\relates TQChar
- Returns TRUE if \a c1 and \a c2 are not the same Unicode
- character; otherwise returns FALSE.
+ Returns true if \a c1 and \a c2 are not the same Unicode
+ character; otherwise returns false.
*/
/*!
@@ -393,8 +393,8 @@
\overload
\relates TQChar
- Returns TRUE if \a c is not the ASCII/Latin-1 character \a ch;
- otherwise returns FALSE.
+ Returns true if \a c is not the ASCII/Latin-1 character \a ch;
+ otherwise returns false.
*/
/*!
@@ -403,8 +403,8 @@
\overload
\relates TQChar
- Returns TRUE if \a c is not the ASCII/Latin-1 character \a ch;
- otherwise returns FALSE.
+ Returns true if \a c is not the ASCII/Latin-1 character \a ch;
+ otherwise returns false.
*/
/*!
@@ -412,9 +412,9 @@
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c1 is less than
+ Returns true if the numeric Unicode value of \a c1 is less than
that of \a c2, or they are the same Unicode character; otherwise
- returns FALSE.
+ returns false.
*/
/*!
@@ -423,9 +423,9 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c is less than or
+ Returns true if the numeric Unicode value of \a c is less than or
equal to that of the ASCII/Latin-1 character \a ch; otherwise
- returns FALSE.
+ returns false.
*/
/*!
@@ -434,9 +434,9 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of the ASCII/Latin-1
+ Returns true if the numeric Unicode value of the ASCII/Latin-1
character \a ch is less than or equal to that of \a c; otherwise
- returns FALSE.
+ returns false.
*/
/*!
@@ -444,9 +444,9 @@
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c1 is greater than
+ Returns true if the numeric Unicode value of \a c1 is greater than
that of \a c2, or they are the same Unicode character; otherwise
- returns FALSE.
+ returns false.
*/
/*!
@@ -455,9 +455,9 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c is greater than
+ Returns true if the numeric Unicode value of \a c is greater than
or equal to that of the ASCII/Latin-1 character \a ch; otherwise
- returns FALSE.
+ returns false.
*/
/*!
@@ -466,9 +466,9 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of the ASCII/Latin-1
+ Returns true if the numeric Unicode value of the ASCII/Latin-1
character \a ch is greater than or equal to that of \a c;
- otherwise returns FALSE.
+ otherwise returns false.
*/
/*!
@@ -476,8 +476,8 @@
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c1 is less than
- that of \a c2; otherwise returns FALSE.
+ Returns true if the numeric Unicode value of \a c1 is less than
+ that of \a c2; otherwise returns false.
*/
/*!
@@ -486,8 +486,8 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c is less than that
- of the ASCII/Latin-1 character \a ch; otherwise returns FALSE.
+ Returns true if the numeric Unicode value of \a c is less than that
+ of the ASCII/Latin-1 character \a ch; otherwise returns false.
*/
/*!
@@ -496,9 +496,9 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of the ASCII/Latin-1
+ Returns true if the numeric Unicode value of the ASCII/Latin-1
character \a ch is less than that of \a c; otherwise returns
- FALSE.
+ false.
*/
/*!
@@ -506,8 +506,8 @@
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c1 is greater than
- that of \a c2; otherwise returns FALSE.
+ Returns true if the numeric Unicode value of \a c1 is greater than
+ that of \a c2; otherwise returns false.
*/
/*!
@@ -516,8 +516,8 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of \a c is greater than
- that of the ASCII/Latin-1 character \a ch; otherwise returns FALSE.
+ Returns true if the numeric Unicode value of \a c is greater than
+ that of the ASCII/Latin-1 character \a ch; otherwise returns false.
*/
/*!
@@ -526,9 +526,9 @@
\overload
\relates TQChar
- Returns TRUE if the numeric Unicode value of the ASCII/Latin-1
+ Returns true if the numeric Unicode value of the ASCII/Latin-1
character \a ch is greater than that of \a c; otherwise returns
- FALSE.
+ false.
*/
@@ -540,8 +540,8 @@ const TQChar TQChar::nbsp((ushort)0x00a0);
/*!
- Returns TRUE if the character is a printable character; otherwise
- returns FALSE. This is any character not of category Cc or Cn.
+ Returns true if the character is a printable character; otherwise
+ returns false. This is any character not of category Cc or Cn.
Note that this gives no indication of whether the character is
available in a particular \link TQFont font\endlink.
@@ -553,8 +553,8 @@ bool TQChar::isPrint() const
}
/*!
- Returns TRUE if the character is a separator character
- (Separator_* categories); otherwise returns FALSE.
+ Returns true if the character is a separator character
+ (Separator_* categories); otherwise returns false.
*/
bool TQChar::isSpace() const
{
@@ -562,8 +562,8 @@ bool TQChar::isSpace() const
}
/*!
- Returns TRUE if the character is a mark (Mark_* categories);
- otherwise returns FALSE.
+ Returns true if the character is a mark (Mark_* categories);
+ otherwise returns false.
*/
bool TQChar::isMark() const
{
@@ -572,8 +572,8 @@ bool TQChar::isMark() const
}
/*!
- Returns TRUE if the character is a punctuation mark (Punctuation_*
- categories); otherwise returns FALSE.
+ Returns true if the character is a punctuation mark (Punctuation_*
+ categories); otherwise returns false.
*/
bool TQChar::isPunct() const
{
@@ -582,8 +582,8 @@ bool TQChar::isPunct() const
}
/*!
- Returns TRUE if the character is a letter (Letter_* categories);
- otherwise returns FALSE.
+ Returns true if the character is a letter (Letter_* categories);
+ otherwise returns false.
*/
bool TQChar::isLetter() const
{
@@ -592,8 +592,8 @@ bool TQChar::isLetter() const
}
/*!
- Returns TRUE if the character is a number (of any sort - Number_*
- categories); otherwise returns FALSE.
+ Returns true if the character is a number (of any sort - Number_*
+ categories); otherwise returns false.
\sa isDigit()
*/
@@ -604,8 +604,8 @@ bool TQChar::isNumber() const
}
/*!
- Returns TRUE if the character is a letter or number (Letter_* or
- Number_* categories); otherwise returns FALSE.
+ Returns true if the character is a letter or number (Letter_* or
+ Number_* categories); otherwise returns false.
*/
bool TQChar::isLetterOrNumber() const
{
@@ -616,8 +616,8 @@ bool TQChar::isLetterOrNumber() const
/*!
- Returns TRUE if the character is a decimal digit
- (Number_DecimalDigit); otherwise returns FALSE.
+ Returns true if the character is a decimal digit
+ (Number_DecimalDigit); otherwise returns false.
*/
bool TQChar::isDigit() const
{
@@ -626,8 +626,8 @@ bool TQChar::isDigit() const
/*!
- Returns TRUE if the character is a symbol (Symbol_* categories);
- otherwise returns FALSE.
+ Returns true if the character is a symbol (Symbol_* categories);
+ otherwise returns false.
*/
bool TQChar::isSymbol() const
{
@@ -689,9 +689,9 @@ TQChar::Joining TQChar::joining() const
/*!
- Returns TRUE if the character is a mirrored character (one that
+ Returns true if the character is a mirrored character (one that
should be reversed if the text direction is reversed); otherwise
- returns FALSE.
+ returns false.
*/
bool TQChar::mirrored() const
{
diff --git a/src/tools/tqchar.h b/src/tools/tqchar.h
index 3382cea35..61a0ca52a 100644
--- a/src/tools/tqchar.h
+++ b/src/tools/tqchar.h
@@ -208,7 +208,7 @@ public:
static bool networkOrdered() {
int wordSize;
- bool bigEndian = FALSE;
+ bool bigEndian = false;
tqSysInfo( &wordSize, &bigEndian );
return bigEndian;
}
diff --git a/src/tools/tqcleanuphandler.h b/src/tools/tqcleanuphandler.h
index b6347f7ea..9a6f5029c 100644
--- a/src/tools/tqcleanuphandler.h
+++ b/src/tools/tqcleanuphandler.h
@@ -65,7 +65,7 @@ public:
}
bool isEmpty() const {
- return cleanupObjects ? cleanupObjects->isEmpty() : TRUE;
+ return cleanupObjects ? cleanupObjects->isEmpty() : true;
}
void clear() {
diff --git a/src/tools/tqcomlibrary.cpp b/src/tools/tqcomlibrary.cpp
index b13c58b9d..19c03c019 100644
--- a/src/tools/tqcomlibrary.cpp
+++ b/src/tools/tqcomlibrary.cpp
@@ -79,11 +79,11 @@ bool TQComLibrary::unload()
int refs = entry ? entry->release() : 0;
entry = 0;
if (refs || !libiface)
- return FALSE;
+ return false;
libiface->cleanup();
if ( !libiface->canUnload() )
- return FALSE;
+ return false;
libiface->release();
libiface = 0;
@@ -125,9 +125,9 @@ static bool qt_verify( const TQString& library, uint version, uint flags,
TQT_BUILD_KEY,
key.isEmpty() ? "<null>" : (const char *) key );
} else {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
struct qt_token_info
@@ -205,12 +205,12 @@ static int qt_tokenize( const char *s, ulong s_len, ulong *advance,
}
/*
- returns TRUE if the string s was correctly parsed, FALSE otherwise.
+ returns true if the string s was correctly parsed, false otherwise.
*/
static bool qt_parse_pattern( const char *s, uint *version, uint *flags,
TQCString *key )
{
- bool ret = TRUE;
+ bool ret = true;
qt_token_info pinfo("=\n", 2);
int parse;
@@ -218,7 +218,7 @@ static bool qt_parse_pattern( const char *s, uint *version, uint *flags,
do {
parse = qt_tokenize( s + at, parselen, &advance, pinfo );
if ( parse == -1 ) {
- ret = FALSE;
+ ret = false;
break;
}
@@ -235,7 +235,7 @@ static bool qt_parse_pattern( const char *s, uint *version, uint *flags,
TQCString p( pinfo2.results[ 2 ], pinfo2.lengths[ 2 ] + 1 );
*version = (m.toUInt() << 16) | (n.toUInt() << 8) | p.toUInt();
} else {
- ret = FALSE;
+ ret = false;
break;
}
} else if ( tqstrncmp( "flags", pinfo.results[ 0 ], pinfo.lengths[ 0 ] ) == 0 ) {
@@ -250,7 +250,7 @@ static bool qt_parse_pattern( const char *s, uint *version, uint *flags,
if ( ch == '1' ) {
*flags |= c;
} else if ( ch != '0' ) {
- ret = FALSE;
+ ret = false;
break;
}
++p;
@@ -317,9 +317,9 @@ static long qt_find_pattern( const char *s, ulong s_len,
we can get the verification data without have to actually load the library.
This lets us detect mismatches more safely.
- Returns FALSE if version/flags/key information is not present, or if the
+ Returns false if version/flags/key information is not present, or if the
information could not be read.
- Returns TRUE if version/flags/key information is present and succesfully read.
+ Returns true if version/flags/key information is present and succesfully read.
*/
static bool qt_unix_query( const TQString &library, uint *version, uint *flags,
TQCString *key )
@@ -328,7 +328,7 @@ static bool qt_unix_query( const TQString &library, uint *version, uint *flags,
if (! file.open( IO_ReadOnly ) ) {
tqWarning( "%s: %s", (const char*) TQFile::encodeName(library),
strerror( errno ) );
- return FALSE;
+ return false;
}
TQByteArray data;
@@ -360,7 +360,7 @@ static bool qt_unix_query( const TQString &library, uint *version, uint *flags,
const ulong plen = tqstrlen( pattern );
long pos = qt_find_pattern( filedata, fdlen, pattern, plen );
- bool ret = FALSE;
+ bool ret = false;
if ( pos >= 0 ) {
ret = qt_parse_pattern( filedata + pos, version, flags, key );
}
@@ -395,8 +395,8 @@ void TQComLibrary::createInstanceInternal()
TQStringList reg;
uint flags = 0;
TQCString key;
- bool query_done = FALSE;
- bool warn_mismatch = TRUE;
+ bool query_done = false;
+ bool warn_mismatch = true;
#ifdef TQT_THREAD_SUPPORT
TQMutexLocker locker( tqt_global_mutexpool ?
@@ -417,8 +417,8 @@ void TQComLibrary::createInstanceInternal()
flags = reg[1].toUInt(0, 16);
key = reg[2].latin1();
- query_done = TRUE;
- warn_mismatch = FALSE;
+ query_done = true;
+ warn_mismatch = false;
}
}
@@ -427,7 +427,7 @@ void TQComLibrary::createInstanceInternal()
// get the query information directly from the plugin without loading
if ( qt_unix_query( library(), &qt_version, &flags, &key ) ) {
// info read succesfully from library
- query_done = TRUE;
+ query_done = true;
}
}
#else // !Q_OS_UNIX
@@ -450,7 +450,7 @@ void TQComLibrary::createInstanceInternal()
qt_version = flags = 0;
key = "unknown";
} else {
- query_done = TRUE;
+ query_done = true;
}
}
#endif // Q_OS_UNIX
diff --git a/src/tools/tqcomponentfactory.cpp b/src/tools/tqcomponentfactory.cpp
index 4d799b024..c8b8e6e6d 100644
--- a/src/tools/tqcomponentfactory.cpp
+++ b/src/tools/tqcomponentfactory.cpp
@@ -115,7 +115,7 @@ static TQPtrList<TQComLibrary> *liblist()
{
if ( !libraries ) {
libraries = new TQPtrList<TQComLibrary>();
- libraries->setAutoDelete( TRUE );
+ libraries->setAutoDelete( true );
tqAddPostRoutine( cleanup );
}
return libraries;
@@ -150,7 +150,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
{
TQSettings settings;
settings.insertSearchPath( TQSettings::Windows, "/Classes" );
- bool ok = FALSE;
+ bool ok = false;
TQString cidStr = cid;
TQRESULT res = TQE_NOCOMPONENT;
@@ -168,7 +168,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
return res;
TQComLibrary *library = new TQComLibrary( file );
- library->setAutoUnload( FALSE );
+ library->setAutoUnload( false );
TQComponentFactoryInterface *cfIface =0;
library->queryInterface( IID_QComponentFactory, (TQUnknownInterface**)&cfIface );
@@ -184,7 +184,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
delete library; // only deletes the object, thanks to TQLibrary::Manual
} else {
libiface->release();
- library->setAutoUnload( TRUE );
+ library->setAutoUnload( true );
liblist()->prepend( library );
}
return res;
@@ -196,8 +196,8 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
the \link TQComponentRegistrationInterface::registerComponents()
registerComponents() \endlink function is called.
- Returns TRUE if the interface is found and successfully called,
- otherwise returns FALSE.
+ Returns true if the interface is found and successfully called,
+ otherwise returns false.
*/
TQRESULT TQComponentFactory::registerServer( const TQString &filename )
{
@@ -219,8 +219,8 @@ TQRESULT TQComponentFactory::registerServer( const TQString &filename )
the \link TQComponentRegistrationInterface::unregisterComponents()
unregisterComponents() \endlink function is called.
- Returns TRUE if the interface is found and successfully unregistered,
- otherwise returns FALSE.
+ Returns true if the interface is found and successfully unregistered,
+ otherwise returns false.
*/
TQRESULT TQComponentFactory::unregisterServer( const TQString &filename )
{
@@ -237,11 +237,11 @@ TQRESULT TQComponentFactory::unregisterServer( const TQString &filename )
/*!
Registers the component with id \a cid in the system component registry and
- returns TRUE if the component was registerd successfully, otherwise returns
- FALSE. The component is provided by the component server at \a filepath and
+ returns true if the component was registerd successfully, otherwise returns
+ false. The component is provided by the component server at \a filepath and
registered with an optional \a name, \a version and \a description.
- This function does nothing and returns FALSE if a component with an identical
+ This function does nothing and returns false if a component with an identical
\a cid does already exist on the system.
A component that has been registered with a \a name can be created using both the
@@ -254,14 +254,14 @@ TQRESULT TQComponentFactory::unregisterServer( const TQString &filename )
*/
bool TQComponentFactory::registerComponent( const TQUuid &cid, const TQString &filepath, const TQString &name, int version, const TQString &description )
{
- bool ok = FALSE;
+ bool ok = false;
TQSettings settings;
settings.insertSearchPath( TQSettings::Windows, "/Classes" );
TQString cidStr = cid.toString().upper();
settings.readEntry( "/CLSID/" + cidStr + "/InprocServer32/Default", TQString::null, &ok );
if ( ok ) // don't overwrite existing component
- return FALSE;
+ return false;
ok = settings.writeEntry( "/CLSID/" + cidStr + "/InprocServer32/Default", filepath );
if ( ok && !!description )
@@ -292,7 +292,7 @@ bool TQComponentFactory::registerComponent( const TQUuid &cid, const TQString &f
/*!
Unregisters the component with id \a cid from the system component registry and returns
- TRUE if the component was unregistered successfully, otherwise returns FALSE.
+ true if the component was unregistered successfully, otherwise returns false.
Call this function for each component in an implementation of
\link TQComponentRegistrationInterface::unregisterComponents() unregisterComponents() \endlink.
@@ -302,12 +302,12 @@ bool TQComponentFactory::registerComponent( const TQUuid &cid, const TQString &f
bool TQComponentFactory::unregisterComponent( const TQUuid &cid )
{
TQSettings settings;
- bool ok = FALSE;
+ bool ok = false;
settings.insertSearchPath( TQSettings::Windows, "/Classes" );
TQString cidStr = cid.toString().upper();
if ( cidStr.isEmpty() )
- return FALSE;
+ return false;
// unregister the human readable part
TQString vName = settings.readEntry( "/CLSID/" + cidStr + "/ProgID/Default", TQString::null, &ok );
diff --git a/src/tools/tqcstring.cpp b/src/tools/tqcstring.cpp
index 8c09d227c..be32595df 100644
--- a/src/tools/tqcstring.cpp
+++ b/src/tools/tqcstring.cpp
@@ -269,7 +269,7 @@ int tqstrnicmp( const char *str1, const char *str2, uint len )
static TQ_UINT16 crc_tbl[16];
-static bool crc_tbl_init = FALSE;
+static bool crc_tbl_init = false;
static void createCRC16Table() // build CRC16 lookup table
{
@@ -319,7 +319,7 @@ TQ_UINT16 tqChecksum( const char *data, uint len )
if ( !crc_tbl_init ) {
createCRC16Table();
- crc_tbl_init = TRUE;
+ crc_tbl_init = true;
}
}
TQ_UINT16 crc = 0xffff;
@@ -762,17 +762,17 @@ TQCString::~TQCString()
/*!
\fn bool TQCString::isNull() const
- Returns TRUE if the string is null, i.e. if data() == 0; otherwise
- returns FALSE. A null string is also an empty string.
+ Returns true if the string is null, i.e. if data() == 0; otherwise
+ returns false. A null string is also an empty string.
Example:
\code
TQCString a; // a.data() == 0, a.size() == 0, a.length() == 0
TQCString b == ""; // b.data() == "", b.size() == 1, b.length() == 0
- a.isNull(); // TRUE because a.data() == 0
- a.isEmpty(); // TRUE because a.length() == 0
- b.isNull(); // FALSE because b.data() == ""
- b.isEmpty(); // TRUE because b.length() == 0
+ a.isNull(); // true because a.data() == 0
+ a.isEmpty(); // true because a.length() == 0
+ b.isNull(); // false because b.data() == ""
+ b.isEmpty(); // true because b.length() == 0
\endcode
\sa isEmpty(), length(), size()
@@ -781,8 +781,8 @@ TQCString::~TQCString()
/*!
\fn bool TQCString::isEmpty() const
- Returns TRUE if the string is empty, i.e. if length() == 0;
- otherwise returns FALSE. An empty string is not always a null
+ Returns true if the string is empty, i.e. if length() == 0;
+ otherwise returns false. An empty string is not always a null
string.
See example in isNull().
@@ -838,12 +838,12 @@ bool TQCString::resize( uint len )
detach();
uint wasNull = isNull();
if ( !TQByteArray::resize(len) )
- return FALSE;
+ return false;
if ( len )
data()[len - 1] = '\0';
if ( len > 0 && wasNull )
data()[0] = '\0';
- return TRUE;
+ return true;
}
@@ -899,8 +899,8 @@ TQCString &TQCString::sprintf( const char *format, ... )
If \a len is negative, then the current string length is used.
- Returns FALSE is \a len is nonnegative and there is not enough
- memory to resize the string; otherwise returns TRUE.
+ Returns false is \a len is nonnegative and there is not enough
+ memory to resize the string; otherwise returns true.
*/
bool TQCString::fill( char c, int len )
@@ -909,9 +909,9 @@ bool TQCString::fill( char c, int len )
if ( len < 0 )
len = length();
if ( !TQByteArray::fill(c,len+1) )
- return FALSE;
+ return false;
*(data()+len) = '\0';
- return TRUE;
+ return true;
}
@@ -928,8 +928,8 @@ bool TQCString::fill( char c, int len )
Finds the first occurrence of the character \a c, starting at
position \a index.
- The search is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs is FALSE.
+ The search is case sensitive if \a cs is true, or case insensitive
+ if \a cs is false.
Returns the position of \a c, or -1 if \a c could not be found.
@@ -965,8 +965,8 @@ int TQCString::find( char c, int index, bool cs ) const
Finds the first occurrence of the string \a str, starting at
position \a index.
- The search is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs is FALSE.
+ The search is case sensitive if \a cs is true, or case insensitive
+ if \a cs is false.
Returns the position of \a str, or -1 if \a str could not be
found.
@@ -1046,8 +1046,8 @@ int TQCString::find( const char *str, int index, bool cs, uint l ) const
Finds the first occurrence of the character \a c, starting at
position \a index and searching backwards.
- The search is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs is FALSE.
+ The search is case sensitive if \a cs is true, or case insensitive
+ if \a cs is false.
Returns the position of \a c, or -1 if \a c could not be found.
@@ -1080,8 +1080,8 @@ int TQCString::findRev( char c, int index, bool cs ) const
Finds the first occurrence of the string \a str, starting at
position \a index and searching backwards.
- The search is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs is FALSE.
+ The search is case sensitive if \a cs is true, or case insensitive
+ if \a cs is false.
Returns the position of \a str, or -1 if \a str could not be
found.
@@ -1150,8 +1150,8 @@ int TQCString::findRev( const char *str, int index, bool cs ) const
Returns the number of times the character \a c occurs in the
string.
- The match is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs if FALSE.
+ The match is case sensitive if \a cs is true, or case insensitive
+ if \a cs if false.
\sa \link #asciinotion Note on character comparisons \endlink
*/
@@ -1182,8 +1182,8 @@ int TQCString::contains( char c, bool cs ) const
Returns the number of times \a str occurs in the string.
- The match is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs if FALSE.
+ The match is case sensitive if \a cs is true, or case insensitive
+ if \a cs if false.
This function counts overlapping substrings, for example, "banana"
contains two occurrences of "ana".
@@ -1303,9 +1303,9 @@ TQCString TQCString::mid( uint index, uint len ) const
'\0') that contains this string padded with the \a fill character.
If the length of the string exceeds \a width and \a truncate is
- FALSE (the default), then the returned string is a copy of the
+ false (the default), then the returned string is a copy of the
string. If the length of the string exceeds \a width and \a
- truncate is TRUE, then the returned string is a left(\a width).
+ truncate is true, then the returned string is a left(\a width).
Example:
\code
@@ -1341,9 +1341,9 @@ TQCString TQCString::leftJustify( uint width, char fill, bool truncate ) const
by this string.
If the length of the string exceeds \a width and \a truncate is
- FALSE (the default), then the returned string is a copy of the
+ false (the default), then the returned string is a copy of the
string. If the length of the string exceeds \a width and \a
- truncate is TRUE, then the returned string is a left(\a width).
+ truncate is true, then the returned string is a left(\a width).
Example:
\code
@@ -1693,7 +1693,7 @@ TQCString &TQCString::replace( const char *before, const char *after )
if ( bl == al ) {
if ( bl ) {
- while( (index = find( before, index, TRUE, len ) ) != -1 ) {
+ while( (index = find( before, index, true, len ) ) != -1 ) {
memcpy( d+index, after, al );
index += bl;
}
@@ -1702,7 +1702,7 @@ TQCString &TQCString::replace( const char *before, const char *after )
uint to = 0;
uint movestart = 0;
uint num = 0;
- while( (index = find( before, index, TRUE, len ) ) != -1 ) {
+ while( (index = find( before, index, true, len ) ) != -1 ) {
if ( num ) {
int msize = index - movestart;
if ( msize > 0 ) {
@@ -1733,7 +1733,7 @@ TQCString &TQCString::replace( const char *before, const char *after )
uint indices[4096];
uint pos = 0;
while( pos < 4095 ) {
- index = find(before, index, TRUE, len);
+ index = find(before, index, true, len);
if ( index == -1 )
break;
indices[pos++] = index;
@@ -1842,7 +1842,7 @@ int TQCString::findRev( const TQRegExp& rx, int index ) const
Example:
\code
TQString s = "banana and panama";
- TQRegExp r = TQRegExp( "a[nm]a", TRUE, FALSE );
+ TQRegExp r = TQRegExp( "a[nm]a", true, false );
s.contains( r ); // 4 matches
\endcode
@@ -1896,9 +1896,9 @@ TQCString &TQCString::replace( const TQRegExp &rx, const char *str )
/*!
Returns the string converted to a \c long value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, or if it has trailing garbage; otherwise \a *ok is set to
- TRUE.
+ true.
*/
long TQCString::toLong( bool *ok ) const
@@ -1906,7 +1906,7 @@ long TQCString::toLong( bool *ok ) const
char *p = data();
long val=0;
const long max_mult = LONG_MAX / 10;
- bool is_ok = FALSE;
+ bool is_ok = false;
int neg = 0;
if ( !p )
goto bye;
@@ -1930,7 +1930,7 @@ long TQCString::toLong( bool *ok ) const
while ( isspace((uchar) *p) ) // skip trailing space
p++;
if ( *p == '\0' )
- is_ok = TRUE;
+ is_ok = true;
bye:
if ( ok )
*ok = is_ok;
@@ -1940,9 +1940,9 @@ bye:
/*!
Returns the string converted to an \c{unsigned long} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, or if it has trailing garbage; otherwise \a *ok is set to
- TRUE.
+ true.
*/
ulong TQCString::toULong( bool *ok ) const
@@ -1950,7 +1950,7 @@ ulong TQCString::toULong( bool *ok ) const
char *p = data();
ulong val=0;
const ulong max_mult = ULONG_MAX / 10;
- bool is_ok = FALSE;
+ bool is_ok = false;
if ( !p )
goto bye;
while ( isspace((uchar) *p) ) // skip leading space
@@ -1967,7 +1967,7 @@ ulong TQCString::toULong( bool *ok ) const
while ( isspace((uchar) *p) ) // skip trailing space
p++;
if ( *p == '\0' )
- is_ok = TRUE;
+ is_ok = true;
bye:
if ( ok )
*ok = is_ok;
@@ -1977,9 +1977,9 @@ bye:
/*!
Returns the string converted to a \c{short} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, is out of range, or if it has trailing garbage; otherwise
- \a *ok is set to TRUE.
+ \a *ok is set to true.
*/
short TQCString::toShort( bool *ok ) const
@@ -1987,7 +1987,7 @@ short TQCString::toShort( bool *ok ) const
long v = toLong( ok );
if ( v < SHRT_MIN || v > SHRT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (short)v;
@@ -1996,9 +1996,9 @@ short TQCString::toShort( bool *ok ) const
/*!
Returns the string converted to an \c{unsigned short} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, is out of range, or if it has trailing garbage; otherwise
- \a *ok is set to TRUE.
+ \a *ok is set to true.
*/
ushort TQCString::toUShort( bool *ok ) const
@@ -2006,7 +2006,7 @@ ushort TQCString::toUShort( bool *ok ) const
ulong v = toULong( ok );
if ( v > USHRT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (ushort)v;
@@ -2016,9 +2016,9 @@ ushort TQCString::toUShort( bool *ok ) const
/*!
Returns the string converted to a \c{int} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, or if it has trailing garbage; otherwise \a *ok is set to
- TRUE.
+ true.
*/
int TQCString::toInt( bool *ok ) const
@@ -2026,7 +2026,7 @@ int TQCString::toInt( bool *ok ) const
long v = toLong( ok );
if ( v < INT_MIN || v > INT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (int)v;
@@ -2035,9 +2035,9 @@ int TQCString::toInt( bool *ok ) const
/*!
Returns the string converted to an \c{unsigned int} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, or if it has trailing garbage; otherwise \a *ok is set to
- TRUE.
+ true.
*/
uint TQCString::toUInt( bool *ok ) const
@@ -2045,7 +2045,7 @@ uint TQCString::toUInt( bool *ok ) const
ulong v = toULong( ok );
if ( v > UINT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (uint)v;
@@ -2054,9 +2054,9 @@ uint TQCString::toUInt( bool *ok ) const
/*!
Returns the string converted to a \c{double} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, or if it has trailing garbage; otherwise \a *ok is set to
- TRUE.
+ true.
*/
double TQCString::toDouble( bool *ok ) const
@@ -2071,9 +2071,9 @@ double TQCString::toDouble( bool *ok ) const
/*!
Returns the string converted to a \c{float} value.
- If \a ok is not 0: \a *ok is set to FALSE if the string is not a
+ If \a ok is not 0: \a *ok is set to false if the string is not a
number, or if it has trailing garbage; otherwise \a *ok is set to
- TRUE.
+ true.
*/
float TQCString::toFloat( bool *ok ) const
@@ -2110,10 +2110,10 @@ TQCString &TQCString::setNum( long n )
char *p = &buf[19];
bool neg;
if ( n < 0 ) {
- neg = TRUE;
+ neg = true;
n = -n;
} else {
- neg = FALSE;
+ neg = false;
}
*p = '\0';
do {
@@ -2219,8 +2219,8 @@ TQCString &TQCString::setNum( double n, char f, int prec )
Sets the character at position \a index to \a c and expands the
string if necessary, padding with spaces.
- Returns FALSE if \a index was out of range and the string could
- not be expanded; otherwise returns TRUE.
+ Returns false if \a index was out of range and the string could
+ not be expanded; otherwise returns true.
*/
bool TQCString::setExpand( uint index, char c )
@@ -2229,13 +2229,13 @@ bool TQCString::setExpand( uint index, char c )
uint oldlen = length();
if ( index >= oldlen ) {
if ( !TQByteArray::resize( index+2 ) ) // no memory
- return FALSE;
+ return false;
if ( index > oldlen )
memset( data() + oldlen, ' ', index - oldlen );
*(data() + index+1) = '\0'; // terminate padded string
}
*(data() + index) = c;
- return TRUE;
+ return true;
}
@@ -2342,7 +2342,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 and \a s2 are equal; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are equal; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) == 0.
*/
@@ -2352,7 +2352,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 and \a s2 are equal; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are equal; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) == 0.
*/
@@ -2362,7 +2362,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 and \a s2 are equal; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are equal; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) == 0.
*/
@@ -2372,7 +2372,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 and \a s2 are different; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are different; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) != 0.
*/
@@ -2382,7 +2382,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 and \a s2 are different; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are different; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) != 0.
*/
@@ -2392,7 +2392,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 and \a s2 are different; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are different; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) != 0.
*/
@@ -2402,7 +2402,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is less than \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is less than \a s2; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) \< 0.
@@ -2414,7 +2414,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is less than \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is less than \a s2; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) \< 0.
@@ -2426,8 +2426,8 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is less than or equal to \a s2; otherwise
- returns FALSE.
+ Returns true if \a s1 is less than or equal to \a s2; otherwise
+ returns false.
Equivalent to qstrcmp(\a s1, \a s2) \<= 0.
@@ -2439,8 +2439,8 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is less than or equal to \a s2; otherwise
- returns FALSE.
+ Returns true if \a s1 is less than or equal to \a s2; otherwise
+ returns false.
Equivalent to qstrcmp(\a s1, \a s2) \<= 0.
@@ -2452,7 +2452,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is greater than \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is greater than \a s2; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) \> 0.
@@ -2464,7 +2464,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is greater than \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is greater than \a s2; otherwise returns false.
Equivalent to qstrcmp(\a s1, \a s2) \> 0.
@@ -2476,8 +2476,8 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is greater than or equal to \a s2; otherwise
- returns FALSE.
+ Returns true if \a s1 is greater than or equal to \a s2; otherwise
+ returns false.
Equivalent to qstrcmp(\a s1, \a s2) \>= 0.
@@ -2489,8 +2489,8 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str )
\relates TQCString
- Returns TRUE if \a s1 is greater than or equal to \a s2; otherwise
- returns FALSE.
+ Returns true if \a s1 is greater than or equal to \a s2; otherwise
+ returns false.
Equivalent to qstrcmp(\a s1, \a s2) \>= 0.
diff --git a/src/tools/tqcstring.h b/src/tools/tqcstring.h
index 4f7f31942..d9559b920 100644
--- a/src/tools/tqcstring.h
+++ b/src/tools/tqcstring.h
@@ -156,18 +156,18 @@ public:
#endif
;
- int find( char c, int index=0, bool cs=TRUE ) const;
- int find( const char *str, int index=0, bool cs=TRUE ) const;
+ int find( char c, int index=0, bool cs=true ) const;
+ int find( const char *str, int index=0, bool cs=true ) const;
#ifndef TQT_NO_REGEXP
int find( const TQRegExp &, int index=0 ) const;
#endif
- int findRev( char c, int index=-1, bool cs=TRUE) const;
- int findRev( const char *str, int index=-1, bool cs=TRUE) const;
+ int findRev( char c, int index=-1, bool cs=true) const;
+ int findRev( const char *str, int index=-1, bool cs=true) const;
#ifndef TQT_NO_REGEXP_CAPTURE
int findRev( const TQRegExp &, int index=-1 ) const;
#endif
- int contains( char c, bool cs=TRUE ) const;
- int contains( const char *str, bool cs=TRUE ) const;
+ int contains( char c, bool cs=true ) const;
+ int contains( const char *str, bool cs=true ) const;
#ifndef TQT_NO_REGEXP
int contains( const TQRegExp & ) const;
#endif
@@ -175,8 +175,8 @@ public:
TQCString right( uint len ) const;
TQCString mid( uint index, uint len=0xffffffff) const;
- TQCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
- TQCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;
+ TQCString leftJustify( uint width, char fill=' ', bool trunc=false)const;
+ TQCString rightJustify( uint width, char fill=' ',bool trunc=false)const;
TQCString lower() const;
TQCString upper() const;
diff --git a/src/tools/tqdatastream.cpp b/src/tools/tqdatastream.cpp
index dd4114bcb..506e6dd04 100644
--- a/src/tools/tqdatastream.cpp
+++ b/src/tools/tqdatastream.cpp
@@ -117,7 +117,7 @@
The initial IODevice is usually set in the constructor, but can be
changed with setDevice(). If you've reached the end of the data
- (or if there is no IODevice set) atEnd() will return TRUE.
+ (or if there is no IODevice set) atEnd() will return true.
If you want the data to be compatible with an earlier version of
TQt use setVersion().
@@ -250,9 +250,9 @@ TQDataStream::TQDataStream()
if ( systemWordSize == 0 ) // get system features
tqSysInfo( &systemWordSize, &systemBigEndian );
dev = 0; // no device set
- owndev = FALSE;
+ owndev = false;
byteorder = BigEndian; // default byte order
- printable = FALSE;
+ printable = false;
ver = DefaultStreamVersion;
noswap = systemBigEndian;
}
@@ -274,9 +274,9 @@ TQDataStream::TQDataStream( TQIODevice *d )
if ( systemWordSize == 0 ) // get system features
tqSysInfo( &systemWordSize, &systemBigEndian );
dev = d; // set device
- owndev = FALSE;
+ owndev = false;
byteorder = BigEndian; // default byte order
- printable = FALSE;
+ printable = false;
ver = DefaultStreamVersion;
noswap = systemBigEndian;
}
@@ -306,9 +306,9 @@ TQDataStream::TQDataStream( TQByteArray a, int mode )
tqSysInfo( &systemWordSize, &systemBigEndian );
dev = new TQBuffer( a ); // create device
((TQBuffer *)dev)->open( mode ); // open device
- owndev = TRUE;
+ owndev = true;
byteorder = BigEndian; // default byte order
- printable = FALSE;
+ printable = false;
ver = DefaultStreamVersion;
noswap = systemBigEndian;
}
@@ -348,7 +348,7 @@ void TQDataStream::setDevice(TQIODevice *d )
{
if ( owndev ) {
delete dev;
- owndev = FALSE;
+ owndev = false;
}
dev = d;
}
@@ -368,9 +368,9 @@ void TQDataStream::unsetDevice()
/*!
\fn bool TQDataStream::atEnd() const
- Returns TRUE if the IO device has reached the end position (end of
+ Returns true if the IO device has reached the end position (end of
the stream or file) or if there is no IO device set; otherwise
- returns FALSE, i.e. if the current position of the IO device is
+ returns false, i.e. if the current position of the IO device is
before the end position.
\sa TQIODevice::atEnd()
@@ -380,10 +380,10 @@ void TQDataStream::unsetDevice()
\obsolete
- Returns TRUE if the IO device has reached the end position (end of
+ Returns true if the IO device has reached the end position (end of
stream or file) or if there is no IO device set.
- Returns FALSE if the current position of the read/write head of the IO
+ Returns false if the current position of the read/write head of the IO
device is somewhere before the end position.
\sa TQIODevice::atEnd()
@@ -423,8 +423,8 @@ void TQDataStream::setByteOrder( int bo )
/*!
\fn bool TQDataStream::isPrintableData() const
- Returns TRUE if the printable data flag has been set; otherwise
- returns FALSE.
+ Returns true if the printable data flag has been set; otherwise
+ returns false.
\sa setPrintableData()
*/
@@ -432,11 +432,11 @@ void TQDataStream::setByteOrder( int bo )
/*!
\fn void TQDataStream::setPrintableData( bool enable )
- If \a enable is TRUE, data will be output in a human readable
- format. If \a enable is FALSE, data will be output in a binary
+ If \a enable is true, data will be output in a human readable
+ format. If \a enable is false, data will be output in a binary
format.
- If \a enable is TRUE, the write functions will generate output
+ If \a enable is true, the write functions will generate output
that consists of printable characters (7 bit ASCII). This output
will typically be a lot larger than the default binary output, and
consequently slower to write.
diff --git a/src/tools/tqdatastream.h b/src/tools/tqdatastream.h
index 5111a2fb9..f3f4e6022 100644
--- a/src/tools/tqdatastream.h
+++ b/src/tools/tqdatastream.h
@@ -135,7 +135,7 @@ inline TQIODevice *TQDataStream::device() const
{ return dev; }
inline bool TQDataStream::atEnd() const
-{ return dev ? dev->atEnd() : TRUE; }
+{ return dev ? dev->atEnd() : true; }
inline bool TQDataStream::eof() const
{ return atEnd(); }
diff --git a/src/tools/tqdatetime.cpp b/src/tools/tqdatetime.cpp
index 49ae68bb4..87529851a 100644
--- a/src/tools/tqdatetime.cpp
+++ b/src/tools/tqdatetime.cpp
@@ -75,7 +75,7 @@ static const char * const qt_shortMonthNames[] = {
*****************************************************************************/
// Replaces tokens by their value. See TQDateTime::toString() for a list of valid tokens
-static TQString getFmtString( const TQString& f, const TQTime* dt = 0, const TQDate* dd = 0, bool am_pm = FALSE )
+static TQString getFmtString( const TQString& f, const TQTime* dt = 0, const TQDate* dd = 0, bool am_pm = false )
{
if ( f.isEmpty() )
return TQString::null;
@@ -92,23 +92,23 @@ static TQString getFmtString( const TQString& f, const TQTime* dt = 0, const TQD
buf = TQString::number( dt->hour() );
} else if ( f == "hh" ) {
if ( ( am_pm ) && ( dt->hour() > 12 ) )
- buf = TQString::number( dt->hour() - 12 ).rightJustify( 2, '0', TRUE );
+ buf = TQString::number( dt->hour() - 12 ).rightJustify( 2, '0', true );
else if ( ( am_pm ) && ( dt->hour() == 0 ) )
buf = "12";
else
- buf = TQString::number( dt->hour() ).rightJustify( 2, '0', TRUE );
+ buf = TQString::number( dt->hour() ).rightJustify( 2, '0', true );
} else if ( f == "m" ) {
buf = TQString::number( dt->minute() );
} else if ( f == "mm" ) {
- buf = TQString::number( dt->minute() ).rightJustify( 2, '0', TRUE );
+ buf = TQString::number( dt->minute() ).rightJustify( 2, '0', true );
} else if ( f == "s" ) {
buf = TQString::number( dt->second() );
} else if ( f == "ss" ) {
- buf = TQString::number( dt->second() ).rightJustify( 2, '0', TRUE );
+ buf = TQString::number( dt->second() ).rightJustify( 2, '0', true );
} else if ( f == "z" ) {
buf = TQString::number( dt->msec() );
} else if ( f == "zzz" ) {
- buf = TQString::number( dt->msec() ).rightJustify( 3, '0', TRUE );
+ buf = TQString::number( dt->msec() ).rightJustify( 3, '0', true );
} else if ( f == "ap" ) {
buf = dt->hour() < 12 ? "am" : "pm";
} else if ( f == "AP" ) {
@@ -120,11 +120,11 @@ static TQString getFmtString( const TQString& f, const TQTime* dt = 0, const TQD
if ( f == "d" ) {
buf = TQString::number( dd->day() );
} else if ( f == "dd" ) {
- buf = TQString::number( dd->day() ).rightJustify( 2, '0', TRUE );
+ buf = TQString::number( dd->day() ).rightJustify( 2, '0', true );
} else if ( f == "M" ) {
buf = TQString::number( dd->month() );
} else if ( f == "MM" ) {
- buf = TQString::number( dd->month() ).rightJustify( 2, '0', TRUE );
+ buf = TQString::number( dd->month() ).rightJustify( 2, '0', true );
#ifndef TQT_NO_TEXTDATE
} else if ( f == "ddd" ) {
buf = dd->shortDayName( dd->dayOfWeek() );
@@ -300,7 +300,7 @@ TQDate::TQDate( int y, int m, int d )
/*!
\fn bool TQDate::isNull() const
- Returns TRUE if the date is null; otherwise returns FALSE. A null
+ Returns true if the date is null; otherwise returns false. A null
date is invalid.
\sa isValid()
@@ -308,7 +308,7 @@ TQDate::TQDate( int y, int m, int d )
/*!
- Returns TRUE if this date is valid; otherwise returns FALSE.
+ Returns true if this date is valid; otherwise returns false.
\sa isNull()
*/
@@ -841,7 +841,7 @@ TQString TQDate::toString( const TQString& format ) const
\warning If \a y is in the range 0..99, it is interpreted as
1900..1999.
- Returns TRUE if the date is valid; otherwise returns FALSE.
+ Returns true if the date is valid; otherwise returns false.
*/
bool TQDate::setYMD( int y, int m, int d )
@@ -852,10 +852,10 @@ bool TQDate::setYMD( int y, int m, int d )
#if defined(QT_CHECK_RANGE)
tqWarning( "TQDate::setYMD: Invalid date %04d-%02d-%02d", y, m, d );
#endif
- return FALSE;
+ return false;
}
jd = gregorianToJulian( y, m, d );
- return TRUE;
+ return true;
}
/*!
@@ -969,39 +969,39 @@ int TQDate::daysTo( const TQDate &d ) const
/*!
\fn bool TQDate::operator==( const TQDate &d ) const
- Returns TRUE if this date is equal to \a d; otherwise returns FALSE.
+ Returns true if this date is equal to \a d; otherwise returns false.
*/
/*!
\fn bool TQDate::operator!=( const TQDate &d ) const
- Returns TRUE if this date is different from \a d; otherwise returns FALSE.
+ Returns true if this date is different from \a d; otherwise returns false.
*/
/*!
\fn bool TQDate::operator<( const TQDate &d ) const
- Returns TRUE if this date is earlier than \a d, otherwise returns FALSE.
+ Returns true if this date is earlier than \a d, otherwise returns false.
*/
/*!
\fn bool TQDate::operator<=( const TQDate &d ) const
- Returns TRUE if this date is earlier than or equal to \a d,
- otherwise returns FALSE.
+ Returns true if this date is earlier than or equal to \a d,
+ otherwise returns false.
*/
/*!
\fn bool TQDate::operator>( const TQDate &d ) const
- Returns TRUE if this date is later than \a d, otherwise returns FALSE.
+ Returns true if this date is later than \a d, otherwise returns false.
*/
/*!
\fn bool TQDate::operator>=( const TQDate &d ) const
- Returns TRUE if this date is later than or equal to \a d,
- otherwise returns FALSE.
+ Returns true if this date is later than or equal to \a d,
+ otherwise returns false.
*/
/*!
@@ -1143,15 +1143,15 @@ TQDate TQDate::fromString( const TQString& s, TQt::DateFormat f )
/*!
\overload
- Returns TRUE if the specified date (year \a y, month \a m and day
- \a d) is valid; otherwise returns FALSE.
+ Returns true if the specified date (year \a y, month \a m and day
+ \a d) is valid; otherwise returns false.
Example:
\code
- TQDate::isValid( 2002, 5, 17 ); // TRUE May 17th 2002 is valid
- TQDate::isValid( 2002, 2, 30 ); // FALSE Feb 30th does not exist
- TQDate::isValid( 2004, 2, 29 ); // TRUE 2004 is a leap year
- TQDate::isValid( 1202, 6, 6 ); // FALSE 1202 is pre-Gregorian
+ TQDate::isValid( 2002, 5, 17 ); // true May 17th 2002 is valid
+ TQDate::isValid( 2002, 2, 30 ); // false Feb 30th does not exist
+ TQDate::isValid( 2004, 2, 29 ); // true 2004 is a leap year
+ TQDate::isValid( 1202, 6, 6 ); // false 1202 is pre-Gregorian
\endcode
\warning A \a y value in the range 00..99 is interpreted as
@@ -1166,14 +1166,14 @@ bool TQDate::isValid( int y, int m, int d )
y += 1900;
else if ( y < FIRST_YEAR || (y == FIRST_YEAR && (m < 9 ||
(m == 9 && d < 14))) )
- return FALSE;
+ return false;
return (d > 0 && m > 0 && m <= 12) &&
(d <= monthDays[m] || (d == 29 && m == 2 && leapYear(y)));
}
/*!
- Returns TRUE if the specified year \a y is a leap year; otherwise
- returns FALSE.
+ Returns true if the specified year \a y is a leap year; otherwise
+ returns false.
*/
bool TQDate::leapYear( int y )
@@ -1313,14 +1313,14 @@ TQTime::TQTime( int h, int m, int s, int ms )
/*!
\fn bool TQTime::isNull() const
- Returns TRUE if the time is equal to 00:00:00.000; otherwise
- returns FALSE. A null time is valid.
+ Returns true if the time is equal to 00:00:00.000; otherwise
+ returns false. A null time is valid.
\sa isValid()
*/
/*!
- Returns TRUE if the time is valid; otherwise returns FALSE. The
+ Returns true if the time is valid; otherwise returns false. The
time 23:30:55.746 is valid, whereas 24:12:30 is invalid.
\sa isNull()
@@ -1483,8 +1483,8 @@ TQString TQTime::toString( const TQString& format ) const
milliseconds \a ms.
\a h must be in the range 0..23, \a m and \a s must be in the
- range 0..59, and \a ms must be in the range 0..999. Returns TRUE
- if the set time is valid; otherwise returns FALSE.
+ range 0..59, and \a ms must be in the range 0..999. Returns true
+ if the set time is valid; otherwise returns false.
\sa isValid()
*/
@@ -1497,10 +1497,10 @@ bool TQTime::setHMS( int h, int m, int s, int ms )
ms );
#endif
ds = MSECS_PER_DAY; // make this invalid
- return FALSE;
+ return false;
}
ds = (h*SECS_PER_HOUR + m*SECS_PER_MIN + s)*1000 + ms;
- return TRUE;
+ return true;
}
/*!
@@ -1586,39 +1586,39 @@ int TQTime::msecsTo( const TQTime &t ) const
/*!
\fn bool TQTime::operator==( const TQTime &t ) const
- Returns TRUE if this time is equal to \a t; otherwise returns FALSE.
+ Returns true if this time is equal to \a t; otherwise returns false.
*/
/*!
\fn bool TQTime::operator!=( const TQTime &t ) const
- Returns TRUE if this time is different from \a t; otherwise returns FALSE.
+ Returns true if this time is different from \a t; otherwise returns false.
*/
/*!
\fn bool TQTime::operator<( const TQTime &t ) const
- Returns TRUE if this time is earlier than \a t; otherwise returns FALSE.
+ Returns true if this time is earlier than \a t; otherwise returns false.
*/
/*!
\fn bool TQTime::operator<=( const TQTime &t ) const
- Returns TRUE if this time is earlier than or equal to \a t;
- otherwise returns FALSE.
+ Returns true if this time is earlier than or equal to \a t;
+ otherwise returns false.
*/
/*!
\fn bool TQTime::operator>( const TQTime &t ) const
- Returns TRUE if this time is later than \a t; otherwise returns FALSE.
+ Returns true if this time is later than \a t; otherwise returns false.
*/
/*!
\fn bool TQTime::operator>=( const TQTime &t ) const
- Returns TRUE if this time is later than or equal to \a t;
- otherwise returns FALSE.
+ Returns true if this time is later than or equal to \a t;
+ otherwise returns false.
*/
@@ -1683,8 +1683,8 @@ TQTime TQTime::fromString( const TQString& s, TQt::DateFormat f )
\internal
\obsolete
- Fetches the current time and returns TRUE if the time is within one
- minute after midnight, otherwise FALSE. The return value is used by
+ Fetches the current time and returns true if the time is within one
+ minute after midnight, otherwise false. The return value is used by
TQDateTime::currentDateTime() to ensure that the date there is correct.
*/
@@ -1697,8 +1697,8 @@ bool TQTime::currentTime( TQTime *ct )
/*!
\internal
- Fetches the current time, for the TimeSpec \a ts, and returns TRUE
- if the time is within one minute after midnight, otherwise FALSE. The
+ Fetches the current time, for the TimeSpec \a ts, and returns true
+ if the time is within one minute after midnight, otherwise false. The
return value is used by TQDateTime::currentDateTime() to ensure that
the date there is correct. The default TimeSpec is LocalTime.
@@ -1710,7 +1710,7 @@ bool TQTime::currentTime( TQTime *ct, TQt::TimeSpec ts )
#if defined(QT_CHECK_NULL)
tqWarning( "TQTime::currentTime(TQTime *): Null pointer not allowed" );
#endif
- return FALSE;
+ return false;
}
#if defined(Q_OS_WIN32)
@@ -1763,16 +1763,16 @@ bool TQTime::currentTime( TQTime *ct, TQt::TimeSpec ts )
/*!
\overload
- Returns TRUE if the specified time is valid; otherwise returns
- FALSE.
+ Returns true if the specified time is valid; otherwise returns
+ false.
The time is valid if \a h is in the range 0..23, \a m and \a s are
in the range 0..59, and \a ms is in the range 0..999.
Example:
\code
- TQTime::isValid(21, 10, 30); // returns TRUE
- TQTime::isValid(22, 5, 62); // returns FALSE
+ TQTime::isValid(21, 10, 30); // returns true
+ TQTime::isValid(22, 5, 62); // returns false
\endcode
*/
@@ -1939,8 +1939,8 @@ TQDateTime::TQDateTime( const TQDate &date, const TQTime &time )
/*!
\fn bool TQDateTime::isNull() const
- Returns TRUE if both the date and the time are null; otherwise
- returns FALSE. A null datetime is invalid.
+ Returns true if both the date and the time are null; otherwise
+ returns false. A null datetime is invalid.
\sa TQDate::isNull(), TQTime::isNull()
*/
@@ -1948,8 +1948,8 @@ TQDateTime::TQDateTime( const TQDate &date, const TQTime &time )
/*!
\fn bool TQDateTime::isValid() const
- Returns TRUE if both the date and the time are valid; otherwise
- returns FALSE.
+ Returns true if both the date and the time are valid; otherwise
+ returns false.
\sa TQDate::isValid(), TQTime::isValid()
*/
@@ -2333,7 +2333,7 @@ int TQDateTime::secsTo( const TQDateTime &dt ) const
/*!
- Returns TRUE if this datetime is equal to \a dt; otherwise returns FALSE.
+ Returns true if this datetime is equal to \a dt; otherwise returns false.
\sa operator!=()
*/
@@ -2344,8 +2344,8 @@ bool TQDateTime::operator==( const TQDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is different from \a dt; otherwise
- returns FALSE.
+ Returns true if this datetime is different from \a dt; otherwise
+ returns false.
\sa operator==()
*/
@@ -2356,51 +2356,51 @@ bool TQDateTime::operator!=( const TQDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is earlier than \a dt; otherwise
- returns FALSE.
+ Returns true if this datetime is earlier than \a dt; otherwise
+ returns false.
*/
bool TQDateTime::operator<( const TQDateTime &dt ) const
{
if ( d < dt.d )
- return TRUE;
- return d == dt.d ? t < dt.t : FALSE;
+ return true;
+ return d == dt.d ? t < dt.t : false;
}
/*!
- Returns TRUE if this datetime is earlier than or equal to \a dt;
- otherwise returns FALSE.
+ Returns true if this datetime is earlier than or equal to \a dt;
+ otherwise returns false.
*/
bool TQDateTime::operator<=( const TQDateTime &dt ) const
{
if ( d < dt.d )
- return TRUE;
- return d == dt.d ? t <= dt.t : FALSE;
+ return true;
+ return d == dt.d ? t <= dt.t : false;
}
/*!
- Returns TRUE if this datetime is later than \a dt; otherwise
- returns FALSE.
+ Returns true if this datetime is later than \a dt; otherwise
+ returns false.
*/
bool TQDateTime::operator>( const TQDateTime &dt ) const
{
if ( d > dt.d )
- return TRUE;
- return d == dt.d ? t > dt.t : FALSE;
+ return true;
+ return d == dt.d ? t > dt.t : false;
}
/*!
- Returns TRUE if this datetime is later than or equal to \a dt;
- otherwise returns FALSE.
+ Returns true if this datetime is later than or equal to \a dt;
+ otherwise returns false.
*/
bool TQDateTime::operator>=( const TQDateTime &dt ) const
{
if ( d > dt.d )
- return TRUE;
- return d == dt.d ? t >= dt.t : FALSE;
+ return true;
+ return d == dt.d ? t >= dt.t : false;
}
/*!
diff --git a/src/tools/tqdict.h b/src/tools/tqdict.h
index 014fb893a..55723c83a 100644
--- a/src/tools/tqdict.h
+++ b/src/tools/tqdict.h
@@ -54,8 +54,8 @@ class TQDict
#endif
{
public:
- TQDict( int size = 17, bool caseSensitive = TRUE )
- : TQGDict( size, StringKey, caseSensitive, FALSE ) { }
+ TQDict( int size = 17, bool caseSensitive = true )
+ : TQGDict( size, StringKey, caseSensitive, false ) { }
TQDict( const TQDict<type> &d ) : TQGDict( d ) { }
~TQDict() { clear(); }
TQDict<type> &operator=(const TQDict<type> &d)
diff --git a/src/tools/tqdir.cpp b/src/tools/tqdir.cpp
index 21bea6afd..5e276dfc1 100644
--- a/src/tools/tqdir.cpp
+++ b/src/tools/tqdir.cpp
@@ -50,9 +50,9 @@
#include <limits.h>
#if defined(Q_FS_FAT) && !defined(Q_OS_UNIX)
-const bool CaseSensitiveFS = FALSE;
+const bool CaseSensitiveFS = false;
#else
-const bool CaseSensitiveFS = TRUE;
+const bool CaseSensitiveFS = true;
#endif
@@ -239,7 +239,7 @@ TQDir::TQDir( const TQDir &d )
fList = 0;
fiList = 0;
nameFilt = d.nameFilt;
- dirty = TRUE;
+ dirty = true;
allDirs = d.allDirs;
filtS = d.filtS;
sortS = d.sortS;
@@ -251,7 +251,7 @@ TQDir::TQDir( const TQDir &d )
void TQDir::refresh() const
{
TQDir* that = (TQDir*) this;
- that->dirty = TRUE;
+ that->dirty = true;
}
void TQDir::init()
@@ -259,8 +259,8 @@ void TQDir::init()
fList = 0;
fiList = 0;
nameFilt = TQString::fromLatin1("*");
- dirty = TRUE;
- allDirs = FALSE;
+ dirty = true;
+ allDirs = false;
filtS = All;
sortS = SortSpec(Name | IgnoreCase);
}
@@ -297,7 +297,7 @@ void TQDir::setPath( const TQString &path )
dPath = cleanDirPath( path );
if ( dPath.isEmpty() )
dPath = TQString::fromLatin1(".");
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -362,9 +362,9 @@ TQString TQDir::dirName() const
multiple separators or "." and ".." directories in \a fileName
will not be removed (see cleanDirPath()).
- If \a acceptAbsPath is TRUE a \a fileName starting with a
+ If \a acceptAbsPath is true a \a fileName starting with a
separator "/" will be returned without change. If \a acceptAbsPath
- is FALSE an absolute path will be prepended to the fileName and
+ is false an absolute path will be prepended to the fileName and
the resultant string returned.
\sa absFilePath(), isRelative(), canonicalPath()
@@ -390,9 +390,9 @@ TQString TQDir::filePath( const TQString &fileName,
multiple separators or "." and ".." directories in \a fileName
will not be removed (see cleanDirPath()).
- If \a acceptAbsPath is TRUE a \a fileName starting with a
+ If \a acceptAbsPath is true a \a fileName starting with a
separator "/" will be returned without change. If \a acceptAbsPath
- is FALSE an absolute path will be prepended to the fileName and
+ is false an absolute path will be prepended to the fileName and
the resultant string returned.
\sa filePath()
@@ -475,14 +475,14 @@ TQString TQDir::convertSeparators( const TQString &pathName )
/*!
Changes the TQDir's directory to \a dirName.
- If \a acceptAbsPath is TRUE a path starting with separator "/"
+ If \a acceptAbsPath is true a path starting with separator "/"
will cause the function to change to the absolute directory. If \a
- acceptAbsPath is FALSE any number of separators at the beginning
+ acceptAbsPath is false any number of separators at the beginning
of \a dirName will be removed and the function will descend into
\a dirName.
- Returns TRUE if the new directory exists and is readable;
- otherwise returns FALSE. Note that the logical cd() operation is
+ Returns true if the new directory exists and is readable;
+ otherwise returns false. Note that the logical cd() operation is
not performed if the new directory does not exist.
Calling cd( ".." ) is equivalent to calling cdUp().
@@ -493,7 +493,7 @@ TQString TQDir::convertSeparators( const TQString &pathName )
bool TQDir::cd( const TQString &dirName, bool acceptAbsPath )
{
if ( dirName.isEmpty() || dirName == TQString::fromLatin1(".") )
- return TRUE;
+ return true;
TQString old = dPath;
if ( acceptAbsPath && !isRelativePath(dirName) ) {
dPath = cleanDirPath( dirName );
@@ -501,7 +501,7 @@ bool TQDir::cd( const TQString &dirName, bool acceptAbsPath )
if ( isRoot() ) {
if ( dirName == ".." ) {
dPath = old;
- return FALSE;
+ return false;
}
} else {
dPath += '/';
@@ -528,18 +528,18 @@ bool TQDir::cd( const TQString &dirName, bool acceptAbsPath )
}
if ( !exists() ) {
dPath = old; // regret
- return FALSE;
+ return false;
}
- dirty = TRUE;
- return TRUE;
+ dirty = true;
+ return true;
}
/*!
Changes directory by moving one directory up from the TQDir's
current directory.
- Returns TRUE if the new directory exists and is readable;
- otherwise returns FALSE. Note that the logical cdUp() operation is
+ Returns true if the new directory exists and is readable;
+ otherwise returns false. Note that the logical cdUp() operation is
not performed if the new directory does not exist.
\sa cd(), isReadable(), exists(), path()
@@ -578,7 +578,7 @@ void TQDir::setNameFilter( const TQString &nameFilter )
nameFilt = nameFilter;
if ( nameFilt.isEmpty() )
nameFilt = TQString::fromLatin1("*");
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -643,7 +643,7 @@ void TQDir::setFilter( int filterSpec )
if ( filtS == (FilterSpec) filterSpec )
return;
filtS = (FilterSpec) filterSpec;
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -696,7 +696,7 @@ void TQDir::setSorting( int sortSpec )
if ( sortS == (SortSpec) sortSpec )
return;
sortS = (SortSpec) sortSpec;
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -708,9 +708,9 @@ void TQDir::setSorting( int sortSpec )
*/
/*!
- If \a enable is TRUE then all directories are included (e.g. in
+ If \a enable is true then all directories are included (e.g. in
entryList()), and the nameFilter() is only applied to the files.
- If \a enable is FALSE then the nameFilter() is applied to both
+ If \a enable is false then the nameFilter() is applied to both
directories and files.
\sa matchAllDirs()
@@ -721,7 +721,7 @@ void TQDir::setMatchAllDirs( bool enable )
if ( (bool)allDirs == enable )
return;
allDirs = enable;
- dirty = TRUE;
+ dirty = true;
}
@@ -921,9 +921,9 @@ const TQFileInfoList *TQDir::entryInfoList( const TQString &nameFilter,
/*!
\overload
- Returns TRUE if the \e directory exists; otherwise returns FALSE.
+ Returns true if the \e directory exists; otherwise returns false.
(If a file with the same name is found this function will return
- FALSE).
+ false).
\sa TQFileInfo::exists(), TQFile::exists()
*/
@@ -935,8 +935,8 @@ bool TQDir::exists() const
}
/*!
- Returns TRUE if the directory path is relative to the current
- directory and returns FALSE if the path is absolute (e.g. under
+ Returns true if the directory path is relative to the current
+ directory and returns false if the path is absolute (e.g. under
UNIX a path is relative if it does not start with a "/").
\sa convertToAbs()
@@ -971,7 +971,7 @@ TQDir &TQDir::operator=( const TQDir &d )
delete fiList;
fiList = 0;
nameFilt = d.nameFilt;
- dirty = TRUE;
+ dirty = true;
allDirs = d.allDirs;
filtS = d.filtS;
sortS = d.sortS;
@@ -987,7 +987,7 @@ TQDir &TQDir::operator=( const TQDir &d )
TQDir &TQDir::operator=( const TQString &path )
{
dPath = cleanDirPath( path );
- dirty = TRUE;
+ dirty = true;
return *this;
}
@@ -995,9 +995,9 @@ TQDir &TQDir::operator=( const TQString &path )
/*!
\fn bool TQDir::operator!=( const TQDir &d ) const
- Returns TRUE if directory \a d and this directory have different
+ Returns true if directory \a d and this directory have different
paths or different sort or filter settings; otherwise returns
- FALSE.
+ false.
Example:
\code
@@ -1010,9 +1010,9 @@ TQDir &TQDir::operator=( const TQString &path )
*/
/*!
- Returns TRUE if directory \a d and this directory have the same
+ Returns true if directory \a d and this directory have the same
path and their sort and filter settings are the same; otherwise
- returns FALSE.
+ returns false.
Example:
\code
@@ -1038,13 +1038,13 @@ bool TQDir::operator==( const TQDir &d ) const
/*!
Removes the file, \a fileName.
- If \a acceptAbsPath is TRUE a path starting with separator "/"
+ If \a acceptAbsPath is true a path starting with separator "/"
will remove the file with the absolute path. If \a acceptAbsPath
- is FALSE any number of separators at the beginning of \a fileName
+ is false any number of separators at the beginning of \a fileName
will be removed and the resultant file name will be removed.
- Returns TRUE if the file is removed successfully; otherwise
- returns FALSE.
+ Returns true if the file is removed successfully; otherwise
+ returns false.
*/
bool TQDir::remove( const TQString &fileName, bool acceptAbsPath )
@@ -1053,7 +1053,7 @@ bool TQDir::remove( const TQString &fileName, bool acceptAbsPath )
#if defined(QT_CHECK_NULL)
tqWarning( "TQDir::remove: Empty or null file name" );
#endif
- return FALSE;
+ return false;
}
TQString p = filePath( fileName, acceptAbsPath );
return TQFile::remove( p );
@@ -1062,12 +1062,12 @@ bool TQDir::remove( const TQString &fileName, bool acceptAbsPath )
/*!
Checks for the existence of the file \a name.
- If \a acceptAbsPath is TRUE a path starting with separator "/"
+ If \a acceptAbsPath is true a path starting with separator "/"
will check the file with the absolute path. If \a acceptAbsPath is
- FALSE any number of separators at the beginning of \a name will be
+ false any number of separators at the beginning of \a name will be
removed and the resultant file name will be checked.
- Returns TRUE if the file exists; otherwise returns FALSE.
+ Returns true if the file exists; otherwise returns false.
\sa TQFileInfo::exists(), TQFile::exists()
*/
@@ -1078,7 +1078,7 @@ bool TQDir::exists( const TQString &name, bool acceptAbsPath ) //### const in 4.
#if defined(QT_CHECK_NULL)
tqWarning( "TQDir::exists: Empty or null file name" );
#endif
- return FALSE;
+ return false;
}
TQString tmp = filePath( name, acceptAbsPath );
return TQFile::exists( tmp );
@@ -1173,7 +1173,7 @@ TQValueList<TQRegExp> qt_makeFilterList( const TQString &filter )
TQStringList list = TQStringList::split( sep, filter );
TQStringList::Iterator it = list.begin();
while ( it != list.end() ) {
- regExps << TQRegExp( (*it).stripWhiteSpace(), CaseSensitiveFS, TRUE );
+ regExps << TQRegExp( (*it).stripWhiteSpace(), CaseSensitiveFS, true );
++it;
}
return regExps;
@@ -1185,18 +1185,18 @@ bool qt_matchFilterList( const TQValueList<TQRegExp>& filters,
TQValueList<TQRegExp>::ConstIterator rit = filters.begin();
while ( rit != filters.end() ) {
if ( (*rit).exactMatch(fileName) )
- return TRUE;
+ return true;
++rit;
}
- return FALSE;
+ return false;
}
/*!
\overload
- Returns TRUE if the \a fileName matches any of the wildcard (glob)
- patterns in the list of \a filters; otherwise returns FALSE.
+ Returns true if the \a fileName matches any of the wildcard (glob)
+ patterns in the list of \a filters; otherwise returns false.
(See \link tqregexp.html#wildcard-matching TQRegExp wildcard
matching.\endlink)
@@ -1207,17 +1207,17 @@ bool TQDir::match( const TQStringList &filters, const TQString &fileName )
{
TQStringList::ConstIterator sit = filters.begin();
while ( sit != filters.end() ) {
- TQRegExp rx( *sit, CaseSensitiveFS, TRUE );
+ TQRegExp rx( *sit, CaseSensitiveFS, true );
if ( rx.exactMatch(fileName) )
- return TRUE;
+ return true;
++sit;
}
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the \a fileName matches the wildcard (glob)
- pattern \a filter; otherwise returns FALSE. The \a filter may
+ Returns true if the \a fileName matches the wildcard (glob)
+ pattern \a filter; otherwise returns false. The \a filter may
contain multiple patterns separated by spaces or semicolons.
(See \link tqregexp.html#wildcard-matching TQRegExp wildcard
diff --git a/src/tools/tqdir.h b/src/tools/tqdir.h
index 697d29f95..dec7ba4f0 100644
--- a/src/tools/tqdir.h
+++ b/src/tools/tqdir.h
@@ -106,13 +106,13 @@ public:
virtual TQString dirName() const;
virtual TQString filePath( const TQString &fileName,
- bool acceptAbsPath = TRUE ) const;
+ bool acceptAbsPath = true ) const;
virtual TQString absFilePath( const TQString &fileName,
- bool acceptAbsPath = TRUE ) const;
+ bool acceptAbsPath = true ) const;
static TQString convertSeparators( const TQString &pathName );
- virtual bool cd( const TQString &dirName, bool acceptAbsPath = TRUE );
+ virtual bool cd( const TQString &dirName, bool acceptAbsPath = true );
virtual bool cdUp();
TQString nameFilter() const;
@@ -148,9 +148,9 @@ public:
static const TQFileInfoList *drives();
virtual bool mkdir( const TQString &dirName,
- bool acceptAbsPath = TRUE ) const;
+ bool acceptAbsPath = true ) const;
virtual bool rmdir( const TQString &dirName,
- bool acceptAbsPath = TRUE ) const;
+ bool acceptAbsPath = true ) const;
virtual bool isReadable() const;
virtual bool exists() const;
@@ -163,11 +163,11 @@ public:
virtual bool operator!=( const TQDir & ) const;
virtual bool remove( const TQString &fileName,
- bool acceptAbsPath = TRUE );
+ bool acceptAbsPath = true );
virtual bool rename( const TQString &name, const TQString &newName,
- bool acceptAbsPaths = TRUE );
+ bool acceptAbsPaths = true );
virtual bool exists( const TQString &name,
- bool acceptAbsPath = TRUE );
+ bool acceptAbsPath = true );
static char separator();
diff --git a/src/tools/tqdir_unix.cpp b/src/tools/tqdir_unix.cpp
index 3587a706a..f58b20875 100644
--- a/src/tools/tqdir_unix.cpp
+++ b/src/tools/tqdir_unix.cpp
@@ -145,7 +145,7 @@ bool TQDir::rename( const TQString &name, const TQString &newName,
#if defined(QT_CHECK_NULL)
tqWarning( "TQDir::rename: Empty or null file name(s)" );
#endif
- return FALSE;
+ return false;
}
TQString fn1 = filePath( name, acceptAbsPaths );
TQString fn2 = filePath( newName, acceptAbsPaths );
@@ -200,7 +200,7 @@ bool TQDir::isRelativePath( const TQString &path )
{
int len = path.length();
if ( len == 0 )
- return TRUE;
+ return true;
return path[0] != '/';
}
@@ -213,7 +213,7 @@ bool TQDir::readDirEntries( const TQString &nameFilter,
TQ_CHECK_PTR( fList );
fiList = new TQFileInfoList;
TQ_CHECK_PTR( fiList );
- fiList->setAutoDelete( TRUE );
+ fiList->setAutoDelete( true );
} else {
fList->clear();
fiList->clear();
@@ -236,7 +236,7 @@ bool TQDir::readDirEntries( const TQString &nameFilter,
dir = opendir( TQFile::encodeName(dPath) );
if ( !dir )
- return FALSE; // cannot read the directory
+ return false; // cannot read the directory
#if defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN)
union {
@@ -285,7 +285,7 @@ bool TQDir::readDirEntries( const TQString &nameFilter,
qt_cmp_si_sortSpec = sortSpec;
qsort( si, i, sizeof(si[0]), qt_cmp_si );
// put them back in the list
- fiList->setAutoDelete( FALSE );
+ fiList->setAutoDelete( false );
fiList->clear();
int j;
for ( j=0; j<i; j++ ) {
@@ -293,15 +293,15 @@ bool TQDir::readDirEntries( const TQString &nameFilter,
fList->append( si[j].item->fileName() );
}
delete [] si;
- fiList->setAutoDelete( TRUE );
+ fiList->setAutoDelete( true );
}
if ( filterSpec == (FilterSpec)filtS && sortSpec == (SortSpec)sortS &&
nameFilter == nameFilt )
- dirty = FALSE;
+ dirty = false;
else
- dirty = TRUE;
- return TRUE;
+ dirty = true;
+ return true;
}
const TQFileInfoList * TQDir::drives()
diff --git a/src/tools/tqfile.cpp b/src/tools/tqfile.cpp
index d67578929..2ebb835f6 100644
--- a/src/tools/tqfile.cpp
+++ b/src/tools/tqfile.cpp
@@ -102,7 +102,7 @@ extern bool qt_file_access( const TQString& fn, int t );
The size of the file is returned by size(). You can get the
current file position or move to a new file position using the
at() functions. If you've reached the end of the file, atEnd()
- returns TRUE. The file handle is returned by handle().
+ returns true. The file handle is returned by handle().
Here is a code fragment that uses TQTextStream to read a text file
line by line. It prints each line with a line number.
@@ -206,7 +206,7 @@ void TQFile::init()
fd = 0;
length = 0;
ioIndex = 0;
- ext_f = FALSE; // not an external file handle
+ ext_f = false; // not an external file handle
}
@@ -257,7 +257,7 @@ void TQFile::setName( const TQString &name )
/*!
\overload
- Returns TRUE if this file exists; otherwise returns FALSE.
+ Returns true if this file exists; otherwise returns false.
\sa name()
*/
@@ -268,8 +268,8 @@ bool TQFile::exists() const
}
/*!
- Returns TRUE if the file given by \a fileName exists; otherwise
- returns FALSE.
+ Returns true if the file given by \a fileName exists; otherwise
+ returns false.
*/
bool TQFile::exists( const TQString &fileName )
@@ -280,7 +280,7 @@ bool TQFile::exists( const TQString &fileName )
/*!
Removes the file specified by the file name currently set. Returns
- TRUE if successful; otherwise returns FALSE.
+ true if successful; otherwise returns false.
The file is closed before it is removed.
*/
@@ -326,7 +326,7 @@ void TQFile::flush()
*/
/*!
- Returns TRUE if the end of file has been reached; otherwise returns FALSE.
+ Returns true if the end of file has been reached; otherwise returns false.
If TQFile has not been open()'d, then the behavior is undefined.
\sa size()
@@ -338,11 +338,11 @@ bool TQFile::atEnd() const
#if defined(QT_CHECK_STATE)
tqWarning( "TQFile::atEnd: File is not open" );
#endif
- return FALSE;
+ return false;
}
if ( isDirectAccess() && !isTranslated() ) {
if ( at() < size() )
- return FALSE;
+ return false;
}
const TQString errorString = d->errorString;
const bool ret = TQIODevice::atEnd();
diff --git a/src/tools/tqfile_unix.cpp b/src/tools/tqfile_unix.cpp
index a56466cda..96e947f97 100644
--- a/src/tools/tqfile_unix.cpp
+++ b/src/tools/tqfile_unix.cpp
@@ -61,14 +61,14 @@ extern const char* qt_fileerr_read;
bool qt_file_access( const TQString& fn, int t )
{
if ( fn.isEmpty() )
- return FALSE;
+ return false;
return ::access( TQFile::encodeName(fn), t ) == 0;
}
/*!
\overload
Removes the file \a fileName.
- Returns TRUE if successful, otherwise FALSE.
+ Returns true if successful, otherwise false.
*/
bool TQFile::remove( const TQString &fileName )
@@ -77,7 +77,7 @@ bool TQFile::remove( const TQString &fileName )
#if defined(QT_CHECK_NULL)
tqWarning( "TQFile::remove: Empty or null file name" );
#endif
- return FALSE;
+ return false;
}
return unlink( TQFile::encodeName(fileName) ) == 0;
}
@@ -92,7 +92,7 @@ bool TQFile::remove( const TQString &fileName )
/*!
Opens the file specified by the file name currently set, using the
- mode \a m. Returns TRUE if successful, otherwise FALSE.
+ mode \a m. Returns true if successful, otherwise false.
\keyword IO_Raw
\keyword IO_ReadOnly
@@ -170,13 +170,13 @@ bool TQFile::open( int m )
#if defined(QT_CHECK_STATE)
tqWarning( "TQFile::open: File (%s) already open", fn.latin1() );
#endif
- return FALSE;
+ return false;
}
if ( fn.isEmpty() ) { // no file name defined
#if defined(QT_CHECK_NULL)
tqWarning( "TQFile::open: No file name specified" );
#endif
- return FALSE;
+ return false;
}
init(); // reset params
setMode( m );
@@ -184,9 +184,9 @@ bool TQFile::open( int m )
#if defined(QT_CHECK_RANGE)
tqWarning( "TQFile::open: File access (%s) not specified", fn.latin1() );
#endif
- return FALSE;
+ return false;
}
- bool ok = TRUE;
+ bool ok = true;
struct stat st;
if ( isRaw() ) {
int oflags = O_RDONLY;
@@ -221,12 +221,12 @@ bool TQFile::open( int m )
if ( fd != -1 ) { // open successful
::fstat( fd, &st ); // get the stat for later usage
} else {
- ok = FALSE;
+ ok = false;
}
} else { // buffered file I/O
TQCString perm;
char perm2[4];
- bool try_create = FALSE;
+ bool try_create = false;
if ( flags() & IO_Append ) { // append to end of file?
setFlags( flags() | IO_WriteOnly ); // append implies write
perm = isReadable() ? "a+" : "a";
@@ -236,7 +236,7 @@ bool TQFile::open( int m )
perm = "w+";
} else {
perm = "r+";
- try_create = TRUE; // try to create if not exists
+ try_create = true; // try to create if not exists
}
} else if ( isReadable() ) {
perm = "r";
@@ -257,7 +257,7 @@ bool TQFile::open( int m )
if ( !fh && try_create ) {
perm2[0] = 'w'; // try "w+" instead of "r+"
- try_create = FALSE;
+ try_create = false;
} else {
break;
}
@@ -265,7 +265,7 @@ bool TQFile::open( int m )
if ( fh ) {
::fstat( fileno(fh), &st ); // get the stat for later usage
} else {
- ok = FALSE;
+ ok = false;
}
}
if ( ok ) {
@@ -311,7 +311,7 @@ bool TQFile::open( int m )
/*!
\overload
Opens a file in the mode \a m using an existing file handle \a f.
- Returns TRUE if successful, otherwise FALSE.
+ Returns true if successful, otherwise false.
Example:
\code
@@ -342,13 +342,13 @@ bool TQFile::open( int m, FILE *f )
#if defined(QT_CHECK_RANGE)
tqWarning( "TQFile::open: File (%s) already open", fn.latin1() );
#endif
- return FALSE;
+ return false;
}
init();
setMode( m &~IO_Raw );
setState( IO_Open );
fh = f;
- ext_f = TRUE;
+ ext_f = true;
struct stat st;
::fstat( fileno(fh), &st );
#if defined(QT_LARGEFILE_SUPPORT)
@@ -381,13 +381,13 @@ bool TQFile::open( int m, FILE *f )
resetStatus();
}
}
- return TRUE;
+ return true;
}
/*!
\overload
Opens a file in the mode \a m using an existing file descriptor \a f.
- Returns TRUE if successful, otherwise FALSE.
+ Returns true if successful, otherwise false.
When a TQFile is opened using this function, close() does not actually
close the file.
@@ -410,13 +410,13 @@ bool TQFile::open( int m, int f )
#if defined(QT_CHECK_RANGE)
tqWarning( "TQFile::open: File (%s) already open", fn.latin1() );
#endif
- return FALSE;
+ return false;
}
init();
setMode( m |IO_Raw );
setState( IO_Open );
fd = f;
- ext_f = TRUE;
+ ext_f = true;
struct stat st;
::fstat( fd, &st );
#if defined(QT_LARGEFILE_SUPPORT)
@@ -449,7 +449,7 @@ bool TQFile::open( int m, int f )
resetStatus();
}
}
- return TRUE;
+ return true;
}
/*!
@@ -479,8 +479,8 @@ TQIODevice::Offset TQFile::size() const
/*!
\overload
- Sets the file index to \a pos. Returns TRUE if successful;
- otherwise returns FALSE.
+ Sets the file index to \a pos. Returns true if successful;
+ otherwise returns false.
Example:
\code
@@ -506,10 +506,10 @@ bool TQFile::at( Offset pos )
#if defined(QT_CHECK_STATE)
tqWarning( "TQFile::at: File (%s) is not open", fn.latin1() );
#endif
- return FALSE;
+ return false;
}
if ( isSequentialAccess() )
- return FALSE;
+ return false;
bool ok;
if ( isRaw() ) {
off_t l = ::lseek( fd, pos, SEEK_SET );
@@ -712,7 +712,7 @@ int TQFile::handle() const
void TQFile::close()
{
- bool ok = FALSE;
+ bool ok = false;
if ( isOpen() ) { // file is not open
if ( fh ) { // buffered file
if ( ext_f )
@@ -721,7 +721,7 @@ void TQFile::close()
ok = fclose( fh ) != -1;
} else { // raw file
if ( ext_f )
- ok = TRUE; // cannot close
+ ok = true; // cannot close
else
ok = ::close( fd ) != -1;
}
diff --git a/src/tools/tqfileinfo.cpp b/src/tools/tqfileinfo.cpp
index e9ba95680..1a50b7713 100644
--- a/src/tools/tqfileinfo.cpp
+++ b/src/tools/tqfileinfo.cpp
@@ -84,7 +84,7 @@ extern bool qt_file_access( const TQString& fn, int t );
even by other parts of the same program, there is a function that
refreshes the file information: refresh(). If you want to switch
off a TQFileInfo's caching and force it to access the file system
- every time you request information from it call setCaching(FALSE).
+ every time you request information from it call setCaching(false).
The file's type is obtained with isFile(), isDir() and
isSymLink(). The readLink() function provides the name of the file
@@ -142,9 +142,9 @@ extern bool qt_file_access( const TQString& fn, int t );
TQFileInfo::TQFileInfo()
{
fic = 0;
- cache = TRUE;
+ cache = true;
#if defined(Q_OS_UNIX)
- symLink = FALSE;
+ symLink = false;
#endif
}
@@ -163,9 +163,9 @@ TQFileInfo::TQFileInfo( const TQString &file )
fn = file;
slashify( fn );
fic = 0;
- cache = TRUE;
+ cache = true;
#if defined(Q_OS_UNIX)
- symLink = FALSE;
+ symLink = false;
#endif
}
@@ -184,9 +184,9 @@ TQFileInfo::TQFileInfo( const TQFile &file )
fn = file.name();
slashify( fn );
fic = 0;
- cache = TRUE;
+ cache = true;
#if defined(Q_OS_UNIX)
- symLink = FALSE;
+ symLink = false;
#endif
}
@@ -205,9 +205,9 @@ TQFileInfo::TQFileInfo( const TQDir &d, const TQString &fileName )
fn = d.filePath( fileName );
slashify( fn );
fic = 0;
- cache = TRUE;
+ cache = true;
#if defined(Q_OS_UNIX)
- symLink = FALSE;
+ symLink = false;
#endif
}
#endif
@@ -343,7 +343,7 @@ void TQFileInfo::setFile( const TQDir &d, const TQString &fileName )
#endif
/*!
- Returns TRUE if the file exists; otherwise returns FALSE.
+ Returns true if the file exists; otherwise returns false.
*/
bool TQFileInfo::exists() const
@@ -368,14 +368,14 @@ void TQFileInfo::refresh() const
/*!
\fn bool TQFileInfo::caching() const
- Returns TRUE if caching is enabled; otherwise returns FALSE.
+ Returns true if caching is enabled; otherwise returns false.
\sa setCaching(), refresh()
*/
/*!
- If \a enable is TRUE, enables caching of file information. If \a
- enable is FALSE caching is disabled.
+ If \a enable is true, enables caching of file information. If \a
+ enable is false caching is disabled.
When caching is enabled, TQFileInfo reads the file information from
the file system the first time it's needed, but generally not
@@ -413,11 +413,11 @@ TQString TQFileInfo::filePath() const
/*!
Returns the base name of the file.
- If \a complete is FALSE (the default) the base name consists of
+ If \a complete is false (the default) the base name consists of
all characters in the file name up to (but not including) the \e
first '.' character.
- If \a complete is TRUE the base name consists of all characters in
+ If \a complete is true the base name consists of all characters in
the file up to (but not including) the \e last '.' character.
The path is not included in either case.
@@ -426,7 +426,7 @@ TQString TQFileInfo::filePath() const
\code
TQFileInfo fi( "/tmp/archive.tar.gz" );
TQString base = fi.baseName(); // base = "archive"
- base = fi.baseName( TRUE ); // base = "archive.tar"
+ base = fi.baseName( true ); // base = "archive.tar"
\endcode
\sa fileName(), extension()
@@ -445,11 +445,11 @@ TQString TQFileInfo::baseName( bool complete ) const
/*!
Returns the file's extension name.
- If \a complete is TRUE (the default), extension() returns the
+ If \a complete is true (the default), extension() returns the
string of all characters in the file name after (but not
including) the first '.' character.
- If \a complete is FALSE, extension() returns the string of all
+ If \a complete is false, extension() returns the string of all
characters in the file name after (but not including) the last '.'
character.
@@ -457,7 +457,7 @@ TQString TQFileInfo::baseName( bool complete ) const
\code
TQFileInfo fi( "/tmp/archive.tar.gz" );
TQString ext = fi.extension(); // ext = "tar.gz"
- ext = fi.extension( FALSE ); // ext = "gz"
+ ext = fi.extension( false ); // ext = "gz"
\endcode
\sa fileName(), baseName()
@@ -476,7 +476,7 @@ TQString TQFileInfo::extension( bool complete ) const
/*!
Returns the file's path as a TQDir object.
- If the TQFileInfo is relative and \a absPath is FALSE, the TQDir
+ If the TQFileInfo is relative and \a absPath is false, the TQDir
will be relative; otherwise it will be absolute.
\sa dirPath(), filePath(), fileName(), isRelative()
@@ -490,7 +490,7 @@ TQDir TQFileInfo::dir( bool absPath ) const
/*!
- Returns TRUE if the file is readable; otherwise returns FALSE.
+ Returns true if the file is readable; otherwise returns false.
\sa isWritable(), isExecutable(), permission()
*/
@@ -505,7 +505,7 @@ bool TQFileInfo::isReadable() const
}
/*!
- Returns TRUE if the file is writable; otherwise returns FALSE.
+ Returns true if the file is writable; otherwise returns false.
\sa isReadable(), isExecutable(), permission()
*/
@@ -520,7 +520,7 @@ bool TQFileInfo::isWritable() const
}
/*!
- Returns TRUE if the file is executable; otherwise returns FALSE.
+ Returns true if the file is executable; otherwise returns false.
\sa isReadable(), isWritable(), permission()
*/
@@ -546,7 +546,7 @@ bool TQFileInfo::isHidden() const
#endif
/*!
- Returns TRUE if the file path name is relative. Returns FALSE if
+ Returns true if the file path name is relative. Returns false if
the path is absolute (e.g. under Unix a path is absolute if it
begins with a "/").
*/
@@ -662,7 +662,7 @@ TQDateTime TQFileInfo::lastRead() const
drive letter, in which case the path will begin '//sharename/'.
This function returns the same as filePath(), unless isRelative()
- is TRUE.
+ is true.
If the TQFileInfo is empty it returns TQDir::currentDirPath().
diff --git a/src/tools/tqfileinfo.h b/src/tools/tqfileinfo.h
index 41a764481..817263e35 100644
--- a/src/tools/tqfileinfo.h
+++ b/src/tools/tqfileinfo.h
@@ -87,14 +87,14 @@ public:
#ifndef TQT_NO_DIR //###
TQString absFilePath() const;
#endif
- TQString baseName( bool complete = FALSE ) const;
- TQString extension( bool complete = TRUE ) const;
+ TQString baseName( bool complete = false ) const;
+ TQString extension( bool complete = true ) const;
#ifndef TQT_NO_DIR //###
- TQString dirPath( bool absPath = FALSE ) const;
+ TQString dirPath( bool absPath = false ) const;
#endif
#ifndef TQT_NO_DIR
- TQDir dir( bool absPath = FALSE ) const;
+ TQDir dir( bool absPath = false ) const;
#endif
bool isReadable() const;
bool isWritable() const;
diff --git a/src/tools/tqfileinfo_unix.cpp b/src/tools/tqfileinfo_unix.cpp
index 98ed9050e..c2925f5c8 100644
--- a/src/tools/tqfileinfo_unix.cpp
+++ b/src/tools/tqfileinfo_unix.cpp
@@ -64,7 +64,7 @@ void TQFileInfo::makeAbs( TQString & )
}
/*!
- Returns TRUE if this object points to a file. Returns FALSE if the
+ Returns true if this object points to a file. Returns false if the
object points to something which isn't a file, e.g. a directory or
a symlink.
@@ -74,12 +74,12 @@ bool TQFileInfo::isFile() const
{
if ( !fic || !cache )
doStat();
- return fic ? (fic->st.st_mode & S_IFMT) == S_IFREG : FALSE;
+ return fic ? (fic->st.st_mode & S_IFMT) == S_IFREG : false;
}
/*!
- Returns TRUE if this object points to a directory or to a symbolic
- link to a directory; otherwise returns FALSE.
+ Returns true if this object points to a directory or to a symbolic
+ link to a directory; otherwise returns false.
\sa isFile(), isSymLink()
*/
@@ -87,13 +87,13 @@ bool TQFileInfo::isDir() const
{
if ( !fic || !cache )
doStat();
- return fic ? (fic->st.st_mode & S_IFMT) == S_IFDIR : FALSE;
+ return fic ? (fic->st.st_mode & S_IFMT) == S_IFDIR : false;
}
/*!
- Returns TRUE if this object points to a symbolic link (or to a
+ Returns true if this object points to a symbolic link (or to a
shortcut on Windows, or an alias on Mac OS X); otherwise returns
- FALSE.
+ false.
\sa isFile(), isDir(), readLink()
*/
@@ -103,7 +103,7 @@ bool TQFileInfo::isSymLink() const
if ( !fic || !cache )
doStat();
if(symLink)
- return TRUE;
+ return true;
#if defined(Q_OS_MAC)
{
FSRef fref;
@@ -114,7 +114,7 @@ bool TQFileInfo::isSymLink() const
}
}
#endif
- return FALSE;
+ return false;
}
/*!
@@ -122,7 +122,7 @@ bool TQFileInfo::isSymLink() const
a TQString::null if the object isn't a symbolic link.
This name may not represent an existing file; it is only a string.
- TQFileInfo::exists() returns TRUE if the symlink points to an
+ TQFileInfo::exists() returns true if the symlink points to an
existing file.
\sa exists(), isSymLink(), isDir(), isFile()
@@ -172,7 +172,7 @@ TQString TQFileInfo::readLink() const
FSRef fref;
if(FSPathMakeRef((const UInt8 *)TQFile::encodeName(fn).data(), &fref, NULL) == noErr) {
Boolean isAlias, isFolder;
- if(FSResolveAliasFile(&fref, TRUE, &isFolder, &isAlias) == noErr && isAlias) {
+ if(FSResolveAliasFile(&fref, true, &isFolder, &isAlias) == noErr && isAlias) {
AliasHandle alias;
if(FSNewAlias(0, &fref, &alias) == noErr && alias) {
CFStringRef cfstr;
@@ -271,7 +271,7 @@ uint TQFileInfo::groupId() const
for permission combinations.
On systems where files do not have permissions this function
- always returns TRUE.
+ always returns true.
Example:
\code
@@ -321,10 +321,10 @@ bool TQFileInfo::permission( int permissionSpec ) const
#if defined(QT_CHECK_NULL)
tqWarning( "TQFileInfo::permission: permissionSpec is 0" );
#endif
- return TRUE;
+ return true;
}
} else {
- return FALSE;
+ return false;
}
}
@@ -333,12 +333,12 @@ void TQFileInfo::doStat() const
TQFileInfo *that = ((TQFileInfo*)this); // mutable function
if ( !that->fic )
that->fic = new TQFileInfoCache;
- that->symLink = FALSE;
+ that->symLink = false;
struct stat *b = &that->fic->st;
#if defined(Q_OS_UNIX) && defined(S_IFLNK)
if ( ::lstat( TQFile::encodeName(fn), b ) == 0 ) {
if ( S_ISLNK( b->st_mode ) )
- that->symLink = TRUE;
+ that->symLink = true;
else
return;
}
@@ -354,7 +354,7 @@ void TQFileInfo::doStat() const
/*!
Returns the file's path.
- If \a absPath is TRUE an absolute path is returned.
+ If \a absPath is true an absolute path is returned.
\sa dir(), filePath(), fileName(), isRelative()
*/
diff --git a/src/tools/tqgarray.cpp b/src/tools/tqgarray.cpp
index a3e9dc42f..6a5528ddf 100644
--- a/src/tools/tqgarray.cpp
+++ b/src/tools/tqgarray.cpp
@@ -211,16 +211,16 @@ TQGArray::~TQGArray()
/*!
- Returns TRUE if this array is equal to \a a, otherwise FALSE.
+ Returns true if this array is equal to \a a, otherwise false.
The comparison is bitwise, of course.
*/
bool TQGArray::isEqual( const TQGArray &a ) const
{
if ( size() != a.size() ) // different size
- return FALSE;
+ return false;
if ( data() == a.data() ) // has same data
- return TRUE;
+ return true;
return (size() ? memcmp( data(), a.data(), size() ) : 0) == 0;
}
@@ -244,7 +244,7 @@ bool TQGArray::resize( uint newsize, Optimization optim )
&& newsize == shd->maxl
#endif
) // nothing to do
- return TRUE;
+ return true;
if ( newsize == 0 ) { // remove array
if ( shd->data )
DELETE(shd->data);
@@ -253,7 +253,7 @@ bool TQGArray::resize( uint newsize, Optimization optim )
#ifdef QT_QGARRAY_SPEED_OPTIM
shd->maxl = 0;
#endif
- return TRUE;
+ return true;
}
uint newmaxl = newsize;
@@ -262,7 +262,7 @@ bool TQGArray::resize( uint newsize, Optimization optim )
if ( newsize <= shd->maxl &&
( newsize * 4 > shd->maxl || shd->maxl <= 4 ) ) {
shd->len = newsize;
- return TRUE;
+ return true;
}
newmaxl = 4;
while ( newmaxl < newsize )
@@ -287,9 +287,9 @@ bool TQGArray::resize( uint newsize, Optimization optim )
shd->data = NEW(char,newmaxl);
}
if ( !shd->data ) // no memory
- return FALSE;
+ return false;
shd->len = newsize;
- return TRUE;
+ return true;
}
/*!\overload
@@ -306,7 +306,7 @@ bool TQGArray::resize( uint newsize )
If \a len is specified as different from -1, then the array will be
resized to \a len*sz before it is filled.
- Returns TRUE if successful, or FALSE if the memory cannot be allocated
+ Returns true if successful, or false if the memory cannot be allocated
(only when \a len != -1).
\sa resize()
@@ -317,7 +317,7 @@ bool TQGArray::fill( const char *d, int len, uint sz )
if ( len < 0 )
len = shd->len/sz; // default: use array length
else if ( !resize( len*sz ) )
- return FALSE;
+ return false;
if ( sz == 1 ) // 8 bit elements
memset( data(), *d, len );
else if ( sz == 4 ) { // 32 bit elements
@@ -337,7 +337,7 @@ bool TQGArray::fill( const char *d, int len, uint sz )
x += sz;
}
}
- return TRUE;
+ return true;
}
/*!
@@ -774,7 +774,7 @@ int TQGArray::bsearch( const char *d, uint sz ) const
Expand the array if necessary, and copies (the first part of) its
contents from the \a index * \a sz bytes at \a d.
- Returns TRUE if the operation succeeds, FALSE if it runs out of
+ Returns true if the operation succeeds, false if it runs out of
memory.
\warning This function disregards the reference count mechanism. If
@@ -786,10 +786,10 @@ bool TQGArray::setExpand( uint index, const char *d, uint sz )
index *= sz;
if ( index >= shd->len ) {
if ( !resize( index+sz ) ) // no memory
- return FALSE;
+ return false;
}
memcpy( data() + index, d, sz );
- return TRUE;
+ return true;
}
diff --git a/src/tools/tqgcache.cpp b/src/tools/tqgcache.cpp
index 471b59f6c..450ce5270 100644
--- a/src/tools/tqgcache.cpp
+++ b/src/tools/tqgcache.cpp
@@ -248,7 +248,7 @@ inline TQCDict::~TQCDict()
The maximum cost of the cache is given by \a maxCost and the size by \a
size. The key type is \a kt which may be \c StringKey, \c AsciiKey,
\c IntKey or \c PtrKey. The case-sensitivity of lookups is set with
- \a caseSensitive. Keys are copied if \a copyKeys is TRUE.
+ \a caseSensitive. Keys are copied if \a copyKeys is true.
*/
TQGCache::TQGCache( int maxCost, uint size, KeyType kt, bool caseSensitive,
@@ -257,9 +257,9 @@ TQGCache::TQGCache( int maxCost, uint size, KeyType kt, bool caseSensitive,
keytype = kt;
lruList = new TQCList;
TQ_CHECK_PTR( lruList );
- lruList->setAutoDelete( TRUE );
+ lruList->setAutoDelete( true );
copyk = ((keytype == AsciiKey) && copyKeys);
- dict = new TQCDict( size, kt, caseSensitive, FALSE );
+ dict = new TQCDict( size, kt, caseSensitive, false );
TQ_CHECK_PTR( dict );
mCost = maxCost;
tCost = 0;
@@ -359,7 +359,7 @@ void TQGCache::setMaxCost( int maxCost )
Inserts an item with data \a data into the cache using key \a key.
The item has cost \a cost and priority \a priority.
- \warning If this function returns FALSE, you must delete \a data
+ \warning If this function returns false, you must delete \a data
yourself. Additionally, be very careful about using \a data after
calling this function, as any other insertions into the cache, from
anywhere in the application, or within TQt itself, could cause the
@@ -375,7 +375,7 @@ bool TQGCache::insert_string( const TQString &key, TQPtrCollection::Item data,
#if defined(QT_DEBUG)
lruList->insertMisses++;
#endif
- return FALSE;
+ return false;
}
}
#if defined(QT_DEBUG)
@@ -393,7 +393,7 @@ bool TQGCache::insert_string( const TQString &key, TQPtrCollection::Item data,
lruList->insert( 0, ci );
dict->insert_string( key, ci );
tCost += cost;
- return TRUE;
+ return true;
}
bool TQGCache::insert_other( const char *key, TQPtrCollection::Item data,
@@ -404,7 +404,7 @@ bool TQGCache::insert_other( const char *key, TQPtrCollection::Item data,
#if defined(QT_DEBUG)
lruList->insertMisses++;
#endif
- return FALSE;
+ return false;
}
}
#if defined(QT_DEBUG)
@@ -427,13 +427,13 @@ bool TQGCache::insert_other( const char *key, TQPtrCollection::Item data,
else
dict->insert_int( (long)key, ci );
tCost += cost;
- return TRUE;
+ return true;
}
/*!
- Removes the item with key \a key from the cache. Returns TRUE if the
- item was removed; otherwise returns FALSE.
+ Removes the item with key \a key from the cache. Returns true if the
+ item was removed; otherwise returns false.
*/
bool TQGCache::remove_string( const TQString &key )
@@ -533,7 +533,7 @@ void TQGCache::clear()
/*!
- Finds an item for \a key in the cache and adds a reference if \a ref is TRUE.
+ Finds an item for \a key in the cache and adds a reference if \a ref is true.
*/
TQPtrCollection::Item TQGCache::find_string( const TQString &key, bool ref ) const
@@ -556,7 +556,7 @@ TQPtrCollection::Item TQGCache::find_string( const TQString &key, bool ref ) con
/*!
- Finds an item for \a key in the cache and adds a reference if \a ref is TRUE.
+ Finds an item for \a key in the cache and adds a reference if \a ref is true.
*/
TQPtrCollection::Item TQGCache::find_other( const char *key, bool ref ) const
@@ -586,7 +586,7 @@ TQPtrCollection::Item TQGCache::find_other( const char *key, bool ref ) const
bool TQGCache::makeRoomFor( int cost, int priority )
{
if ( cost > mCost ) // cannot make room for more
- return FALSE; // than maximum cost
+ return false; // than maximum cost
if ( priority == -1 )
priority = 32767;
TQCacheItem *ci = lruList->last();
@@ -598,7 +598,7 @@ bool TQGCache::makeRoomFor( int cost, int priority )
dumps++;
}
if ( cntCost < cost ) // can enough cost be dumped?
- return FALSE; // no
+ return false; // no
#if defined(QT_DEBUG)
Q_ASSERT( dumps > 0 );
#endif
@@ -628,7 +628,7 @@ bool TQGCache::makeRoomFor( int cost, int priority )
lruList->removeLast(); // remove from list
}
tCost -= cntCost;
- return TRUE;
+ return true;
}
@@ -738,7 +738,7 @@ uint TQGCacheIterator::count() const
}
/*!
- Returns TRUE if the iterator points to the first item.
+ Returns true if the iterator points to the first item.
*/
bool TQGCacheIterator::atFirst() const
@@ -747,7 +747,7 @@ bool TQGCacheIterator::atFirst() const
}
/*!
- Returns TRUE if the iterator points to the last item.
+ Returns true if the iterator points to the last item.
*/
bool TQGCacheIterator::atLast() const
diff --git a/src/tools/tqgcache.h b/src/tools/tqgcache.h
index 5fea6c901..47c660c2e 100644
--- a/src/tools/tqgcache.h
+++ b/src/tools/tqgcache.h
@@ -82,8 +82,8 @@ protected:
TQPtrCollection::Item take_string( const TQString &key );
TQPtrCollection::Item take_other( const char *key );
- TQPtrCollection::Item find_string( const TQString &key, bool ref=TRUE ) const;
- TQPtrCollection::Item find_other( const char *key, bool ref=TRUE ) const;
+ TQPtrCollection::Item find_string( const TQString &key, bool ref=true ) const;
+ TQPtrCollection::Item find_other( const char *key, bool ref=true ) const;
void statistics() const;
diff --git a/src/tools/tqgdict.cpp b/src/tools/tqgdict.cpp
index 894881a61..d810cbe0f 100644
--- a/src/tools/tqgdict.cpp
+++ b/src/tools/tqgdict.cpp
@@ -196,7 +196,7 @@ TQDataStream& TQGDict::write( TQDataStream &s, TQPtrCollection::Item ) const
\a len is the initial size of the dictionary.
The key type is \a kt which may be \c StringKey, \c AsciiKey,
\c IntKey or \c PtrKey. The case-sensitivity of lookups is set with
- \a caseSensitive. Keys are copied if \a copyKeys is TRUE.
+ \a caseSensitive. Keys are copied if \a copyKeys is true.
*/
TQGDict::TQGDict( uint len, KeyType kt, bool caseSensitive, bool copyKeys )
@@ -219,15 +219,15 @@ void TQGDict::init( uint len, KeyType kt, bool caseSensitive, bool copyKeys )
switch ( (keytype = (uint)kt) ) {
case StringKey:
cases = caseSensitive;
- copyk = FALSE;
+ copyk = false;
break;
case AsciiKey:
cases = caseSensitive;
copyk = copyKeys;
break;
default:
- cases = FALSE;
- copyk = FALSE;
+ cases = false;
+ copyk = false;
break;
}
}
@@ -477,7 +477,7 @@ void TQGDict::resize( uint newsize )
TQ_CHECK_PTR( vec );
memset( (char*)vec, 0, vlen*sizeof(TQBaseBucket*) );
numItems = 0;
- copyk = FALSE;
+ copyk = false;
// Reinsert every item from vec, deleting vec as we go
for ( uint index = 0; index < old_vlen; index++ ) {
@@ -675,9 +675,9 @@ bool TQGDict::remove_string( const TQString &key, TQPtrCollection::Item item )
if ( n ) {
deleteItem( n->getData() );
delete n;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
diff --git a/src/tools/tqglist.cpp b/src/tools/tqglist.cpp
index def2fd4e3..1da131e69 100644
--- a/src/tools/tqglist.cpp
+++ b/src/tools/tqglist.cpp
@@ -106,7 +106,7 @@ public:
: list(0), iterator(0) {
}
~TQGListIteratorList() {
- notifyClear( TRUE );
+ notifyClear( true );
delete list;
}
@@ -297,18 +297,18 @@ TQGList& TQGList::operator=( const TQGList &list )
}
/*!
- Compares this list with \a list. Returns TRUE if the lists
- contain the same data, otherwise FALSE.
+ Compares this list with \a list. Returns true if the lists
+ contain the same data, otherwise false.
*/
bool TQGList::operator==( const TQGList &list ) const
{
if ( count() != list.count() ) {
- return FALSE;
+ return false;
}
if ( count() == 0 ) {
- return TRUE;
+ return true;
}
TQLNode *n1 = firstNode;
@@ -316,12 +316,12 @@ bool TQGList::operator==( const TQGList &list ) const
while ( n1 && n2 ) {
// should be mutable
if ( ( (TQGList*)this )->compareItems( n1->data, n2->data ) != 0 )
- return FALSE;
+ return false;
n1 = n1->next;
n2 = n2->next;
}
- return TRUE;
+ return true;
}
/*!
@@ -370,13 +370,13 @@ TQLNode *TQGList::locate( uint index )
} else if ( index < numNodes - index ) { // start from first node
node = firstNode;
distance = index;
- forward = TRUE;
+ forward = true;
} else { // start from last node
node = lastNode;
distance = numNodes - index - 1;
if ( distance < 0 )
distance = 0;
- forward = FALSE;
+ forward = false;
}
if ( forward ) { // now run through nodes
while ( distance-- ) {
@@ -483,21 +483,21 @@ bool TQGList::insertAt( uint index, TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
else if ( index == numNodes ) {
append( d );
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
TQLNode *nextNode = locate( index );
if ( !nextNode ) {
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
TQLNode *prevNode = nextNode->prev;
TQLNode *n = new TQLNode( newItem(d) );
@@ -512,7 +512,7 @@ bool TQGList::insertAt( uint index, TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
@@ -613,7 +613,7 @@ bool TQGList::removeNode( TQLNode *n )
if ( n == 0 || (n->prev && n->prev->next != n) ||
(n->next && n->next->prev != n) ) {
tqWarning( "TQGList::removeNode: Corrupted node" );
- return FALSE;
+ return false;
}
#endif
curNode = n;
@@ -625,7 +625,7 @@ bool TQGList::removeNode( TQLNode *n )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
/*!
@@ -643,21 +643,21 @@ bool TQGList::remove( TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
TQLNode *n = unlink();
if ( !n ) {
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
deleteItem( n->data );
delete n;
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
/*!
@@ -673,21 +673,21 @@ bool TQGList::removeRef( TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
TQLNode *n = unlink();
if ( !n ) {
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
deleteItem( n->data );
delete n;
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
/*!
@@ -715,21 +715,21 @@ bool TQGList::removeAt( uint index )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
TQLNode *n = unlink();
if ( !n ) {
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
deleteItem( n->data );
delete n;
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
@@ -746,7 +746,7 @@ bool TQGList::replaceAt( uint index, TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return FALSE;
+ return false;
}
if ( n->data != d ) {
deleteItem( n->data );
@@ -755,7 +755,7 @@ bool TQGList::replaceAt( uint index, TQPtrCollection::Item d )
#if defined(TQT_THREAD_SUPPORT)
//mutex->unlock();
#endif
- return TRUE;
+ return true;
}
@@ -888,7 +888,7 @@ void TQGList::clear()
curIndex = -1;
if ( iterators ) {
- iterators->notifyClear( FALSE );
+ iterators->notifyClear( false );
}
TQLNode *prevNode;
@@ -905,7 +905,7 @@ void TQGList::clear()
/*!
- Finds item \a d in the list. If \a fromStart is TRUE the search
+ Finds item \a d in the list. If \a fromStart is true the search
begins at the first node; otherwise it begins at the current node.
*/
@@ -937,7 +937,7 @@ int TQGList::findRef( TQPtrCollection::Item d, bool fromStart )
/*!
Finds item \a d in the list using compareItems(). If \a fromStart is
- TRUE the search begins at the first node; otherwise it begins at the
+ true the search begins at the first node; otherwise it begins at the
current node.
*/
@@ -1451,13 +1451,13 @@ TQGListIterator::~TQGListIterator()
/*!
\fn bool TQGListIterator::atFirst() const
\internal
- Returns TRUE if the iterator points to the first item, otherwise FALSE.
+ Returns true if the iterator points to the first item, otherwise false.
*/
/*!
\fn bool TQGListIterator::atLast() const
\internal
- Returns TRUE if the iterator points to the last item, otherwise FALSE.
+ Returns true if the iterator points to the last item, otherwise false.
*/
diff --git a/src/tools/tqglist.h b/src/tools/tqglist.h
index 95a5786d3..a06340018 100644
--- a/src/tools/tqglist.h
+++ b/src/tools/tqglist.h
@@ -103,8 +103,8 @@ protected:
void sort(); // sort all items;
void clear(); // remove all items
- int findRef( TQPtrCollection::Item, bool = TRUE ); // find exact item in list
- int find( TQPtrCollection::Item, bool = TRUE ); // find equal item in list
+ int findRef( TQPtrCollection::Item, bool = true ); // find exact item in list
+ int find( TQPtrCollection::Item, bool = true ); // find equal item in list
uint containsRef( TQPtrCollection::Item ) const; // get number of exact matches
uint contains( TQPtrCollection::Item ) const; // get number of equal matches
diff --git a/src/tools/tqglobal.cpp b/src/tools/tqglobal.cpp
index 038e1225c..14ed0d40b 100644
--- a/src/tools/tqglobal.cpp
+++ b/src/tools/tqglobal.cpp
@@ -72,9 +72,9 @@ const char *tqVersion()
bool tqSharedBuild()
{
#ifdef QT_SHARED
- return TRUE;
+ return true;
#else
- return FALSE;
+ return false;
#endif
}
@@ -82,7 +82,7 @@ bool tqSharedBuild()
System detection routines
*****************************************************************************/
-static bool si_alreadyDone = FALSE;
+static bool si_alreadyDone = false;
static int si_wordSize;
static bool si_bigEndian;
@@ -92,12 +92,12 @@ static bool si_bigEndian;
Obtains information about the system.
The system's word size in bits (typically 32) is returned in \a
- *wordSize. The \a *bigEndian is set to TRUE if this is a big-endian
- machine, or to FALSE if this is a little-endian machine.
+ *wordSize. The \a *bigEndian is set to true if this is a big-endian
+ machine, or to false if this is a little-endian machine.
In debug mode, this function calls tqFatal() with a message if the
computer is truly weird (i.e. different endianness for 16 bit and
- 32 bit integers); in release mode it returns FALSE.
+ 32 bit integers); in release mode it returns false.
*/
bool tqSysInfo( int *wordSize, bool *bigEndian )
@@ -110,7 +110,7 @@ bool tqSysInfo( int *wordSize, bool *bigEndian )
if ( si_alreadyDone ) { // run it only once
*wordSize = si_wordSize;
*bigEndian = si_bigEndian;
- return TRUE;
+ return true;
}
si_wordSize = 0;
@@ -127,14 +127,14 @@ bool tqSysInfo( int *wordSize, bool *bigEndian )
#if defined(QT_CHECK_RANGE)
tqFatal( "qSysInfo: Unsupported system word size %d", *wordSize );
#endif
- return FALSE;
+ return false;
}
if ( sizeof(TQ_INT8) != 1 || sizeof(TQ_INT16) != 2 || sizeof(TQ_INT32) != 4 ||
sizeof(TQ_ULONG)*8 != si_wordSize || sizeof(float) != 4 || sizeof(double) != 8 ) {
#if defined(QT_CHECK_RANGE)
tqFatal( "qSysInfo: Unsupported system data type size" );
#endif
- return FALSE;
+ return false;
}
bool be16, be32; // determine byte ordering
@@ -146,10 +146,10 @@ bool tqSysInfo( int *wordSize, bool *bigEndian )
p = (unsigned char *)(&nl); // 32-bit integer
if ( p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78 )
- be32 = TRUE;
+ be32 = true;
else
if ( p[0] == 0x78 && p[1] == 0x56 && p[2] == 0x34 && p[3] == 0x12 )
- be32 = FALSE;
+ be32 = false;
else
be32 = !be16;
@@ -157,12 +157,12 @@ bool tqSysInfo( int *wordSize, bool *bigEndian )
#if defined(QT_CHECK_RANGE)
tqFatal( "qSysInfo: Inconsistent system byte order" );
#endif
- return FALSE;
+ return false;
}
*bigEndian = si_bigEndian = be32;
- si_alreadyDone = TRUE;
- return TRUE;
+ si_alreadyDone = true;
+ return true;
}
#if defined(Q_OS_MAC)
@@ -220,9 +220,9 @@ TQString p2qstring(const unsigned char *c) {
int qMacVersion()
{
static int macver = TQt::MV_Unknown;
- static bool first = TRUE;
+ static bool first = true;
if(first) {
- first = FALSE;
+ first = false;
long gestalt_version;
if(Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) {
macver = ((gestalt_version & 0x00f0) >> 4) + 2;
@@ -330,10 +330,10 @@ int qWinVersion()
#if defined(UNICODE)
if ( winver & TQt::WV_NT_based )
- qt_winunicode = TRUE;
+ qt_winunicode = true;
else
#endif
- qt_winunicode = FALSE;
+ qt_winunicode = false;
return winver;
}
@@ -641,7 +641,7 @@ void tqSystemWarning( const char* msg, int code )
\relates TQApplication
Prints a warning message containing the source code file name and
- line number if \a test is FALSE.
+ line number if \a test is false.
This is really a macro defined in \c tqglobal.h.
@@ -703,7 +703,7 @@ bool tqt_check_pointer( bool c, const char *n, int l )
{
if ( c )
tqWarning( "In file %s, line %d: Out of memory", n, l );
- return TRUE;
+ return true;
}
@@ -724,12 +724,12 @@ static bool firstObsoleteWarning(const char *obj, const char *oldfunc )
s += oldfunc;
if ( obsoleteDict->find(s.data()) == 0 ) {
obsoleteDict->insert( s.data(), (int*)1 ); // anything different from 0
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-static bool suppressObsolete = FALSE;
+static bool suppressObsolete = false;
void tqSuppressObsoleteWarnings( bool suppress )
{
diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h
index a227392a3..941416ee8 100644
--- a/src/tools/tqglobal.h
+++ b/src/tools/tqglobal.h
@@ -554,14 +554,8 @@ typedef const char *pcchar;
//
#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
+const bool FALSE = false;
+const bool TRUE = true;
#endif
//
@@ -915,7 +909,7 @@ TQ_EXPORT TQtMsgHandler qInstallMsgHandler( TQtMsgHandler );
typedef TQtMsgHandler msg_handler;
#endif // TQT_NO_COMPAT
-TQ_EXPORT void tqSuppressObsoleteWarnings( bool = TRUE );
+TQ_EXPORT void tqSuppressObsoleteWarnings( bool = true );
TQ_EXPORT void tqObsolete( const char *obj, const char *oldfunc,
const char *newfunc );
@@ -952,7 +946,7 @@ TQ_EXPORT const char *tqInstallPathShare();
# define TQ_DUMMY_COMPARISON_OPERATOR(C) \
bool operator==( const C& ) const { \
tqWarning( #C"::operator==( const "#C"& ) got called." ); \
- return FALSE; \
+ return false; \
}
#else
# define TQ_DUMMY_COMPARISON_OPERATOR(C)
diff --git a/src/tools/tqgpluginmanager.cpp b/src/tools/tqgpluginmanager.cpp
index 94b5a6435..a19532136 100644
--- a/src/tools/tqgpluginmanager.cpp
+++ b/src/tools/tqgpluginmanager.cpp
@@ -264,13 +264,13 @@ static int similarity( const TQString& s1, const TQString& s2 )
*/
/*!
- \fn TQPluginManager::TQPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = TRUE )
+ \fn TQPluginManager::TQPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = true )
Creates an TQPluginManager for interfaces \a id that will load all shared library files in the \a paths + \a suffix.
- If \a cs is FALSE the manager will handle feature strings case insensitive.
+ If \a cs is false the manager will handle feature strings case insensitive.
\warning
- Setting the cs flag to FALSE requires that components also convert to lower case when comparing with passed strings, so this has
+ Setting the cs flag to false requires that components also convert to lower case when comparing with passed strings, so this has
to be handled with care and documented very well.
\sa TQApplication::libraryPaths()
@@ -290,10 +290,10 @@ static int similarity( const TQString& s1, const TQString& s2 )
#include <tqptrlist.h>
TQGPluginManager::TQGPluginManager( const TQUuid& id, const TQStringList& paths, const TQString &suffix, bool cs )
- : interfaceId( id ), plugDict( 17, cs ), casesens( cs ), autounload( TRUE )
+ : interfaceId( id ), plugDict( 17, cs ), casesens( cs ), autounload( true )
{
// Every TQLibrary object is destroyed on destruction of the manager
- libDict.setAutoDelete( TRUE );
+ libDict.setAutoDelete( true );
for ( TQStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it ) {
TQString path = *it;
addLibraryPath( path + suffix );
@@ -307,14 +307,14 @@ TQGPluginManager::~TQGPluginManager()
while ( it.current() ) {
TQLibrary *lib = it.current();
++it;
- lib->setAutoUnload( FALSE );
+ lib->setAutoUnload( false );
}
}
}
void TQGPluginManager::addLibraryPath( const TQString& path )
{
- if ( !enabled() || !TQDir( path ).exists( ".", TRUE ) )
+ if ( !enabled() || !TQDir( path ).exists( ".", true ) )
return;
#if defined(Q_OS_WIN32)
@@ -393,7 +393,7 @@ const TQLibrary* TQGPluginManager::library( const TQString& feature ) const
that->addLibrary( new TQComLibrary( lib ) );
} else {
TQPtrList<TQComLibrary> same;
- same.setAutoDelete( TRUE );
+ same.setAutoDelete( true );
same.append( new TQComLibrary( lib ) );
for ( TQStringList::ConstIterator bit = sameBasename.begin();
bit != sameBasename.end(); ++bit )
@@ -458,10 +458,10 @@ TQStringList TQGPluginManager::featureList() const
bool TQGPluginManager::addLibrary( TQLibrary* lib )
{
if ( !enabled() || !lib )
- return FALSE;
+ return false;
TQComLibrary* plugin = (TQComLibrary*)lib;
- bool useful = FALSE;
+ bool useful = false;
TQUnknownInterface* iFace = 0;
plugin->queryInterface( interfaceId, &iFace );
@@ -486,22 +486,22 @@ bool TQGPluginManager::addLibrary( TQLibrary* lib )
for ( TQStringList::Iterator f = fl.begin(); f != fl.end(); ++f ) {
TQLibrary *old = plugDict[*f];
if ( !old ) {
- useful = TRUE;
+ useful = true;
plugDict.replace( *f, plugin );
} else {
// we have old *and* plugin, which one to pick?
TQComLibrary* first = (TQComLibrary*)old;
TQComLibrary* second = (TQComLibrary*)plugin;
- bool takeFirst = TRUE;
+ bool takeFirst = true;
if ( first->qtVersion() != TQT_VERSION ) {
if ( second->qtVersion() == TQT_VERSION )
- takeFirst = FALSE;
+ takeFirst = false;
else if ( second->qtVersion() < TQT_VERSION &&
first->qtVersion() > TQT_VERSION )
- takeFirst = FALSE;
+ takeFirst = false;
}
if ( !takeFirst ) {
- useful = TRUE;
+ useful = true;
plugDict.replace( *f, plugin );
tqWarning("%s: Discarding feature %s in %s!",
(const char*) TQFile::encodeName( plugin->library()),
@@ -526,19 +526,19 @@ bool TQGPluginManager::addLibrary( TQLibrary* lib )
libDict.replace( plugin->library(), plugin );
if ( !libList.contains( plugin->library() ) )
libList.append( plugin->library() );
- return TRUE;
+ return true;
}
delete plugin;
- return FALSE;
+ return false;
}
bool TQGPluginManager::enabled() const
{
#ifdef QT_SHARED
- return TRUE;
+ return true;
#else
- return FALSE;
+ return false;
#endif
}
diff --git a/src/tools/tqgpluginmanager_p.h b/src/tools/tqgpluginmanager_p.h
index 123936627..8be978765 100644
--- a/src/tools/tqgpluginmanager_p.h
+++ b/src/tools/tqgpluginmanager_p.h
@@ -70,7 +70,7 @@
class TQ_EXPORT TQGPluginManager
{
public:
- TQGPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = TRUE );
+ TQGPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = true );
~TQGPluginManager();
void addLibraryPath( const TQString& path );
diff --git a/src/tools/tqgvector.cpp b/src/tools/tqgvector.cpp
index 9ee7034df..67434110f 100644
--- a/src/tools/tqgvector.cpp
+++ b/src/tools/tqgvector.cpp
@@ -233,7 +233,7 @@ bool TQGVector::insert( uint index, Item d ) // insert item at index
#if defined(QT_CHECK_RANGE)
if ( index >= len ) { // range error
tqWarning( "TQGVector::insert: Index %d out of range", index );
- return FALSE;
+ return false;
}
#endif
if ( vec[index] ) { // remove old item
@@ -248,7 +248,7 @@ bool TQGVector::insert( uint index, Item d ) // insert item at index
} else {
vec[index] = 0; // reset item
}
- return TRUE;
+ return true;
}
bool TQGVector::remove( uint index ) // remove item at index
@@ -256,7 +256,7 @@ bool TQGVector::remove( uint index ) // remove item at index
#if defined(QT_CHECK_RANGE)
if ( index >= len ) { // range error
tqWarning( "TQGVector::remove: Index %d out of range", index );
- return FALSE;
+ return false;
}
#endif
if ( vec[index] ) { // valid item
@@ -264,7 +264,7 @@ bool TQGVector::remove( uint index ) // remove item at index
vec[index] = 0; // reset pointer
numItems--;
}
- return TRUE;
+ return true;
}
TQPtrCollection::Item TQGVector::take( uint index ) // take out item
@@ -298,7 +298,7 @@ void TQGVector::clear() // clear vector
bool TQGVector::resize( uint newsize ) // resize array
{
if ( newsize == len ) // nothing to do
- return TRUE;
+ return true;
if ( vec ) { // existing data
if ( newsize < len ) { // shrink vector
uint i = newsize;
@@ -314,36 +314,36 @@ bool TQGVector::resize( uint newsize ) // resize array
DELETE(vec);
vec = 0;
len = numItems = 0;
- return TRUE;
+ return true;
}
#if defined(DONT_USE_REALLOC)
if ( newsize == 0 ) {
DELETE(vec);
vec = 0;
- return FALSE;
+ return false;
}
Item *newvec = NEW(Item,newsize); // manual realloc
if (!newvec)
- return FALSE;
+ return false;
memcpy( newvec, vec, (len < newsize ? len : newsize)*sizeof(Item) );
DELETE(vec);
vec = newvec;
#else
Item *newvec = (Item*)realloc( (char *)vec, newsize*sizeof(Item) );
if (!newvec)
- return FALSE;
+ return false;
vec = newvec;
#endif
} else { // create new vector
vec = NEW(Item,newsize);
if (!vec)
- return FALSE;
+ return false;
len = numItems = 0;
}
if ( newsize > len ) // init extra space added
memset( (void*)&vec[len], 0, (newsize-len)*sizeof(Item) );
len = newsize;
- return TRUE;
+ return true;
}
@@ -352,10 +352,10 @@ bool TQGVector::fill( Item d, int flen ) // resize and fill vector
if ( flen < 0 )
flen = len; // default: use vector length
else if ( !resize( flen ) )
- return FALSE;
+ return false;
for ( uint i=0; i<(uint)flen; i++ ) // insert d at every index
insert( i, d );
- return TRUE;
+ return true;
}
@@ -424,7 +424,7 @@ int TQGVector::bsearch( Item d ) const // binary search; when sorted
int n1 = 0;
int n2 = len - 1;
int mid = 0;
- bool found = FALSE;
+ bool found = false;
while ( n1 <= n2 ) {
int res;
mid = (n1 + n2)/2;
@@ -437,7 +437,7 @@ int TQGVector::bsearch( Item d ) const // binary search; when sorted
else if ( res > 0 )
n1 = mid + 1;
else { // found it
- found = TRUE;
+ found = true;
break;
}
}
@@ -507,10 +507,10 @@ bool TQGVector::insertExpand( uint index, Item d )// insert and grow if necessar
{
if ( index >= len ) {
if ( !resize( index+1 ) ) // no memory
- return FALSE;
+ return false;
}
insert( index, d );
- return TRUE;
+ return true;
}
void TQGVector::toList( TQGList *list ) const // store items in list
@@ -581,14 +581,14 @@ TQDataStream &TQGVector::write( TQDataStream &s ) const
bool TQGVector::operator==( const TQGVector &v ) const
{
if ( size() != v.size() )
- return FALSE;
+ return false;
if ( count() != v.count() )
- return FALSE;
+ return false;
for ( int i = 0; i < (int)size(); ++i ) {
if ( ( (TQGVector*)this )->compareItems( at( i ), v.at( i ) ) != 0 )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif // TQT_NO_DATASTREAM
diff --git a/src/tools/tqintcache.h b/src/tools/tqintcache.h
index 7a22d1cd5..32903d537 100644
--- a/src/tools/tqintcache.h
+++ b/src/tools/tqintcache.h
@@ -57,7 +57,7 @@ class TQIntCache
public:
TQIntCache( const TQIntCache<type> &c ) : TQGCache(c) {}
TQIntCache( int maxCost=100, int size=17 )
- : TQGCache( maxCost, size, IntKey, FALSE, FALSE ) {}
+ : TQGCache( maxCost, size, IntKey, false, false ) {}
~TQIntCache() { clear(); }
TQIntCache<type> &operator=( const TQIntCache<type> &c )
{ return (TQIntCache<type>&)TQGCache::operator=(c); }
@@ -74,7 +74,7 @@ public:
type *take( long k )
{ return (type *)TQGCache::take_other((const char*)k);}
void clear() { TQGCache::clear(); }
- type *find( long k, bool ref=TRUE ) const
+ type *find( long k, bool ref=true ) const
{ return (type *)TQGCache::find_other( (const char*)k,ref);}
type *operator[]( long k ) const
{ return (type *)TQGCache::find_other( (const char*)k); }
diff --git a/src/tools/tqiodevice.cpp b/src/tools/tqiodevice.cpp
index 014a18d46..06dedb383 100644
--- a/src/tools/tqiodevice.cpp
+++ b/src/tools/tqiodevice.cpp
@@ -134,7 +134,7 @@
\i CR/LF translation. For simplicity, applications often like to
see just a single CR/LF style, and TQIODevice subclasses can
- provide this. isTranslated() returns TRUE if this object
+ provide this. isTranslated() returns true if this object
translates CR/LF to just LF. (This can often be set by the
application in the call to open().)
@@ -143,7 +143,7 @@
whether it can read from and write to a given device. (This can
often be set by the application in the call to open().)
- \i Finally, isOpen() returns TRUE if the device is open, i.e.
+ \i Finally, isOpen() returns true if the device is open, i.e.
after an open() call.
\endlist
@@ -247,8 +247,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isDirectAccess() const
- Returns TRUE if the I/O device is a direct access device;
- otherwise returns FALSE, i.e. if the device is a sequential access
+ Returns true if the I/O device is a direct access device;
+ otherwise returns false, i.e. if the device is a sequential access
device.
\sa isSequentialAccess()
@@ -257,8 +257,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isSequentialAccess() const
- Returns TRUE if the device is a sequential access device;
- otherwise returns FALSE, i.e. if the device is a direct access
+ Returns true if the device is a sequential access device;
+ otherwise returns false, i.e. if the device is a direct access
device.
Operations involving size() and at(int) are not valid on
@@ -270,8 +270,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isCombinedAccess() const
- Returns TRUE if the I/O device is a combined access (both direct
- and sequential) device; otherwise returns FALSE.
+ Returns true if the I/O device is a combined access (both direct
+ and sequential) device; otherwise returns false.
This access method is currently not in use.
*/
@@ -279,8 +279,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isBuffered() const
- Returns TRUE if the I/O device is a buffered device; otherwise
- returns FALSE, i.e. the device is a raw device.
+ Returns true if the I/O device is a buffered device; otherwise
+ returns false, i.e. the device is a raw device.
\sa isRaw()
*/
@@ -288,8 +288,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isRaw() const
- Returns TRUE if the device is a raw device; otherwise returns
- FALSE, i.e. if the device is a buffered device.
+ Returns true if the device is a raw device; otherwise returns
+ false, i.e. if the device is a buffered device.
\sa isBuffered()
*/
@@ -297,8 +297,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isSynchronous() const
- Returns TRUE if the I/O device is a synchronous device; otherwise
- returns FALSE, i.e. the device is an asynchronous device.
+ Returns true if the I/O device is a synchronous device; otherwise
+ returns false, i.e. the device is an asynchronous device.
\sa isAsynchronous()
*/
@@ -306,8 +306,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isAsynchronous() const
- Returns TRUE if the device is an asynchronous device; otherwise
- returns FALSE, i.e. if the device is a synchronous device.
+ Returns true if the device is an asynchronous device; otherwise
+ returns false, i.e. if the device is a synchronous device.
This mode is currently not in use.
@@ -317,8 +317,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isTranslated() const
- Returns TRUE if the I/O device translates carriage-return and
- linefeed characters; otherwise returns FALSE.
+ Returns true if the I/O device translates carriage-return and
+ linefeed characters; otherwise returns false.
A TQFile is translated if it is opened with the \c IO_Translate
mode flag.
@@ -327,8 +327,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isReadable() const
- Returns TRUE if the I/O device was opened using \c IO_ReadOnly or
- \c IO_ReadWrite mode; otherwise returns FALSE.
+ Returns true if the I/O device was opened using \c IO_ReadOnly or
+ \c IO_ReadWrite mode; otherwise returns false.
\sa isWritable(), isReadWrite()
*/
@@ -336,8 +336,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isWritable() const
- Returns TRUE if the I/O device was opened using \c IO_WriteOnly or
- \c IO_ReadWrite mode; otherwise returns FALSE.
+ Returns true if the I/O device was opened using \c IO_WriteOnly or
+ \c IO_ReadWrite mode; otherwise returns false.
\sa isReadable(), isReadWrite()
*/
@@ -345,8 +345,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isReadWrite() const
- Returns TRUE if the I/O device was opened using \c IO_ReadWrite
- mode; otherwise returns FALSE.
+ Returns true if the I/O device was opened using \c IO_ReadWrite
+ mode; otherwise returns false.
\sa isReadable(), isWritable()
*/
@@ -354,8 +354,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isInactive() const
- Returns TRUE if the I/O device state is 0, i.e. the device is not
- open; otherwise returns FALSE.
+ Returns true if the I/O device state is 0, i.e. the device is not
+ open; otherwise returns false.
\sa isOpen()
*/
@@ -363,8 +363,8 @@ TQIODevice::~TQIODevice()
/*!
\fn bool TQIODevice::isOpen() const
- Returns TRUE if the I/O device has been opened; otherwise returns
- FALSE.
+ Returns true if the I/O device has been opened; otherwise returns
+ false.
\sa isInactive()
*/
@@ -376,7 +376,7 @@ TQIODevice::~TQIODevice()
Returns the I/O device status.
The I/O device status returns an error code. If open() returns
- FALSE or readBlock() or writeBlock() return -1, this function can
+ false or readBlock() or writeBlock() return -1, this function can
be called to find out the reason why the operation failed.
\keyword IO_Ok
@@ -482,8 +482,8 @@ void TQIODevice::setStatus( int s )
/*!
\fn bool TQIODevice::open( int mode )
- Opens the I/O device using the specified \a mode. Returns TRUE if
- the device was successfully opened; otherwise returns FALSE.
+ Opens the I/O device using the specified \a mode. Returns true if
+ the device was successfully opened; otherwise returns false.
The mode parameter \a mode must be an OR'ed combination of the
following flags.
@@ -558,8 +558,8 @@ TQIODevice::Offset TQIODevice::at() const
*/
/*!
Virtual function that sets the I/O device position to \a pos.
- Returns TRUE if the position was successfully set, i.e. \a pos is
- within range and the seek was successful; otherwise returns FALSE.
+ Returns true if the position was successfully set, i.e. \a pos is
+ within range and the seek was successful; otherwise returns false.
\sa size()
*/
@@ -569,16 +569,16 @@ bool TQIODevice::at( Offset pos )
#if defined(QT_CHECK_RANGE)
if ( pos > size() ) {
tqWarning( "TQIODevice::at: Index %lu out of range", pos );
- return FALSE;
+ return false;
}
#endif
ioIndex = pos;
- return TRUE;
+ return true;
}
/*!
- Virtual function that returns TRUE if the I/O device position is
- at the end of the input; otherwise returns FALSE.
+ Virtual function that returns true if the I/O device position is
+ at the end of the input; otherwise returns false.
*/
bool TQIODevice::atEnd() const
diff --git a/src/tools/tqlibrary.cpp b/src/tools/tqlibrary.cpp
index 05ceee649..947492f39 100644
--- a/src/tools/tqlibrary.cpp
+++ b/src/tools/tqlibrary.cpp
@@ -138,7 +138,7 @@ TQLibraryPrivate::TQLibraryPrivate( TQLibrary *lib )
\sa load() unload(), setAutoUnload()
*/
TQLibrary::TQLibrary( const TQString& filename )
- : libfile( filename ), aunload( TRUE )
+ : libfile( filename ), aunload( true )
{
libfile.replace( '\\', '/' );
d = new TQLibraryPrivate( this );
@@ -147,7 +147,7 @@ TQLibrary::TQLibrary( const TQString& filename )
/*!
Deletes the TQLibrary object.
- The library will be unloaded if autoUnload() is TRUE (the
+ The library will be unloaded if autoUnload() is true (the
default), otherwise it stays in memory until the application
exits.
@@ -254,7 +254,7 @@ void *TQLibrary::resolve( const char* symb )
\code
typedef void (*FunctionType)();
static FunctionType *ptrFunction = 0;
- static bool triedResolve = FALSE;
+ static bool triedResolve = false;
if ( !ptrFunction && !triedResolve )
ptrFunction = TQLibrary::resolve( "mylib", "mysymb" );
@@ -272,12 +272,12 @@ void *TQLibrary::resolve( const char* symb )
void *TQLibrary::resolve( const TQString &filename, const char *symb )
{
TQLibrary lib( filename );
- lib.setAutoUnload( FALSE );
+ lib.setAutoUnload( false );
return lib.resolve( symb );
}
/*!
- Returns TRUE if the library is loaded; otherwise returns FALSE.
+ Returns true if the library is loaded; otherwise returns false.
\sa unload()
*/
@@ -321,13 +321,13 @@ bool TQLibrary::isLoaded() const
bool TQLibrary::load()
{
if (libfile.isEmpty())
- return FALSE;
+ return false;
return d->loadLibrary();
}
/*!
- Unloads the library and returns TRUE if the library could be
- unloaded; otherwise returns FALSE.
+ Unloads the library and returns true if the library could be
+ unloaded; otherwise returns false.
This function is called by the destructor if autoUnload() is
enabled.
@@ -337,14 +337,14 @@ bool TQLibrary::load()
bool TQLibrary::unload()
{
if ( !d->pHnd )
- return TRUE;
+ return true;
#if !defined(TQT_NO_LIBRARY_UNLOAD)
if ( !d->freeLibrary() ) {
# if defined(QT_DEBUG_COMPONENT)
tqWarning( "%s could not be unloaded", (const char*) TQFile::encodeName(library()) );
# endif
- return FALSE;
+ return false;
}
# if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
@@ -352,13 +352,13 @@ bool TQLibrary::unload()
# endif
d->pHnd = 0;
#endif
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if the library will be automatically unloaded when
- this wrapper object is destructed; otherwise returns FALSE. The
- default is TRUE.
+ Returns true if the library will be automatically unloaded when
+ this wrapper object is destructed; otherwise returns false. The
+ default is true.
\sa setAutoUnload()
*/
@@ -368,9 +368,9 @@ bool TQLibrary::autoUnload() const
}
/*!
- If \a enabled is TRUE (the default), the wrapper object is set to
+ If \a enabled is true (the default), the wrapper object is set to
automatically unload the library upon destruction. If \a enabled
- is FALSE, the wrapper object is not unloaded unless you explicitly
+ is false, the wrapper object is not unloaded unless you explicitly
call unload().
\sa autoUnload()
@@ -412,7 +412,7 @@ TQString TQLibrary::library() const
#else
filters << ".so";
#endif
- for(TQStringList::Iterator it = filters.begin(); TRUE; ) {
+ for(TQStringList::Iterator it = filters.begin(); true; ) {
TQString filter = (*it);
++it;
diff --git a/src/tools/tqlibrary_unix.cpp b/src/tools/tqlibrary_unix.cpp
index c541625d9..7e2997087 100644
--- a/src/tools/tqlibrary_unix.cpp
+++ b/src/tools/tqlibrary_unix.cpp
@@ -61,7 +61,7 @@
bool TQLibraryPrivate::loadLibrary()
{
if ( pHnd )
- return TRUE;
+ return true;
TQString filename = library->library();
@@ -76,17 +76,17 @@ bool TQLibraryPrivate::loadLibrary()
bool TQLibraryPrivate::freeLibrary()
{
if ( !pHnd )
- return TRUE;
+ return true;
if ( shl_unload( (shl_t)pHnd ) ) {
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
TQString filename = library->library();
tqWarning( "%s: Failed to unload library!", filename.latin1() );
#endif
- return FALSE;
+ return false;
}
pHnd = 0;
- return TRUE;
+ return true;
}
void* TQLibraryPrivate::resolveSymbol( const char* symbol )
@@ -113,7 +113,7 @@ void* TQLibraryPrivate::resolveSymbol( const char* symbol )
bool TQLibraryPrivate::loadLibrary()
{
if ( pHnd )
- return TRUE;
+ return true;
TQString filename = library->library();
@@ -128,17 +128,17 @@ bool TQLibraryPrivate::loadLibrary()
bool TQLibraryPrivate::freeLibrary()
{
if ( !pHnd )
- return TRUE;
+ return true;
if ( DL_PREFIX(dlclose)( pHnd ) ) {
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
tqWarning( "%s", DL_PREFIX(dlerror)() );
#endif
- return FALSE;
+ return false;
}
pHnd = 0;
- return TRUE;
+ return true;
}
void* TQLibraryPrivate::resolveSymbol( const char* symbol )
diff --git a/src/tools/tqlocale.cpp b/src/tools/tqlocale.cpp
index a53d34571..e3ab4305d 100644
--- a/src/tools/tqlocale.cpp
+++ b/src/tools/tqlocale.cpp
@@ -2497,7 +2497,7 @@ TQLocale::TQLocale(const TQString &name)
break;
cntry = codeToCountry(name.mid(3, 2));
- } while (FALSE);
+ } while (false);
d = findLocale(lang, cntry);
}
@@ -2675,7 +2675,7 @@ short TQLocale::toShort(const TQString &s, bool *ok) const
TQ_LLONG i = toLongLong(s, ok);
if (i < SHRT_MIN || i > SHRT_MAX) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
return (short) i;
@@ -2698,7 +2698,7 @@ ushort TQLocale::toUShort(const TQString &s, bool *ok) const
TQ_ULLONG i = toULongLong(s, ok);
if (i > USHRT_MAX) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
return (ushort) i;
@@ -2721,7 +2721,7 @@ int TQLocale::toInt(const TQString &s, bool *ok) const
TQ_LLONG i = toLongLong(s, ok);
if (i < INT_MIN || i > INT_MAX) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
return (int) i;
@@ -2744,7 +2744,7 @@ uint TQLocale::toUInt(const TQString &s, bool *ok) const
TQ_ULLONG i = toULongLong(s, ok);
if (i > UINT_MAX) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
return (uint) i;
@@ -2767,7 +2767,7 @@ TQ_LONG TQLocale::toLong(const TQString &s, bool *ok) const
TQ_LLONG i = toLongLong(s, ok);
if (i < LONG_MIN || i > LONG_MAX) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
return (TQ_LONG) i;
@@ -2790,7 +2790,7 @@ TQ_ULONG TQLocale::toULong(const TQString &s, bool *ok) const
TQ_ULLONG i = toULongLong(s, ok);
if (i > ULONG_MAX) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
return (TQ_ULONG) i;
@@ -2852,11 +2852,11 @@ float TQLocale::toFloat(const TQString &s, bool *ok) const
double d = toDouble(s, &myOk);
if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0.0;
}
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return (float) d;
}
@@ -3204,19 +3204,19 @@ TQString TQLocalePrivate::doubleToString(double d,
if (width == -1)
width = 0;
- bool negative = FALSE;
- bool special_number = FALSE; // nan, +/-inf
+ bool negative = false;
+ bool special_number = false; // nan, +/-inf
TQString num_str;
#ifdef Q_OS_WIN
// Detect special numbers (nan, +/-inf)
if (qIsInf(d)) {
num_str = infinity();
- special_number = TRUE;
+ special_number = true;
negative = d < 0;
} else if (qIsNan(d)) {
num_str = nan();
- special_number = TRUE;
+ special_number = true;
}
#else
// Comparing directly to INFINITY gives weird results on some systems.
@@ -3225,11 +3225,11 @@ TQString TQLocalePrivate::doubleToString(double d,
// Detect special numbers (nan, +/-inf)
if (d == tmp_infinity || d == -tmp_infinity) {
num_str = infinity();
- special_number = TRUE;
+ special_number = true;
negative = d < 0;
} else if (qIsNan(d)) {
num_str = nan();
- special_number = TRUE;
+ special_number = true;
}
#endif
@@ -3367,9 +3367,9 @@ TQString TQLocalePrivate::longLongToString(TQ_LLONG l, int precision,
int base, int width,
unsigned flags) const
{
- bool precision_not_specified = FALSE;
+ bool precision_not_specified = false;
if (precision == -1) {
- precision_not_specified = TRUE;
+ precision_not_specified = true;
precision = 1;
}
@@ -3378,7 +3378,7 @@ TQString TQLocalePrivate::longLongToString(TQ_LLONG l, int precision,
// these are not suported by sprintf for octal and hex
flags &= ~AlwaysShowSign;
flags &= ~BlankBeforePositive;
- negative = FALSE; // neither are negative numbers
+ negative = false; // neither are negative numbers
}
TQString num_str;
@@ -3452,9 +3452,9 @@ TQString TQLocalePrivate::unsLongLongToString(TQ_ULLONG l, int precision,
int base, int width,
unsigned flags) const
{
- bool precision_not_specified = FALSE;
+ bool precision_not_specified = false;
if (precision == -1) {
- precision_not_specified = TRUE;
+ precision_not_specified = true;
precision = 1;
}
@@ -3526,15 +3526,15 @@ bool TQLocalePrivate::removeGroupSeparators(TQString &num_str) const
if (c.unicode() == ',') {
// check that there are digits before and after the separator
if (i == 0 || !isLatin1Digit(num_str.unicode()[i - 1]))
- return FALSE;
+ return false;
if (i == num_str.length() + 1 || !isLatin1Digit(num_str.unicode()[i + 1]))
- return FALSE;
+ return false;
++group_cnt;
}
else if (c.unicode() == '.') {
// Fail if more than one decimal points
if (decpt_idx != -1)
- return FALSE;
+ return false;
decpt_idx = i;
} else if (c.unicode() == 'e' || c.unicode() == 'E') {
// an 'e' or 'E' - if we have not encountered a decimal
@@ -3546,7 +3546,7 @@ bool TQLocalePrivate::removeGroupSeparators(TQString &num_str) const
// If no group chars, we're done
if (group_cnt == 0)
- return TRUE;
+ return true;
// No decimal point means that it "is" at the end of the string
if (decpt_idx == -1)
@@ -3559,11 +3559,11 @@ bool TQLocalePrivate::removeGroupSeparators(TQString &num_str) const
if (c.unicode() == ',') {
// Don't allow group chars after the decimal point
if ((int)i > decpt_idx)
- return FALSE;
+ return false;
// Check that it is placed correctly relative to the decpt
if ((decpt_idx - i) % 4 != 0)
- return FALSE;
+ return false;
// Remove it
num_str.remove(i, 1);
@@ -3573,12 +3573,12 @@ bool TQLocalePrivate::removeGroupSeparators(TQString &num_str) const
} else {
// Check that we are not missing a separator
if ((int)i < decpt_idx && (decpt_idx - i) % 4 == 0)
- return FALSE;
+ return false;
++i;
}
}
- return TRUE;
+ return true;
}
static void stripWhiteSpaceInPlace(TQString &s)
@@ -3614,7 +3614,7 @@ bool TQLocalePrivate::numberToCLocale(TQString &l_num,
stripWhiteSpaceInPlace(l_num);
if (l_num.isEmpty())
- return FALSE;
+ return false;
for (uint idx = 0; idx < l_num.length(); ++idx) {
TQChar &c = l_num.ref(idx);
@@ -3644,14 +3644,14 @@ bool TQLocalePrivate::numberToCLocale(TQString &l_num,
else if (c.unicode() >= 'a' && c.unicode() <= 'z')
; // do nothing
else
- return FALSE;
+ return false;
}
if (group_sep_mode == ParseGroupSeparators
&& !removeGroupSeparators(l_num))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
double TQLocalePrivate::stringToDouble(TQString num,
@@ -3660,12 +3660,12 @@ double TQLocalePrivate::stringToDouble(TQString num,
{
if (!numberToCLocale(num, group_sep_mode)) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0.0;
}
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
if (num == "nan")
return NAN;
@@ -3683,7 +3683,7 @@ double TQLocalePrivate::stringToDouble(TQString num,
#ifdef QT_QLOCALE_USES_FCVT
char *endptr;
double d = strtod(num_buff, &endptr);
- _ok = TRUE;
+ _ok = true;
#else
const char *endptr;
double d = qstrtod(num_buff, &endptr, &_ok);
@@ -3691,7 +3691,7 @@ double TQLocalePrivate::stringToDouble(TQString num,
if (!_ok || *endptr != '\0') {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0.0;
}
else
@@ -3704,7 +3704,7 @@ TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
{
if (!numberToCLocale(num, group_sep_mode)) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
@@ -3715,12 +3715,12 @@ TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
if (!_ok || *endptr != '\0') {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return l;
}
@@ -3730,7 +3730,7 @@ TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
{
if (!numberToCLocale(num, group_sep_mode)) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
@@ -3741,12 +3741,12 @@ TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
if (!_ok || *endptr != '\0') {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return l;
}
@@ -3801,7 +3801,7 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
int neg, any, cutlim;
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
/*
* See strtoq for comments as to the logic used.
@@ -3812,7 +3812,7 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
} while (isspace(c));
if (c == '-') {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
if (endptr != 0)
*endptr = s - 1;
return 0;
@@ -3854,7 +3854,7 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
if (any < 0) {
acc = ULLONG_MAX;
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
}
else if (neg)
acc = (~acc) + 1;
@@ -3882,7 +3882,7 @@ static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *
int neg, any, cutlim;
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
/*
* Skip white space and pick up leading +/- sign if any.
@@ -3955,7 +3955,7 @@ static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *
if (any < 0) {
acc = neg ? LLONG_MIN : LLONG_MAX;
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
} else if (neg) {
acc = (~acc) + 1;
}
@@ -5007,7 +5007,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
CONST char decimal_point = '.';
#endif */
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
CONST char decimal_point = '.';
@@ -5192,7 +5192,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
ovfl:
// errno = ERANGE;
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
#ifdef __STDC__
rv = HUGE_VAL;
#else
@@ -5255,7 +5255,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
rv = 0.;
// errno = ERANGE;
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
if (bd0)
goto retfree;
goto ret;
diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h
index 46e4c4fbb..8689e17ee 100644
--- a/src/tools/tqmap.h
+++ b/src/tools/tqmap.h
@@ -525,7 +525,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T
// Search correct position in the tree
TQMapNodeBase* y = header;
TQMapNodeBase* x = header->parent;
- bool result = TRUE;
+ bool result = true;
while ( x != 0 ) {
result = ( k < key(x) );
y = x;
@@ -729,14 +729,14 @@ public:
bool isEmpty() const { return sh->node_count == 0; }
- iterator insert( const Key& key, const T& value, bool overwrite = TRUE );
+ iterator insert( const Key& key, const T& value, bool overwrite = true );
void remove( iterator it ) { detach(); sh->remove( it ); }
void remove( const Key& k );
#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
- bool operator==( const TQMap<Key,T>& ) const { return FALSE; }
+ bool operator==( const TQMap<Key,T>& ) const { return false; }
#ifndef TQT_NO_STL
- bool operator==( const std::map<Key,T>& ) const { return FALSE; }
+ bool operator==( const std::map<Key,T>& ) const { return false; }
#endif
#endif
@@ -769,9 +769,9 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert(
detach();
size_type n = size();
iterator it = sh->insertSingle( x.first );
- bool inserted = FALSE;
+ bool inserted = false;
if ( n < size() ) {
- inserted = TRUE;
+ inserted = true;
it.data() = x.second;
}
return TQPair<iterator,bool>( it, inserted );
diff --git a/src/tools/tqmutex.h b/src/tools/tqmutex.h
index 8009d672d..373d35128 100644
--- a/src/tools/tqmutex.h
+++ b/src/tools/tqmutex.h
@@ -59,7 +59,7 @@ class TQ_EXPORT TQMutex
friend class TQWaitConditionPrivate;
public:
- TQMutex(bool recursive = FALSE);
+ TQMutex(bool recursive = false);
virtual ~TQMutex();
void lock();
diff --git a/src/tools/tqmutex_unix.cpp b/src/tools/tqmutex_unix.cpp
index 9c793a02d..af916e3e0 100644
--- a/src/tools/tqmutex_unix.cpp
+++ b/src/tools/tqmutex_unix.cpp
@@ -61,7 +61,7 @@ typedef pthread_mutex_t Q_MUTEX_T;
class TQRealMutexPrivate : public TQMutexPrivate {
public:
- TQRealMutexPrivate(bool = FALSE);
+ TQRealMutexPrivate(bool = false);
void lock();
void unlock();
@@ -140,15 +140,15 @@ bool TQRealMutexPrivate::trylock()
int ret = pthread_mutex_trylock(&handle);
if (ret == EBUSY) {
- return FALSE;
+ return false;
} else if (ret) {
#ifdef QT_CHECK_RANGE
tqWarning("Mutex trylock failure: %s", strerror(ret));
#endif
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
int TQRealMutexPrivate::type() const
@@ -258,8 +258,8 @@ int TQRealMutexPrivate::level()
/*!
Constructs a new mutex. The mutex is created in an unlocked state.
- A recursive mutex is created if \a recursive is TRUE; a normal
- mutex is created if \a recursive is FALSE (the default). With a
+ A recursive mutex is created if \a recursive is true; a normal
+ mutex is created if \a recursive is false (the default). With a
recursive mutex, a thread can lock the same mutex multiple times
and it will not be unlocked until a corresponding number of
unlock() calls have been made.
@@ -305,8 +305,8 @@ void TQMutex::unlock()
}
/*!
- Returns TRUE if the mutex is locked by another thread; otherwise
- returns FALSE.
+ Returns true if the mutex is locked by another thread; otherwise
+ returns false.
\warning Due to differing implementations of recursive mutexes on
various platforms, calling this function from the same thread that
@@ -321,8 +321,8 @@ bool TQMutex::locked()
/*!
Attempt to lock the mutex. If the lock was obtained, this function
- returns TRUE. If another thread has locked the mutex, this
- function returns FALSE, instead of waiting for the mutex to become
+ returns true. If another thread has locked the mutex, this
+ function returns false, instead of waiting for the mutex to become
available, i.e. it does not block.
If the lock was obtained, the mutex must be unlocked with unlock()
diff --git a/src/tools/tqmutexpool.cpp b/src/tools/tqmutexpool.cpp
index a7b17da3d..74e5926dc 100644
--- a/src/tools/tqmutexpool.cpp
+++ b/src/tools/tqmutexpool.cpp
@@ -100,14 +100,14 @@ TQ_EXPORT TQMutexPool *tqt_global_mutexpool = 0;
/*!
Constructs a TQMutexPool, reserving space for \a size TQMutexes. If
- \a recursive is TRUE, all TQMutexes in the pool will be recursive
+ \a recursive is true, all TQMutexes in the pool will be recursive
mutexes; otherwise they will all be non-recursive (the default).
The TQMutexes are created when needed, and deleted when the
TQMutexPool is destructed.
*/
TQMutexPool::TQMutexPool( bool recursive, int size )
- : mutex( FALSE ), count( size ), recurs( recursive )
+ : mutex( false ), count( size ), recurs( recursive )
{
mutexes = new TQMutex*[count];
for ( int index = 0; index < count; ++index ) {
diff --git a/src/tools/tqmutexpool_p.h b/src/tools/tqmutexpool_p.h
index 9e388473e..7dbb1a02f 100644
--- a/src/tools/tqmutexpool_p.h
+++ b/src/tools/tqmutexpool_p.h
@@ -61,7 +61,7 @@
class TQ_EXPORT TQMutexPool
{
public:
- TQMutexPool( bool recursive = FALSE, int size = 17 );
+ TQMutexPool( bool recursive = false, int size = 17 );
~TQMutexPool();
TQMutex *get( void *address );
diff --git a/src/tools/tqpluginmanager_p.h b/src/tools/tqpluginmanager_p.h
index 4e42eed0f..1f033ed53 100644
--- a/src/tools/tqpluginmanager_p.h
+++ b/src/tools/tqpluginmanager_p.h
@@ -63,7 +63,7 @@ template<class Type>
class TQPluginManager : public TQGPluginManager
{
public:
- TQPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = TRUE )
+ TQPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = true )
: TQGPluginManager( id, paths, suffix, cs ) {}
TQRESULT queryInterface(const TQString& feature, Type** iface) const
{
diff --git a/src/tools/tqptrcollection.cpp b/src/tools/tqptrcollection.cpp
index 7a9258c5e..ef59e462e 100644
--- a/src/tools/tqptrcollection.cpp
+++ b/src/tools/tqptrcollection.cpp
@@ -79,7 +79,7 @@
/*!
\fn TQPtrCollection::TQPtrCollection( const TQPtrCollection & source )
- Constructs a copy of \a source with autoDelete() set to FALSE. The
+ Constructs a copy of \a source with autoDelete() set to false. The
constructor is protected because TQPtrCollection is an abstract
class.
@@ -98,7 +98,7 @@
/*!
\fn bool TQPtrCollection::autoDelete() const
- Returns the setting of the auto-delete option. The default is FALSE.
+ Returns the setting of the auto-delete option. The default is false.
\sa setAutoDelete()
*/
@@ -107,13 +107,13 @@
\fn void TQPtrCollection::setAutoDelete( bool enable )
Sets the collection to auto-delete its contents if \a enable is
- TRUE and to never delete them if \a enable is FALSE.
+ true and to never delete them if \a enable is false.
If auto-deleting is turned on, all the items in a collection are
deleted when the collection itself is deleted. This is convenient
if the collection has the only pointer to the items.
- The default setting is FALSE, for safety. If you turn it on, be
+ The default setting is false, for safety. If you turn it on, be
careful about copying the collection - you might find yourself
with two collections deleting the same items.
diff --git a/src/tools/tqptrcollection.h b/src/tools/tqptrcollection.h
index 424512627..41e8b11c2 100644
--- a/src/tools/tqptrcollection.h
+++ b/src/tools/tqptrcollection.h
@@ -62,11 +62,11 @@ public:
typedef void *Item; // generic collection item
protected:
- TQPtrCollection() { del_item = FALSE; } // no deletion of objects
- TQPtrCollection(const TQPtrCollection &) { del_item = FALSE; }
+ TQPtrCollection() { del_item = false; } // no deletion of objects
+ TQPtrCollection(const TQPtrCollection &) { del_item = false; }
virtual ~TQPtrCollection() {}
- bool del_item; // default FALSE
+ bool del_item; // default false
virtual Item newItem( Item ); // create object
virtual void deleteItem( Item ) = 0; // delete object
diff --git a/src/tools/tqptrlist.h b/src/tools/tqptrlist.h
index 861dbc031..ef63382c6 100644
--- a/src/tools/tqptrlist.h
+++ b/src/tools/tqptrlist.h
@@ -96,9 +96,9 @@ public:
void clear() { TQGList::clear(); }
void sort() { TQGList::sort(); }
int find( const type *d ) { return TQGList::find((TQPtrCollection::Item)d); }
- int findNext( const type *d ) { return TQGList::find((TQPtrCollection::Item)d,FALSE); }
+ int findNext( const type *d ) { return TQGList::find((TQPtrCollection::Item)d,false); }
int findRef( const type *d ) { return TQGList::findRef((TQPtrCollection::Item)d); }
- int findNextRef( const type *d ){ return TQGList::findRef((TQPtrCollection::Item)d,FALSE);}
+ int findNextRef( const type *d ){ return TQGList::findRef((TQPtrCollection::Item)d,false);}
uint contains( const type *d ) const { return TQGList::contains((TQPtrCollection::Item)d); }
uint containsRef( const type *d ) const
{ return TQGList::containsRef((TQPtrCollection::Item)d); }
diff --git a/src/tools/tqregexp.cpp b/src/tools/tqregexp.cpp
index 6ed3e3a15..5eddb8e0c 100644
--- a/src/tools/tqregexp.cpp
+++ b/src/tools/tqregexp.cpp
@@ -529,11 +529,11 @@
example, to match the Perl regexp <b>ro+?m</b> requires:
\code
TQRegExp rx( "ro+m" );
- rx.setMinimal( TRUE );
+ rx.setMinimal( true );
\endcode
The equivalent of Perl's \c{/i} option is
- setCaseSensitive(FALSE).
+ setCaseSensitive(false).
Perl's \c{/g} option can be emulated using a \link
#cap_in_a_loop loop \endlink.
@@ -694,10 +694,10 @@
\code
TQRegExp rx( "*.html" ); // invalid regexp: * doesn't quantify anything
- rx.setWildcard( TRUE ); // now it's a valid wildcard regexp
- rx.exactMatch( "index.html" ); // returns TRUE
- rx.exactMatch( "default.htm" ); // returns FALSE
- rx.exactMatch( "readme.txt" ); // returns FALSE
+ rx.setWildcard( true ); // now it's a valid wildcard regexp
+ rx.exactMatch( "index.html" ); // returns true
+ rx.exactMatch( "default.htm" ); // returns false
+ rx.exactMatch( "readme.txt" ); // returns false
\endcode
Wildcard matching can be convenient because of its simplicity, but
@@ -1219,7 +1219,7 @@ private:
void parseExpression( Box *box );
int yyTok; // the last token read
- bool yyMayCapture; // set this to FALSE to disable capturing
+ bool yyMayCapture; // set this to false to disable capturing
/*
This is the engine state during matching.
@@ -1260,7 +1260,7 @@ TQRegExpEngine::TQRegExpEngine( const TQString& rx, bool caseSensitive )
valid = ( parse(rx.unicode(), rx.length()) == (int) rx.length() );
if ( !valid ) {
#ifndef TQT_NO_REGEXP_OPTIM
- trivial = FALSE;
+ trivial = false;
#endif
error( RXERR_LEFTDELIM );
}
@@ -1280,7 +1280,7 @@ void TQRegExpEngine::match( const TQString& str, int pos, bool minimal,
bool oneTest, int caretIndex,
TQMemArray<int>& captured )
{
- bool matched = FALSE;
+ bool matched = false;
#ifndef TQT_NO_REGEXP_OPTIM
if ( trivial && !oneTest ) {
@@ -1483,9 +1483,9 @@ void TQRegExpEngine::addAnchors( int from, int to, int a )
void TQRegExpEngine::heuristicallyChooseHeuristic()
{
if ( minl == 0 ) {
- useGoodStringHeuristic = FALSE;
+ useGoodStringHeuristic = false;
} else if ( trivial ) {
- useGoodStringHeuristic = TRUE;
+ useGoodStringHeuristic = true;
} else {
/*
Magic formula: The good string has to constitute a good
@@ -1566,7 +1566,7 @@ void TQRegExpEngine::dump() const
void TQRegExpEngine::setup( bool caseSensitive )
{
- s.setAutoDelete( TRUE );
+ s.setAutoDelete( true );
s.resize( 32 );
ns = 0;
#ifndef TQT_NO_REGEXP_CAPTURE
@@ -1577,22 +1577,22 @@ void TQRegExpEngine::setup( bool caseSensitive )
officialncap = 0;
ncap = 0;
#ifndef TQT_NO_REGEXP_CCLASS
- cl.setAutoDelete( TRUE );
+ cl.setAutoDelete( true );
#endif
#ifndef TQT_NO_REGEXP_LOOKAHEAD
- ahead.setAutoDelete( TRUE );
+ ahead.setAutoDelete( true );
#endif
#ifndef TQT_NO_REGEXP_OPTIM
- caretAnchored = TRUE;
- trivial = TRUE;
+ caretAnchored = true;
+ trivial = true;
#endif
- valid = FALSE;
+ valid = false;
cs = caseSensitive;
#ifndef TQT_NO_REGEXP_BACKREF
nbrefs = 0;
#endif
#ifndef TQT_NO_REGEXP_OPTIM
- useGoodStringHeuristic = TRUE;
+ useGoodStringHeuristic = true;
minl = 0;
occ1.fill( 0, NumBadChars );
#endif
@@ -1659,13 +1659,13 @@ bool TQRegExpEngine::isBetterCapture( const int *begin1, const int *end1,
if ( delta != 0 )
return delta > 0;
}
- return FALSE;
+ return false;
}
#endif
/*
- Returns TRUE if anchor a matches at position mmPos + i in the input
- string, otherwise FALSE.
+ Returns true if anchor a matches at position mmPos + i in the input
+ string, otherwise false.
*/
bool TQRegExpEngine::testAnchor( int i, int a, const int *capBegin )
{
@@ -1680,24 +1680,24 @@ bool TQRegExpEngine::testAnchor( int i, int a, const int *capBegin )
if ( (a & Anchor_Caret) != 0 ) {
if ( mmPos + i != mmCaretPos )
- return FALSE;
+ return false;
}
if ( (a & Anchor_Dollar) != 0 ) {
if ( mmPos + i != mmLen )
- return FALSE;
+ return false;
}
#ifndef TQT_NO_REGEXP_ESCAPE
if ( (a & (Anchor_Word | Anchor_NonWord)) != 0 ) {
- bool before = FALSE;
- bool after = FALSE;
+ bool before = false;
+ bool after = false;
if ( mmPos + i != 0 )
before = isWord( mmIn[mmPos + i - 1] );
if ( mmPos + i != mmLen )
after = isWord( mmIn[mmPos + i] );
if ( (a & Anchor_Word) != 0 && (before == after) )
- return FALSE;
+ return false;
if ( (a & Anchor_NonWord) != 0 && (before != after) )
- return FALSE;
+ return false;
}
#endif
#ifndef TQT_NO_REGEXP_LOOKAHEAD
@@ -1707,10 +1707,10 @@ bool TQRegExpEngine::testAnchor( int i, int a, const int *capBegin )
for ( j = 0; j < (int) ahead.size(); j++ ) {
if ( (a & (Anchor_FirstLookahead << j)) != 0 ) {
TQMemArray<int> captured;
- ahead[j]->eng->match( cstr.string(), 0, TRUE, TRUE,
+ ahead[j]->eng->match( cstr.string(), 0, true, true,
mmCaretPos - mmPos - i, captured );
if ( (captured[0] == 0) == ahead[j]->neg )
- return FALSE;
+ return false;
}
}
}
@@ -1720,12 +1720,12 @@ bool TQRegExpEngine::testAnchor( int i, int a, const int *capBegin )
for ( j = 0; j < nbrefs; j++ ) {
if ( (a & (Anchor_BackRef1Empty << j)) != 0 ) {
if ( capBegin[j] != EmptyCapture )
- return FALSE;
+ return false;
}
}
#endif
#endif
- return TRUE;
+ return true;
}
#ifndef TQT_NO_REGEXP_OPTIM
@@ -1746,12 +1746,12 @@ bool TQRegExpEngine::goodStringMatch()
while ( mmPos <= to ) {
if ( matchHere() )
- return TRUE;
+ return true;
mmPos++;
}
k++;
}
- return FALSE;
+ return false;
}
bool TQRegExpEngine::badCharMatch()
@@ -1782,7 +1782,7 @@ bool TQRegExpEngine::badCharMatch()
}
if ( mmPos > lastPos )
- return FALSE;
+ return false;
for ( ;; ) {
if ( ++slideNext >= mmSlideTabSize )
@@ -1793,7 +1793,7 @@ bool TQRegExpEngine::badCharMatch()
mmSlideTab[slideHead] = 0;
} else {
if ( matchHere() )
- return TRUE;
+ return true;
}
if ( mmPos == lastPos )
@@ -1816,17 +1816,17 @@ bool TQRegExpEngine::badCharMatch()
slideHead = slideNext;
mmPos++;
}
- return FALSE;
+ return false;
}
#else
bool TQRegExpEngine::bruteMatch()
{
while ( mmPos <= mmLen ) {
if ( matchHere() )
- return TRUE;
+ return true;
mmPos++;
}
- return FALSE;
+ return false;
}
#endif
@@ -1837,7 +1837,7 @@ bool TQRegExpEngine::matchHere()
{
int ncur = 1, nnext = 0;
int i = 0, j, k, m;
- bool stop = FALSE;
+ bool stop = false;
mmMatchLen = -1;
mmOneTestMatchedLen = -1;
@@ -1869,7 +1869,7 @@ bool TQRegExpEngine::matchHere()
for ( k = 0; k < (int) outs.size(); k++ ) {
int next = outs[k];
State *snext = s[next];
- bool in = TRUE;
+ bool in = true;
#ifndef TQT_NO_REGEXP_BACKREF
int needSomeSleep = 0;
#endif
@@ -1880,7 +1880,7 @@ bool TQRegExpEngine::matchHere()
if ( scur->anchors != 0 ) {
int a = at( *scur->anchors, next );
if ( a != 0 && !testAnchor(i, a, mmCurCapBegin + j * ncap) )
- in = FALSE;
+ in = false;
}
/*
If indeed they are, check if the input character is
@@ -1896,7 +1896,7 @@ bool TQRegExpEngine::matchHere()
} else if ( next == FinalState ) {
mmMatchLen = i;
stop = mmMinimal;
- in = TRUE;
+ in = true;
} else if ( (m & CharClassBit) != 0 ) {
#ifndef TQT_NO_REGEXP_CCLASS
const CharClass *cc = cl[m ^ CharClassBit];
@@ -2021,11 +2021,11 @@ bool TQRegExpEngine::matchHere()
if ( scur->reenter != 0 &&
(q = at(*scur->reenter, next)) != 0 ) {
TQBitArray b;
- b.fill( FALSE, nf );
- b.setBit( q, TRUE );
+ b.fill( false, nf );
+ b.setBit( q, true );
for ( int ell = q + 1; ell < nf; ell++ ) {
if ( b.testBit(f[ell].parent) ) {
- b.setBit( ell, TRUE );
+ b.setBit( ell, true );
cap = f[ell].capture;
if ( cap >= 0 ) {
capBegin[cap] = EmptyCapture;
@@ -2138,7 +2138,7 @@ bool TQRegExpEngine::matchHere()
int next = zzZ[0];
int *capBegin = zzZ + 1;
int *capEnd = zzZ + 1 + ncap;
- bool copyOver = TRUE;
+ bool copyOver = true;
if ( (m = mmInNextStack[zzZ[0]]) == -1 ) {
m = nnext++;
@@ -2169,7 +2169,7 @@ bool TQRegExpEngine::matchHere()
&& mmSleeping.isEmpty()
#endif
)
- stop = TRUE;
+ stop = true;
tqSwap( mmCurStack, mmNextStack );
#ifndef TQT_NO_REGEXP_CAPTURE
@@ -2199,7 +2199,7 @@ bool TQRegExpEngine::matchHere()
#ifndef TQT_NO_REGEXP_CCLASS
TQRegExpEngine::CharClass::CharClass()
- : c( 0 ), n( FALSE )
+ : c( 0 ), n( false )
{
#ifndef TQT_NO_REGEXP_OPTIM
occ1.fill( NoOccurrence, NumBadChars );
@@ -2222,7 +2222,7 @@ void TQRegExpEngine::CharClass::clear()
{
c = 0;
r.resize( 0 );
- n = FALSE;
+ n = false;
}
void TQRegExpEngine::CharClass::setNegative( bool negative )
@@ -2818,7 +2818,7 @@ int TQRegExpEngine::getToken()
return Tok_Quantifier;
case '.':
#ifndef TQT_NO_REGEXP_CCLASS
- yyCharClass->setNegative( TRUE );
+ yyCharClass->setNegative( true );
#endif
return Tok_CharClass;
case '?':
@@ -2828,19 +2828,19 @@ int TQRegExpEngine::getToken()
case '[':
#ifndef TQT_NO_REGEXP_CCLASS
if ( yyCh == '^' ) {
- yyCharClass->setNegative( TRUE );
+ yyCharClass->setNegative( true );
yyCh = getChar();
}
- charPending = FALSE;
- rangePending = FALSE;
+ charPending = false;
+ rangePending = false;
do {
if ( yyCh == '-' && charPending && !rangePending ) {
- rangePending = TRUE;
+ rangePending = true;
yyCh = getChar();
} else {
if ( charPending && !rangePending ) {
yyCharClass->addSingleton( pendingCh );
- charPending = FALSE;
+ charPending = false;
}
if ( yyCh == '\\' ) {
yyCh = getChar();
@@ -2855,17 +2855,17 @@ int TQRegExpEngine::getToken()
if ( rangePending ) {
yyCharClass->addSingleton( '-' );
yyCharClass->addSingleton( pendingCh );
- charPending = FALSE;
- rangePending = FALSE;
+ charPending = false;
+ rangePending = false;
}
} else if ( (tok & Tok_Char) != 0 ) {
if ( rangePending ) {
yyCharClass->addRange( pendingCh, tok ^ Tok_Char );
- charPending = FALSE;
- rangePending = FALSE;
+ charPending = false;
+ rangePending = false;
} else {
pendingCh = tok ^ Tok_Char;
- charPending = TRUE;
+ charPending = true;
}
} else {
error( RXERR_CHARCLASS );
@@ -2922,17 +2922,17 @@ int TQRegExpEngine::getToken()
int TQRegExpEngine::parse( const TQChar *pattern, int len )
{
- valid = TRUE;
+ valid = true;
startTokenizer( pattern, len );
yyTok = getToken();
#ifndef TQT_NO_REGEXP_CAPTURE
- yyMayCapture = TRUE;
+ yyMayCapture = true;
#else
- yyMayCapture = FALSE;
+ yyMayCapture = false;
#endif
#ifndef TQT_NO_REGEXP_CAPTURE
- int atom = startAtom( FALSE );
+ int atom = startAtom( false );
#endif
CharClass anything;
Box box( this ); // create InitialState
@@ -3002,7 +3002,7 @@ int TQRegExpEngine::parse( const TQChar *pattern, int len )
(*a & Anchor_Alternation) != 0 ||
#endif
(*a & Anchor_Caret) == 0 ) {
- caretAnchored = FALSE;
+ caretAnchored = false;
break;
}
}
@@ -3023,7 +3023,7 @@ void TQRegExpEngine::parseAtom( Box *box )
box->set( TQChar(yyTok ^ Tok_Char) );
} else {
#ifndef TQT_NO_REGEXP_OPTIM
- trivial = FALSE;
+ trivial = false;
#endif
switch ( yyTok ) {
case Tok_Dollar:
@@ -3113,7 +3113,7 @@ void TQRegExpEngine::parseFactor( Box *box )
if ( yyTok == Tok_Quantifier ) {
#ifndef TQT_NO_REGEXP_OPTIM
- trivial = FALSE;
+ trivial = false;
#endif
if ( yyMaxRep == InftyRep ) {
box->plus( atom );
@@ -3126,7 +3126,7 @@ void TQRegExpEngine::parseFactor( Box *box )
box->opt();
#ifndef TQT_NO_REGEXP_INTERVAL
- yyMayCapture = FALSE;
+ yyMayCapture = false;
int alpha = ( yyMinRep == 0 ) ? 0 : yyMinRep - 1;
int beta = ( yyMaxRep == InftyRep ) ? 0 : yyMaxRep - ( alpha + 1 );
@@ -3177,7 +3177,7 @@ void TQRegExpEngine::parseExpression( Box *box )
parseTerm( box );
while ( yyTok == Tok_Bar ) {
#ifndef TQT_NO_REGEXP_OPTIM
- trivial = FALSE;
+ trivial = false;
#endif
Box rightBox( this );
yyTok = getToken();
@@ -3257,7 +3257,7 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern,
{
if ( engineCache == 0 ) {
engineCache = new TQCache<TQRegExpEngine>;
- engineCache->setAutoDelete( TRUE );
+ engineCache->setAutoDelete( true );
# ifdef TQT_THREAD_SUPPORT
engineCaches.setLocalData(engineCache);
# else
@@ -3302,17 +3302,17 @@ TQRegExp::TQRegExp()
{
priv = new TQRegExpPrivate;
#ifndef TQT_NO_REGEXP_WILDCARD
- priv->wc = FALSE;
+ priv->wc = false;
#endif
- priv->min = FALSE;
- priv->cs = TRUE;
+ priv->min = false;
+ priv->cs = true;
}
/*!
Constructs a regular expression object for the given \a pattern
string. The pattern must be given using wildcard notation if \a
- wildcard is TRUE (default is FALSE). The pattern is case
- sensitive, unless \a caseSensitive is FALSE. Matching is greedy
+ wildcard is true (default is false). The pattern is case
+ sensitive, unless \a caseSensitive is false. Matching is greedy
(maximal), but can be changed by calling setMinimal().
\sa setPattern() setCaseSensitive() setWildcard() setMinimal()
@@ -3325,7 +3325,7 @@ TQRegExp::TQRegExp( const TQString& pattern, bool caseSensitive, bool wildcard )
#ifndef TQT_NO_REGEXP_WILDCARD
priv->wc = wildcard;
#endif
- priv->min = FALSE;
+ priv->min = false;
priv->cs = caseSensitive;
}
@@ -3378,8 +3378,8 @@ TQRegExp& TQRegExp::operator=( const TQRegExp& rx )
}
/*!
- Returns TRUE if this regular expression is equal to \a rx;
- otherwise returns FALSE.
+ Returns true if this regular expression is equal to \a rx;
+ otherwise returns false.
Two TQRegExp objects are equal if they have the same pattern
strings and the same settings for case sensitivity, wildcard and
@@ -3398,18 +3398,18 @@ bool TQRegExp::operator==( const TQRegExp& rx ) const
/*!
\fn bool TQRegExp::operator!=( const TQRegExp& rx ) const
- Returns TRUE if this regular expression is not equal to \a rx;
- otherwise returns FALSE.
+ Returns true if this regular expression is not equal to \a rx;
+ otherwise returns false.
\sa operator==()
*/
/*!
- Returns TRUE if the pattern string is empty; otherwise returns
- FALSE.
+ Returns true if the pattern string is empty; otherwise returns
+ false.
If you call exactMatch() with an empty pattern on an empty string
- it will return TRUE; otherwise it returns FALSE since it operates
+ it will return true; otherwise it returns false since it operates
over the whole string. If you call search() with an empty pattern
on \e any string it will return the start offset (0 by default)
because the empty pattern matches the 'emptiness' at the start of
@@ -3425,8 +3425,8 @@ bool TQRegExp::isEmpty() const
}
/*!
- Returns TRUE if the regular expression is valid; otherwise returns
- FALSE. An invalid regular expression never matches.
+ Returns true if the regular expression is valid; otherwise returns
+ false. An invalid regular expression never matches.
The pattern <b>[a-z</b> is an example of an invalid pattern, since
it lacks a closing square bracket.
@@ -3440,7 +3440,7 @@ bool TQRegExp::isEmpty() const
bool TQRegExp::isValid() const
{
if ( priv->pattern.isEmpty() ) {
- return TRUE;
+ return true;
} else {
prepareEngine();
return eng->isValid();
@@ -3474,8 +3474,8 @@ void TQRegExp::setPattern( const TQString& pattern )
}
/*!
- Returns TRUE if case sensitivity is enabled; otherwise returns
- FALSE. The default is TRUE.
+ Returns true if case sensitivity is enabled; otherwise returns
+ false. The default is true.
\sa setCaseSensitive()
*/
@@ -3487,7 +3487,7 @@ bool TQRegExp::caseSensitive() const
/*!
Sets case sensitive matching to \a sensitive.
- If \a sensitive is TRUE, <b>\\.txt$</b> matches \c{readme.txt} but
+ If \a sensitive is true, <b>\\.txt$</b> matches \c{readme.txt} but
not \c{README.TXT}.
\sa caseSensitive()
@@ -3502,8 +3502,8 @@ void TQRegExp::setCaseSensitive( bool sensitive )
#ifndef TQT_NO_REGEXP_WILDCARD
/*!
- Returns TRUE if wildcard mode is enabled; otherwise returns FALSE.
- The default is FALSE.
+ Returns true if wildcard mode is enabled; otherwise returns false.
+ The default is false.
\sa setWildcard()
*/
@@ -3514,9 +3514,9 @@ bool TQRegExp::wildcard() const
/*!
Sets the wildcard mode for the regular expression. The default is
- FALSE.
+ false.
- Setting \a wildcard to TRUE enables simple shell-like wildcard
+ Setting \a wildcard to true enables simple shell-like wildcard
matching. (See \link #wildcard-matching wildcard matching
(globbing) \endlink.)
@@ -3535,8 +3535,8 @@ void TQRegExp::setWildcard( bool wildcard )
#endif
/*!
- Returns TRUE if minimal (non-greedy) matching is enabled;
- otherwise returns FALSE.
+ Returns true if minimal (non-greedy) matching is enabled;
+ otherwise returns false.
\sa setMinimal()
*/
@@ -3546,7 +3546,7 @@ bool TQRegExp::minimal() const
}
/*!
- Enables or disables minimal matching. If \a minimal is FALSE,
+ Enables or disables minimal matching. If \a minimal is false,
matching is greedy (maximal) which is the default.
For example, suppose we have the input string "We must be
@@ -3568,8 +3568,8 @@ void TQRegExp::setMinimal( bool minimal )
}
/*!
- Returns TRUE if \a str is matched exactly by this regular
- expression; otherwise returns FALSE. You can determine how much of
+ Returns true if \a str is matched exactly by this regular
+ expression; otherwise returns false. You can determine how much of
the string was matched by calling matchedLength().
For a given regexp string, R, exactMatch("R") is the equivalent of
@@ -3578,8 +3578,8 @@ void TQRegExp::setMinimal( bool minimal )
sets matchedLength() differently.
For example, if the regular expression is <b>blue</b>, then
- exactMatch() returns TRUE only for input \c blue. For inputs \c
- bluebell, \c blutak and \c lightblue, exactMatch() returns FALSE
+ exactMatch() returns true only for input \c blue. For inputs \c
+ bluebell, \c blutak and \c lightblue, exactMatch() returns false
and matchedLength() will return 4, 3 and 0 respectively.
Although const, this function sets matchedLength(),
@@ -3590,13 +3590,13 @@ void TQRegExp::setMinimal( bool minimal )
bool TQRegExp::exactMatch( const TQString& str ) const
{
prepareEngineForMatch( str );
- eng->match( str, 0, priv->min, TRUE, 0, priv->captured );
+ eng->match( str, 0, priv->min, true, 0, priv->captured );
if ( priv->captured[1] == (int) str.length() ) {
- return TRUE;
+ return true;
} else {
priv->captured[0] = 0;
priv->captured[1] = eng->partialMatchLength();
- return FALSE;
+ return false;
}
}
@@ -3609,7 +3609,7 @@ bool TQRegExp::exactMatch( const TQString& str ) const
The length of the match is stored in \a *len, unless \a len is a
null pointer.
- If \a indexIsStart is TRUE (the default), the position \a index in
+ If \a indexIsStart is true (the default), the position \a index in
the string will match the start of string anchor, <b>^</b>, in the
regexp, if present. Otherwise, position 0 in \a str will match.
@@ -3671,7 +3671,7 @@ int TQRegExp::search( const TQString& str, int offset, CaretMode caretMode ) con
prepareEngineForMatch( str );
if ( offset < 0 )
offset += str.length();
- eng->match( str, offset, priv->min, FALSE, caretIndex(offset, caretMode),
+ eng->match( str, offset, priv->min, false, caretIndex(offset, caretMode),
priv->captured );
return priv->captured[0];
}
@@ -3715,7 +3715,7 @@ int TQRegExp::searchRev( const TQString& str, int offset,
}
while ( offset >= 0 ) {
- eng->match( str, offset, priv->min, TRUE, caretIndex(offset, caretMode),
+ eng->match( str, offset, priv->min, true, caretIndex(offset, caretMode),
priv->captured );
if ( priv->captured[0] == offset )
return offset;
@@ -3956,7 +3956,7 @@ void TQRegExp::prepareEngine() const
: priv->pattern;
TQRegExp *that = (TQRegExp *) this;
// that->eng = newEngine( priv->rxpattern, priv->cs );
- regexpEngine( that->eng, priv->rxpattern, priv->cs, FALSE );
+ regexpEngine( that->eng, priv->rxpattern, priv->cs, false );
priv->captured.detach();
priv->captured.fill( -1, 2 + 2 * eng->numCaptures() );
}
@@ -3976,7 +3976,7 @@ void TQRegExp::prepareEngineForMatch( const TQString& str ) const
void TQRegExp::invalidateEngine()
{
if ( eng != 0 ) {
- regexpEngine( eng, priv->rxpattern, priv->cs, TRUE );
+ regexpEngine( eng, priv->rxpattern, priv->cs, true );
priv->rxpattern = TQString();
eng = 0;
}
diff --git a/src/tools/tqregexp.h b/src/tools/tqregexp.h
index d8aca02c0..d656259ad 100644
--- a/src/tools/tqregexp.h
+++ b/src/tools/tqregexp.h
@@ -55,8 +55,8 @@ public:
enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
TQRegExp();
- TQRegExp( const TQString& pattern, bool caseSensitive = TRUE,
- bool wildcard = FALSE );
+ TQRegExp( const TQString& pattern, bool caseSensitive = true,
+ bool wildcard = false );
TQRegExp( const TQRegExp& rx );
~TQRegExp();
TQRegExp& operator=( const TQRegExp& rx );
@@ -80,7 +80,7 @@ public:
bool exactMatch( const TQString& str ) const;
#ifndef TQT_NO_COMPAT
int match( const TQString& str, int index = 0, int *len = 0,
- bool indexIsStart = TRUE ) const;
+ bool indexIsStart = true ) const;
#endif
#if defined(Q_QDOC)
diff --git a/src/tools/tqsemaphore.cpp b/src/tools/tqsemaphore.cpp
index a5cdfc630..6b440fb73 100644
--- a/src/tools/tqsemaphore.cpp
+++ b/src/tools/tqsemaphore.cpp
@@ -99,7 +99,7 @@ public:
TQSemaphorePrivate::TQSemaphorePrivate(int m)
- : mutex(FALSE), value(0), max(m)
+ : mutex(false), value(0), max(m)
{
}
@@ -236,8 +236,8 @@ int TQSemaphore::total() const
/*!
Try to get access to the semaphore. If \l available() \< \a n, this
- function will return FALSE immediately. If \l available() \>= \a n,
- this function will take \a n accesses and return TRUE. This
+ function will return false immediately. If \l available() \>= \a n,
+ this function will take \a n accesses and return true. This
function does \e not block.
*/
bool TQSemaphore::tryAccess(int n)
@@ -245,11 +245,11 @@ bool TQSemaphore::tryAccess(int n)
TQMutexLocker locker(&d->mutex);
if (d->value + n > d->max)
- return FALSE;
+ return false;
d->value += n;
- return TRUE;
+ return true;
}
#endif // TQT_THREAD_SUPPORT
diff --git a/src/tools/tqsettings.cpp b/src/tools/tqsettings.cpp
index 18638b571..2f846731d 100644
--- a/src/tools/tqsettings.cpp
+++ b/src/tools/tqsettings.cpp
@@ -327,7 +327,7 @@ static void closelock( HANDLE fd )
TQSettingsGroup::TQSettingsGroup()
- : modified(FALSE)
+ : modified(false)
{
}
@@ -408,10 +408,10 @@ void TQSettingsHeading::parseLine(TQTextStream &stream)
TQString key, value;
key = line.left(i);
value = "";
- bool esc=TRUE;
+ bool esc=true;
i++;
while (esc) {
- esc = FALSE;
+ esc = false;
for ( ; i < (int)line.length(); i++ ) {
if ( esc ) {
if ( line[i] == 'n' )
@@ -420,9 +420,9 @@ void TQSettingsHeading::parseLine(TQTextStream &stream)
value = TQString::null; // escaped empty string
else
value.append(line[i]);
- esc = FALSE;
+ esc = false;
} else if ( line[i] == '\\' )
- esc = TRUE;
+ esc = true;
else
value.append(line[i]);
}
@@ -460,7 +460,7 @@ void TQSettingsHeading::parseLine(TQTextStream &stream)
#endif
TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format )
- : groupDirty( TRUE ), modified(FALSE), globalScope(TRUE)
+ : groupDirty( true ), modified(false), globalScope(true)
{
#if defined(TQ_WS_WIN) || defined(Q_OS_MAC)
if ( format != TQSettings::Ini )
@@ -486,21 +486,21 @@ TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format )
#ifdef TQ_WS_WIN
#ifdef Q_OS_TEMP
TCHAR path[MAX_PATH];
- SHGetSpecialFolderPath( 0, path, CSIDL_APPDATA, FALSE );
+ SHGetSpecialFolderPath( 0, path, CSIDL_APPDATA, false );
appSettings = TQString::fromUcs2( path );
- SHGetSpecialFolderPath( 0, path, CSIDL_COMMON_APPDATA, FALSE );
+ SHGetSpecialFolderPath( 0, path, CSIDL_COMMON_APPDATA, false );
defPath = TQString::fromUcs2( path );
#else
TQLibrary library( "shell32" );
- library.setAutoUnload( FALSE );
+ library.setAutoUnload( false );
QT_WA( {
typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, LPTSTR, int, BOOL);
GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve( "SHGetSpecialFolderPathW" );
if ( SHGetSpecialFolderPath ) {
TCHAR path[MAX_PATH];
- SHGetSpecialFolderPath( 0, path, CSIDL_APPDATA, FALSE );
+ SHGetSpecialFolderPath( 0, path, CSIDL_APPDATA, false );
appSettings = TQString::fromUcs2( (ushort*)path );
- SHGetSpecialFolderPath( 0, path, CSIDL_COMMON_APPDATA, FALSE );
+ SHGetSpecialFolderPath( 0, path, CSIDL_COMMON_APPDATA, false );
defPath = TQString::fromUcs2( (ushort*)path );
}
} , {
@@ -508,9 +508,9 @@ TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format )
GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve( "SHGetSpecialFolderPathA" );
if ( SHGetSpecialFolderPath ) {
char path[MAX_PATH];
- SHGetSpecialFolderPath( 0, path, CSIDL_APPDATA, FALSE );
+ SHGetSpecialFolderPath( 0, path, CSIDL_APPDATA, false );
appSettings = TQString::fromLocal8Bit( path );
- SHGetSpecialFolderPath( 0, path, CSIDL_COMMON_APPDATA, FALSE );
+ SHGetSpecialFolderPath( 0, path, CSIDL_COMMON_APPDATA, false );
defPath = TQString::fromLocal8Bit( path );
}
} );
@@ -586,7 +586,7 @@ void TQSettingsPrivate::removeGroup(const TQString &key)
{
TQSettingsHeading hd;
TQSettingsGroup grp;
- bool found = FALSE;
+ bool found = false;
TQMap<TQString,TQSettingsHeading>::Iterator headingsit = headings.find(heading);
if (headingsit != headings.end())
@@ -610,11 +610,11 @@ void TQSettingsPrivate::removeGroup(const TQString &key)
grpit = hd.find(group);
if (grpit != hd.end()) {
- found = TRUE;
+ found = true;
grp = *grpit;
}
} else if (hd.count() != 0) {
- found = TRUE;
+ found = true;
grp = *grpit;
}
@@ -631,7 +631,7 @@ void TQSettingsPrivate::removeGroup(const TQString &key)
else
headings.remove(heading);
- modified = TRUE;
+ modified = true;
}
}
@@ -667,12 +667,12 @@ void TQSettingsPrivate::writeGroup(const TQString &key, const TQString &value)
} else if (hd.count() != 0)
grp = *grpit;
- grp.modified = TRUE;
+ grp.modified = true;
grp.replace(key, value);
hd.replace(group, grp);
headings.replace(heading, hd);
- modified = TRUE;
+ modified = true;
}
@@ -698,8 +698,8 @@ TQDateTime TQSettingsPrivate::modificationTime()
bool qt_verify_key( const TQString &key )
{
if ( key.isEmpty() || key[0] != '/' || key.contains( TQRegExp(TQString::fromLatin1("[=\\r\\n]")) ) )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
static TQString groupKey( const TQString &group, const TQString &key )
@@ -746,7 +746,7 @@ static TQString groupKey( const TQString &group, const TQString &key )
\code
TQSettings settings;
settings.insertSearchPath( TQSettings::Windows, "/MyCompany" );
- settings.writeEntry( "/MyApplication/Tip of the day", TRUE );
+ settings.writeEntry( "/MyApplication/Tip of the day", true );
\endcode
The code above will write the subkey "Tip of the day" into the \e
first of the registry folders listed below that is found and for
@@ -956,7 +956,7 @@ TQSettings::~TQSettings()
/*! \internal
Writes all modifications to the settings to disk. If any errors are
- encountered, this function returns FALSE, otherwise it will return TRUE.
+ encountered, this function returns false, otherwise it will return true.
*/
bool TQSettings::sync()
{
@@ -966,9 +966,9 @@ bool TQSettings::sync()
#endif
if (! d->modified)
// fake success
- return TRUE;
+ return true;
- bool success = TRUE;
+ bool success = true;
TQMap<TQString,TQSettingsHeading>::Iterator it = d->headings.begin();
while (it != d->headings.end()) {
@@ -1011,7 +1011,7 @@ bool TQSettings::sync()
tqWarning("TQSettings::sync: filename is null/empty");
#endif // QT_CHECK_STATE
- success = FALSE;
+ success = false;
continue;
}
@@ -1027,7 +1027,7 @@ bool TQSettings::sync()
file.name().latin1());
#endif // QT_CHECK_STATE
- success = FALSE;
+ success = false;
continue;
}
@@ -1067,22 +1067,22 @@ bool TQSettings::sync()
tqWarning("TQSettings::sync: error at end of write");
#endif // QT_CHECK_STATE
- success = FALSE;
+ success = false;
}
file.close();
if ( success ) {
- TQDir dir( TQFileInfo( file ).dir( TRUE ) );
+ TQDir dir( TQFileInfo( file ).dir( true ) );
if ( ( dir.exists( filename ) && !dir.remove( filename ) ) ||
- !dir.rename( file.name(), filename, TRUE ) ) {
+ !dir.rename( file.name(), filename, true ) ) {
#ifdef QT_CHECK_STATE
tqWarning( "TQSettings::sync: error writing file '%s'",
TQFile::encodeName( filename ).data() );
#endif // QT_CHECK_STATE
- success = FALSE;
+ success = false;
}
}
@@ -1094,7 +1094,7 @@ bool TQSettings::sync()
#endif
}
- d->modified = FALSE;
+ d->modified = false;
return success;
}
@@ -1105,7 +1105,7 @@ bool TQSettings::sync()
Reads the entry specified by \a key, and returns a bool, or the
default value, \a def, if the entry couldn't be read.
- If \a ok is non-null, *ok is set to TRUE if the key was read, FALSE
+ If \a ok is non-null, *ok is set to true if the key was read, false
otherwise.
\sa readEntry(), readNumEntry(), readDoubleEntry(), writeEntry(), removeEntry()
@@ -1122,7 +1122,7 @@ bool TQSettings::readBoolEntry(const TQString &key, bool def, bool *ok )
tqWarning( "TQSettings::readBoolEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1135,19 +1135,19 @@ bool TQSettings::readBoolEntry(const TQString &key, bool def, bool *ok )
TQString value = readEntry( key, ( def ? "true" : "false" ), ok );
if (value.lower() == "true")
- return TRUE;
+ return true;
else if (value.lower() == "false")
- return FALSE;
+ return false;
else if (value == "1")
- return TRUE;
+ return true;
else if (value == "0")
- return FALSE;
+ return false;
if (! value.isEmpty())
tqWarning("TQSettings::readBoolEntry: '%s' is not 'true' or 'false'",
value.latin1());
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1157,7 +1157,7 @@ bool TQSettings::readBoolEntry(const TQString &key, bool def, bool *ok )
Reads the entry specified by \a key, and returns a double, or the
default value, \a def, if the entry couldn't be read.
- If \a ok is non-null, *ok is set to TRUE if the key was read, FALSE
+ If \a ok is non-null, *ok is set to true if the key was read, false
otherwise.
\sa readEntry(), readNumEntry(), readBoolEntry(), writeEntry(), removeEntry()
@@ -1174,7 +1174,7 @@ double TQSettings::readDoubleEntry(const TQString &key, double def, bool *ok )
tqWarning( "TQSettings::readDoubleEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1193,7 +1193,7 @@ double TQSettings::readDoubleEntry(const TQString &key, double def, bool *ok )
tqWarning( "TQSettings::readDoubleEntry: '%s' is not a number",
value.latin1() );
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1203,7 +1203,7 @@ double TQSettings::readDoubleEntry(const TQString &key, double def, bool *ok )
Reads the entry specified by \a key, and returns an integer, or the
default value, \a def, if the entry couldn't be read.
- If \a ok is non-null, *ok is set to TRUE if the key was read, FALSE
+ If \a ok is non-null, *ok is set to true if the key was read, false
otherwise.
\sa readEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), removeEntry()
@@ -1220,7 +1220,7 @@ int TQSettings::readNumEntry(const TQString &key, int def, bool *ok )
tqWarning( "TQSettings::readNumEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1238,7 +1238,7 @@ int TQSettings::readNumEntry(const TQString &key, int def, bool *ok )
tqWarning( "TQSettings::readNumEntry: '%s' is not a number",
value.latin1() );
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1248,7 +1248,7 @@ int TQSettings::readNumEntry(const TQString &key, int def, bool *ok )
Reads the entry specified by \a key, and returns a TQString, or the
default value, \a def, if the entry couldn't be read.
- If \a ok is non-null, *ok is set to TRUE if the key was read, FALSE
+ If \a ok is non-null, *ok is set to true if the key was read, false
otherwise.
\sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), removeEntry()
@@ -1265,7 +1265,7 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o
tqWarning( "TQSettings::readEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1276,7 +1276,7 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o
#endif
if ( ok ) // no, everything is not ok
- *ok = FALSE;
+ *ok = false;
TQString realkey;
@@ -1289,7 +1289,7 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o
tqWarning("TQSettings::readEntry: invalid key '%s'", grp_key.latin1());
#endif // QT_CHECK_STATE
if ( ok )
- *ok = FALSE;
+ *ok = false;
return def;
}
@@ -1318,7 +1318,7 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o
if ( it != end ) {
// found the value we needed
retval = *it;
- if ( ok ) *ok = TRUE;
+ if ( ok ) *ok = true;
}
return retval;
}
@@ -1330,8 +1330,8 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o
created if it doesn't exist. Any previous value is overwritten by \a
value.
- If an error occurs the settings are left unchanged and FALSE is
- returned; otherwise TRUE is returned.
+ If an error occurs the settings are left unchanged and false is
+ returned; otherwise true is returned.
\warning On certain platforms, keys are required to contain at least
two components (e.g., "/foo/bar"). This limitation does not apply to
@@ -1346,7 +1346,7 @@ bool TQSettings::writeEntry(const TQString &key, bool value)
#if defined(QT_CHECK_STATE)
tqWarning( "TQSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
- return FALSE;
+ return false;
}
#if defined(TQ_WS_WIN) || defined(Q_OS_MAC)
@@ -1365,8 +1365,8 @@ bool TQSettings::writeEntry(const TQString &key, bool value)
created if it doesn't exist. Any previous value is overwritten by \a
value.
- If an error occurs the settings are left unchanged and FALSE is
- returned; otherwise TRUE is returned.
+ If an error occurs the settings are left unchanged and false is
+ returned; otherwise true is returned.
\sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry()
*/
@@ -1377,7 +1377,7 @@ bool TQSettings::writeEntry(const TQString &key, double value)
#if defined(QT_CHECK_STATE)
tqWarning( "TQSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
- return FALSE;
+ return false;
}
#if defined(TQ_WS_WIN) || defined(Q_OS_MAC)
@@ -1395,8 +1395,8 @@ bool TQSettings::writeEntry(const TQString &key, double value)
created if it doesn't exist. Any previous value is overwritten by \a
value.
- If an error occurs the settings are left unchanged and FALSE is
- returned; otherwise TRUE is returned.
+ If an error occurs the settings are left unchanged and false is
+ returned; otherwise true is returned.
\sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry()
*/
@@ -1407,7 +1407,7 @@ bool TQSettings::writeEntry(const TQString &key, int value)
#if defined(QT_CHECK_STATE)
tqWarning( "TQSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
- return FALSE;
+ return false;
}
#if defined(TQ_WS_WIN) || defined(Q_OS_MAC)
@@ -1430,7 +1430,7 @@ bool TQSettings::writeEntry(const TQString &key, int value)
writeEntry (const TQString &, bool) overload for this code:
writeEntry ("/foo/bar", "baz")
- If an error occurs, this functions returns FALSE and the object is left
+ If an error occurs, this functions returns false and the object is left
unchanged.
\sa readEntry(), removeEntry()
@@ -1448,8 +1448,8 @@ bool TQSettings::writeEntry(const TQString &key, const char *value)
value. If \a value is an empty string or a null string the key's
value will be an empty string.
- If an error occurs the settings are left unchanged and FALSE is
- returned; otherwise TRUE is returned.
+ If an error occurs the settings are left unchanged and false is
+ returned; otherwise true is returned.
\sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry()
*/
@@ -1460,7 +1460,7 @@ bool TQSettings::writeEntry(const TQString &key, const TQString &value)
#if defined(QT_CHECK_STATE)
tqWarning( "TQSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
- return FALSE;
+ return false;
}
#if defined(TQ_WS_WIN) || defined(Q_OS_MAC)
@@ -1480,7 +1480,7 @@ bool TQSettings::writeEntry(const TQString &key, const TQString &value)
tqWarning("TQSettings::writeEntry: invalid key '%s'", grp_key.latin1());
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if (list.count() == 2) {
@@ -1503,7 +1503,7 @@ bool TQSettings::writeEntry(const TQString &key, const TQString &value)
}
d->writeGroup(realkey, value);
- return TRUE;
+ return true;
}
@@ -1523,7 +1523,7 @@ bool TQSettings::removeEntry(const TQString &key)
#if defined(QT_CHECK_STATE)
tqWarning( "TQSettings::removeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
#endif
- return FALSE;
+ return false;
}
#if defined(TQ_WS_WIN) || defined(Q_OS_MAC)
@@ -1541,7 +1541,7 @@ bool TQSettings::removeEntry(const TQString &key)
tqWarning("TQSettings::removeEntry: invalid key '%s'", grp_key.latin1());
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if (list.count() == 2) {
@@ -1564,7 +1564,7 @@ bool TQSettings::removeEntry(const TQString &key)
}
d->removeGroup(realkey);
- return TRUE;
+ return true;
}
@@ -1859,8 +1859,8 @@ TQDateTime TQSettings::lastModificationTime( const TQString &key )
that do not take a \a separator argument.
- If an error occurs the settings are left unchanged and FALSE is
- returned; otherwise returns TRUE.
+ If an error occurs the settings are left unchanged and false is
+ returned; otherwise returns true.
\sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry(), TQStringList::join()
*/
@@ -1878,8 +1878,8 @@ bool TQSettings::writeEntry(const TQString &key, const TQStringList &value,
is created if it doesn't exist. Any previous value is overwritten
by \a value.
- If an error occurs the settings are left unchanged and FALSE is
- returned; otherwise returns TRUE.
+ If an error occurs the settings are left unchanged and false is
+ returned; otherwise returns true.
\sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry()
*/
@@ -1906,8 +1906,8 @@ bool TQSettings::writeEntry(const TQString &key, const TQStringList &value)
Reads the entry specified by \a key as a string. The \a separator
is used to create a TQStringList by calling TQStringList::split(\a
- separator, entry). If \a ok is not 0: \a *ok is set to TRUE
- if the key was read, otherwise \a *ok is set to FALSE.
+ separator, entry). If \a ok is not 0: \a *ok is set to true
+ if the key was read, otherwise \a *ok is set to false.
\warning As the documentation states, TQStringList::split() will
omit empty strings from the list. Because of this, it is
@@ -1944,8 +1944,8 @@ TQStringList TQSettings::readListEntry(const TQString &key, const TQChar &separa
/*!
\fn TQStringList TQSettings::readListEntry(const TQString &key, bool *ok ) const
Reads the entry specified by \a key as a string. If \a ok is not
- 0, \a *ok is set to TRUE if the key was read, otherwise \a *ok is
- set to FALSE.
+ 0, \a *ok is set to true if the key was read, otherwise \a *ok is
+ set to false.
Note that if you want to iterate over the list, you should iterate
over a copy, e.g.
@@ -1971,7 +1971,7 @@ TQStringList TQSettings::readListEntry(const TQString &key, bool *ok )
return TQStringList();
TQStringList l;
TQString s;
- bool esc=FALSE;
+ bool esc=false;
for (int i=0; i<(int)value.length(); i++) {
if ( esc ) {
if ( value[i] == 'e' ) { // end-of-string
@@ -1982,9 +1982,9 @@ TQStringList TQSettings::readListEntry(const TQString &key, bool *ok )
} else {
s.append(value[i]);
}
- esc=FALSE;
+ esc=false;
} else if ( value[i] == '^' ) {
- esc = TRUE;
+ esc = true;
} else {
s.append(value[i]);
if ( i == (int)value.length()-1 )
@@ -2072,7 +2072,7 @@ void TQSettings::setPath( const TQString &domain, const TQString &product, Scope
void TQSettings::beginGroup( const TQString &group )
{
d->groupStack.push( group );
- d->groupDirty = TRUE;
+ d->groupDirty = true;
}
/*!
@@ -2089,7 +2089,7 @@ void TQSettings::beginGroup( const TQString &group )
void TQSettings::endGroup()
{
d->groupStack.pop();
- d->groupDirty = TRUE;
+ d->groupDirty = true;
}
/*!
@@ -2098,7 +2098,7 @@ void TQSettings::endGroup()
void TQSettings::resetGroup()
{
d->groupStack.clear();
- d->groupDirty = FALSE;
+ d->groupDirty = false;
d->groupPrefix = TQString::null;
}
@@ -2110,7 +2110,7 @@ void TQSettings::resetGroup()
TQString TQSettings::group() const
{
if ( d->groupDirty ) {
- d->groupDirty = FALSE;
+ d->groupDirty = false;
d->groupPrefix = TQString::null;
TQValueStack<TQString>::Iterator it = d->groupStack.begin();
diff --git a/src/tools/tqsettings.h b/src/tools/tqsettings.h
index ee8e8e3b2..82966746e 100644
--- a/src/tools/tqsettings.h
+++ b/src/tools/tqsettings.h
@@ -92,7 +92,7 @@ public:
TQString readEntry( const TQString &, const TQString &def = TQString::null, bool * = 0 );
int readNumEntry( const TQString &, int def = 0, bool * = 0 );
double readDoubleEntry( const TQString &, double def = 0, bool * = 0 );
- bool readBoolEntry( const TQString &, bool def = FALSE, bool * = 0 );
+ bool readBoolEntry( const TQString &, bool def = false, bool * = 0 );
//### make those non-inlined in 4.0
TQStringList readListEntry( const TQString &key, bool *ok = 0 ) const
@@ -122,7 +122,7 @@ public:
TQSettings *that = (TQSettings*)this;
return that->readDoubleEntry( key, def, ok );
}
- bool readBoolEntry( const TQString &key, bool def = FALSE, bool *ok = 0 ) const
+ bool readBoolEntry( const TQString &key, bool def = false, bool *ok = 0 ) const
{
TQSettings *that = (TQSettings*)this;
return that->readBoolEntry( key, def, ok );
diff --git a/src/tools/tqstring.cpp b/src/tools/tqstring.cpp
index cec2ca61a..625884c7d 100644
--- a/src/tools/tqstring.cpp
+++ b/src/tools/tqstring.cpp
@@ -248,7 +248,7 @@ static inline bool format(TQChar::Decomposition tag, TQString & str,
unsigned int l = index + len;
unsigned int r = index;
- bool left = FALSE, right = FALSE;
+ bool left = false, right = false;
left = ((l < str.length()) &&
((str[(int)l].joining() == TQChar::Dual) ||
@@ -278,13 +278,13 @@ TQStringData::TQStringData() : TQShared(),
unicode(0),
ascii(0),
len(0),
- issimpletext(TRUE),
+ issimpletext(true),
maxl(0),
- islatin1(FALSE),
- security_unpaged(FALSE),
+ islatin1(false),
+ security_unpaged(false),
cString(0) {
#if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
- mutex = new TQMutex(FALSE);
+ mutex = new TQMutex(false);
#endif // TQT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
ref();
}
@@ -293,13 +293,13 @@ TQStringData::TQStringData(TQChar *u, uint l, uint m) : TQShared(),
unicode(u),
ascii(0),
len(l),
- issimpletext(FALSE),
+ issimpletext(false),
maxl(m),
- islatin1(FALSE),
- security_unpaged(FALSE),
+ islatin1(false),
+ security_unpaged(false),
cString(0) {
#if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
- mutex = new TQMutex(FALSE);
+ mutex = new TQMutex(false);
#endif // TQT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
}
@@ -335,7 +335,7 @@ void TQStringData::setDirty() {
delete cString;
cString = 0;
}
- issimpletext = FALSE;
+ issimpletext = false;
}
/*
@@ -1047,13 +1047,13 @@ TQString &TQString::operator=( const char *str )
/*!
\fn bool TQString::isNull() const
- Returns TRUE if the string is null; otherwise returns FALSE. A
+ Returns true if the string is null; otherwise returns false. A
null string is always empty.
\code
TQString a; // a.unicode() == 0, a.length() == 0
- a.isNull(); // TRUE, because a.unicode() == 0
- a.isEmpty(); // TRUE, because a.length() == 0
+ a.isNull(); // true, because a.unicode() == 0
+ a.isEmpty(); // true, because a.length() == 0
\endcode
\sa isEmpty(), length()
@@ -1062,17 +1062,17 @@ TQString &TQString::operator=( const char *str )
/*!
\fn bool TQString::isEmpty() const
- Returns TRUE if the string is empty, i.e. if length() == 0;
- otherwise returns FALSE. Null strings are also empty.
+ Returns true if the string is empty, i.e. if length() == 0;
+ otherwise returns false. Null strings are also empty.
\code
TQString a( "" );
- a.isEmpty(); // TRUE
- a.isNull(); // FALSE
+ a.isEmpty(); // true
+ a.isNull(); // false
TQString b;
- b.isEmpty(); // TRUE
- b.isNull(); // TRUE
+ b.isEmpty(); // true
+ b.isNull(); // true
\endcode
\sa isNull(), length()
@@ -1282,9 +1282,9 @@ static ArgEscapeData findArgEscapes(const TQString &s)
if (c == uc_end || ++c == uc_end)
break;
- bool locale_arg = FALSE;
+ bool locale_arg = false;
if (c->unicode() == 'L') {
- locale_arg = TRUE;
+ locale_arg = true;
if (++c == uc_end)
break;
}
@@ -1356,9 +1356,9 @@ static TQString replaceArgEscapes(const TQString &s, const ArgEscapeData &d, int
const TQChar *escape_start = c++;
- bool locale_arg = FALSE;
+ bool locale_arg = false;
if (c->unicode() == 'L') {
- locale_arg = TRUE;
+ locale_arg = true;
++c;
}
@@ -1883,7 +1883,7 @@ TQString &TQString::vsprintf( const char* cformat, va_list ap )
// Parse flag characters
unsigned flags = 0;
- bool no_more_flags = FALSE;
+ bool no_more_flags = false;
do {
switch (*c) {
case '#': flags |= TQLocalePrivate::Alternate; break;
@@ -1892,7 +1892,7 @@ TQString &TQString::vsprintf( const char* cformat, va_list ap )
case ' ': flags |= TQLocalePrivate::BlankBeforePositive; break;
case '+': flags |= TQLocalePrivate::AlwaysShowSign; break;
case '\'': flags |= TQLocalePrivate::ThousandsGroup; break;
- default: no_more_flags = TRUE; break;
+ default: no_more_flags = true; break;
}
if (!no_more_flags)
@@ -2225,7 +2225,7 @@ TQString& TQString::fill( TQChar c, int len )
last character; if -2, at the next to last character and so on.
(See findRev() for searching backwards.)
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
Returns the position of \a c or -1 if \a c could not be found.
@@ -2362,7 +2362,7 @@ static int bm_find( const TQString &str, int index, const TQString &pattern, uin
last character, if it is -2, at the next to last character and so
on. (See findRev() for searching backwards.)
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
Returns the position of \a str or -1 if \a str could not be found.
@@ -2469,7 +2469,7 @@ int TQString::find( const TQString& str, int index, bool cs ) const
Returns the position of \a c or -1 if \a c could not be found.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
\code
@@ -2512,7 +2512,7 @@ int TQString::findRev( TQChar c, int index, bool cs ) const
Returns the position of \a str or -1 if \a str could not be found.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
\code
@@ -2689,7 +2689,7 @@ int TQString::findRev( const TQString& str, int index, bool cs ) const
TQString TQString::section( const TQString &sep, int start, int end, int flags ) const
{
- TQStringList sections = TQStringList::split(sep, *this, TRUE);
+ TQStringList sections = TQStringList::split(sep, *this, true);
if(sections.isEmpty())
return TQString();
if(!(flags & SectionSkipEmpty)) {
@@ -2794,7 +2794,7 @@ TQString TQString::section( const TQRegExp &reg, int start, int end, int flags )
sep.setCaseSensitive(!(flags & SectionCaseInsensitiveSeps));
TQPtrList<section_chunk> l;
- l.setAutoDelete(TRUE);
+ l.setAutoDelete(true);
int n = length(), m = 0, last_m = 0, last = 0, last_len = 0;
while ( ( m = sep.search( *this, m ) ) != -1 ) {
@@ -2856,12 +2856,12 @@ TQString TQString::section( const TQRegExp &reg, int start, int end, int flags )
Returns the number of times the character \a c occurs in the
string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
\code
TQString string( "Trolltech and TQt" );
- int n = string.contains( 't', FALSE );
+ int n = string.contains( 't', false );
// n == 3
\endcode
*/
@@ -2895,7 +2895,7 @@ int TQString::contains( TQChar c, bool cs ) const
Returns the number of times the string \a str occurs in the string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
*/
int TQString::contains( const char* str, bool cs ) const
@@ -2916,7 +2916,7 @@ int TQString::contains( const char* str, bool cs ) const
Find character \a c starting from position \a index.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
*/
@@ -2928,7 +2928,7 @@ int TQString::contains( const char* str, bool cs ) const
Find character \a c starting from position \a index and working
backwards.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
*/
@@ -2937,7 +2937,7 @@ int TQString::contains( const char* str, bool cs ) const
Returns the number of times \a str occurs in the string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
This function counts overlapping strings, so in the example below,
@@ -2989,7 +2989,7 @@ TQString TQString::left( uint len ) const
} else if ( len >= length() ) {
return *this;
} else {
- TQString s( len, TRUE );
+ TQString s( len, true );
memcpy( s.d->unicode, d->unicode, len * sizeof(TQChar) );
s.d->len = len;
return s;
@@ -3021,7 +3021,7 @@ TQString TQString::right( uint len ) const
uint l = length();
if ( len >= l )
return *this;
- TQString s( len, TRUE );
+ TQString s( len, true );
memcpy( s.d->unicode, d->unicode+(l-len), len*sizeof(TQChar) );
s.d->len = len;
return s;
@@ -3057,7 +3057,7 @@ TQString TQString::mid( uint index, uint len ) const
if ( index == 0 && len == slen )
return *this;
const TQChar *p = unicode()+index;
- TQString s( len, TRUE );
+ TQString s( len, true );
memcpy( s.d->unicode, p, len * sizeof(TQChar) );
s.d->len = len;
return s;
@@ -3068,10 +3068,10 @@ TQString TQString::mid( uint index, uint len ) const
Returns a string of length \a width that contains this string
padded by the \a fill character.
- If \a truncate is FALSE and the length of the string is more than
+ If \a truncate is false and the length of the string is more than
\a width, then the returned string is a copy of the string.
- If \a truncate is TRUE and the length of the string is more than
+ If \a truncate is true and the length of the string is more than
\a width, then any characters in a copy of the string after length
\a width are removed, and the copy is returned.
@@ -3108,10 +3108,10 @@ TQString TQString::leftJustify( uint width, TQChar fill, bool truncate ) const
Returns a string of length \a width that contains the \a fill
character followed by the string.
- If \a truncate is FALSE and the length of the string is more than
+ If \a truncate is false and the length of the string is more than
\a width, then the returned string is a copy of the string.
- If \a truncate is TRUE and the length of the string is more than
+ If \a truncate is true and the length of the string is more than
\a width, then the resulting string is truncated at position \a
width.
@@ -3216,7 +3216,7 @@ TQString TQString::upper() const
the end.
Whitespace means any character for which TQChar::isSpace() returns
- TRUE. This includes Unicode characters with decimal values 9
+ true. This includes Unicode characters with decimal values 9
(TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR) and 32 (Space), and may
also include other Unicode characters.
@@ -3248,7 +3248,7 @@ TQString TQString::stripWhiteSpace() const
if ( l <= 0 )
return TQString::fromLatin1("");
- TQString result( l, TRUE );
+ TQString result( l, true );
memcpy( result.d->unicode, &s[start], sizeof(TQChar)*l );
result.d->len = l;
return result;
@@ -3261,7 +3261,7 @@ TQString TQString::stripWhiteSpace() const
replaced with a single space.
Whitespace means any character for which TQChar::isSpace() returns
- TRUE. This includes Unicode characters with decimal values 9
+ true. This includes Unicode characters with decimal values 9
(TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space).
\code
@@ -3585,7 +3585,7 @@ TQString &TQString::remove( TQChar c )
Removes every occurrence of \a str in the string. Returns a
reference to the string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
This is the same as replace(\a str, "", \a cs).
@@ -3605,7 +3605,7 @@ TQString &TQString::remove( const TQString & str, bool cs )
TQString &TQString::remove( const TQString & str )
{
- return remove( str, TRUE );
+ return remove( str, true );
}
/*! \overload
@@ -3653,7 +3653,7 @@ TQString &TQString::remove( const TQRegExp & rx )
*/
TQString &TQString::remove( const char *str )
{
- return remove( TQString::fromAscii(str), TRUE );
+ return remove( TQString::fromAscii(str), true );
}
/*!
@@ -3737,7 +3737,7 @@ TQString &TQString::replace( uint index, uint len, const TQChar* s, uint slen )
Replaces every occurrence of the character \a c in the string
with \a after. Returns a reference to the string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
Example:
@@ -3754,7 +3754,7 @@ TQString &TQString::replace( TQChar c, const TQString & after, bool cs )
TQString &TQString::replace( TQChar c, const TQString & after )
{
- return replace( TQString( c ), after, TRUE );
+ return replace( TQString( c ), after, true );
}
/*! \overload
@@ -3763,7 +3763,7 @@ TQString &TQString::replace( TQChar c, const TQString & after )
Replaces every occurrence of the character \a c in the string
with \a after. Returns a reference to the string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
*/
@@ -3772,7 +3772,7 @@ TQString &TQString::replace( TQChar c, const TQString & after )
Replaces every occurrence of the string \a before in the string
with the string \a after. Returns a reference to the string.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
Example:
@@ -3883,7 +3883,7 @@ TQString &TQString::replace( const TQString & before, const TQString & after,
TQString &TQString::replace( const TQString & before, const TQString & after )
{
- return replace( before, after, TRUE );
+ return replace( before, after, true );
}
#ifndef TQT_NO_REGEXP_CAPTURE
@@ -4102,7 +4102,7 @@ int TQString::findRev( const TQRegExp &rx, int index ) const
\code
TQString str = "banana and panama";
- TQRegExp rxp = TQRegExp( "a[nm]a", TRUE, FALSE );
+ TQRegExp rxp = TQRegExp( "a[nm]a", true, false );
int i = str.contains( rxp ); // i == 4
\endcode
@@ -4140,7 +4140,7 @@ int TQString::contains( const TQRegExp &rx ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4155,7 +4155,7 @@ long TQString::toLong( bool *ok, int base ) const
TQ_LLONG v = toLongLong( ok, base );
if ( v < LONG_MIN || v > LONG_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return long(v);
@@ -4176,7 +4176,7 @@ long TQString::toLong( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4200,14 +4200,14 @@ TQ_LLONG TQString::toLongLong( bool *ok, int base ) const
TQ_LLONG result = def_locale.d->stringToLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators);
if (my_ok) {
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return result;
}
// If the default was not "C", try the "C" locale
if (def_locale.language() == TQLocale::C) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
@@ -4230,7 +4230,7 @@ TQ_LLONG TQString::toLongLong( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4245,7 +4245,7 @@ ulong TQString::toULong( bool *ok, int base ) const
TQ_ULLONG v = toULongLong( ok, base );
if ( v > ULONG_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return ulong(v);
@@ -4266,7 +4266,7 @@ ulong TQString::toULong( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4290,14 +4290,14 @@ TQ_ULLONG TQString::toULongLong( bool *ok, int base ) const
TQ_ULLONG result = def_locale.d->stringToUnsLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators);
if (my_ok) {
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return result;
}
// If the default was not "C", try the "C" locale
if (def_locale.language() == TQLocale::C) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0;
}
@@ -4321,7 +4321,7 @@ TQ_ULLONG TQString::toULongLong( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4337,7 +4337,7 @@ short TQString::toShort( bool *ok, int base ) const
TQ_LLONG v = toLongLong( ok, base );
if ( v < SHRT_MIN || v > SHRT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (short)v;
@@ -4359,7 +4359,7 @@ short TQString::toShort( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4374,7 +4374,7 @@ ushort TQString::toUShort( bool *ok, int base ) const
TQ_ULLONG v = toULongLong( ok, base );
if ( v > USHRT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (ushort)v;
@@ -4397,13 +4397,13 @@ ushort TQString::toUShort( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
\code
TQString str( "FF" );
bool ok;
- int hex = str.toInt( &ok, 16 ); // hex == 255, ok == TRUE
- int dec = str.toInt( &ok, 10 ); // dec == 0, ok == FALSE
+ int hex = str.toInt( &ok, 16 ); // hex == 255, ok == true
+ int dec = str.toInt( &ok, 10 ); // dec == 0, ok == false
\endcode
Leading and trailing whitespace is ignored by this function.
@@ -4419,7 +4419,7 @@ int TQString::toInt( bool *ok, int base ) const
TQ_LLONG v = toLongLong( ok, base );
if ( v < INT_MIN || v > INT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (int)v;
@@ -4440,7 +4440,7 @@ int TQString::toInt( bool *ok, int base ) const
Returns 0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
Leading and trailing whitespace is ignored by this function.
@@ -4455,7 +4455,7 @@ uint TQString::toUInt( bool *ok, int base ) const
TQ_ULLONG v = toULongLong( ok, base );
if ( v > UINT_MAX ) {
if ( ok )
- *ok = FALSE;
+ *ok = false;
v = 0;
}
return (uint)v;
@@ -4465,7 +4465,7 @@ uint TQString::toUInt( bool *ok, int base ) const
Returns the string converted to a \c double value.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
\code
TQString string( "1234.56" );
@@ -4533,7 +4533,7 @@ double TQString::toDouble( bool *ok ) const
if (length() > 0 && unicode()[length() - 1].isSpace()) {
TQString tmp = stripWhiteSpace();
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return tmp.toDouble();
}
@@ -4543,14 +4543,14 @@ double TQString::toDouble( bool *ok ) const
double result = def_locale.d->stringToDouble(*this, &my_ok, TQLocalePrivate::FailOnGroupSeparators);
if (my_ok) {
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return result;
}
// If the default was not "C", try the "C" locale
if (def_locale.language() == TQLocale::C) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0.0;
}
@@ -4564,7 +4564,7 @@ double TQString::toDouble( bool *ok ) const
Returns 0.0 if the conversion fails.
If \a ok is not 0: if a conversion error occurs, \a *ok is set to
- FALSE; otherwise \a *ok is set to TRUE.
+ false; otherwise \a *ok is set to true.
For information on how string-to-number functions in TQString handle
localized input, see toDouble().
@@ -4584,11 +4584,11 @@ float TQString::toFloat( bool *ok ) const
double d = toDouble(&myOk);
if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) {
if (ok != 0)
- *ok = FALSE;
+ *ok = false;
return 0.0;
}
if (ok != 0)
- *ok = TRUE;
+ *ok = true;
return (float) d;
}
@@ -4915,7 +4915,7 @@ void TQString::setExpand( uint index, TQChar c )
/*!
\fn bool TQString::operator!() const
- Returns TRUE if this is a null string; otherwise returns FALSE.
+ Returns true if this is a null string; otherwise returns false.
\code
TQString name = getName();
@@ -5142,7 +5142,7 @@ const char* TQString::latin1() const
}
delete [] d->ascii;
d->ascii = unicodeToLatin1( d->unicode, d->len, d->security_unpaged );
- d->islatin1 = TRUE;
+ d->islatin1 = true;
}
return d->ascii;
}
@@ -5181,7 +5181,7 @@ const char* TQString::ascii() const
} else {
d->ascii = 0;
}
- d->islatin1 = FALSE;
+ d->islatin1 = false;
}
return d->ascii;
}
@@ -5441,7 +5441,7 @@ TQString TQString::fromLatin1( const char* chars, int len )
len = -1;
}
uc = internalLatin1ToUnicode( chars, &l, len );
- TQString ret( new TQStringData(uc, l, l), TRUE );
+ TQString ret( new TQStringData(uc, l, l), true );
return ret;
}
@@ -5609,7 +5609,7 @@ TQString TQString::fromUcs2( const unsigned short *str )
length++;
TQChar* uc = QT_ALLOC_QCHAR_VEC( length );
memcpy( uc, str, length*sizeof(TQChar) );
- TQString ret( new TQStringData( uc, length, length ), TRUE );
+ TQString ret( new TQStringData( uc, length, length ), true );
return ret;
}
}
@@ -5885,12 +5885,12 @@ void TQString::checkSimpleText() const
ushort uc = p->unicode();
// sort out regions of complex text formatting
if ( uc > 0x058f && ( uc < 0x1100 || uc > 0xfb0f ) ) {
- d->issimpletext = FALSE;
+ d->issimpletext = false;
return;
}
p++;
}
- d->issimpletext = TRUE;
+ d->issimpletext = true;
}
/*! \fn bool TQString::simpleText() const
@@ -5909,18 +5909,18 @@ bool TQString::isRightToLeft() const
case TQChar::DirL:
case TQChar::DirLRO:
case TQChar::DirLRE:
- return FALSE;
+ return false;
case TQChar::DirR:
case TQChar::DirAL:
case TQChar::DirRLO:
case TQChar::DirRLE:
- return TRUE;
+ return true;
default:
break;
}
++p;
}
- return FALSE;
+ return false;
}
@@ -6031,7 +6031,7 @@ int TQString::localeAwareCompare( const TQString& s ) const
bool operator==( const TQString &s1, const TQString &s2 )
{
if ( s1.unicode() == s2.unicode() )
- return TRUE;
+ return true;
return (s1.length() == s2.length()) && s1.isNull() == s2.isNull() &&
(memcmp((char*)s1.unicode(),(char*)s2.unicode(),
s1.length()*sizeof(TQChar)) == 0 );
@@ -6062,7 +6062,7 @@ bool operator==( const TQString &s1, const char *s2 )
const TQChar *uc = s1.unicode();
while ( len ) {
if ( !(*s2) || uc->unicode() != (uchar) *s2 )
- return FALSE;
+ return false;
++uc;
++s2;
--len;
@@ -6113,7 +6113,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\relates TQString
- Returns TRUE if \a s1 is equal to \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is equal to \a s2; otherwise returns false.
Note that a null string is not equal to a not-null empty string.
Equivalent to compare(\a s1, \a s2) == 0.
@@ -6127,7 +6127,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is equal to \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is equal to \a s2; otherwise returns false.
Note that a null string is not equal to a not-null empty string.
Equivalent to compare(\a s1, \a s2) == 0.
@@ -6141,7 +6141,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is equal to \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is equal to \a s2; otherwise returns false.
Note that a null string is not equal to a not-null empty string.
Equivalent to compare(\a s1, \a s2) == 0.
@@ -6154,7 +6154,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\relates TQString
- Returns TRUE if \a s1 is not equal to \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is not equal to \a s2; otherwise returns false.
Note that a null string is not equal to a not-null empty string.
Equivalent to compare(\a s1, \a s2) != 0.
@@ -6168,7 +6168,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is not equal to \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is not equal to \a s2; otherwise returns false.
Note that a null string is not equal to a not-null empty string.
Equivalent to compare(\a s1, \a s2) != 0.
@@ -6182,7 +6182,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is not equal to \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is not equal to \a s2; otherwise returns false.
Note that a null string is not equal to a not-null empty string.
Equivalent to compare(\a s1, \a s2) != 0.
@@ -6195,7 +6195,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\relates TQString
- Returns TRUE if \a s1 is lexically less than \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is lexically less than \a s2; otherwise returns false.
The comparison is case sensitive.
Equivalent to compare(\a s1, \a s2) \< 0.
@@ -6207,7 +6207,7 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is lexically less than \a s2; otherwise returns FALSE.
+ Returns true if \a s1 is lexically less than \a s2; otherwise returns false.
The comparison is case sensitive.
Equivalent to compare(\a s1, \a s2) \< 0.
@@ -6218,8 +6218,8 @@ bool operator>=( const char *s1, const TQString &s2 )
\relates TQString
- Returns TRUE if \a s1 is lexically less than or equal to \a s2;
- otherwise returns FALSE.
+ Returns true if \a s1 is lexically less than or equal to \a s2;
+ otherwise returns false.
The comparison is case sensitive.
Note that a null string is not equal to a not-null empty string.
@@ -6234,8 +6234,8 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is lexically less than or equal to \a s2;
- otherwise returns FALSE.
+ Returns true if \a s1 is lexically less than or equal to \a s2;
+ otherwise returns false.
The comparison is case sensitive.
Note that a null string is not equal to a not-null empty string.
@@ -6249,8 +6249,8 @@ bool operator>=( const char *s1, const TQString &s2 )
\relates TQString
- Returns TRUE if \a s1 is lexically greater than \a s2; otherwise
- returns FALSE.
+ Returns true if \a s1 is lexically greater than \a s2; otherwise
+ returns false.
The comparison is case sensitive.
Equivalent to compare(\a s1, \a s2) \> 0.
@@ -6262,8 +6262,8 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is lexically greater than \a s2; otherwise
- returns FALSE.
+ Returns true if \a s1 is lexically greater than \a s2; otherwise
+ returns false.
The comparison is case sensitive.
Equivalent to compare(\a s1, \a s2) \> 0.
@@ -6274,8 +6274,8 @@ bool operator>=( const char *s1, const TQString &s2 )
\relates TQString
- Returns TRUE if \a s1 is lexically greater than or equal to \a s2;
- otherwise returns FALSE.
+ Returns true if \a s1 is lexically greater than or equal to \a s2;
+ otherwise returns false.
The comparison is case sensitive.
Note that a null string is not equal to a not-null empty string.
@@ -6290,8 +6290,8 @@ bool operator>=( const char *s1, const TQString &s2 )
\overload
\relates TQString
- Returns TRUE if \a s1 is lexically greater than or equal to \a s2;
- otherwise returns FALSE.
+ Returns true if \a s1 is lexically greater than or equal to \a s2;
+ otherwise returns false.
The comparison is case sensitive.
Note that a null string is not equal to a not-null empty string.
@@ -6493,7 +6493,7 @@ TQDataStream &operator>>( TQDataStream &s, TQString &str )
guarantee that \a unicode will not be deleted or modified.
*/
TQConstString::TQConstString( const TQChar* unicode, uint length ) :
- TQString( new TQStringData( (TQChar*)unicode, length, length ), TRUE )
+ TQString( new TQStringData( (TQChar*)unicode, length, length ), true )
{
}
@@ -6530,16 +6530,16 @@ TQConstString::~TQConstString()
*/
/*!
- Returns TRUE if the string starts with \a s; otherwise returns
- FALSE.
+ Returns true if the string starts with \a s; otherwise returns
+ false.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
\code
TQString str( "Bananas" );
- str.startsWith( "Ban" ); // returns TRUE
- str.startsWith( "Car" ); // returns FALSE
+ str.startsWith( "Ban" ); // returns true
+ str.startsWith( "Car" ); // returns false
\endcode
\sa endsWith()
@@ -6549,34 +6549,34 @@ bool TQString::startsWith( const TQString& s, bool cs ) const
if ( isNull() )
return s.isNull();
if ( s.length() > length() )
- return FALSE;
+ return false;
if ( cs ) {
return memcmp((char*)d->unicode, (char*)s.d->unicode, s.length()*sizeof(TQChar)) == 0;
} else {
for ( int i = 0; i < (int) s.length(); i++ ) {
if ( ::lower(d->unicode[i]) != ::lower(s.d->unicode[i]) )
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
bool TQString::startsWith( const TQString& s ) const
{
- return startsWith( s, TRUE );
+ return startsWith( s, true );
}
/*!
- Returns TRUE if the string ends with \a s; otherwise returns
- FALSE.
+ Returns true if the string ends with \a s; otherwise returns
+ false.
- If \a cs is TRUE (the default), the search is case sensitive;
+ If \a cs is true (the default), the search is case sensitive;
otherwise the search is case insensitive.
\code
TQString str( "Bananas" );
- str.endsWith( "anas" ); // returns TRUE
- str.endsWith( "pple" ); // returns FALSE
+ str.endsWith( "anas" ); // returns true
+ str.endsWith( "pple" ); // returns false
\endcode
\sa startsWith()
@@ -6587,21 +6587,21 @@ bool TQString::endsWith( const TQString& s, bool cs ) const
return s.isNull();
int pos = length() - s.length();
if ( pos < 0 )
- return FALSE;
+ return false;
if ( cs ) {
return memcmp((char*)&d->unicode[pos], (char*)s.d->unicode, s.length()*sizeof(TQChar)) == 0;
} else {
for ( int i = 0; i < (int) s.length(); i++ ) {
if ( ::lower(d->unicode[pos + i]) != ::lower(s.d->unicode[i]) )
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
bool TQString::endsWith( const TQString& s ) const
{
- return endsWith( s, TRUE );
+ return endsWith( s, true );
}
/*! \fn void TQString::detach()
@@ -6619,7 +6619,7 @@ bool TQString::endsWith( const TQString& s ) const
\obsolete
Returns a static Windows TCHAR* from a TQString, adding NUL if \a
- addnul is TRUE.
+ addnul is true.
The lifetime of the return value is until the next call to this function,
or until the last copy of str is deleted, whatever comes first.
diff --git a/src/tools/tqstring.h b/src/tools/tqstring.h
index 12914075e..77bbfea2d 100644
--- a/src/tools/tqstring.h
+++ b/src/tools/tqstring.h
@@ -181,31 +181,31 @@ public:
;
#endif
- int find( TQChar c, int index=0, bool cs=TRUE ) const;
- int find( char c, int index=0, bool cs=TRUE ) const;
- int find( const TQString &str, int index=0, bool cs=TRUE ) const;
+ int find( TQChar c, int index=0, bool cs=true ) const;
+ int find( char c, int index=0, bool cs=true ) const;
+ int find( const TQString &str, int index=0, bool cs=true ) const;
#ifndef TQT_NO_REGEXP
int find( const TQRegExp &, int index=0 ) const;
#endif
#ifndef TQT_NO_CAST_ASCII
int find( const char* str, int index=0 ) const;
#endif
- int findRev( TQChar c, int index=-1, bool cs=TRUE) const;
- int findRev( char c, int index=-1, bool cs=TRUE) const;
- int findRev( const TQString &str, int index=-1, bool cs=TRUE) const;
+ int findRev( TQChar c, int index=-1, bool cs=true) const;
+ int findRev( char c, int index=-1, bool cs=true) const;
+ int findRev( const TQString &str, int index=-1, bool cs=true) const;
#ifndef TQT_NO_REGEXP
int findRev( const TQRegExp &, int index=-1 ) const;
#endif
#ifndef TQT_NO_CAST_ASCII
int findRev( const char* str, int index=-1 ) const;
#endif
- int contains( TQChar c, bool cs=TRUE ) const;
- int contains( char c, bool cs=TRUE ) const
+ int contains( TQChar c, bool cs=true ) const;
+ int contains( char c, bool cs=true ) const
{ return contains(TQChar(c), cs); }
#ifndef TQT_NO_CAST_ASCII
- int contains( const char* str, bool cs=TRUE ) const;
+ int contains( const char* str, bool cs=true ) const;
#endif
- int contains( const TQString &str, bool cs=TRUE ) const;
+ int contains( const TQString &str, bool cs=true ) const;
#ifndef TQT_NO_REGEXP
int contains( const TQRegExp & ) const;
#endif
@@ -231,8 +231,8 @@ public:
TQString right( uint len ) const;
TQString mid( uint index, uint len=0xffffffff) const;
- TQString leftJustify( uint width, TQChar fill=' ', bool trunc=FALSE)const;
- TQString rightJustify( uint width, TQChar fill=' ',bool trunc=FALSE)const;
+ TQString leftJustify( uint width, TQChar fill=' ', bool trunc=false)const;
+ TQString rightJustify( uint width, TQChar fill=' ',bool trunc=false)const;
TQString lower() const;
TQString upper() const;
@@ -270,7 +270,7 @@ public:
#endif
TQString &remove( uint index, uint len );
#if defined(Q_QDOC)
- TQString &remove( const TQString & str, bool cs = TRUE );
+ TQString &remove( const TQString & str, bool cs = true );
#else
// ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
TQString &remove( const TQString & );
@@ -291,10 +291,10 @@ public:
TQString &replace( uint index, uint len, char c )
{ return replace( index, len, TQChar(c) ); }
#if defined(Q_QDOC)
- TQString &replace( TQChar c, const TQString & after, bool cs = TRUE );
- TQString &replace( char c, const TQString & after, bool cs = TRUE );
+ TQString &replace( TQChar c, const TQString & after, bool cs = true );
+ TQString &replace( char c, const TQString & after, bool cs = true );
TQString &replace( const TQString & before, const TQString & after,
- bool cs = TRUE );
+ bool cs = true );
#else
// ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
TQString &replace( TQChar c, const TQString & );
@@ -302,7 +302,7 @@ public:
// ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
TQString &replace( char c, const TQString & after )
- { return replace( TQChar(c), after, TRUE ); }
+ { return replace( TQChar(c), after, true ); }
TQString &replace( char c, const TQString & after, bool cs )
{ return replace( TQChar(c), after, cs ); }
@@ -412,8 +412,8 @@ public:
#endif
#if defined(Q_QDOC)
- bool startsWith( const TQString& str, bool cs = TRUE ) const;
- bool endsWith( const TQString& str, bool cs = TRUE ) const;
+ bool startsWith( const TQString& str, bool cs = true ) const;
+ bool endsWith( const TQString& str, bool cs = true ) const;
#else
// ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
bool startsWith( const TQString& str ) const;
diff --git a/src/tools/tqstringlist.cpp b/src/tools/tqstringlist.cpp
index b1a2f70c4..39df6915f 100644
--- a/src/tools/tqstringlist.cpp
+++ b/src/tools/tqstringlist.cpp
@@ -211,7 +211,7 @@ TQStringList TQStringList::split( const TQChar &sep, const TQString &str,
one-character strings: split( TQString( "" ), "four" ) returns the
four-item list, "f", "o", "u", "r".
- If \a allowEmptyEntries is TRUE, a null string is inserted in
+ If \a allowEmptyEntries is true, a null string is inserted in
the list wherever the separator matches twice without intervening
text.
@@ -249,14 +249,14 @@ TQStringList TQStringList::split( const TQString &sep, const TQString &str,
Splits the string \a str into strings wherever the regular
expression \a sep occurs, and returns the list of those strings.
- If \a allowEmptyEntries is TRUE, a null string is inserted in
+ If \a allowEmptyEntries is true, a null string is inserted in
the list wherever the separator matches twice without intervening
text.
For example, if you split the string "a,,b,c" on commas, split()
returns the three-item list "a", "b", "c" if \a allowEmptyEntries
- is FALSE (the default), and the four-item list "a", "", "b", "c"
- if \a allowEmptyEntries is TRUE.
+ is false (the default), and the four-item list "a", "", "b", "c"
+ if \a allowEmptyEntries is true.
If \a sep does not match anywhere in \a str, split() returns a
single element list with the element containing the single string
@@ -300,7 +300,7 @@ TQStringList TQStringList::split( const TQRegExp &sep, const TQString &str,
/*!
Returns a list of all the strings containing the substring \a str.
- If \a cs is TRUE, the grep is done case-sensitively; otherwise
+ If \a cs is true, the grep is done case-sensitively; otherwise
case is ignored.
\code
@@ -349,7 +349,7 @@ TQStringList TQStringList::grep( const TQRegExp &rx ) const
that constitute the string list with the string \a after. Returns
a reference to the string list.
- If \a cs is TRUE, the search is case sensitive; otherwise the
+ If \a cs is true, the search is case sensitive; otherwise the
search is case insensitive.
Example:
@@ -424,11 +424,11 @@ TQStringList& TQStringList::gres( const TQRegExp &rx, const TQString &after )
TQString TQStringList::join( const TQString &sep ) const
{
TQString res;
- bool alredy = FALSE;
+ bool alredy = false;
for ( TQStringList::ConstIterator it = begin(); it != end(); ++it ) {
if ( alredy )
res += sep;
- alredy = TRUE;
+ alredy = true;
res += *it;
}
diff --git a/src/tools/tqstringlist.h b/src/tools/tqstringlist.h
index 664d205f6..9a0ae9ac0 100644
--- a/src/tools/tqstringlist.h
+++ b/src/tools/tqstringlist.h
@@ -73,20 +73,20 @@ public:
void sort();
- static TQStringList split( const TQString &sep, const TQString &str, bool allowEmptyEntries = FALSE );
- static TQStringList split( const TQChar &sep, const TQString &str, bool allowEmptyEntries = FALSE );
+ static TQStringList split( const TQString &sep, const TQString &str, bool allowEmptyEntries = false );
+ static TQStringList split( const TQChar &sep, const TQString &str, bool allowEmptyEntries = false );
#ifndef TQT_NO_REGEXP
- static TQStringList split( const TQRegExp &sep, const TQString &str, bool allowEmptyEntries = FALSE );
+ static TQStringList split( const TQRegExp &sep, const TQString &str, bool allowEmptyEntries = false );
#endif
TQString join( const TQString &sep ) const;
- TQStringList grep( const TQString &str, bool cs = TRUE ) const;
+ TQStringList grep( const TQString &str, bool cs = true ) const;
#ifndef TQT_NO_REGEXP
TQStringList grep( const TQRegExp &expr ) const;
#endif
TQStringList& gres( const TQString &before, const TQString &after,
- bool cs = TRUE );
+ bool cs = true );
#ifndef TQT_NO_REGEXP_CAPTURE
TQStringList& gres( const TQRegExp &expr, const TQString &after );
#endif
diff --git a/src/tools/tqstrlist.h b/src/tools/tqstrlist.h
index 2815b609e..9343dc914 100644
--- a/src/tools/tqstrlist.h
+++ b/src/tools/tqstrlist.h
@@ -58,7 +58,7 @@ typedef TQPtrListIterator<char> TQStrListIterator;
class TQ_EXPORT TQStrList : public TQPtrList<char>
{
public:
- TQStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; }
+ TQStrList( bool deepCopies=true ) { dc = deepCopies; del_item = deepCopies; }
TQStrList( const TQStrList & );
~TQStrList() { clear(); }
TQStrList& operator=( const TQStrList & );
@@ -81,7 +81,7 @@ private:
class TQ_EXPORT TQStrIList : public TQStrList // case insensitive string list
{
public:
- TQStrIList( bool deepCopies=TRUE ) : TQStrList( deepCopies ) {}
+ TQStrIList( bool deepCopies=true ) : TQStrList( deepCopies ) {}
~TQStrIList() { clear(); }
private:
int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
@@ -102,7 +102,7 @@ inline TQStrList & TQStrList::operator=( const TQStrList &strList )
inline TQStrList::TQStrList( const TQStrList &strList )
: TQPtrList<char>( strList )
{
- dc = FALSE;
+ dc = false;
operator=( strList );
}
diff --git a/src/tools/tqstrvec.h b/src/tools/tqstrvec.h
index 2490c828b..834b46f7c 100644
--- a/src/tools/tqstrvec.h
+++ b/src/tools/tqstrvec.h
@@ -50,8 +50,8 @@
class TQ_EXPORT TQStrVec : public TQPtrVector<char>
{
public:
- TQStrVec() { dc = TRUE; }
- TQStrVec( uint size, bool deepc = TRUE ) : TQPtrVector<char>(size) {dc=deepc;}
+ TQStrVec() { dc = true; }
+ TQStrVec( uint size, bool deepc = true ) : TQPtrVector<char>(size) {dc=deepc;}
~TQStrVec() { clear(); }
private:
Item newItem( Item d ) { return dc ? tqstrdup( (const char*)d ) : d; }
@@ -73,7 +73,7 @@ class TQ_EXPORT TQStrIVec : public TQStrVec // case insensitive string vec
{
public:
TQStrIVec() {}
- TQStrIVec( uint size, bool dc = TRUE ) : TQStrVec( size, dc ) {}
+ TQStrIVec( uint size, bool dc = true ) : TQStrVec( size, dc ) {}
~TQStrIVec() { clear(); }
private:
int compareItems( Item s1, Item s2 )
diff --git a/src/tools/tqtextstream.cpp b/src/tools/tqtextstream.cpp
index 20f6301e9..5fe14e28b 100644
--- a/src/tools/tqtextstream.cpp
+++ b/src/tools/tqtextstream.cpp
@@ -105,7 +105,7 @@
The TQIODevice is set in the constructor, or later using
setDevice(). If the end of the input is reached atEnd() returns
- TRUE. Data can be read into variables of the appropriate type
+ true. Data can be read into variables of the appropriate type
using the operator>>() overloads, or read in its entirety into a
single string using read(), or read a line at a time using
readLine(). Whitespace can be skipped over using skipWhiteSpace().
@@ -254,13 +254,13 @@ void TQTextStream::init()
{
// ### ungetcBuf = TQEOF;
dev = 0;
- owndev = FALSE;
+ owndev = false;
mapper = 0;
d = new TQTextStreamPrivate;
- doUnicodeHeader = TRUE; // autodetect
- latin1 = TRUE; // should use locale?
+ doUnicodeHeader = true; // autodetect
+ latin1 = true; // should use locale?
internalOrder = TQChar::networkOrdered();
- networkOrder = TRUE;
+ networkOrder = true;
}
/*!
@@ -330,13 +330,13 @@ bool TQStringBuffer::open( int m )
#if defined(QT_CHECK_STATE)
tqWarning( "TQStringBuffer::open: No string" );
#endif
- return FALSE;
+ return false;
}
if ( isOpen() ) {
#if defined(QT_CHECK_STATE)
tqWarning( "TQStringBuffer::open: Buffer already open" );
#endif
- return FALSE;
+ return false;
}
setMode( m );
if ( m & IO_Truncate )
@@ -349,7 +349,7 @@ bool TQStringBuffer::open( int m )
}
setState( IO_Open );
resetStatus();
- return TRUE;
+ return true;
}
void TQStringBuffer::close()
@@ -379,17 +379,17 @@ bool TQStringBuffer::at( Offset pos )
#if defined(QT_CHECK_STATE)
if ( !isOpen() ) {
tqWarning( "TQStringBuffer::at: Buffer is not open" );
- return FALSE;
+ return false;
}
#endif
if ( pos >= s->length()*2 ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQStringBuffer::at: Index %lu out of range", pos );
#endif
- return FALSE;
+ return false;
}
ioIndex = pos;
- return TRUE;
+ return true;
}
@@ -534,7 +534,7 @@ TQTextStream::TQTextStream( TQString* str, int filemode )
init();
dev = new TQStringBuffer( str );
((TQStringBuffer *)dev)->open( filemode );
- owndev = TRUE;
+ owndev = true;
setEncoding(RawUnicode);
reset();
d->sourceType = TQTextStreamPrivate::String;
@@ -551,7 +551,7 @@ TQTextStream::TQTextStream( TQString& str, int filemode )
init();
dev = new TQStringBuffer( &str );
((TQStringBuffer *)dev)->open( filemode );
- owndev = TRUE;
+ owndev = true;
setEncoding(RawUnicode);
reset();
d->sourceType = TQTextStreamPrivate::String;
@@ -589,7 +589,7 @@ TQTextStream::TQTextStream( TQByteArray a, int mode )
init();
dev = new TQBuffer( a );
((TQBuffer *)dev)->open( mode );
- owndev = TRUE;
+ owndev = true;
setEncoding( Latin1 ); //### Locale???
reset();
d->sourceType = TQTextStreamPrivate::ByteArray;
@@ -612,7 +612,7 @@ TQTextStream::TQTextStream( FILE *fh, int mode )
setEncoding( Locale ); //###
dev = new TQFile;
((TQFile *)dev)->open( mode, fh );
- owndev = TRUE;
+ owndev = true;
reset();
d->sourceType = TQTextStreamPrivate::File;
}
@@ -670,21 +670,21 @@ uint TQTextStream::ts_getbuf( TQChar* buf, uint len )
int ungetHack = EOF;
if ( doUnicodeHeader ) {
- doUnicodeHeader = FALSE; // only at the top
+ doUnicodeHeader = false; // only at the top
int c1 = dev->getch();
if ( c1 == EOF )
return rnum;
int c2 = dev->getch();
if ( c1 == 0xfe && c2 == 0xff ) {
mapper = 0;
- latin1 = FALSE;
+ latin1 = false;
internalOrder = TQChar::networkOrdered();
- networkOrder = TRUE;
+ networkOrder = true;
} else if ( c1 == 0xff && c2 == 0xfe ) {
mapper = 0;
- latin1 = FALSE;
+ latin1 = false;
internalOrder = !TQChar::networkOrdered();
- networkOrder = FALSE;
+ networkOrder = false;
} else {
if ( c2 != EOF ) {
dev->ungetch( c2 );
@@ -703,7 +703,7 @@ uint TQTextStream::ts_getbuf( TQChar* buf, uint len )
#ifndef TQT_NO_TEXTCODEC
if ( mapper ) {
- bool shortRead = FALSE;
+ bool shortRead = false;
if ( !d->decoder )
d->decoder = mapper->makeDecoder();
while( rnum < len ) {
@@ -733,7 +733,7 @@ uint TQTextStream::ts_getbuf( TQChar* buf, uint len )
// use buffered reading only for the first time, because we
// have to get the stream synchronous again (this is easier
// with single character reading)
- readBlock = FALSE;
+ readBlock = false;
}
// get stream (and codec) in sync
int c;
@@ -744,7 +744,7 @@ uint TQTextStream::ts_getbuf( TQChar* buf, uint len )
ungetHack = EOF;
}
if ( c == EOF ) {
- shortRead = TRUE;
+ shortRead = true;
break;
}
char b = c;
@@ -872,7 +872,7 @@ uint TQTextStream::ts_getbuf( TQChar* buf, uint len )
use it only for such codecs where this is true!
This function is (almost) a no-op for UTF 16. Don't use it if
- doUnicodeHeader is TRUE!
+ doUnicodeHeader is true!
*/
uint TQTextStream::ts_getline( TQChar* buf )
{
@@ -894,7 +894,7 @@ uint TQTextStream::ts_getline( TQChar* buf )
if ( !d->decoder )
d->decoder = mapper->makeDecoder();
TQString s;
- bool readBlock = TRUE;
+ bool readBlock = true;
for (;;) {
// for efficiency: try to read a line
if ( readBlock ) {
@@ -903,7 +903,7 @@ uint TQTextStream::ts_getline( TQChar* buf )
if ( rlen == -1 )
rlen = 0;
s += d->decoder->toUnicode( cbuf, rlen );
- readBlock = FALSE;
+ readBlock = false;
}
if ( dev->atEnd()
|| s.at( s.length()-1 ) == '\n'
@@ -977,7 +977,7 @@ void TQTextStream::ts_putc( TQChar c )
dev->putch( c.cell() );
} else {
if ( doUnicodeHeader ) {
- doUnicodeHeader = FALSE;
+ doUnicodeHeader = false;
ts_putc( TQChar::byteOrderMark );
}
if ( internalOrder ) {
@@ -1060,7 +1060,7 @@ TQTextStream &TQTextStream::writeRawBytes( const char* s, uint len )
TQTextStream &TQTextStream::writeBlock( const char* p, uint len )
{
if ( doUnicodeHeader ) {
- doUnicodeHeader = FALSE;
+ doUnicodeHeader = false;
if ( !mapper && !latin1 )
ts_putc( TQChar::byteOrderMark );
}
@@ -1109,7 +1109,7 @@ TQTextStream &TQTextStream::writeBlock( const TQChar* p, uint len )
delete [] str;
} else if ( internalOrder ) {
if ( doUnicodeHeader ) {
- doUnicodeHeader = FALSE;
+ doUnicodeHeader = false;
ts_putc( TQChar::byteOrderMark );
}
dev->writeBlock( (char*)p, sizeof(TQChar)*len );
@@ -1159,7 +1159,7 @@ void TQTextStream::setDevice( TQIODevice *iod )
{
if ( owndev ) {
delete dev;
- owndev = FALSE;
+ owndev = false;
}
dev = iod;
d->sourceType = TQTextStreamPrivate::IODevice;
@@ -1180,9 +1180,9 @@ void TQTextStream::unsetDevice()
/*!
\fn bool TQTextStream::atEnd() const
- Returns TRUE if the IO device has reached the end position (end of
+ Returns true if the IO device has reached the end position (end of
the stream or file) or if there is no IO device set; otherwise
- returns FALSE.
+ returns false.
\sa TQIODevice::atEnd()
*/
@@ -1588,7 +1588,7 @@ TQTextStream &TQTextStream::operator>>( double &f )
Reads a "word" from the stream into \a s and returns a reference
to the stream.
- A word consists of characters for which isspace() returns FALSE.
+ A word consists of characters for which isspace() returns false.
*/
TQTextStream &TQTextStream::operator>>( char *s )
@@ -1617,7 +1617,7 @@ TQTextStream &TQTextStream::operator>>( char *s )
Reads a "word" from the stream into \a str and returns a reference
to the stream.
- A word consists of characters for which isspace() returns FALSE.
+ A word consists of characters for which isspace() returns false.
*/
TQTextStream &TQTextStream::operator>>( TQString &str )
@@ -1643,7 +1643,7 @@ TQTextStream &TQTextStream::operator>>( TQString &str )
Reads a "word" from the stream into \a str and returns a reference
to the stream.
- A word consists of characters for which isspace() returns FALSE.
+ A word consists of characters for which isspace() returns false.
*/
TQTextStream &TQTextStream::operator>>( TQCString &str )
@@ -1703,24 +1703,24 @@ TQString TQTextStream::readLine()
return TQString::null;
}
#endif
- bool readCharByChar = TRUE;
+ bool readCharByChar = true;
TQString result;
#if 0
if ( !doUnicodeHeader && (
(latin1) ||
(mapper != 0 && mapper->mibEnum() == 106 ) // UTF 8
) ) {
- readCharByChar = FALSE;
+ readCharByChar = false;
// use optimized read line
TQChar c[getline_buf_size];
int pos = 0;
- bool eof = FALSE;
+ bool eof = false;
for (;;) {
pos = ts_getline( c );
if ( pos == 0 ) {
// something went wrong; try fallback
- readCharByChar = TRUE;
+ readCharByChar = true;
//dev->resetStatus();
break;
}
@@ -1731,7 +1731,7 @@ TQString TQTextStream::readLine()
result += TQString( c, pos-1 );
}
if ( pos == 1 && c[pos-1] == TQEOF )
- eof = TRUE;
+ eof = true;
break;
} else {
result += TQString( c, pos );
@@ -1790,7 +1790,7 @@ TQString TQTextStream::read()
const uint bufsize = 512;
TQChar buf[bufsize];
uint i, num, start;
- bool skipped_cr = FALSE;
+ bool skipped_cr = false;
for (;;) {
num = ts_getbuf(buf,bufsize);
@@ -1805,7 +1805,7 @@ TQString TQTextStream::read()
} else {
result += TQString( &buf[start], i-start );
start = i+1;
- skipped_cr = TRUE;
+ skipped_cr = true;
}
} else {
if ( skipped_cr ) {
@@ -1813,7 +1813,7 @@ TQString TQTextStream::read()
// Should not have skipped it
result += '\n';
}
- skipped_cr = FALSE;
+ skipped_cr = false;
}
}
}
@@ -1984,7 +1984,7 @@ TQTextStream &TQTextStream::operator<<( signed short i )
TQTextStream &TQTextStream::operator<<( unsigned short i )
{
- return output_int( I_SHORT | I_UNSIGNED, i, FALSE );
+ return output_int( I_SHORT | I_UNSIGNED, i, false );
}
@@ -2010,7 +2010,7 @@ TQTextStream &TQTextStream::operator<<( signed int i )
TQTextStream &TQTextStream::operator<<( unsigned int i )
{
- return output_int( I_INT | I_UNSIGNED, i, FALSE );
+ return output_int( I_INT | I_UNSIGNED, i, false );
}
@@ -2036,7 +2036,7 @@ TQTextStream &TQTextStream::operator<<( signed long i )
TQTextStream &TQTextStream::operator<<( unsigned long i )
{
- return output_int( I_LONG | I_UNSIGNED, i, FALSE );
+ return output_int( I_LONG | I_UNSIGNED, i, false );
}
/*!
@@ -2061,7 +2061,7 @@ TQTextStream &TQTextStream::operator<<( signed long long i )
TQTextStream &TQTextStream::operator<<( unsigned long long i )
{
- return output_int( I_LONGLONG | I_UNSIGNED, i, FALSE );
+ return output_int( I_LONGLONG | I_UNSIGNED, i, false );
}
@@ -2217,7 +2217,7 @@ TQTextStream &TQTextStream::operator<<( void *ptr )
setf( hex, basefield );
setf( showbase );
unsetf( uppercase );
- output_int( I_LONG | I_UNSIGNED, (ulong)ptr, FALSE );
+ output_int( I_LONG | I_UNSIGNED, (ulong)ptr, false );
flags( f );
return *this;
}
@@ -2523,47 +2523,47 @@ void TQTextStream::setEncoding( Encoding e )
switch ( e ) {
case Unicode:
mapper = 0;
- latin1 = FALSE;
- doUnicodeHeader = TRUE;
- internalOrder = TRUE;
+ latin1 = false;
+ doUnicodeHeader = true;
+ internalOrder = true;
networkOrder = TQChar::networkOrdered();
break;
case UnicodeUTF8:
#ifndef TQT_NO_TEXTCODEC
mapper = TQTextCodec::codecForMib( 106 );
- latin1 = FALSE;
- doUnicodeHeader = TRUE;
- internalOrder = TRUE;
+ latin1 = false;
+ doUnicodeHeader = true;
+ internalOrder = true;
networkOrder = TQChar::networkOrdered();
#else
mapper = 0;
- latin1 = TRUE;
- doUnicodeHeader = TRUE;
+ latin1 = true;
+ doUnicodeHeader = true;
#endif
break;
case UnicodeNetworkOrder:
mapper = 0;
- latin1 = FALSE;
- doUnicodeHeader = TRUE;
+ latin1 = false;
+ doUnicodeHeader = true;
internalOrder = TQChar::networkOrdered();
- networkOrder = TRUE;
+ networkOrder = true;
break;
case UnicodeReverse:
mapper = 0;
- latin1 = FALSE;
- doUnicodeHeader = TRUE;
+ latin1 = false;
+ doUnicodeHeader = true;
internalOrder = !TQChar::networkOrdered();
- networkOrder = FALSE;
+ networkOrder = false;
break;
case RawUnicode:
mapper = 0;
- latin1 = FALSE;
- doUnicodeHeader = FALSE;
- internalOrder = TRUE;
+ latin1 = false;
+ doUnicodeHeader = false;
+ internalOrder = true;
networkOrder = TQChar::networkOrdered();
break;
case Locale:
- latin1 = TRUE; // fallback to Latin-1
+ latin1 = true; // fallback to Latin-1
#ifndef TQT_NO_TEXTCODEC
mapper = TQTextCodec::codecForLocale();
// optimized Latin-1 processing
@@ -2575,12 +2575,12 @@ void TQTextStream::setEncoding( Encoding e )
#endif
mapper = 0;
- doUnicodeHeader = TRUE; // If it reads as Unicode, accept it
+ doUnicodeHeader = true; // If it reads as Unicode, accept it
break;
case Latin1:
mapper = 0;
- doUnicodeHeader = FALSE;
- latin1 = TRUE;
+ doUnicodeHeader = false;
+ latin1 = true;
break;
}
}
@@ -2605,7 +2605,7 @@ void TQTextStream::setCodec( TQTextCodec *codec )
latin1 = ( codec->mibEnum() == 4 );
if ( latin1 )
mapper = 0;
- doUnicodeHeader = FALSE;
+ doUnicodeHeader = false;
}
/*!
diff --git a/src/tools/tqtextstream.h b/src/tools/tqtextstream.h
index acfea9704..c0a4418d5 100644
--- a/src/tools/tqtextstream.h
+++ b/src/tools/tqtextstream.h
@@ -241,7 +241,7 @@ inline TQIODevice *TQTextStream::device() const
{ return dev; }
inline bool TQTextStream::atEnd() const
-{ return dev ? dev->atEnd() : FALSE; }
+{ return dev ? dev->atEnd() : false; }
inline bool TQTextStream::eof() const
{ return atEnd(); }
diff --git a/src/tools/tqthreadstorage_unix.cpp b/src/tools/tqthreadstorage_unix.cpp
index 71b10822b..b982590f9 100644
--- a/src/tools/tqthreadstorage_unix.cpp
+++ b/src/tools/tqthreadstorage_unix.cpp
@@ -55,7 +55,7 @@ static const int MAX_THREAD_STORAGE = 257; // 256 maximum + 1 used in TQRegExp
static pthread_mutex_t thread_storage_mutex = PTHREAD_MUTEX_INITIALIZER;
-static bool thread_storage_init = FALSE;
+static bool thread_storage_init = false;
static struct {
bool used;
void (*func)( void * );
@@ -70,7 +70,7 @@ TQThreadStorageData::TQThreadStorageData( void (*func)( void * ) )
// make sure things are initialized
if ( ! thread_storage_init )
memset( thread_storage_usage, 0, sizeof( thread_storage_usage ) );
- thread_storage_init = TRUE;
+ thread_storage_init = true;
for ( ; id < MAX_THREAD_STORAGE; ++id ) {
if ( !thread_storage_usage[id].used )
@@ -78,7 +78,7 @@ TQThreadStorageData::TQThreadStorageData( void (*func)( void * ) )
}
Q_ASSERT( id >= 0 && id < MAX_THREAD_STORAGE );
- thread_storage_usage[id].used = TRUE;
+ thread_storage_usage[id].used = true;
thread_storage_usage[id].func = func;
#ifdef TQTHREADSTORAGE_DEBUG
@@ -106,7 +106,7 @@ TQThreadStorageData::~TQThreadStorageData()
}
pthread_mutex_lock( &thread_storage_mutex );
- thread_storage_usage[id].used = FALSE;
+ thread_storage_usage[id].used = false;
thread_storage_usage[id].func = 0;
#ifdef TQTHREADSTORAGE_DEBUG
@@ -287,8 +287,8 @@ void TQThreadStorageData::finish( void **thread_storage )
/*!
\fn bool TQThreadStorage::hasLocalData() const
- Returns TRUE if the calling thread has non-zero data available;
- otherwise returns FALSE.
+ Returns true if the calling thread has non-zero data available;
+ otherwise returns false.
\sa localData()
*/
diff --git a/src/tools/tqtl.h b/src/tools/tqtl.h
index df5a7cdb6..c70f198f2 100644
--- a/src/tools/tqtl.h
+++ b/src/tools/tqtl.h
@@ -95,8 +95,8 @@ inline bool tqEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2
// ### compare using !(*first1 == *first2) in TQt 4.0
for ( ; first1 != last1; ++first1, ++first2 )
if ( *first1 != *first2 )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
template <class ForwardIterator, class T>
@@ -160,7 +160,7 @@ TQ_INLINE_TEMPLATES void qBubbleSort( InputIterator b, InputIterator e )
// So we have at least two elements in here
while( b != last ) {
- bool swapped = FALSE;
+ bool swapped = false;
InputIterator swap_pos = b;
InputIterator x = e;
InputIterator y = x;
@@ -169,7 +169,7 @@ TQ_INLINE_TEMPLATES void qBubbleSort( InputIterator b, InputIterator e )
--x;
--y;
if ( *x < *y ) {
- swapped = TRUE;
+ swapped = true;
tqSwap( *x, *y );
swap_pos = y;
}
diff --git a/src/tools/tqucom.cpp b/src/tools/tqucom.cpp
index 3ab50a7a9..ae99cfb22 100644
--- a/src/tools/tqucom.cpp
+++ b/src/tools/tqucom.cpp
@@ -51,10 +51,10 @@
const TQUuid TID_QUType_Null( 0xde56510e, 0x4e9f, 0x4b76, 0xa3, 0xc2, 0xd1, 0xe2, 0xef, 0x42, 0xf1, 0xac );
const TQUuid *TQUType_Null::uuid() const { return &TID_QUType_Null; }
const char *TQUType_Null::desc() const { return "null"; }
-bool TQUType_Null::canConvertFrom( TQUObject *, TQUType * ) { return FALSE; }
-bool TQUType_Null::canConvertTo( TQUObject *, TQUType * ) { return FALSE; }
-bool TQUType_Null::convertFrom( TQUObject *, TQUType * ) { return FALSE; }
-bool TQUType_Null::convertTo( TQUObject *, TQUType * ) { return FALSE; }
+bool TQUType_Null::canConvertFrom( TQUObject *, TQUType * ) { return false; }
+bool TQUType_Null::canConvertTo( TQUObject *, TQUType * ) { return false; }
+bool TQUType_Null::convertFrom( TQUObject *, TQUType * ) { return false; }
+bool TQUType_Null::convertTo( TQUObject *, TQUType * ) { return false; }
void TQUType_Null::clear( TQUObject *) {}
int TQUType_Null::serializeTo( TQUObject *, TQUBuffer * ) { return 0; }
int TQUType_Null::serializeFrom( TQUObject *, TQUBuffer * ) { return 0; }
@@ -75,7 +75,7 @@ void TQUType_enum::set( TQUObject *o, int v )
bool TQUType_enum::canConvertFrom( TQUObject *o, TQUType *t )
{
if ( isEqual( t, &static_QUType_int ) ) // ## todo unsigned int?
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
@@ -93,16 +93,16 @@ bool TQUType_enum::convertFrom( TQUObject *o, TQUType *t )
return t->convertTo( o, this );
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_enum::convertTo( TQUObject *o, TQUType *t )
{
if ( isEqual( t, &static_QUType_int ) ) {
o->type = &static_QUType_int;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
int TQUType_enum::serializeTo( TQUObject *, TQUBuffer * )
@@ -134,7 +134,7 @@ bool TQUType_ptr::canConvertFrom( TQUObject *o, TQUType *t )
bool TQUType_ptr::canConvertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
bool TQUType_ptr::convertFrom( TQUObject *o, TQUType *t )
@@ -144,7 +144,7 @@ bool TQUType_ptr::convertFrom( TQUObject *o, TQUType *t )
bool TQUType_ptr::convertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
int TQUType_ptr::serializeTo( TQUObject *, TQUBuffer * )
@@ -176,7 +176,7 @@ bool TQUType_iface::canConvertFrom( TQUObject *o, TQUType *t )
bool TQUType_iface::canConvertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
bool TQUType_iface::convertFrom( TQUObject *o, TQUType *t )
@@ -186,7 +186,7 @@ bool TQUType_iface::convertFrom( TQUObject *o, TQUType *t )
bool TQUType_iface::convertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
int TQUType_iface::serializeTo( TQUObject *, TQUBuffer * )
@@ -232,10 +232,10 @@ bool TQUType_idisp::convertTo( TQUObject *o, TQUType *t )
if ( isEqual( t, &static_QUType_iface ) ) {
o->payload.iface = (TQUnknownInterface*)o->payload.idisp;
o->type = &static_QUType_iface;
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
int TQUType_idisp::serializeTo( TQUObject *, TQUBuffer * )
@@ -267,7 +267,7 @@ bool TQUType_bool::canConvertFrom( TQUObject *o, TQUType *t )
bool TQUType_bool::canConvertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
bool TQUType_bool::convertFrom( TQUObject *o, TQUType *t )
@@ -277,7 +277,7 @@ bool TQUType_bool::convertFrom( TQUObject *o, TQUType *t )
bool TQUType_bool::convertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
int TQUType_bool::serializeTo( TQUObject *, TQUBuffer * )
@@ -305,7 +305,7 @@ void TQUType_int::set( TQUObject *o, int v )
bool TQUType_int::canConvertFrom( TQUObject *o, TQUType *t )
{
if ( isEqual( t, &static_QUType_double ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
@@ -323,7 +323,7 @@ bool TQUType_int::convertFrom( TQUObject *o, TQUType *t )
return t->convertTo( o, this );
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_int::convertTo( TQUObject *o, TQUType *t )
@@ -332,8 +332,8 @@ bool TQUType_int::convertTo( TQUObject *o, TQUType *t )
o->payload.d = (double)o->payload.i;
o->type = &static_QUType_double;
} else
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
int TQUType_int::serializeTo( TQUObject *, TQUBuffer * )
@@ -361,7 +361,7 @@ void TQUType_double::set( TQUObject *o, double v )
bool TQUType_double::canConvertFrom( TQUObject *o, TQUType *t )
{
if ( isEqual( t, &static_QUType_int ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
@@ -379,7 +379,7 @@ bool TQUType_double::convertFrom( TQUObject *o, TQUType *t )
return t->convertTo( o, this );
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_double::convertTo( TQUObject *o, TQUType *t )
@@ -391,8 +391,8 @@ bool TQUType_double::convertTo( TQUObject *o, TQUType *t )
o->payload.d = (double) o->payload.f;
o->type = &static_QUType_double;
} else
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
int TQUType_double::serializeTo( TQUObject *, TQUBuffer * )
@@ -420,10 +420,10 @@ void TQUType_charstar::set( TQUObject *o, const char* v, bool take )
} else {
o->payload.charstar.ptr = 0;
}
- o->payload.charstar.owner = TRUE;
+ o->payload.charstar.owner = true;
} else {
o->payload.charstar.ptr = (char*) v;
- o->payload.charstar.owner = FALSE;
+ o->payload.charstar.owner = false;
}
o->type = this;
}
@@ -435,7 +435,7 @@ bool TQUType_charstar::canConvertFrom( TQUObject *o, TQUType *t )
bool TQUType_charstar::canConvertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
bool TQUType_charstar::convertFrom( TQUObject *o, TQUType *t )
@@ -445,7 +445,7 @@ bool TQUType_charstar::convertFrom( TQUObject *o, TQUType *t )
bool TQUType_charstar::convertTo( TQUObject *, TQUType * )
{
- return FALSE;
+ return false;
}
void TQUType_charstar::clear( TQUObject *o )
@@ -485,7 +485,7 @@ bool TQUType_TQString::canConvertFrom( TQUObject *o, TQUType *t )
if ( isEqual( t, &static_QUType_charstar ) ||
isEqual( t, &static_QUType_double ) ||
isEqual( t, &static_QUType_int ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
@@ -512,7 +512,7 @@ bool TQUType_TQString::convertFrom( TQUObject *o, TQUType *t )
o->type->clear( o );
o->payload.ptr = str;
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_TQString::convertTo( TQUObject *o, TQUType *t )
@@ -520,7 +520,7 @@ bool TQUType_TQString::convertTo( TQUObject *o, TQUType *t )
TQString *str = (TQString *)o->payload.ptr;
if ( isEqual( t, &static_QUType_charstar ) ) {
o->payload.charstar.ptr = tqstrdup( str->local8Bit().data() );
- o->payload.charstar.owner = TRUE;
+ o->payload.charstar.owner = true;
o->type = &static_QUType_charstar;
} else if ( isEqual( t, &static_QUType_int ) ) {
o->payload.l = str->toLong();
@@ -529,10 +529,10 @@ bool TQUType_TQString::convertTo( TQUObject *o, TQUType *t )
o->payload.d = str->toDouble();
o->type = &static_QUType_double;
} else {
- return FALSE;
+ return false;
}
delete str;
- return TRUE;
+ return true;
}
int TQUType_TQString::serializeTo( TQUObject *, TQUBuffer * )
diff --git a/src/tools/tqucom_p.h b/src/tools/tqucom_p.h
index 761d5cee4..5c92960a7 100644
--- a/src/tools/tqucom_p.h
+++ b/src/tools/tqucom_p.h
@@ -220,8 +220,8 @@ struct TQ_EXPORT TQUProperty
int set; // -1 undefined
int get; // -1 undefined
- int designable; // -1 FALSE, -2 TRUE, else method
- int stored; // -1 FALSE, -2 TRUE, else method
+ int designable; // -1 false, -2 true, else method
+ int stored; // -1 false, -2 true, else method
};
// An interface description describes one interface, that is all its
@@ -433,7 +433,7 @@ struct TQ_EXPORT TQUType_charstar : public TQUType
const TQUuid *uuid() const;
const char *desc() const;
- void set( TQUObject *, const char*, bool take = FALSE );
+ void set( TQUObject *, const char*, bool take = false );
char* get( TQUObject *o ){ return o->payload.charstar.ptr; }
bool canConvertFrom( TQUObject *, TQUType * );
bool canConvertTo( TQUObject *, TQUType * );
diff --git a/src/tools/tqunicodetables_p.h b/src/tools/tqunicodetables_p.h
index 18045f470..1325c2478 100644
--- a/src/tools/tqunicodetables_p.h
+++ b/src/tools/tqunicodetables_p.h
@@ -163,7 +163,7 @@ inline bool mirrored( const TQChar &c )
return TQUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128;
#else
Q_UNUSED(c);
- return FALSE;
+ return false;
#endif
}
@@ -214,7 +214,7 @@ inline unsigned char combiningClass( const TQChar &ch )
inline bool isSpace( const TQChar &ch )
{
- if( ch.unicode() >= 9 && ch.unicode() <=13 ) return TRUE;
+ if( ch.unicode() >= 9 && ch.unicode() <=13 ) return true;
TQChar::Category c = ::category( ch );
return c >= TQChar::Separator_Space && c <= TQChar::Separator_Paragraph;
}
@@ -257,7 +257,7 @@ do { \
} else { \
script = (TQFont::Script)scriptForChar( _uc ); \
} \
-} while( FALSE )
+} while( false )
#else
#define SCRIPT_FOR_CHAR( script, c ) \
script = (TQFont::Script)scriptForChar( (c).unicode() )
diff --git a/src/tools/tquuid.cpp b/src/tools/tquuid.cpp
index 566c9f405..bcef551a3 100644
--- a/src/tools/tquuid.cpp
+++ b/src/tools/tquuid.cpp
@@ -62,7 +62,7 @@
UUIDs can be constructed from numeric values or from strings, or
using the static createUuid() function. They can be converted to a
string with toString(). UUIDs have a variant() and a version(),
- and null UUIDs return TRUE from isNull().
+ and null UUIDs return true from isNull().
*/
/*!
@@ -162,15 +162,15 @@ TQUuid::TQUuid( const char *text )
/*!
\fn bool TQUuid::operator==(const TQUuid &other) const
- Returns TRUE if this TQUuid and the \a other TQUuid are identical;
- otherwise returns FALSE.
+ Returns true if this TQUuid and the \a other TQUuid are identical;
+ otherwise returns false.
*/
/*!
\fn bool TQUuid::operator!=(const TQUuid &other) const
- Returns TRUE if this TQUuid and the \a other TQUuid are different;
- otherwise returns FALSE.
+ Returns true if this TQUuid and the \a other TQUuid are different;
+ otherwise returns false.
*/
#ifndef TQT_NO_QUUID_STRING
/*!
@@ -241,8 +241,8 @@ TQDataStream &operator>>( TQDataStream &s, TQUuid &id )
#endif
/*!
- Returns TRUE if this is the null UUID
- {00000000-0000-0000-0000-000000000000}; otherwise returns FALSE.
+ Returns true if this is the null UUID
+ {00000000-0000-0000-0000-000000000000}; otherwise returns false.
*/
bool TQUuid::isNull() const
{
@@ -320,9 +320,9 @@ TQUuid::Version TQUuid::version() const
/*!
\fn bool TQUuid::operator<(const TQUuid &other) const
- Returns TRUE if this TQUuid is of the same variant,
+ Returns true if this TQUuid is of the same variant,
and lexicographically before the \a other TQUuid;
- otherwise returns FALSE.
+ otherwise returns false.
\sa variant()
*/
@@ -330,7 +330,7 @@ TQUuid::Version TQUuid::version() const
bool TQUuid::operator<(const TQUuid &other ) const
{
if ( variant() != other.variant() )
- return FALSE;
+ return false;
ISLESS( data1, other.data1 );
ISLESS( data2, other.data2 );
@@ -338,15 +338,15 @@ bool TQUuid::operator<(const TQUuid &other ) const
for ( int n = 0; n < 8; n++ ) {
ISLESS( data4[n], other.data4[n] );
}
- return FALSE;
+ return false;
}
/*!
\fn bool TQUuid::operator>(const TQUuid &other) const
- Returns TRUE if this TQUuid is of the same variant,
+ Returns true if this TQUuid is of the same variant,
and lexicographically after the \a other TQUuid;
- otherwise returns FALSE.
+ otherwise returns false.
\sa variant()
*/
@@ -354,7 +354,7 @@ bool TQUuid::operator<(const TQUuid &other ) const
bool TQUuid::operator>(const TQUuid &other ) const
{
if ( variant() != other.variant() )
- return FALSE;
+ return false;
ISMORE( data1, other.data1 );
ISMORE( data2, other.data2 );
@@ -362,7 +362,7 @@ bool TQUuid::operator>(const TQUuid &other ) const
for ( int n = 0; n < 8; n++ ) {
ISMORE( data4[n], other.data4[n] );
}
- return FALSE;
+ return false;
}
/*!
diff --git a/src/tools/tquuid.h b/src/tools/tquuid.h
index 69092a5d7..d1daa879d 100644
--- a/src/tools/tquuid.h
+++ b/src/tools/tquuid.h
@@ -120,13 +120,13 @@ struct TQ_EXPORT TQUuid
uint i;
if ( data1 != orig.data1 || data2 != orig.data2 ||
data3 != orig.data3 )
- return FALSE;
+ return false;
for( i = 0; i < 8; i++ )
if ( data4[i] != orig.data4[i] )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
bool operator!=(const TQUuid &orig ) const
@@ -162,13 +162,13 @@ struct TQ_EXPORT TQUuid
uint i;
if ( data1 != guid.Data1 || data2 != guid.Data2 ||
data3 != guid.Data3 )
- return FALSE;
+ return false;
for( i = 0; i < 8; i++ )
if ( data4[i] != guid.Data4[i] )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
bool operator!=( const GUID &guid ) const
diff --git a/src/tools/tqvaluelist.h b/src/tools/tqvaluelist.h
index d90001397..d0beab5ed 100644
--- a/src/tools/tqvaluelist.h
+++ b/src/tools/tqvaluelist.h
@@ -474,7 +474,7 @@ public:
bool operator== ( const std::list<T>& l ) const
{
if ( size() != l.size() )
- return FALSE;
+ return false;
const_iterator it2 = begin();
#if !defined(Q_CC_MIPS)
typename
@@ -482,8 +482,8 @@ public:
std::list<T>::const_iterator it = l.begin();
for ( ; it2 != end(); ++it2, ++it )
if ( !((*it2) == (*it)) )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
#endif
bool operator== ( const TQValueList<T>& l ) const;
@@ -599,13 +599,13 @@ template <class T>
TQ_INLINE_TEMPLATES bool TQValueList<T>::operator== ( const TQValueList<T>& l ) const
{
if ( size() != l.size() )
- return FALSE;
+ return false;
const_iterator it2 = begin();
const_iterator it = l.begin();
for( ; it != l.end(); ++it, ++it2 )
if ( !( *it == *it2 ) )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
template <class T>
diff --git a/src/tools/tqvaluevector.h b/src/tools/tqvaluevector.h
index 06dfc06f4..3cae4b71d 100644
--- a/src/tools/tqvaluevector.h
+++ b/src/tools/tqvaluevector.h
@@ -457,12 +457,12 @@ public:
// ### remove in TQt 4.0
bool operator==( const TQValueVector<T>& x )
{
- return size()==x.size() ? tqEqual( constBegin(), constEnd(), x.begin()) : FALSE;
+ return size()==x.size() ? tqEqual( constBegin(), constEnd(), x.begin()) : false;
}
bool operator==( const TQValueVector<T>& x ) const
{
- return size()==x.size() ? tqEqual( begin(), end(), x.begin() ) : FALSE;
+ return size()==x.size() ? tqEqual( begin(), end(), x.begin() ) : false;
}
typedef T ValueType;
diff --git a/src/tools/tqwaitcondition_unix.cpp b/src/tools/tqwaitcondition_unix.cpp
index 78fdb16bc..8067c4ace 100644
--- a/src/tools/tqwaitcondition_unix.cpp
+++ b/src/tools/tqwaitcondition_unix.cpp
@@ -216,10 +216,10 @@ void TQWaitCondition::wakeAll()
block until either of these conditions is met:
\list
\i Another thread signals it using wakeOne() or wakeAll(). This
- function will return TRUE in this case.
+ function will return true in this case.
\i \a time milliseconds has elapsed. If \a time is ULONG_MAX (the
default), then the wait will never timeout (the event must be
- signalled). This function will return FALSE if the wait timed
+ signalled). This function will return false if the wait timed
out.
\endlist
@@ -265,10 +265,10 @@ bool TQWaitCondition::wait(unsigned long time)
will block until either of these conditions is met:
\list
\i Another thread signals it using wakeOne() or wakeAll(). This
- function will return TRUE in this case.
+ function will return true in this case.
\i \a time milliseconds has elapsed. If \a time is ULONG_MAX (the
default), then the wait will never timeout (the event must be
- signalled). This function will return FALSE if the wait timed
+ signalled). This function will return false if the wait timed
out.
\endlist
@@ -281,14 +281,14 @@ bool TQWaitCondition::wait(unsigned long time)
bool TQWaitCondition::wait(TQMutex *mutex, unsigned long time)
{
if (! mutex)
- return FALSE;
+ return false;
if (mutex->d->type() == Q_MUTEX_RECURSIVE) {
#ifdef QT_CHECK_RANGE
tqWarning("Wait condition warning: using recursive mutexes with\n"
" wait conditions is undefined!");
#endif
- return FALSE;
+ return false;
}
int ret;
diff --git a/src/tqmoc/tqmoc.y b/src/tqmoc/tqmoc.y
index 639756218..9df3d1ac7 100644
--- a/src/tqmoc/tqmoc.y
+++ b/src/tqmoc/tqmoc.y
@@ -91,7 +91,7 @@ static void enterNameSpace( const char *name = 0 );
static void leaveNameSpace();
static void selectOutsideClassState();
static void registerClassInNamespace();
-static bool suppress_func_warn = FALSE;
+static bool suppress_func_warn = false;
static void func_warn( const char *msg );
static void tqmoc_warn( const char *msg );
static void tqmoc_err( const char *s );
@@ -122,12 +122,12 @@ bool validUType( TQCString ctype )
if ( ctype.right(1) == "&" )
ctype = ctype.left( ctype.length() - 1 );
else if ( ctype.right(1) == "*" )
- return TRUE;
+ return true;
int i = -1;
while ( utype_map[++i] )
if ( ctype == utype_map[i] )
- return TRUE;
+ return true;
return isEnumType( ctype );
}
@@ -184,12 +184,12 @@ TQCString uType( TQCString ctype )
bool isInOut( TQCString ctype )
{
if ( ctype.left(6) == "const " )
- return FALSE;
+ return false;
if ( ctype.right(1) == "&" )
- return TRUE;
+ return true;
if ( ctype.right(2) == "**" )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
TQCString uTypeExtra( TQCString ctype )
@@ -221,7 +221,7 @@ TQCString uTypeExtra( TQCString ctype )
if ( idx >= 0 ) {
typeExtra.sprintf( "&enum_tbl[%d]", enumIndex( ctype ) );
} else {
- typeExtra.sprintf( "parentObject->enumerator(\"%s\", TRUE )", ctype.data() );
+ typeExtra.sprintf( "parentObject->enumerator(\"%s\", true )", ctype.data() );
}
typeExtra =
"\n#ifndef TQT_NO_PROPERTIES\n\t " + typeExtra +
@@ -287,7 +287,7 @@ int tqvariant_nameToType( const char* name )
}
/*
- Returns TRUE if the type is a TQVariant types.
+ Returns true if the type is a TQVariant types.
*/
bool isVariantType( const char* type )
{
@@ -312,7 +312,7 @@ enum Access { Private, Protected, Public };
class Argument // single arg meta data
{
public:
- Argument( const char *left, const char *right, const char* argName = 0, bool isDefaultArgument = FALSE )
+ Argument( const char *left, const char *right, const char* argName = 0, bool isDefaultArgument = false )
{
leftType = rmWS( left );
rightType = rmWS( right );
@@ -359,18 +359,18 @@ public:
class ArgList : public TQPtrList<Argument> { // member function arg list
public:
- ArgList() { setAutoDelete( TRUE ); }
+ ArgList() { setAutoDelete( true ); }
~ArgList() { clear(); }
/* the clone has one default argument less, the orignal has all default arguments removed */
ArgList* magicClone() {
ArgList* l = new ArgList;
- bool firstDefault = FALSE;
+ bool firstDefault = false;
for ( first(); current(); next() ) {
bool isDefault = current()->isDefault;
if ( !firstDefault && isDefault ) {
- isDefault = FALSE;
- firstDefault = TRUE;
+ isDefault = false;
+ firstDefault = true;
}
l->append( new Argument( current()->leftType, current()->rightType, current()->name, isDefault ) );
}
@@ -386,9 +386,9 @@ public:
bool hasDefaultArguments() {
for ( Argument* a = first(); a; a = next() ) {
if ( a->isDefault )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
};
@@ -416,7 +416,7 @@ struct Function // member function meta data
class FuncList : public TQPtrList<Function> { // list of member functions
public:
- FuncList( bool autoDelete = FALSE ) { setAutoDelete( autoDelete ); }
+ FuncList( bool autoDelete = false ) { setAutoDelete( autoDelete ); }
FuncList find( const char* name )
{
@@ -438,7 +438,7 @@ public:
class EnumList : public TQPtrList<Enum> { // list of property enums
public:
- EnumList() { setAutoDelete(TRUE); }
+ EnumList() { setAutoDelete(true); }
};
@@ -518,7 +518,7 @@ struct Property
class PropList : public TQPtrList<Property> { // list of properties
public:
- PropList() { setAutoDelete( TRUE ); }
+ PropList() { setAutoDelete( true ); }
};
@@ -533,7 +533,7 @@ struct ClassInfo
class ClassInfoList : public TQPtrList<ClassInfo> { // list of class infos
public:
- ClassInfoList() { setAutoDelete( TRUE ); }
+ ClassInfoList() { setAutoDelete( true ); }
};
class parser_reg {
@@ -605,10 +605,10 @@ char *straddSpc( const char *, const char *,
const char *, const char * );
extern int yydebug;
-bool lexDebug = FALSE;
+bool lexDebug = false;
int lineNo; // current line number
-bool errorControl = FALSE; // controled errors
-bool displayWarnings = TRUE;
+bool errorControl = false; // controled errors
+bool displayWarnings = true;
bool skipClass; // don't generate for class
bool skipFunc; // don't generate for func
bool templateClass; // class is a template
@@ -620,9 +620,9 @@ Enum *tmpEnum; // current enum
Access tmpAccess; // current access permission
Access subClassPerm; // current access permission
-bool TQ_OBJECTdetected; // TRUE if current class
+bool TQ_OBJECTdetected; // true if current class
// contains the TQ_OBJECT macro
-bool TQ_PROPERTYdetected; // TRUE if current class
+bool TQ_PROPERTYdetected; // true if current class
// contains at least one TQ_PROPERTY,
// TQ_OVERRIDE, TQ_SETS or TQ_ENUMS macro
bool tmpPropOverride; // current property override setting
@@ -896,8 +896,8 @@ enumerator_expression: /* empty */ { initExpression();
decl_specifier: storage_class_specifier { $$ = ""; }
| type_specifier { $$ = $1; }
| fct_specifier { $$ = ""; }
- | FRIEND { skipFunc = TRUE; $$ = ""; }
- | TYPEDEF { skipFunc = TRUE; $$ = ""; }
+ | FRIEND { skipFunc = true; $$ = ""; }
+ | TYPEDEF { skipFunc = true; $$ = ""; }
;
decl_specifiers: decl_specs_opt type_name decl_specs_opt
@@ -913,7 +913,7 @@ decl_specs: decl_specifier { $$ = $1; }
storage_class_specifier: AUTO
| REGISTER
- | STATIC { skipFunc = TRUE; }
+ | STATIC { skipFunc = true; }
| EXTERN
;
@@ -954,7 +954,7 @@ template_spec: TEMPLATE '<' template_args '>'
opt_template_spec: /* empty */
| template_spec { templateClassOld = templateClass;
- templateClass = TRUE;
+ templateClass = true;
}
;
@@ -1014,7 +1014,7 @@ argument_declaration: decl_specifiers abstract_decl_opt
| decl_specifiers abstract_decl_opt
'=' { expLevel = 1; }
def_argument
- { $$ = new Argument(straddSpc($1,$2),"", 0, TRUE ); }
+ { $$ = new Argument(straddSpc($1,$2),"", 0, true ); }
| decl_specifiers abstract_decl_opt dname
abstract_decl_opt
{ $$ = new Argument(straddSpc($1,$2),$4, $3); }
@@ -1022,7 +1022,7 @@ argument_declaration: decl_specifiers abstract_decl_opt
abstract_decl_opt
'=' { expLevel = 1; }
def_argument
- { $$ = new Argument(straddSpc($1,$2),$4, $3, TRUE); }
+ { $$ = new Argument(straddSpc($1,$2),$4, $3, true); }
;
@@ -1077,10 +1077,10 @@ fct_name: IDENTIFIER /* NOTE: simplified! */
{ func_warn("Variable as signal or slot."); }
| IDENTIFIER '=' { expLevel=0; }
const_expression /* probably const member */
- { skipFunc = TRUE; }
+ { skipFunc = true; }
| IDENTIFIER array_decls '=' { expLevel=0; }
const_expression /* probably const member */
- { skipFunc = TRUE; }
+ { skipFunc = true; }
;
@@ -1139,16 +1139,16 @@ class_specifier: full_class_head
opt_obj_member_list
'}' { BEGIN QT_DEF; } /*catch ';'*/
| class_head { BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
+ skipClass = true; }
| class_head '*' IDENTIFIER { BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
+ skipClass = true; }
| class_head '&' IDENTIFIER { BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
+ skipClass = true; }
| class_head
'(' IDENTIFIER ')' /* TQt macro name */
{ BEGIN QT_DEF; /* catch ';' */
- skipClass = TRUE; }
- | template_spec whatever { skipClass = TRUE;
+ skipClass = true; }
+ | template_spec whatever { skipClass = true;
BEGIN GIMME_SEMICOLON; }
;
@@ -1163,13 +1163,13 @@ whatever: IDENTIFIER
class_head: class_key
qualified_class_name { g->className = $2;
if ( g->className == "TQObject" )
- TQ_OBJECTdetected = TRUE;
+ TQ_OBJECTdetected = true;
}
| class_key
IDENTIFIER /* possible DLL EXPORT macro */
class_name { g->className = $3;
if ( g->className == "TQObject" )
- TQ_OBJECTdetected = TRUE;
+ TQ_OBJECTdetected = true;
}
;
@@ -1235,17 +1235,17 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; }
" section of the class.\n"
"TQ_OBJECT is a macro that resets"
" access permission to \"private\".");
- TQ_OBJECTdetected = TRUE;
+ TQ_OBJECTdetected = true;
}
| TQ_PROPERTY { tmpYYStart = YY_START;
- tmpPropOverride = FALSE;
+ tmpPropOverride = false;
BEGIN IN_PROPERTY; }
'(' property ')' {
BEGIN tmpYYStart;
}
opt_property_candidates
| TQ_OVERRIDE { tmpYYStart = YY_START;
- tmpPropOverride = TRUE;
+ tmpPropOverride = true;
BEGIN IN_PROPERTY; }
'(' property ')' {
BEGIN tmpYYStart;
@@ -1260,13 +1260,13 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; }
opt_property_candidates
| TQ_ENUMS { tmpYYStart = YY_START; BEGIN IN_PROPERTY; }
'(' qt_enums ')' {
- TQ_PROPERTYdetected = TRUE;
+ TQ_PROPERTYdetected = true;
BEGIN tmpYYStart;
}
opt_property_candidates
| TQ_SETS { tmpYYStart = YY_START; BEGIN IN_PROPERTY; }
'(' qt_sets ')' {
- TQ_PROPERTYdetected = TRUE;
+ TQ_PROPERTYdetected = true;
BEGIN tmpYYStart;
}
opt_property_candidates
@@ -1279,11 +1279,11 @@ slot_area: SIGNALS ':' { tqmoc_err( "Signals cannot "
BEGIN QT_DEF;
else
BEGIN IN_CLASS;
- suppress_func_warn = TRUE;
+ suppress_func_warn = true;
}
opt_property_candidates
{
- suppress_func_warn = FALSE;
+ suppress_func_warn = false;
}
| IDENTIFIER { BEGIN IN_CLASS;
if ( classPLevel != 1 )
@@ -1434,7 +1434,7 @@ type_and_name: type_name fct_name
delete [] tmp;
tmpFunc->name = $5; }
| decl_specs type_name /* probably friend decl */
- { skipFunc = TRUE; }
+ { skipFunc = true; }
| type_name ptr_operators fct_name
{ tmpFunc->type =
straddSpc($1,$2);
@@ -1557,7 +1557,7 @@ property: IDENTIFIER IDENTIFIER
if ( g->propRead.isEmpty() && !g->propOverride )
tqmoc_err( "A property must at least feature a read method." );
checkPropertyName( $2 );
- TQ_PROPERTYdetected = TRUE;
+ TQ_PROPERTYdetected = true;
// Avoid duplicates
for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) {
if ( lit.current()->name == $2 ) {
@@ -1612,13 +1612,13 @@ TQCString combinePath( const char *, const char * );
FILE *out; // output file
-parser_reg::parser_reg() : funcs(TRUE)
+parser_reg::parser_reg() : funcs(true)
{
gen_count = 0;
- noInclude = FALSE; // no #include <filename>
- generatedCode = FALSE; // no code generated
- mocError = FALSE; // moc parsing error occurred
- hasVariantIncluded = FALSE;
+ noInclude = false; // no #include <filename>
+ generatedCode = false; // no code generated
+ mocError = false; // moc parsing error occurred
+ hasVariantIncluded = false;
}
@@ -1662,7 +1662,7 @@ int main( int argc, char **argv )
{
init();
- bool autoInclude = TRUE;
+ bool autoInclude = true;
const char *error = 0;
g->qtPath = "";
for ( int n=1; n<argc && error==0; n++ ) {
@@ -1679,11 +1679,11 @@ int main( int argc, char **argv )
} else
g->outputFile = &opt[1];
} else if ( opt == "i" ) { // no #include statement
- g->noInclude = TRUE;
- autoInclude = FALSE;
+ g->noInclude = true;
+ autoInclude = false;
} else if ( opt[0] == 'f' ) { // produce #include statement
- g->noInclude = FALSE;
- autoInclude = FALSE;
+ g->noInclude = false;
+ autoInclude = false;
if ( opt[1] ) // -fsomething.h
g->includeFiles.append( &opt[1] );
} else if ( opt == "pch" ) { // produce #include statement for PCH
@@ -1722,13 +1722,13 @@ int main( int argc, char **argv )
cleanup();
return 1;
} else if ( opt == "k" ) { // stop on errors
- errorControl = TRUE;
+ errorControl = true;
} else if ( opt == "nw" ) { // don't display warnings
- displayWarnings = FALSE;
+ displayWarnings = false;
} else if ( opt == "ldbg" ) { // lex debug output
- lexDebug = TRUE;
+ lexDebug = true;
} else if ( opt == "ydbg" ) { // yacc debug output
- yydebug = TRUE;
+ yydebug = true;
} else {
error = "Invalid argument";
}
@@ -1743,9 +1743,9 @@ int main( int argc, char **argv )
if ( autoInclude ) {
int ppos = g->fileName.findRev('.');
if ( ppos != -1 && tolower( g->fileName[ppos + 1] ) == 'h' )
- g->noInclude = FALSE;
+ g->noInclude = false;
else
- g->noInclude = TRUE;
+ g->noInclude = true;
}
setDefaultIncludeFile();
@@ -1829,9 +1829,9 @@ TQCString combinePath( const char *infile, const char *outfile )
int numCommonComponents = 0;
TQStringList inSplitted =
- TQStringList::split( '/', inFileInfo.dir().canonicalPath(), TRUE );
+ TQStringList::split( '/', inFileInfo.dir().canonicalPath(), true );
TQStringList outSplitted =
- TQStringList::split( '/', outFileInfo.dir().canonicalPath(), TRUE );
+ TQStringList::split( '/', outFileInfo.dir().canonicalPath(), true );
while ( !inSplitted.isEmpty() && !outSplitted.isEmpty() &&
inSplitted.first() == outSplitted.first() ) {
@@ -1872,8 +1872,8 @@ void init() // initialize
delete g;
g = new parser_reg;
lineNo = 1;
- skipClass = FALSE;
- skipFunc = FALSE;
+ skipClass = false;
+ skipFunc = false;
tmpArgList = new ArgList;
tmpFunc = new Function;
tmpEnum = new Enum;
@@ -1889,10 +1889,10 @@ void initClass() // prepare for new class
{
tmpAccess = Private;
subClassPerm = Private;
- TQ_OBJECTdetected = FALSE;
- TQ_PROPERTYdetected = FALSE;
- skipClass = FALSE;
- templateClass = FALSE;
+ TQ_OBJECTdetected = false;
+ TQ_PROPERTYdetected = false;
+ skipClass = false;
+ templateClass = false;
g->slots.clear();
g->signals.clear();
g->propfuncs.clear();
@@ -1916,10 +1916,10 @@ TQPtrList<NamespaceInfo> namespaces;
void enterNameSpace( const char *name ) // prepare for new class
{
- static bool first = TRUE;
+ static bool first = true;
if ( first ) {
- namespaces.setAutoDelete( TRUE );
- first = FALSE;
+ namespaces.setAutoDelete( true );
+ first = false;
}
NamespaceInfo *tmp = new NamespaceInfo;
@@ -2052,7 +2052,7 @@ void addExpressionChar( const char c )
void yyerror( const char *msg ) // print yacc error message
{
- g->mocError = TRUE;
+ g->mocError = true;
fprintf( stderr, ErrorFormatString" Error: %s\n", g->fileName.data(), lineNo, msg );
if ( errorControl ) {
if ( !g->outputFile.isEmpty() && yyin && fclose(yyin) == 0 )
@@ -2091,14 +2091,14 @@ void func_warn( const char *msg )
{
if ( !suppress_func_warn )
tqmoc_warn( msg );
- skipFunc = TRUE;
+ skipFunc = true;
}
void operatorError()
{
if ( !suppress_func_warn )
tqmoc_warn("Operator functions cannot be signals or slots.");
- skipFunc = TRUE;
+ skipFunc = true;
}
#ifndef yywrap
@@ -2308,7 +2308,7 @@ bool isEnumType( const char* type )
bool isPropertyType( const char* type )
{
if ( isVariantType( type ) )
- return TRUE;
+ return true;
return isEnumType( type );
}
@@ -2383,10 +2383,10 @@ int generateProps()
tmp = tmp.simplifyWhiteSpace();
if ( p->type == tmp ) {
// If it is an enum then it may not be a set
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->gspec = spec;
p->getfunc = f;
@@ -2396,10 +2396,10 @@ int generateProps()
else if ( !isVariantType( p->type ) ) {
if ( tmp == "int" || tmp == "uint" || tmp == "unsigned int" ) {
// Test whether the enum is really a set (unfortunately we don't know enums of super classes)
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && !lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->gspec = spec;
p->getfunc = f;
@@ -2412,10 +2412,10 @@ int generateProps()
if ( displayWarnings ) {
// Is the type a set, that means, mentioned in TQ_SETS?
- bool set = FALSE;
+ bool set = false;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- set = TRUE;
+ set = true;
fprintf( stderr, ErrorFormatString" Warning: Property '%s' not available.\n",
g->fileName.data(), p->lineNo, (const char*) p->name );
@@ -2498,10 +2498,10 @@ int generateProps()
// If it is an enum then it may not be a set
if ( p->oredEnum == 1 )
continue;
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->sspec = spec;
p->setfunc = f;
@@ -2512,10 +2512,10 @@ int generateProps()
if ( p->oredEnum == 0 )
continue;
// Test wether the enum is really a set (unfortunately we don't know enums of super classes)
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && !lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->sspec = spec;
p->setfunc = f;
@@ -2528,10 +2528,10 @@ int generateProps()
if ( displayWarnings ) {
// Is the type a set, that means, mentioned in TQ_SETS ?
- bool set = FALSE;
+ bool set = false;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- set = TRUE;
+ set = true;
fprintf( stderr, ErrorFormatString" Warning: Property '%s' not writable.\n",
g->fileName.data(), p->lineNo, (const char*) p->name );
@@ -2715,7 +2715,7 @@ void generateClass() // generate C++ source code for a class
"\tsignals, slots or TQ_OBJECT." );
return;
}
- g->generatedCode = TRUE;
+ g->generatedCode = true;
g->gen_count++;
if ( g->gen_count == 1 ) { // first class to be generated
@@ -2780,7 +2780,7 @@ void generateClass() // generate C++ source code for a class
if ( needToIncludeVariant ) {
fprintf( out, "#include <%stqvariant.h>\n", (const char*)g->qtPath );
- g->hasVariantIncluded = TRUE;
+ g->hasVariantIncluded = true;
}
}
@@ -2946,7 +2946,7 @@ void generateClass() // generate C++ source code for a class
//
Function *f;
f = g->signals.first(); // make internal signal methods
- static bool included_list_headers = FALSE;
+ static bool included_list_headers = false;
int sigindex = 0;
while ( f ) {
TQCString argstr;
@@ -2974,7 +2974,7 @@ void generateClass() // generate C++ source code for a class
// yes we need it, because otherwise TQT_VERSION may not be defined
fprintf( out, "\n#include <%stqobjectdefs.h>\n", (const char*)g->qtPath );
fprintf( out, "#include <%stqsignalslotimp.h>\n", (const char*)g->qtPath );
- included_list_headers = TRUE;
+ included_list_headers = true;
}
while ( a ) { // argument list
@@ -3107,14 +3107,14 @@ void generateClass() // generate C++ source code for a class
}
fprintf( out, " case %d: ", slotindex );
- bool hasReturnValue = FALSE;
- bool hasVariantReturn = FALSE;
+ bool hasReturnValue = false;
+ bool hasVariantReturn = false;
if ( f->type != "void" ) {
if ( validUType( f->type )) {
- hasReturnValue = TRUE;
+ hasReturnValue = true;
fprintf( out, "static_QUType_%s.set(_o,", uType(f->type).data() );
} else if ( isVariantType( f->type ) ) {
- hasReturnValue = hasVariantReturn = TRUE;
+ hasReturnValue = hasVariantReturn = true;
// do not need special handling for bool since this is handled as utype
fprintf( out, "static_QUType_TQVariant.set(_o,TQVariant(" );
}
@@ -3159,16 +3159,16 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "\treturn %s::tqt_invoke( _id, _o );\n",
(const char *) purestSuperClassName() );
} else {
- fprintf( out, "\treturn FALSE;\n" );
+ fprintf( out, "\treturn false;\n" );
}
fprintf( out, " }\n" );
- fprintf( out, " return TRUE;\n}\n" );
+ fprintf( out, " return true;\n}\n" );
} else {
if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::tqt_invoke(_id,_o);\n}\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, " return FALSE;\n}\n" );
+ fprintf( out, " return false;\n}\n" );
}
@@ -3188,9 +3188,9 @@ void generateClass() // generate C++ source code for a class
}
fprintf( out, " case %d: ", signalindex );
- bool hasReturnValue = FALSE;
+ bool hasReturnValue = false;
if ( f->type != "void" && validUType( f->type )) {
- hasReturnValue = TRUE;
+ hasReturnValue = true;
fprintf( out, "static_QUType_%s.set(_o,", uType(f->type).data() );
}
int offset = 0;
@@ -3230,15 +3230,15 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "\treturn %s::tqt_emit(_id,_o);\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, "\treturn FALSE;\n" );
+ fprintf( out, "\treturn false;\n" );
fprintf( out, " }\n" );
- fprintf( out, " return TRUE;\n}\n" );
+ fprintf( out, " return true;\n}\n" );
} else {
if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::tqt_emit(_id,_o);\n}\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, " return FALSE;\n}\n" );
+ fprintf( out, " return false;\n}\n" );
}
@@ -3252,7 +3252,7 @@ void generateClass() // generate C++ source code for a class
if ( !g->props.isEmpty() ) {
fprintf( out, " switch ( id - staticMetaObject()->propertyOffset() ) {\n" );
int propindex = -1;
- bool need_resolve = FALSE;
+ bool need_resolve = false;
for( TQPtrListIterator<Property> it( g->props ); it.current(); ++it ){
propindex ++;
@@ -3340,9 +3340,9 @@ void generateClass() // generate C++ source code for a class
}
if (!g->superClassName.isEmpty() && !isTQObject ) {
fprintf( out, "goto resolve;\n" );
- need_resolve = TRUE;
+ need_resolve = true;
} else {
- fprintf( out, " return FALSE;\n" );
+ fprintf( out, " return false;\n" );
}
}
if ( flag_break != 0 ) {
@@ -3354,16 +3354,16 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "break;\n");
}
- fprintf( out, "\tdefault: return FALSE;\n } break;\n" );
+ fprintf( out, "\tdefault: return false;\n } break;\n" );
}
fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, "\treturn %s::tqt_property( id, f, v );\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, "\treturn FALSE;\n" );
+ fprintf( out, "\treturn false;\n" );
fprintf( out, " }\n" );
- fprintf( out, " return TRUE;\n" );
+ fprintf( out, " return true;\n" );
if ( need_resolve )
fprintf( out, "resolve:\n return %s::tqt_property( staticMetaObject()->resolveProperty(id), f, v );\n",
@@ -3374,10 +3374,10 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return %s::tqt_property( id, f, v);\n}\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, " return FALSE;\n}\n" );
+ fprintf( out, " return false;\n}\n" );
}
- fprintf( out, "\nbool %s::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }\n", qualifiedClassName().data() );
+ fprintf( out, "\nbool %s::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }\n", qualifiedClassName().data() );
fprintf( out, "#endif // TQT_NO_PROPERTIES\n" );
}
@@ -3405,9 +3405,9 @@ void addEnum()
{
g->enums.append( tmpEnum );
if ( g->qtSets.contains( tmpEnum->name ) )
- tmpEnum->set = TRUE;
+ tmpEnum->set = true;
else
- tmpEnum->set = FALSE;
+ tmpEnum->set = false;
}
else
delete tmpEnum;
@@ -3421,7 +3421,7 @@ void addMember( Member m )
delete tmpFunc;
tmpArgList = new ArgList; // ugly but works
tmpFunc = new Function;
- skipFunc = FALSE;
+ skipFunc = false;
return;
}
@@ -3449,7 +3449,7 @@ void addMember( Member m )
}
}
- skipFunc = FALSE;
+ skipFunc = false;
tmpFunc = new Function;
tmpArgList = new ArgList;
}
diff --git a/src/tqmoc/tqmoc_yacc.cpp b/src/tqmoc/tqmoc_yacc.cpp
index 2c7098fc1..b67bfc22b 100644
--- a/src/tqmoc/tqmoc_yacc.cpp
+++ b/src/tqmoc/tqmoc_yacc.cpp
@@ -104,7 +104,7 @@ static void enterNameSpace( const char *name = 0 );
static void leaveNameSpace();
static void selectOutsideClassState();
static void registerClassInNamespace();
-static bool suppress_func_warn = FALSE;
+static bool suppress_func_warn = false;
static void func_warn( const char *msg );
static void tqmoc_warn( const char *msg );
static void tqmoc_err( const char *s );
@@ -135,12 +135,12 @@ bool validUType( TQCString ctype )
if ( ctype.right(1) == "&" )
ctype = ctype.left( ctype.length() - 1 );
else if ( ctype.right(1) == "*" )
- return TRUE;
+ return true;
int i = -1;
while ( utype_map[++i] )
if ( ctype == utype_map[i] )
- return TRUE;
+ return true;
return isEnumType( ctype );
}
@@ -197,12 +197,12 @@ TQCString uType( TQCString ctype )
bool isInOut( TQCString ctype )
{
if ( ctype.left(6) == "const " )
- return FALSE;
+ return false;
if ( ctype.right(1) == "&" )
- return TRUE;
+ return true;
if ( ctype.right(2) == "**" )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
TQCString uTypeExtra( TQCString ctype )
@@ -234,7 +234,7 @@ TQCString uTypeExtra( TQCString ctype )
if ( idx >= 0 ) {
typeExtra.sprintf( "&enum_tbl[%d]", enumIndex( ctype ) );
} else {
- typeExtra.sprintf( "parentObject->enumerator(\"%s\", TRUE )", ctype.data() );
+ typeExtra.sprintf( "parentObject->enumerator(\"%s\", true )", ctype.data() );
}
typeExtra =
"\n#ifndef TQT_NO_PROPERTIES\n\t " + typeExtra +
@@ -300,7 +300,7 @@ int tqvariant_nameToType( const char* name )
}
/*
- Returns TRUE if the type is a TQVariant types.
+ Returns true if the type is a TQVariant types.
*/
bool isVariantType( const char* type )
{
@@ -325,7 +325,7 @@ enum Access { Private, Protected, Public };
class Argument // single arg meta data
{
public:
- Argument( const char *left, const char *right, const char* argName = 0, bool isDefaultArgument = FALSE )
+ Argument( const char *left, const char *right, const char* argName = 0, bool isDefaultArgument = false )
{
leftType = rmWS( left );
rightType = rmWS( right );
@@ -372,18 +372,18 @@ public:
class ArgList : public TQPtrList<Argument> { // member function arg list
public:
- ArgList() { setAutoDelete( TRUE ); }
+ ArgList() { setAutoDelete( true ); }
~ArgList() { clear(); }
/* the clone has one default argument less, the orignal has all default arguments removed */
ArgList* magicClone() {
ArgList* l = new ArgList;
- bool firstDefault = FALSE;
+ bool firstDefault = false;
for ( first(); current(); next() ) {
bool isDefault = current()->isDefault;
if ( !firstDefault && isDefault ) {
- isDefault = FALSE;
- firstDefault = TRUE;
+ isDefault = false;
+ firstDefault = true;
}
l->append( new Argument( current()->leftType, current()->rightType, current()->name, isDefault ) );
}
@@ -399,9 +399,9 @@ public:
bool hasDefaultArguments() {
for ( Argument* a = first(); a; a = next() ) {
if ( a->isDefault )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
};
@@ -429,7 +429,7 @@ struct Function // member function meta data
class FuncList : public TQPtrList<Function> { // list of member functions
public:
- FuncList( bool autoDelete = FALSE ) { setAutoDelete( autoDelete ); }
+ FuncList( bool autoDelete = false ) { setAutoDelete( autoDelete ); }
FuncList find( const char* name )
{
@@ -451,7 +451,7 @@ public:
class EnumList : public TQPtrList<Enum> { // list of property enums
public:
- EnumList() { setAutoDelete(TRUE); }
+ EnumList() { setAutoDelete(true); }
};
@@ -531,7 +531,7 @@ struct Property
class PropList : public TQPtrList<Property> { // list of properties
public:
- PropList() { setAutoDelete( TRUE ); }
+ PropList() { setAutoDelete( true ); }
};
@@ -546,7 +546,7 @@ struct ClassInfo
class ClassInfoList : public TQPtrList<ClassInfo> { // list of class infos
public:
- ClassInfoList() { setAutoDelete( TRUE ); }
+ ClassInfoList() { setAutoDelete( true ); }
};
class parser_reg {
@@ -618,10 +618,10 @@ char *straddSpc( const char *, const char *,
const char *, const char * );
extern int yydebug;
-bool lexDebug = FALSE;
+bool lexDebug = false;
int lineNo; // current line number
-bool errorControl = FALSE; // controled errors
-bool displayWarnings = TRUE;
+bool errorControl = false; // controled errors
+bool displayWarnings = true;
bool skipClass; // don't generate for class
bool skipFunc; // don't generate for func
bool templateClass; // class is a template
@@ -633,9 +633,9 @@ Enum *tmpEnum; // current enum
Access tmpAccess; // current access permission
Access subClassPerm; // current access permission
-bool TQ_OBJECTdetected; // TRUE if current class
+bool TQ_OBJECTdetected; // true if current class
// contains the TQ_OBJECT macro
-bool TQ_PROPERTYdetected; // TRUE if current class
+bool TQ_PROPERTYdetected; // true if current class
// contains at least one TQ_PROPERTY,
// TQ_OVERRIDE, TQ_SETS or TQ_ENUMS macro
bool tmpPropOverride; // current property override setting
@@ -2807,14 +2807,14 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 914 "tqmoc.y"
- { skipFunc = TRUE; (yyval.string) = ""; }
+ { skipFunc = true; (yyval.string) = ""; }
break;
case 35:
/* Line 1806 of yacc.c */
#line 915 "tqmoc.y"
- { skipFunc = TRUE; (yyval.string) = ""; }
+ { skipFunc = true; (yyval.string) = ""; }
break;
case 36:
@@ -2856,7 +2856,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 931 "tqmoc.y"
- { skipFunc = TRUE; }
+ { skipFunc = true; }
break;
case 45:
@@ -2999,7 +2999,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 971 "tqmoc.y"
{ templateClassOld = templateClass;
- templateClass = TRUE;
+ templateClass = true;
}
break;
@@ -3145,7 +3145,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1032 "tqmoc.y"
- { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string)),"", 0, TRUE ); }
+ { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string)),"", 0, true ); }
break;
case 88:
@@ -3166,7 +3166,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1040 "tqmoc.y"
- { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (7)].string),(yyvsp[(2) - (7)].string)),(yyvsp[(4) - (7)].string), (yyvsp[(3) - (7)].string), TRUE); }
+ { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (7)].string),(yyvsp[(2) - (7)].string)),(yyvsp[(4) - (7)].string), (yyvsp[(3) - (7)].string), true); }
break;
case 91:
@@ -3299,7 +3299,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1095 "tqmoc.y"
- { skipFunc = TRUE; }
+ { skipFunc = true; }
break;
case 111:
@@ -3313,7 +3313,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1098 "tqmoc.y"
- { skipFunc = TRUE; }
+ { skipFunc = true; }
break;
case 113:
@@ -3449,7 +3449,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1156 "tqmoc.y"
{ BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
+ skipClass = true; }
break;
case 137:
@@ -3457,7 +3457,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1158 "tqmoc.y"
{ BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
+ skipClass = true; }
break;
case 138:
@@ -3465,7 +3465,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1160 "tqmoc.y"
{ BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
+ skipClass = true; }
break;
case 139:
@@ -3473,14 +3473,14 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1164 "tqmoc.y"
{ BEGIN QT_DEF; /* catch ';' */
- skipClass = TRUE; }
+ skipClass = true; }
break;
case 140:
/* Line 1806 of yacc.c */
#line 1166 "tqmoc.y"
- { skipClass = TRUE;
+ { skipClass = true;
BEGIN GIMME_SEMICOLON; }
break;
@@ -3497,7 +3497,7 @@ yyreduce:
#line 1179 "tqmoc.y"
{ g->className = (yyvsp[(2) - (2)].string);
if ( g->className == "TQObject" )
- TQ_OBJECTdetected = TRUE;
+ TQ_OBJECTdetected = true;
}
break;
@@ -3507,7 +3507,7 @@ yyreduce:
#line 1185 "tqmoc.y"
{ g->className = (yyvsp[(3) - (3)].string);
if ( g->className == "TQObject" )
- TQ_OBJECTdetected = TRUE;
+ TQ_OBJECTdetected = true;
}
break;
@@ -3585,7 +3585,7 @@ yyreduce:
" section of the class.\n"
"TQ_OBJECT is a macro that resets"
" access permission to \"private\".");
- TQ_OBJECTdetected = TRUE;
+ TQ_OBJECTdetected = true;
}
break;
@@ -3594,7 +3594,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1255 "tqmoc.y"
{ tmpYYStart = YY_START;
- tmpPropOverride = FALSE;
+ tmpPropOverride = false;
BEGIN IN_PROPERTY; }
break;
@@ -3612,7 +3612,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1262 "tqmoc.y"
{ tmpYYStart = YY_START;
- tmpPropOverride = TRUE;
+ tmpPropOverride = true;
BEGIN IN_PROPERTY; }
break;
@@ -3654,7 +3654,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1277 "tqmoc.y"
{
- TQ_PROPERTYdetected = TRUE;
+ TQ_PROPERTYdetected = true;
BEGIN tmpYYStart;
}
break;
@@ -3671,7 +3671,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1283 "tqmoc.y"
{
- TQ_PROPERTYdetected = TRUE;
+ TQ_PROPERTYdetected = true;
BEGIN tmpYYStart;
}
break;
@@ -3692,7 +3692,7 @@ yyreduce:
BEGIN QT_DEF;
else
BEGIN IN_CLASS;
- suppress_func_warn = TRUE;
+ suppress_func_warn = true;
}
break;
@@ -3701,7 +3701,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1300 "tqmoc.y"
{
- suppress_func_warn = FALSE;
+ suppress_func_warn = false;
}
break;
@@ -3918,7 +3918,7 @@ yyreduce:
/* Line 1806 of yacc.c */
#line 1452 "tqmoc.y"
- { skipFunc = TRUE; }
+ { skipFunc = true; }
break;
case 276:
@@ -4144,7 +4144,7 @@ yyreduce:
if ( g->propRead.isEmpty() && !g->propOverride )
tqmoc_err( "A property must at least feature a read method." );
checkPropertyName( (yyvsp[(2) - (4)].string) );
- TQ_PROPERTYdetected = TRUE;
+ TQ_PROPERTYdetected = true;
// Avoid duplicates
for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) {
if ( lit.current()->name == (yyvsp[(2) - (4)].string) ) {
@@ -4487,13 +4487,13 @@ TQCString combinePath( const char *, const char * );
FILE *out; // output file
-parser_reg::parser_reg() : funcs(TRUE)
+parser_reg::parser_reg() : funcs(true)
{
gen_count = 0;
- noInclude = FALSE; // no #include <filename>
- generatedCode = FALSE; // no code generated
- mocError = FALSE; // moc parsing error occurred
- hasVariantIncluded = FALSE;
+ noInclude = false; // no #include <filename>
+ generatedCode = false; // no code generated
+ mocError = false; // moc parsing error occurred
+ hasVariantIncluded = false;
}
@@ -4537,7 +4537,7 @@ int main( int argc, char **argv )
{
init();
- bool autoInclude = TRUE;
+ bool autoInclude = true;
const char *error = 0;
g->qtPath = "";
for ( int n=1; n<argc && error==0; n++ ) {
@@ -4554,11 +4554,11 @@ int main( int argc, char **argv )
} else
g->outputFile = &opt[1];
} else if ( opt == "i" ) { // no #include statement
- g->noInclude = TRUE;
- autoInclude = FALSE;
+ g->noInclude = true;
+ autoInclude = false;
} else if ( opt[0] == 'f' ) { // produce #include statement
- g->noInclude = FALSE;
- autoInclude = FALSE;
+ g->noInclude = false;
+ autoInclude = false;
if ( opt[1] ) // -fsomething.h
g->includeFiles.append( &opt[1] );
} else if ( opt == "pch" ) { // produce #include statement for PCH
@@ -4597,13 +4597,13 @@ int main( int argc, char **argv )
cleanup();
return 1;
} else if ( opt == "k" ) { // stop on errors
- errorControl = TRUE;
+ errorControl = true;
} else if ( opt == "nw" ) { // don't display warnings
- displayWarnings = FALSE;
+ displayWarnings = false;
} else if ( opt == "ldbg" ) { // lex debug output
- lexDebug = TRUE;
+ lexDebug = true;
} else if ( opt == "ydbg" ) { // yacc debug output
- yydebug = TRUE;
+ yydebug = true;
} else {
error = "Invalid argument";
}
@@ -4618,9 +4618,9 @@ int main( int argc, char **argv )
if ( autoInclude ) {
int ppos = g->fileName.findRev('.');
if ( ppos != -1 && tolower( g->fileName[ppos + 1] ) == 'h' )
- g->noInclude = FALSE;
+ g->noInclude = false;
else
- g->noInclude = TRUE;
+ g->noInclude = true;
}
setDefaultIncludeFile();
@@ -4704,9 +4704,9 @@ TQCString combinePath( const char *infile, const char *outfile )
int numCommonComponents = 0;
TQStringList inSplitted =
- TQStringList::split( '/', inFileInfo.dir().canonicalPath(), TRUE );
+ TQStringList::split( '/', inFileInfo.dir().canonicalPath(), true );
TQStringList outSplitted =
- TQStringList::split( '/', outFileInfo.dir().canonicalPath(), TRUE );
+ TQStringList::split( '/', outFileInfo.dir().canonicalPath(), true );
while ( !inSplitted.isEmpty() && !outSplitted.isEmpty() &&
inSplitted.first() == outSplitted.first() ) {
@@ -4747,8 +4747,8 @@ void init() // initialize
delete g;
g = new parser_reg;
lineNo = 1;
- skipClass = FALSE;
- skipFunc = FALSE;
+ skipClass = false;
+ skipFunc = false;
tmpArgList = new ArgList;
tmpFunc = new Function;
tmpEnum = new Enum;
@@ -4764,10 +4764,10 @@ void initClass() // prepare for new class
{
tmpAccess = Private;
subClassPerm = Private;
- TQ_OBJECTdetected = FALSE;
- TQ_PROPERTYdetected = FALSE;
- skipClass = FALSE;
- templateClass = FALSE;
+ TQ_OBJECTdetected = false;
+ TQ_PROPERTYdetected = false;
+ skipClass = false;
+ templateClass = false;
g->slots.clear();
g->signals.clear();
g->propfuncs.clear();
@@ -4791,10 +4791,10 @@ TQPtrList<NamespaceInfo> namespaces;
void enterNameSpace( const char *name ) // prepare for new class
{
- static bool first = TRUE;
+ static bool first = true;
if ( first ) {
- namespaces.setAutoDelete( TRUE );
- first = FALSE;
+ namespaces.setAutoDelete( true );
+ first = false;
}
NamespaceInfo *tmp = new NamespaceInfo;
@@ -4927,7 +4927,7 @@ void addExpressionChar( const char c )
void yyerror( const char *msg ) // print yacc error message
{
- g->mocError = TRUE;
+ g->mocError = true;
fprintf( stderr, ErrorFormatString" Error: %s\n", g->fileName.data(), lineNo, msg );
if ( errorControl ) {
if ( !g->outputFile.isEmpty() && yyin && fclose(yyin) == 0 )
@@ -4966,14 +4966,14 @@ void func_warn( const char *msg )
{
if ( !suppress_func_warn )
tqmoc_warn( msg );
- skipFunc = TRUE;
+ skipFunc = true;
}
void operatorError()
{
if ( !suppress_func_warn )
tqmoc_warn("Operator functions cannot be signals or slots.");
- skipFunc = TRUE;
+ skipFunc = true;
}
#ifndef yywrap
@@ -5183,7 +5183,7 @@ bool isEnumType( const char* type )
bool isPropertyType( const char* type )
{
if ( isVariantType( type ) )
- return TRUE;
+ return true;
return isEnumType( type );
}
@@ -5258,10 +5258,10 @@ int generateProps()
tmp = tmp.simplifyWhiteSpace();
if ( p->type == tmp ) {
// If it is an enum then it may not be a set
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->gspec = spec;
p->getfunc = f;
@@ -5271,10 +5271,10 @@ int generateProps()
else if ( !isVariantType( p->type ) ) {
if ( tmp == "int" || tmp == "uint" || tmp == "unsigned int" ) {
// Test whether the enum is really a set (unfortunately we don't know enums of super classes)
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && !lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->gspec = spec;
p->getfunc = f;
@@ -5287,10 +5287,10 @@ int generateProps()
if ( displayWarnings ) {
// Is the type a set, that means, mentioned in TQ_SETS?
- bool set = FALSE;
+ bool set = false;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- set = TRUE;
+ set = true;
fprintf( stderr, ErrorFormatString" Warning: Property '%s' not available.\n",
g->fileName.data(), p->lineNo, (const char*) p->name );
@@ -5373,10 +5373,10 @@ int generateProps()
// If it is an enum then it may not be a set
if ( p->oredEnum == 1 )
continue;
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->sspec = spec;
p->setfunc = f;
@@ -5387,10 +5387,10 @@ int generateProps()
if ( p->oredEnum == 0 )
continue;
// Test wether the enum is really a set (unfortunately we don't know enums of super classes)
- bool ok = TRUE;
+ bool ok = true;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && !lit.current()->set )
- ok = FALSE;
+ ok = false;
if ( !ok ) continue;
p->sspec = spec;
p->setfunc = f;
@@ -5403,10 +5403,10 @@ int generateProps()
if ( displayWarnings ) {
// Is the type a set, that means, mentioned in TQ_SETS ?
- bool set = FALSE;
+ bool set = false;
for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit )
if ( lit.current()->name == p->type && lit.current()->set )
- set = TRUE;
+ set = true;
fprintf( stderr, ErrorFormatString" Warning: Property '%s' not writable.\n",
g->fileName.data(), p->lineNo, (const char*) p->name );
@@ -5590,7 +5590,7 @@ void generateClass() // generate C++ source code for a class
"\tsignals, slots or TQ_OBJECT." );
return;
}
- g->generatedCode = TRUE;
+ g->generatedCode = true;
g->gen_count++;
if ( g->gen_count == 1 ) { // first class to be generated
@@ -5655,7 +5655,7 @@ void generateClass() // generate C++ source code for a class
if ( needToIncludeVariant ) {
fprintf( out, "#include <%stqvariant.h>\n", (const char*)g->qtPath );
- g->hasVariantIncluded = TRUE;
+ g->hasVariantIncluded = true;
}
}
@@ -5821,7 +5821,7 @@ void generateClass() // generate C++ source code for a class
//
Function *f;
f = g->signals.first(); // make internal signal methods
- static bool included_list_headers = FALSE;
+ static bool included_list_headers = false;
int sigindex = 0;
while ( f ) {
TQCString argstr;
@@ -5849,7 +5849,7 @@ void generateClass() // generate C++ source code for a class
// yes we need it, because otherwise TQT_VERSION may not be defined
fprintf( out, "\n#include <%stqobjectdefs.h>\n", (const char*)g->qtPath );
fprintf( out, "#include <%stqsignalslotimp.h>\n", (const char*)g->qtPath );
- included_list_headers = TRUE;
+ included_list_headers = true;
}
while ( a ) { // argument list
@@ -5982,14 +5982,14 @@ void generateClass() // generate C++ source code for a class
}
fprintf( out, " case %d: ", slotindex );
- bool hasReturnValue = FALSE;
- bool hasVariantReturn = FALSE;
+ bool hasReturnValue = false;
+ bool hasVariantReturn = false;
if ( f->type != "void" ) {
if ( validUType( f->type )) {
- hasReturnValue = TRUE;
+ hasReturnValue = true;
fprintf( out, "static_QUType_%s.set(_o,", uType(f->type).data() );
} else if ( isVariantType( f->type ) ) {
- hasReturnValue = hasVariantReturn = TRUE;
+ hasReturnValue = hasVariantReturn = true;
// do not need special handling for bool since this is handled as utype
fprintf( out, "static_QUType_TQVariant.set(_o,TQVariant(" );
}
@@ -6034,16 +6034,16 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "\treturn %s::tqt_invoke( _id, _o );\n",
(const char *) purestSuperClassName() );
} else {
- fprintf( out, "\treturn FALSE;\n" );
+ fprintf( out, "\treturn false;\n" );
}
fprintf( out, " }\n" );
- fprintf( out, " return TRUE;\n}\n" );
+ fprintf( out, " return true;\n}\n" );
} else {
if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::tqt_invoke(_id,_o);\n}\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, " return FALSE;\n}\n" );
+ fprintf( out, " return false;\n}\n" );
}
@@ -6063,9 +6063,9 @@ void generateClass() // generate C++ source code for a class
}
fprintf( out, " case %d: ", signalindex );
- bool hasReturnValue = FALSE;
+ bool hasReturnValue = false;
if ( f->type != "void" && validUType( f->type )) {
- hasReturnValue = TRUE;
+ hasReturnValue = true;
fprintf( out, "static_QUType_%s.set(_o,", uType(f->type).data() );
}
int offset = 0;
@@ -6105,15 +6105,15 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "\treturn %s::tqt_emit(_id,_o);\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, "\treturn FALSE;\n" );
+ fprintf( out, "\treturn false;\n" );
fprintf( out, " }\n" );
- fprintf( out, " return TRUE;\n}\n" );
+ fprintf( out, " return true;\n}\n" );
} else {
if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::tqt_emit(_id,_o);\n}\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, " return FALSE;\n}\n" );
+ fprintf( out, " return false;\n}\n" );
}
@@ -6127,7 +6127,7 @@ void generateClass() // generate C++ source code for a class
if ( !g->props.isEmpty() ) {
fprintf( out, " switch ( id - staticMetaObject()->propertyOffset() ) {\n" );
int propindex = -1;
- bool need_resolve = FALSE;
+ bool need_resolve = false;
for( TQPtrListIterator<Property> it( g->props ); it.current(); ++it ){
propindex ++;
@@ -6215,9 +6215,9 @@ void generateClass() // generate C++ source code for a class
}
if (!g->superClassName.isEmpty() && !isTQObject ) {
fprintf( out, "goto resolve;\n" );
- need_resolve = TRUE;
+ need_resolve = true;
} else {
- fprintf( out, " return FALSE;\n" );
+ fprintf( out, " return false;\n" );
}
}
if ( flag_break != 0 ) {
@@ -6229,16 +6229,16 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "break;\n");
}
- fprintf( out, "\tdefault: return FALSE;\n } break;\n" );
+ fprintf( out, "\tdefault: return false;\n } break;\n" );
}
fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, "\treturn %s::tqt_property( id, f, v );\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, "\treturn FALSE;\n" );
+ fprintf( out, "\treturn false;\n" );
fprintf( out, " }\n" );
- fprintf( out, " return TRUE;\n" );
+ fprintf( out, " return true;\n" );
if ( need_resolve )
fprintf( out, "resolve:\n return %s::tqt_property( staticMetaObject()->resolveProperty(id), f, v );\n",
@@ -6249,10 +6249,10 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return %s::tqt_property( id, f, v);\n}\n",
(const char *) purestSuperClassName() );
else
- fprintf( out, " return FALSE;\n}\n" );
+ fprintf( out, " return false;\n}\n" );
}
- fprintf( out, "\nbool %s::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }\n", qualifiedClassName().data() );
+ fprintf( out, "\nbool %s::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }\n", qualifiedClassName().data() );
fprintf( out, "#endif // TQT_NO_PROPERTIES\n" );
}
@@ -6280,9 +6280,9 @@ void addEnum()
{
g->enums.append( tmpEnum );
if ( g->qtSets.contains( tmpEnum->name ) )
- tmpEnum->set = TRUE;
+ tmpEnum->set = true;
else
- tmpEnum->set = FALSE;
+ tmpEnum->set = false;
}
else
delete tmpEnum;
@@ -6296,7 +6296,7 @@ void addMember( Member m )
delete tmpFunc;
tmpArgList = new ArgList; // ugly but works
tmpFunc = new Function;
- skipFunc = FALSE;
+ skipFunc = false;
return;
}
@@ -6324,7 +6324,7 @@ void addMember( Member m )
}
}
- skipFunc = FALSE;
+ skipFunc = false;
tmpFunc = new Function;
tmpArgList = new ArgList;
}