summaryrefslogtreecommitdiffstats
path: root/pytqlupdate3/metatranslator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pytqlupdate3/metatranslator.cpp')
-rw-r--r--pytqlupdate3/metatranslator.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/pytqlupdate3/metatranslator.cpp b/pytqlupdate3/metatranslator.cpp
index 18b2b0d..62a5386 100644
--- a/pytqlupdate3/metatranslator.cpp
+++ b/pytqlupdate3/metatranslator.cpp
@@ -35,7 +35,7 @@ static bool encodingIsUtf8( const TQXmlAttributes& atts )
return ( atts.value(i) == TQString("UTF-8") );
}
}
- return FALSE;
+ return false;
}
class TsHandler : public TQXmlDefaultHandler
@@ -43,8 +43,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,
@@ -96,7 +96,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 );
@@ -116,7 +116,7 @@ bool TsHandler::startElement( const TQString& /* namespaceURI */,
}
accum.truncate( 0 );
}
- return TRUE;
+ return true;
}
bool TsHandler::endElement( const TQString& /* namespaceURI */,
@@ -136,11 +136,11 @@ bool TsHandler::endElement( const TQString& /* namespaceURI */,
} else {
if ( contextIsUtf8 )
tor->insert( MetaTranslatorMessage(context.utf8(), "",
- accum.utf8(), TQString::null, TRUE,
+ accum.utf8(), TQString::null, true,
MetaTranslatorMessage::Unfinished) );
else
tor->insert( MetaTranslatorMessage(context.local8Bit(), "",
- accum.local8Bit(), TQString::null, FALSE,
+ accum.local8Bit(), TQString::null, false,
MetaTranslatorMessage::Unfinished) );
}
} else if ( qName == TQString("translation") ) {
@@ -149,14 +149,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.local8Bit(), source.local8Bit(),
comment.local8Bit(), translation,
- FALSE, type) );
- inMessage = FALSE;
+ false, type) );
+ inMessage = false;
}
- return TRUE;
+ return true;
}
bool TsHandler::characters( const TQString& ch )
@@ -164,7 +164,7 @@ bool TsHandler::characters( const TQString& ch )
TQString t = ch;
t.replace( TQRegExp(TQChar('\r')), "" );
accum += t;
- return TRUE;
+ return true;
}
bool TsHandler::fatalError( const TQXmlParseException& exception )
@@ -180,7 +180,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 )
@@ -239,7 +239,7 @@ static TQString evilBytes( const TQCString& str, bool utf8 )
}
MetaTranslatorMessage::MetaTranslatorMessage()
- : utfeight( FALSE ), ty( Unfinished )
+ : utfeight( false ), ty( Unfinished )
{
}
@@ -249,7 +249,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
@@ -261,7 +261,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context,
int i = 0;
while ( sourceText[i] != '\0' ) {
if ( (uchar) sourceText[i] >= 0x80 ) {
- utfeight = TRUE;
+ utfeight = true;
break;
}
i++;
@@ -271,7 +271,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context,
int i = 0;
while ( comment[i] != '\0' ) {
if ( (uchar) comment[i] >= 0x80 ) {
- utfeight = TRUE;
+ utfeight = true;
break;
}
i++;
@@ -336,16 +336,16 @@ 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;
// don't click on these!
- 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 );
reader.setFeature( "http://trolltech.com/xml/features/report-whitespace"
- "-only-CharData", FALSE );
+ "-only-CharData", false );
TQXmlDefaultHandler *hand = new TsHandler( this );
reader.setContentHandler( hand );
reader.setErrorHandler( hand );
@@ -364,7 +364,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") );
@@ -426,7 +426,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 ) const