diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-04 13:24:31 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-04 21:11:58 +0900 |
commit | 2d2a66210c4827dd2469d4fde55bf2c9aab81b5a (patch) | |
tree | 8a1b99c230b11fb6e679434055553504620119c7 | |
parent | f89d120a2d4982896f0b5c00cee347a010f609a9 (diff) | |
download | pytqt-r14.1.4.tar.gz pytqt-r14.1.4.zip |
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 6cbdd25dc4c6b0987636b37b2046b1b9464e3d60)
-rw-r--r-- | pytqlupdate3/fetchtr.cpp | 10 | ||||
-rw-r--r-- | pytqlupdate3/main.cpp | 16 | ||||
-rw-r--r-- | pytqlupdate3/metatranslator.cpp | 46 | ||||
-rw-r--r-- | pytqlupdate3/metatranslator.h | 4 | ||||
-rw-r--r-- | pytqlupdate3/numberh.cpp | 8 | ||||
-rw-r--r-- | pytquic3/domtool.cpp | 10 | ||||
-rw-r--r-- | pytquic3/embed.cpp | 2 | ||||
-rw-r--r-- | pytquic3/form.cpp | 44 | ||||
-rw-r--r-- | pytquic3/main.cpp | 20 | ||||
-rw-r--r-- | pytquic3/object.cpp | 12 | ||||
-rw-r--r-- | pytquic3/uic.cpp | 44 | ||||
-rw-r--r-- | pytquic3/uic.h | 2 | ||||
-rw-r--r-- | pytquic3/widgetdatabase.cpp | 34 | ||||
-rw-r--r-- | sip/tqt/tqinputdialog.sip | 4 | ||||
-rw-r--r-- | sip/tqt/tqmetaobject.sip | 4 | ||||
-rw-r--r-- | sip/tqt/tqobject.sip | 28 | ||||
-rw-r--r-- | sip/tqt/tqstring.sip | 4 | ||||
-rw-r--r-- | sip/tqt/tqstyle.sip | 4 | ||||
-rw-r--r-- | sip/tqt/tqtextedit.sip | 2 | ||||
-rw-r--r-- | sip/tqtsql/tqsqlcursor.sip | 4 | ||||
-rw-r--r-- | sip/tqtsql/tqsqlselectcursor.sip | 2 |
21 files changed, 153 insertions, 151 deletions
diff --git a/pytqlupdate3/fetchtr.cpp b/pytqlupdate3/fetchtr.cpp index 0127394..9c66a2f 100644 --- a/pytqlupdate3/fetchtr.cpp +++ b/pytqlupdate3/fetchtr.cpp @@ -332,9 +332,9 @@ static bool matchEncoding( bool *utf8 ) } *utf8 = TQString( yyIdent ).endsWith( TQString("UTF8") ); yyTok = getToken(); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -347,7 +347,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, TQCString com; TQCString functionContext = initialContext; TQCString prefix; - bool utf8 = FALSE; + bool utf8 = false; yyTok = getToken(); while ( yyTok != Tok_Eof ) { @@ -382,7 +382,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, } break; case Tok_translate: - utf8 = FALSE; + utf8 = false; yyTok = getToken(); if ( match(Tok_LeftParen) && matchString(&context) && @@ -420,7 +420,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, context = com.left( k ); com.remove( 0, k + 1 ); tor->insert( MetaTranslatorMessage(context, "", com, - TQString::null, FALSE) ); + TQString::null, false) ); } } yyTok = getToken(); diff --git a/pytqlupdate3/main.cpp b/pytqlupdate3/main.cpp index f024072..87b2a68 100644 --- a/pytqlupdate3/main.cpp +++ b/pytqlupdate3/main.cpp @@ -64,9 +64,9 @@ static void printUsage() int main( int argc, char **argv ) { - bool verbose = FALSE; - bool noObsolete = FALSE; - bool metSomething = FALSE; + bool verbose = false; + bool noObsolete = false; + bool metSomething = false; int numProFiles = 0; for ( int i = 1; i < argc; i++ ) { @@ -74,10 +74,10 @@ int main( int argc, char **argv ) printUsage(); return 0; } else if ( qstrcmp(argv[i], "-noobsolete") == 0 ) { - noObsolete = TRUE; + noObsolete = true; continue; } else if ( qstrcmp(argv[i], "-verbose") == 0 ) { - verbose = TRUE; + verbose = true; continue; } else if ( qstrcmp(argv[i], "-version") == 0 ) { tqWarning( "pytqlupdate version %s", TQT_VERSION_STR ); @@ -112,11 +112,11 @@ int main( int argc, char **argv ) for ( t = toks.begin(); t != toks.end(); ++t ) { if ( it.key() == TQString("SOURCES") ) { fetchtr_py( *t, &fetchedTor, - defaultContext, TRUE ); - metSomething = TRUE; + defaultContext, true ); + metSomething = true; } else if ( it.key() == TQString("TRANSLATIONS") ) { translatorFiles.append( *t ); - metSomething = TRUE; + metSomething = true; } else if ( it.key() == TQString("CODEC") ) { codec = (*t).utf8(); } 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 diff --git a/pytqlupdate3/metatranslator.h b/pytqlupdate3/metatranslator.h index aab280f..abe0293 100644 --- a/pytqlupdate3/metatranslator.h +++ b/pytqlupdate3/metatranslator.h @@ -33,7 +33,7 @@ public: MetaTranslatorMessage( const char *context, const char *sourceText, const char *comment, const TQString& translation = TQString::null, - bool utf8 = FALSE, Type type = Unfinished ); + bool utf8 = false, Type type = Unfinished ); MetaTranslatorMessage( const MetaTranslatorMessage& m ); MetaTranslatorMessage& operator=( const MetaTranslatorMessage& m ); @@ -68,7 +68,7 @@ public: bool load( const TQString& filename ); bool save( const TQString& filename ) const; - bool release( const TQString& filename, bool verbose = FALSE ) const; + bool release( const TQString& filename, bool verbose = false ) const; bool contains( const char *context, const char *sourceText, const char *comment ) const; diff --git a/pytqlupdate3/numberh.cpp b/pytqlupdate3/numberh.cpp index a52687b..1392b60 100644 --- a/pytqlupdate3/numberh.cpp +++ b/pytqlupdate3/numberh.cpp @@ -55,14 +55,14 @@ static TQCString zeroKey( const char *key ) char *z = zeroed.data(); int i = 0, j = 0; int len; - bool metSomething = FALSE; + bool metSomething = false; while ( key[i] != '\0' ) { len = numberLength( key + i ); if ( len > 0 ) { i += len; z[j++] = '0'; - metSomething = TRUE; + metSomething = true; } else { z[j++] = key[i++]; } @@ -107,7 +107,7 @@ static TQString translationAttempt( const TQString& oldTranslation, newNumbers.append( TQCString(newSource + j, n + 1) ); i += m; j += n; - met[k] = FALSE; + met[k] = false; matchedYet[k] = 0; k++; } @@ -150,7 +150,7 @@ static TQString translationAttempt( const TQString& oldTranslation, if ( best != p ) { attempt.truncate( attempt.length() - matchedYet[best] ); attempt += newNumbers[best]; - met[best] = TRUE; + met[best] = true; for ( k = 0; k < p; k++ ) matchedYet[k] = 0; break; diff --git a/pytquic3/domtool.cpp b/pytquic3/domtool.cpp index 740088e..f37866c 100644 --- a/pytquic3/domtool.cpp +++ b/pytquic3/domtool.cpp @@ -80,10 +80,10 @@ bool DomTool::hasProperty( const TQDomElement& e, const TQString& name ) if ( n.tagName() == "property" ) { if ( n.attribute( "name" ) != name ) continue; - return TRUE; + return true; } } - return FALSE; + return false; } TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type ) @@ -180,7 +180,7 @@ TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& def } else if ( e.tagName() == "cstring" ) { v = TQVariant( TQCString( e.firstChild().toText().data() ) ); } else if ( e.tagName() == "number" ) { - bool ok = TRUE; + bool ok = true; v = TQVariant( e.firstChild().toText().data().toInt( &ok ) ); if ( !ok ) v = TQVariant( e.firstChild().toText().data().toDouble() ); @@ -334,10 +334,10 @@ bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name ) if ( n.tagName() == "attribute" ) { if ( n.attribute( "name" ) != name ) continue; - return TRUE; + return true; } } - return FALSE; + return false; } static bool toBool( const TQString& s ) diff --git a/pytquic3/embed.cpp b/pytquic3/embed.cpp index f86a1d6..b07db52 100644 --- a/pytquic3/embed.cpp +++ b/pytquic3/embed.cpp @@ -144,7 +144,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima TQPtrList<EmbedImage> list_image; - list_image.setAutoDelete( TRUE ); + list_image.setAutoDelete( true ); int image_count = 0; for ( it = images.begin(); it != images.end(); ++it ) { TQImage img; diff --git a/pytquic3/form.cpp b/pytquic3/form.cpp index 323161e..148bdae 100644 --- a/pytquic3/form.cpp +++ b/pytquic3/form.cpp @@ -232,14 +232,14 @@ void Uic::createFormImpl( const TQDomElement &e ) sqlClasses += "TQSqlDatabase"; if ( dbCursors.count() ) sqlClasses += "TQSqlCursor"; - bool dbForm = FALSE; + bool dbForm = false; if ( dbForms[ "(default)" ].count() ) - dbForm = TRUE; - bool subDbForms = FALSE; + dbForm = true; + bool subDbForms = false; for ( it = dbConnections.begin(); it != dbConnections.end(); ++it ) { if ( !(*it).isEmpty() && (*it) != "(default)" ) { if ( dbForms[ (*it) ].count() ) { - subDbForms = TRUE; + subDbForms = true; break; } } @@ -377,7 +377,7 @@ void Uic::createFormImpl( const TQDomElement &e ) ++indent; out << indent << objClass << ".__init__(self,parent,name,fl)" << endl; out << indent << "self.statusBar()" << endl; - isMainWindow = TRUE; + isMainWindow = true; } else { out << indent << "def __init__(self,parent = None,name = None):" << endl; ++indent; @@ -460,7 +460,7 @@ void Uic::createFormImpl( const TQDomElement &e ) TQString label = DomTool::readAttribute( n, "title", "", comment ).toString(); out << indent << "self.addPage(" << page << ",TQString(\"\"))" << endl; trout << trindent << "self.setTitle(" << page << ","<< trcall( label, comment ) << ")" << endl; - TQVariant def( FALSE ); + TQVariant def( false ); if ( DomTool::hasAttribute( n, "backEnabled" ) ) out << indent << "self.setBackEnabled(" << page << "," << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << ")" << endl; if ( DomTool::hasAttribute( n, "nextEnabled" ) ) @@ -507,35 +507,35 @@ void Uic::createFormImpl( const TQDomElement &e ) } // actions, toolbars, menubar - bool needEndl = FALSE; + bool needEndl = false; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "actions" ) { if ( !needEndl ) out << endl; createActionImpl( n.firstChild().toElement(), "self" ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) out << endl; - needEndl = FALSE; + needEndl = false; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "toolbars" ) { if ( !needEndl ) out << endl; createToolbarImpl( n, objClass, objName ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) out << endl; - needEndl = FALSE; + needEndl = false; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "menubar" ) { if ( !needEndl ) out << endl; createMenuBarImpl( n, objClass, objName ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) @@ -638,14 +638,14 @@ void Uic::createFormImpl( const TQDomElement &e ) } // buddies - bool firstBuddy = TRUE; + bool firstBuddy = true; for ( TQValueList<Buddy>::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) { if ( isObjectRegistered( (*buddy).buddy ) ) { if ( firstBuddy ) { out << endl; } out << indent << "self." << (*buddy).key << ".setBuddy(self." << registeredName( (*buddy).buddy ) << ")" << endl; - firstBuddy = FALSE; + firstBuddy = false; } } @@ -666,26 +666,26 @@ void Uic::createFormImpl( const TQDomElement &e ) } // handle application events if required - bool needFontEventHandler = FALSE; - bool needSqlTableEventHandler = FALSE; - bool needSqlDataBrowserEventHandler = FALSE; + bool needFontEventHandler = false; + bool needSqlTableEventHandler = false; + bool needSqlDataBrowserEventHandler = false; nl = e.elementsByTagName( "widget" ); for ( i = 0; i < (int) nl.length(); i++ ) { if ( !DomTool::propertiesOfType( nl.item(i).toElement() , "font" ).isEmpty() ) - needFontEventHandler = TRUE; + needFontEventHandler = true; TQString s = getClassName( nl.item(i).toElement() ); if ( s == "TQDataTable" || s == "TQDataBrowser" ) { if ( !isFrameworkCodeGenerated( nl.item(i).toElement() ) ) continue; if ( s == "TQDataTable" ) - needSqlTableEventHandler = TRUE; + needSqlTableEventHandler = true; if ( s == "TQDataBrowser" ) - needSqlDataBrowserEventHandler = TRUE; + needSqlDataBrowserEventHandler = true; } if ( needFontEventHandler && needSqlTableEventHandler && needSqlDataBrowserEventHandler ) break; } - if ( needFontEventHandler && FALSE ) { + if ( needFontEventHandler && false ) { // indent = "\t"; // increase indentation for if-clause below out << "/* " << endl; out << " * Main event handler. Reimplemented to handle" << endl; @@ -800,7 +800,7 @@ void Uic::createFormImpl( const TQDomElement &e ) for ( cit = extraSlots.begin(); cit != extraSlots.end(); ++cit ) { pySlot(cit); - bool createWarning = TRUE; + bool createWarning = true; TQString fname = Parser::cleanArgs( *cit ); TQMap<TQString, TQString>::Iterator fit = functionImpls.find( fname ); if ( fit != functionImpls.end() ) { diff --git a/pytquic3/main.cpp b/pytquic3/main.cpp index 826b1ef..9c463e4 100644 --- a/pytquic3/main.cpp +++ b/pytquic3/main.cpp @@ -36,17 +36,17 @@ int main( int argc, char * argv[] ) { PyIndent indent; - bool testCode = FALSE, execCode = FALSE; - bool subcl = FALSE; - bool imagecollection = FALSE; + bool testCode = false, execCode = false; + bool subcl = false; + bool imagecollection = false; TQStringList images; const char *error = 0; const char* fileName = 0; TQCString outputFile; const char* projectName = 0; const char* trmacro = 0; - bool fix = FALSE; - TQApplication app(argc, argv, FALSE); + bool fix = false; + TQApplication app(argc, argv, false); TQString className, uicClass; for ( int n = 1; n < argc && error == 0; n++ ) { @@ -63,7 +63,7 @@ int main( int argc, char * argv[] ) } else outputFile = &opt[1]; } else if ( opt[0] == 'e' || opt == "embed" ) { - imagecollection = TRUE; + imagecollection = true; if ( opt == "embed" || opt[1] == '\0' ) { if ( !(n < argc-1) ) { error = "Missing name of project"; @@ -73,7 +73,7 @@ int main( int argc, char * argv[] ) } else projectName = &opt[1]; } else if ( opt == "subimpl" ) { - subcl = TRUE; + subcl = true; if ( !(n < argc-1) ) { error = "Missing class name"; break; @@ -97,7 +97,7 @@ int main( int argc, char * argv[] ) } else if ( opt == "help" ) { break; } else if ( opt == "fix" ) { - fix = TRUE; + fix = true; } else if ( opt[0] == 'p' ) { uint tabstop; bool ok; @@ -116,9 +116,9 @@ int main( int argc, char * argv[] ) else error = "Invalid Python indent"; } else if ( opt == "test" ) { - testCode = TRUE; + testCode = true; } else if ( opt == "x" ) { - execCode = TRUE; + execCode = true; } else { error = "Unrecognized option"; } diff --git a/pytquic3/object.cpp b/pytquic3/object.cpp index 6b26e8c..30a447a 100644 --- a/pytquic3/object.cpp +++ b/pytquic3/object.cpp @@ -36,7 +36,7 @@ Returns the name of the generated child object. */ -static bool createdCentralWidget = FALSE; +static bool createdCentralWidget = false; TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& par, const TQString& layout ) { @@ -44,7 +44,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla if ( parent == "self" && isMainWindow ) { if ( !createdCentralWidget ) out << indent << "self.setCentralWidget(TQWidget(self,\"tqt_central_widget\"))" << endl; - createdCentralWidget = TRUE; + createdCentralWidget = true; parent = "self.centralWidget()"; } TQDomElement n; @@ -116,7 +116,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla lastItem = "None"; // set the properties and insert items - bool hadFrameShadow = FALSE; + bool hadFrameShadow = false; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { bool stdset = stdsetdef; @@ -131,7 +131,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla if ( prop == "name" ) continue; if ( isLine && prop == "frameShadow" ) - hadFrameShadow = TRUE; + hadFrameShadow = true; if ( prop == "buddy" && value.startsWith("\"") && value.endsWith("\"") ) { buddies << Buddy( objName, value.mid(1, value.length() - 2 ) ); continue; @@ -584,12 +584,12 @@ TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj, TQString palette = "pal"; if ( !pal_used ) { out << indent << palette << " = TQPalette()" << endl; - pal_used = TRUE; + pal_used = true; } TQString cg = "cg"; if ( !cg_used ) { out << indent << cg << " = TQColorGroup()" << endl; - cg_used = TRUE; + cg_used = true; } n = e.firstChild().toElement(); while ( !n.isNull() && n.tagName() != "active" ) diff --git a/pytquic3/uic.cpp b/pytquic3/uic.cpp index e4a5ad0..067aacc 100644 --- a/pytquic3/uic.cpp +++ b/pytquic3/uic.cpp @@ -32,7 +32,7 @@ #include <stdio.h> #include <stdlib.h> -bool Uic::isMainWindow = FALSE; +bool Uic::isMainWindow = false; PyIndent Uic::indent; PyIndent Uic::trindent; @@ -113,21 +113,21 @@ TQString Uic::trcall( const TQString& sourceText, const TQString& comment ) return "TQString.null"; TQString t = trmacro; - bool encode = FALSE; + bool encode = false; if ( t.isNull() ) { t = "self.__tr"; for ( int i = 0; i < (int) sourceText.length(); i++ ) { if ( sourceText[i].unicode() >= 0x80 ) { t = "self.__trUtf8"; - encode = TRUE; + encode = true; break; } } if (encode) - pyNeedTrUtf8 = TRUE; + pyNeedTrUtf8 = true; else - pyNeedTr = TRUE; + pyNeedTr = true; } if ( comment.isEmpty() ) { @@ -156,13 +156,13 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, const TQString& subClass, TQString &uicClass ) : out( outStream ), trout (&languageChangeBody ), outputFileName( outputFn ), trmacro( trm ), - pyNeedTr(FALSE), pyNeedTrUtf8(FALSE) + pyNeedTr(false), pyNeedTrUtf8(false) { fileName = fn; - writeFunctImpl = TRUE; + writeFunctImpl = true; defMargin = BOXLAYOUT_DEFAULT_MARGIN; defSpacing = BOXLAYOUT_DEFAULT_SPACING; - externPixmaps = FALSE; + externPixmaps = false; trindent.setIndent(2); @@ -194,7 +194,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, if ( e.tagName() == "widget" ) { widget = e; } else if ( e.tagName() == "pixmapinproject" ) { - externPixmaps = TRUE; + externPixmaps = true; } else if ( e.tagName() == "layoutdefaults" ) { defSpacing = e.attribute( "spacing", defSpacing.toString() ); defMargin = e.attribute( "margin", defMargin.toString() ); @@ -299,16 +299,16 @@ TQString Uic::getClassName( const TQDomElement& e ) return s; } -/*! Returns TRUE if database framework code is generated, else FALSE. +/*! Returns true if database framework code is generated, else false. */ bool Uic::isFrameworkCodeGenerated( const TQDomElement& e ) { TQDomElement n = getObjectProperty( e, "frameworkCode" ); if ( n.attribute("name") == "frameworkCode" && - !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( TRUE ) ).toBool() ) - return FALSE; - return TRUE; + !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( true ) ).toBool() ) + return false; + return true; } /*! Extracts an object name from \a e. It's stored in the 'name' @@ -392,8 +392,8 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) out << indent << "self." << objName << " = TQActionGroup(" << parent << ",b\"" << objName << "\")" << endl; else continue; - bool subActionsDone = FALSE; - bool hasMenuText = FALSE; + bool subActionsDone = false; + bool hasMenuText = false; TQString actionText; for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) { if ( n2.tagName() == "property" ) { @@ -414,7 +414,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) call += "setProperty(\"" + prop + "\",TQVariant(" + value + "))"; if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; else if (prop == "text") actionText = value; @@ -425,7 +425,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) } } else if ( !subActionsDone && ( n2.tagName() == "actiongroup" || n2.tagName() == "action" ) ) { createActionImpl( n2, "self." + objName ); - subActionsDone = TRUE; + subActionsDone = true; } } // workaround for loading pre-3.3 files expecting bogus TQAction behavior @@ -636,7 +636,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par item = registerObject( "item" ); } else { item = "item"; - item_used = TRUE; + item_used = true; } s = trindent + item + " = "; @@ -694,7 +694,7 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p TQString txt; TQString com; TQString pix; - bool clickable = FALSE, resizable = FALSE; + bool clickable = false, resizable = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute("name"); @@ -997,7 +997,7 @@ TQColorGroup Uic::loadColorGroup( const TQDomElement &e ) return cg; } -/*! Returns TRUE if the widget properties specify that it belongs to +/*! Returns true if the widget properties specify that it belongs to the database \a connection and \a table. */ @@ -1006,8 +1006,8 @@ bool Uic::isWidgetInTable( const TQDomElement& e, const TQString& connection, co TQString conn = getDatabaseInfo( e, "connection" ); TQString tab = getDatabaseInfo( e, "table" ); if ( conn == connection && tab == table ) - return TRUE; - return FALSE; + return true; + return false; } /*! diff --git a/pytquic3/uic.h b/pytquic3/uic.h index 6bf9232..6e62b10 100644 --- a/pytquic3/uic.h +++ b/pytquic3/uic.h @@ -164,7 +164,7 @@ private: static TQString mkBool( bool b ); static TQString mkBool( const TQString& s ); bool toBool( const TQString& s ); - static TQString fixString( const TQString &str, bool encode = FALSE ); + static TQString fixString( const TQString &str, bool encode = false ); static bool onlyAscii; static TQString mkStdSet( const TQString& prop ); static TQString getComment( const TQDomNode& n ); diff --git a/pytquic3/widgetdatabase.cpp b/pytquic3/widgetdatabase.cpp index 3e075b0..002ba91 100644 --- a/pytquic3/widgetdatabase.cpp +++ b/pytquic3/widgetdatabase.cpp @@ -48,10 +48,10 @@ static int dbcount = 0; static int dbcustomcount = 200; static TQStrList *wGroups; static TQStrList *invisibleGroups; -static bool whatsThisLoaded = FALSE; +static bool whatsThisLoaded = false; static TQPluginManager<WidgetInterface> *widgetPluginManager = 0; -static bool plugins_set_up = FALSE; -static bool was_in_setup = FALSE; +static bool plugins_set_up = false; +static bool was_in_setup = false; TQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager; @@ -101,7 +101,7 @@ WidgetDatabase::WidgetDatabase() void WidgetDatabase::setupDataBase( int id ) { - was_in_setup = TRUE; + was_in_setup = true; #ifndef UIC Q_UNUSED( id ) if ( dbcount ) @@ -122,7 +122,7 @@ void WidgetDatabase::setupDataBase( int id ) invisibleGroups->append( "Forms" ); invisibleGroups->append( "Temp" ); className2Id = new TQDict<int>( dbdictsize ); - className2Id->setAutoDelete( TRUE ); + className2Id->setAutoDelete( true ); WidgetDatabaseRecord *r = 0; @@ -574,7 +574,7 @@ void WidgetDatabase::setupPlugins() { if ( plugins_set_up ) return; - plugins_set_up = TRUE; + plugins_set_up = true; TQStringList widgets = widgetManager()->featureList(); for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { if ( hasWidget( *it ) ) @@ -724,7 +724,7 @@ bool WidgetDatabase::isForm( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isForm; } @@ -736,7 +736,7 @@ bool WidgetDatabase::isContainer( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isContainer || r->isForm; } @@ -745,7 +745,7 @@ bool WidgetDatabase::isCommon( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isCommon; } @@ -837,9 +837,9 @@ bool WidgetDatabase::isGroupEmpty( const TQString &grp ) if ( !( r = db[ i ] ) ) continue; if ( r->group == grp ) - return FALSE; + return false; } - return TRUE; + return true; } TQString WidgetDatabase::widgetGroup( int i ) @@ -883,8 +883,8 @@ void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName, bool WidgetDatabase::isCustomWidget( int id ) { if ( id >= dbcustom && id < dbcustomcount ) - return TRUE; - return FALSE; + return true; + return false; } bool WidgetDatabase::isCustomPluginWidget( int id ) @@ -892,7 +892,7 @@ bool WidgetDatabase::isCustomPluginWidget( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isPlugin; } @@ -916,13 +916,13 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath ) if ( r ) r->whatsThis = l[ 0 ]; } - whatsThisLoaded = TRUE; + whatsThisLoaded = true; } // ### TQt 3.1: make these publically accessible via TQWidgetDatabase API #if defined(UIC) -bool dbnounload = FALSE; +bool dbnounload = false; TQStringList *dbpaths = 0; #else extern TQString *qwf_plugin_dir; @@ -941,7 +941,7 @@ TQPluginManager<WidgetInterface> *widgetManager() cleanup_manager.add( &widgetPluginManager ); #if defined(UIC) if ( dbnounload ) - widgetPluginManager->setAutoUnload( FALSE ); + widgetPluginManager->setAutoUnload( false ); if ( dbpaths ) { TQStringList::ConstIterator it = dbpaths->begin(); for ( ; it != dbpaths->end(); ++it ) diff --git a/sip/tqt/tqinputdialog.sip b/sip/tqt/tqinputdialog.sip index f64baa7..11016b6 100644 --- a/sip/tqt/tqinputdialog.sip +++ b/sip/tqt/tqinputdialog.sip @@ -109,7 +109,7 @@ the <Literal>double</Literal> result and the <Literal>ok</Literal> flag. <ParamDef>const TQString &<Parameter>label</Parameter></ParamDef> <ParamDef>const TQStringList &<Parameter>list</Parameter></ParamDef> <ParamDef>int <Parameter>current</Parameter> = 0</ParamDef> - <ParamDef>bool <Parameter>editable</Parameter> = TRUE</ParamDef> + <ParamDef>bool <Parameter>editable</Parameter> = true</ParamDef> <ParamDef>bool *<Parameter>ok</Parameter> = 0</ParamDef> <ParamDef>TQWidget *<Parameter>parent</Parameter> = 0</ParamDef> <ParamDef>const char *<Parameter>name</Parameter> = 0</ParamDef> @@ -146,7 +146,7 @@ public: bool * = 0,TQWidget * = 0,const char * = 0); static TQString getItem(const TQString &,const TQString &, - const TQStringList &,int = 0,bool = TRUE, + const TQStringList &,int = 0,bool = true, bool * = 0,TQWidget * = 0,const char * = 0); private: diff --git a/sip/tqt/tqmetaobject.sip b/sip/tqt/tqmetaobject.sip index 56e96e6..881e8e8 100644 --- a/sip/tqt/tqmetaobject.sip +++ b/sip/tqt/tqmetaobject.sip @@ -24,7 +24,7 @@ <Sect2><Title>TQMetaObject</Title> <FuncSynopsis> <FuncDef>int <Function>numClassInfo</Function> const</FuncDef> - <ParamDef>bool <Parameter>super</Parameter> = FALSE</ParamDef> + <ParamDef>bool <Parameter>super</Parameter> = false</ParamDef> </FuncSynopsis> <Para> Not implemented. @@ -32,7 +32,7 @@ Not implemented. <FuncSynopsis> <FuncDef>const TQClassInfo *<Function>classInfo</Function> const</FuncDef> - <ParamDef>bool <Parameter>super</Parameter> = FALSE</ParamDef> + <ParamDef>bool <Parameter>super</Parameter> = false</ParamDef> </FuncSynopsis> <Para> Not implemented. diff --git a/sip/tqt/tqobject.sip b/sip/tqt/tqobject.sip index ef2ddc5..7a7c86b 100644 --- a/sip/tqt/tqobject.sip +++ b/sip/tqt/tqobject.sip @@ -487,7 +487,7 @@ public: while (o) { - bool remove = TRUE; + bool remove = true; PyObject *pyo = sipConvertFromInstance(o, sipClass_TQObject, 0); if (pyo) @@ -497,7 +497,7 @@ public: for (int i = 0; i < PyTuple_GET_SIZE(mro); ++i) if (strcmp(((PyTypeObject *)PyTuple_GET_ITEM(mro,i)) -> tp_name,a0) == 0) { - remove = FALSE; + remove = false; break; } @@ -1224,7 +1224,7 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *tqargs) if (id - staticMetaObject()->slotOffset() != 0) return TQObject::tqt_invoke(id, tqargs); - bool ok = TRUE; + bool ok = true; const pytqt3Signature *psig = conn.sc_signature; TQVariant *tqv; @@ -1246,7 +1246,7 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *tqargs) PyObject *argtup = PyTuple_New(psig->sg_nrargs); if (!argtup) - ok = FALSE; + ok = false; else { for (int a = 0; a < psig->sg_nrargs; ++a) @@ -1359,7 +1359,7 @@ bool UniversalSlot::tqt_invoke(int id, TQUObject *tqargs) if (res) Py_DECREF(res); else - ok = FALSE; + ok = false; } Py_DECREF(argtup); @@ -1458,7 +1458,8 @@ static pytqt3Signature *parseSignature(const char *sig) // non-significant spaces. Each argument is left as a '\0' terminated // string. char *dp = psig->sg_signature; - int depth = 0, nrcommas = 0, argstart = TRUE; + int depth = 0, nrcommas = 0; + bool argstart = true; for (;;) { @@ -1480,7 +1481,7 @@ static pytqt3Signature *parseSignature(const char *sig) { *dp++ = '\0'; ++nrcommas; - argstart = TRUE; + argstart = true; } else { @@ -1502,7 +1503,7 @@ static pytqt3Signature *parseSignature(const char *sig) else { *dp++ = ch; - argstart = FALSE; + argstart = false; } } @@ -1546,7 +1547,8 @@ static pytqt3Signature *parseSignature(const char *sig) static void parseType(const char *type, pytqt3SigArg *arg) { size_t btlen = 0; - int unsup, isref = FALSE, indir = 0; + int indir = 0; + bool unsup, isref = false; const char *ep; pytqt3SigArgType sat = unknown_sat; @@ -1558,7 +1560,7 @@ static void parseType(const char *type, pytqt3SigArg *arg) // is a reference. for (ep = type; *ep; ++ep) if (*ep == '&') - isref = TRUE; + isref = true; else if (*ep == '*') ++indir; else @@ -1662,12 +1664,12 @@ static void parseType(const char *type, pytqt3SigArg *arg) if (indir == 0) { sat = tqvariant_sat; - unsup = FALSE; + unsup = false; } else if (indir == 1) { sat = tqvariantp_sat; - unsup = FALSE; + unsup = false; } } break; @@ -1701,7 +1703,7 @@ static void parseType(const char *type, pytqt3SigArg *arg) else if (strcmp(type, "PyTQt_PyObject") == 0 && indir == 0) { sat = pyobject_sat; - unsup = FALSE; + unsup = false; } break; diff --git a/sip/tqt/tqstring.sip b/sip/tqt/tqstring.sip index 6e09d0f..d713997 100644 --- a/sip/tqt/tqstring.sip +++ b/sip/tqt/tqstring.sip @@ -690,7 +690,7 @@ public: else { static TQTextCodec *codec = 0; - static bool check_codec = TRUE; + static bool check_codec = true; // For the first time only, try and find a TQt codec that // corresponds to the default Python codec. If one wasn't @@ -699,7 +699,7 @@ public: if (check_codec) { codec = TQTextCodec::codecForName(PyUnicode_GetDefaultEncoding()); - check_codec = FALSE; + check_codec = false; } if (codec) diff --git a/sip/tqt/tqstyle.sip b/sip/tqt/tqstyle.sip index 0630d81..521678e 100644 --- a/sip/tqt/tqstyle.sip +++ b/sip/tqt/tqstyle.sip @@ -158,8 +158,8 @@ class TQStyleWidgetActionRequestData public: TQStyleWidgetActionRequestData(); TQStyleWidgetActionRequestData(int, int = 0); - TQStyleWidgetActionRequestData(TQPalette, bool = FALSE, const char* = 0); - TQStyleWidgetActionRequestData(TQFont, bool = FALSE, const char* = 0); + TQStyleWidgetActionRequestData(TQPalette, bool = false, const char* = 0); + TQStyleWidgetActionRequestData(TQFont, bool = false, const char* = 0); TQStyleWidgetActionRequestData(TQRect); ~TQStyleWidgetActionRequestData(); }; diff --git a/sip/tqt/tqtextedit.sip b/sip/tqt/tqtextedit.sip index ef0f80c..80bedec 100644 --- a/sip/tqt/tqtextedit.sip +++ b/sip/tqt/tqtextedit.sip @@ -45,7 +45,7 @@ This has been renamed <Literal>delChar</Literal> in Python. <ParamDef>const TQString &<Parameter>expr</Parameter></ParamDef> <ParamDef>bool <Parameter>cs</Parameter></ParamDef> <ParamDef>bool <Parameter>wo</Parameter></ParamDef> - <ParamDef>bool <Parameter>forward</Parameter> = TRUE</ParamDef> + <ParamDef>bool <Parameter>forward</Parameter> = true</ParamDef> <ParamDef>int *<Parameter>para</Parameter> = 0</ParamDef> <ParamDef>int *<Parameter>index</Parameter> = 0</ParamDef> </FuncSynopsis> diff --git a/sip/tqtsql/tqsqlcursor.sip b/sip/tqtsql/tqsqlcursor.sip index 76f258e..4d85be9 100644 --- a/sip/tqtsql/tqsqlcursor.sip +++ b/sip/tqtsql/tqsqlcursor.sip @@ -24,7 +24,7 @@ <Sect2><Title>TQSqlCursor (TQt v3+)</Title> <FuncSynopsis> <FuncDef>virtual int <Function>del</Function></FuncDef> - <ParamDef>bool <Parameter>invalidate</Parameter> = TRUE</ParamDef> + <ParamDef>bool <Parameter>invalidate</Parameter> = true</ParamDef> </FuncSynopsis> <Para> This has been renamed <Literal>delRecords</Literal> in Python. @@ -33,7 +33,7 @@ This has been renamed <Literal>delRecords</Literal> in Python. <FuncSynopsis> <FuncDef>virtual int <Function>del</Function></FuncDef> <ParamDef>const TQString &<Parameter>filter</Parameter></ParamDef> - <ParamDef>bool <Parameter>invalidate</Parameter> = TRUE</ParamDef> + <ParamDef>bool <Parameter>invalidate</Parameter> = true</ParamDef> </FuncSynopsis> <Para> This has been renamed <Literal>delRecords</Literal> in Python. diff --git a/sip/tqtsql/tqsqlselectcursor.sip b/sip/tqtsql/tqsqlselectcursor.sip index a33fee3..147c38c 100644 --- a/sip/tqtsql/tqsqlselectcursor.sip +++ b/sip/tqtsql/tqsqlselectcursor.sip @@ -24,7 +24,7 @@ <Sect2><Title>TQSqlSelectCursor (TQt v3.2.0+)</Title> <FuncSynopsis> <FuncDef>int <Function>del</Function></FuncDef> - <ParamDef>bool <Parameter>invalidate</Parameter> = TRUE</ParamDef> + <ParamDef>bool <Parameter>invalidate</Parameter> = true</ParamDef> </FuncSynopsis> <Para> This has been renamed <Literal>delRecords</Literal> in Python. |