diff options
Diffstat (limited to 'src/kernel/tqtranslator.cpp')
| -rw-r--r-- | src/kernel/tqtranslator.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp index b6a11feb3..59444c327 100644 --- a/src/kernel/tqtranslator.cpp +++ b/src/kernel/tqtranslator.cpp @@ -377,8 +377,8 @@ extern bool qt_detectRTLLanguage(); /*! Loads \a filename, which may be an absolute file name or relative to \a directory. The previous contents of this translator object - is discarded. Returns TRUE if the file is loaded successfully; - otherwise returns FALSE. + is discarded. Returns true if the file is loaded successfully; + otherwise returns false. If the full file name does not exist, other file names are tried in the following order: @@ -467,7 +467,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory, if (d->oldPermissionLookup != qt_ntfs_permission_lookup) qt_ntfs_permission_lookup++; #endif - return FALSE; + return false; } fname.truncate( rightmost ); @@ -493,13 +493,13 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory, f = qt_open( TQFile::encodeName(realname), O_RDONLY, 0666 ); if ( f < 0 ) { // tqDebug( "can't open %s: %s", realname.ascii(), strerror( errno ) ); - return FALSE; + return false; } struct stat st; if ( fstat( f, &st ) ) { // tqDebug( "can't stat %s: %s", realname.ascii(), strerror( errno ) ); - return FALSE; + return false; } char * tmp; tmp = (char*)mmap( 0, st.st_size, // any address, whole file @@ -508,7 +508,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory, f, 0 ); // from offset 0 of f if ( !tmp || tmp == (char*)MAP_FAILED ) { // tqDebug( "can't mmap %s: %s", filename.ascii(), strerror( errno ) ); - return FALSE; + return false; } ::close( f ); @@ -518,10 +518,10 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory, #else TQFile f( realname ); if ( !f.exists() ) - return FALSE; + return false; d->unmapLength = f.size(); d->unmapPointer = new char[d->unmapLength]; - bool ok = FALSE; + bool ok = false; if ( f.open(IO_ReadOnly) ) { ok = d->unmapLength == (uint)f.readBlock( d->unmapPointer, d->unmapLength ); @@ -530,7 +530,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory, if ( !ok ) { delete [] d->unmapPointer; d->unmapPointer = 0; - return FALSE; + return false; } #endif @@ -542,8 +542,8 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory, \fn bool TQTranslator::load( const uchar *data, int len ) Loads the .qm file data \a data of length \a len into the - translator. Returns TRUE if the data is loaded successfully; - otherwise returns FALSE. + translator. Returns true if the data is loaded successfully; + otherwise returns false. The data is not copied. The caller must be able to guarantee that \a data will not be deleted or modified. @@ -553,13 +553,13 @@ bool TQTranslator::do_load( const uchar *data, int len ) { if ( len < MagicLength || memcmp( data, magic, MagicLength ) != 0 ) { clear(); - return FALSE; + return false; } TQByteArray array; array.setRawData( (const char *) data, len ); TQDataStream s( array, IO_ReadOnly ); - bool ok = TRUE; + bool ok = true; s.device()->at( MagicLength ); @@ -568,7 +568,7 @@ bool TQTranslator::do_load( const uchar *data, int len ) s >> tag >> blockLen; while ( tag && blockLen ) { if ( (TQ_UINT32) s.device()->at() + blockLen > (TQ_UINT32) len ) { - ok = FALSE; + ok = false; break; } @@ -587,7 +587,7 @@ bool TQTranslator::do_load( const uchar *data, int len ) } if ( !s.device()->at(s.device()->at() + blockLen) ) { - ok = FALSE; + ok = false; break; } tag = 0; @@ -642,9 +642,9 @@ bool TQTranslator::save( const TQString & filename, SaveMode mode ) s << tag << cas; s.writeRawBytes( d->contextArray->data(), cas ); } - return TRUE; + return true; } - return FALSE; + return false; } #endif @@ -884,8 +884,8 @@ void TQTranslator::unsqueeze() /*! - Returns TRUE if this message file contains a message with the key - (\a context, \a sourceText, \a comment); otherwise returns FALSE. + Returns true if this message file contains a message with the key + (\a context, \a sourceText, \a comment); otherwise returns false. This function works with stripped translator files. @@ -1071,7 +1071,7 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context, } /*! - Returns TRUE if this translator is empty, otherwise returns FALSE. + Returns true if this translator is empty, otherwise returns false. This function works with stripped and unstripped translation files. */ bool TQTranslator::isEmpty() const @@ -1342,8 +1342,8 @@ TQTranslatorMessage & TQTranslatorMessage::operator=( /*! Writes this translator message to the \a stream. If \a strip is - FALSE (the default), all the information in the message is - written. If \a strip is TRUE, only the part of the extended key + false (the default), all the information in the message is + written. If \a strip is true, only the part of the extended key specified by \a prefix is written with the translation (\c HashContextSourceTextComment by default). @@ -1359,7 +1359,7 @@ void TQTranslatorMessage::write( TQDataStream & stream, bool strip, stream.writeRawBytes( &tag, 1 ); stream << tn; - bool mustWriteHash = TRUE; + bool mustWriteHash = true; if ( !strip ) prefix = HashContextSourceTextComment; @@ -1420,8 +1420,8 @@ TQTranslatorMessage::Prefix TQTranslatorMessage::commonPrefix( /*! - Returns TRUE if the extended key of this object is equal to that of - \a m; otherwise returns FALSE. + Returns true if the extended key of this object is equal to that of + \a m; otherwise returns false. */ bool TQTranslatorMessage::operator==( const TQTranslatorMessage& m ) const @@ -1433,15 +1433,15 @@ bool TQTranslatorMessage::operator==( const TQTranslatorMessage& m ) const /*! \fn bool TQTranslatorMessage::operator!=( const TQTranslatorMessage& m ) const - Returns TRUE if the extended key of this object is different from - that of \a m; otherwise returns FALSE. + Returns true if the extended key of this object is different from + that of \a m; otherwise returns false. */ /*! - Returns TRUE if the extended key of this object is + Returns true if the extended key of this object is lexicographically before than that of \a m; otherwise returns - FALSE. + false. */ bool TQTranslatorMessage::operator<( const TQTranslatorMessage& m ) const @@ -1455,24 +1455,24 @@ bool TQTranslatorMessage::operator<( const TQTranslatorMessage& m ) const /*! \fn bool TQTranslatorMessage::operator<=( const TQTranslatorMessage& m ) const - Returns TRUE if the extended key of this object is + Returns true if the extended key of this object is lexicographically before that of \a m or if they are equal; - otherwise returns FALSE. + otherwise returns false. */ /*! \fn bool TQTranslatorMessage::operator>( const TQTranslatorMessage& m ) const - Returns TRUE if the extended key of this object is - lexicographically after that of \a m; otherwise returns FALSE. + Returns true if the extended key of this object is + lexicographically after that of \a m; otherwise returns false. */ /*! \fn bool TQTranslatorMessage::operator>=( const TQTranslatorMessage& m ) const - Returns TRUE if the extended key of this object is + Returns true if the extended key of this object is lexicographically after that of \a m or if they are equal; - otherwise returns FALSE. + otherwise returns false. */ #endif // TQT_NO_TRANSLATION |
