diff options
Diffstat (limited to 'tools/linguist/shared/metatranslator.cpp')
| -rw-r--r-- | tools/linguist/shared/metatranslator.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tools/linguist/shared/metatranslator.cpp b/tools/linguist/shared/metatranslator.cpp index 27c921bd6..a00c84e70 100644 --- a/tools/linguist/shared/metatranslator.cpp +++ b/tools/linguist/shared/metatranslator.cpp @@ -51,7 +51,7 @@ static bool encodingIsUtf8( const TQXmlAttributes& atts ) return ( atts.value(i) == TQString("UTF-8") ); } } - return FALSE; + return false; } class TsHandler : public TQXmlDefaultHandler @@ -59,8 +59,8 @@ class TsHandler : public TQXmlDefaultHandler public: TsHandler( MetaTranslator *translator ) : tor( translator ), type( MetaTranslatorMessage::Finished ), - inMessage( FALSE ), ferrorCount( 0 ), contextIsUtf8( FALSE ), - messageIsUtf8( FALSE ) { } + inMessage( false ), ferrorCount( 0 ), contextIsUtf8( false ), + messageIsUtf8( false ) { } virtual bool startElement( const TQString& namespaceURI, const TQString& localName, const TQString& qName, @@ -112,7 +112,7 @@ bool TsHandler::startElement( const TQString& /* namespaceURI */, translation.truncate( 0 ); contextIsUtf8 = encodingIsUtf8( atts ); } else if ( qName == TQString("message") ) { - inMessage = TRUE; + inMessage = true; type = MetaTranslatorMessage::Finished; source.truncate( 0 ); comment.truncate( 0 ); @@ -132,7 +132,7 @@ bool TsHandler::startElement( const TQString& /* namespaceURI */, } accum.truncate( 0 ); } - return TRUE; + return true; } bool TsHandler::endElement( const TQString& /* namespaceURI */, @@ -153,12 +153,12 @@ bool TsHandler::endElement( const TQString& /* namespaceURI */, if ( contextIsUtf8 ) tor->insert( MetaTranslatorMessage(context.utf8(), ContextComment, - accum.utf8(), TQString::null, TRUE, + accum.utf8(), TQString::null, true, MetaTranslatorMessage::Unfinished) ); else tor->insert( MetaTranslatorMessage(context.ascii(), ContextComment, - accum.ascii(), TQString::null, FALSE, + accum.ascii(), TQString::null, false, MetaTranslatorMessage::Unfinished) ); } } else if ( qName == TQString("translation") ) { @@ -167,14 +167,14 @@ bool TsHandler::endElement( const TQString& /* namespaceURI */, if ( messageIsUtf8 ) tor->insert( MetaTranslatorMessage(context.utf8(), source.utf8(), comment.utf8(), translation, - TRUE, type) ); + true, type) ); else tor->insert( MetaTranslatorMessage(context.ascii(), source.ascii(), comment.ascii(), translation, - FALSE, type) ); - inMessage = FALSE; + false, type) ); + inMessage = false; } - return TRUE; + return true; } bool TsHandler::characters( const TQString& ch ) @@ -182,7 +182,7 @@ bool TsHandler::characters( const TQString& ch ) TQString t = ch; t.replace( "\r", "" ); accum += t; - return TRUE; + return true; } bool TsHandler::fatalError( const TQXmlParseException& exception ) @@ -198,7 +198,7 @@ bool TsHandler::fatalError( const TQXmlParseException& exception ) TQMessageBox::information( tqApp->mainWidget(), TQObject::tr("TQt Linguist"), msg ); } - return FALSE; + return false; } static TQString numericEntity( int ch ) @@ -257,7 +257,7 @@ static TQString evilBytes( const TQCString& str, bool utf8 ) } MetaTranslatorMessage::MetaTranslatorMessage() - : utfeight( FALSE ), ty( Unfinished ) + : utfeight( false ), ty( Unfinished ) { } @@ -267,7 +267,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context, const TQString& translation, bool utf8, Type type ) : TQTranslatorMessage( context, sourceText, comment, translation ), - utfeight( FALSE ), ty( type ) + utfeight( false ), ty( type ) { /* Don't use UTF-8 if it makes no difference. UTF-8 should be @@ -279,7 +279,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context, int i = 0; while ( sourceText[i] != '\0' ) { if ( (uchar) sourceText[i] >= 0x80 ) { - utfeight = TRUE; + utfeight = true; break; } i++; @@ -289,7 +289,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context, int i = 0; while ( comment[i] != '\0' ) { if ( (uchar) comment[i] >= 0x80 ) { - utfeight = TRUE; + utfeight = true; break; } i++; @@ -358,13 +358,13 @@ bool MetaTranslator::load( const TQString& filename ) { TQFile f( filename ); if ( !f.open(IO_ReadOnly) ) - return FALSE; + return false; TQTextStream t( &f ); TQXmlInputSource in( t ); TQXmlSimpleReader reader; - reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); - reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", false ); + reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true ); TQXmlDefaultHandler *hand = new TsHandler( this ); reader.setContentHandler( hand ); reader.setErrorHandler( hand ); @@ -381,7 +381,7 @@ bool MetaTranslator::save( const TQString& filename ) const { TQFile f( filename ); if ( !f.open(IO_WriteOnly) ) - return FALSE; + return false; TQTextStream t( &f ); t.setCodec( TQTextCodec::codecForName("ISO-8859-1") ); @@ -448,7 +448,7 @@ bool MetaTranslator::save( const TQString& filename ) const } t << "</TS>\n"; f.close(); - return TRUE; + return true; } bool MetaTranslator::release( const TQString& filename, bool verbose, |
