diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-30 14:27:29 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-25 16:43:08 +0900 |
| commit | 35ced32e331ee29fda1642616c803637952f5b22 (patch) | |
| tree | da44726777f814e19c7ef1e43854f6a1693dd6fb /tools/designer/uic | |
| parent | 7dd4848d61e4c52091d6c644356c84c67536bde2 (diff) | |
| download | tqt-35ced32e.tar.gz tqt-35ced32e.zip | |
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit a7f1e6e2552d9cdbb3d76bff089db522248b9a24)
Diffstat (limited to 'tools/designer/uic')
| -rw-r--r-- | tools/designer/uic/embed.cpp | 8 | ||||
| -rw-r--r-- | tools/designer/uic/form.cpp | 82 | ||||
| -rw-r--r-- | tools/designer/uic/main.cpp | 36 | ||||
| -rw-r--r-- | tools/designer/uic/object.cpp | 12 | ||||
| -rw-r--r-- | tools/designer/uic/subclassing.cpp | 4 | ||||
| -rw-r--r-- | tools/designer/uic/uic.cpp | 46 | ||||
| -rw-r--r-- | tools/designer/uic/uic.h | 2 |
7 files changed, 95 insertions, 95 deletions
diff --git a/tools/designer/uic/embed.cpp b/tools/designer/uic/embed.cpp index aa4597d34..0a89ca533 100644 --- a/tools/designer/uic/embed.cpp +++ b/tools/designer/uic/embed.cpp @@ -150,7 +150,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima out << "\n"; 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; @@ -217,9 +217,9 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima else out << "0, "; if ( e->alpha ) - out << "TRUE, "; + out << "true, "; else - out << "FALSE, "; + out << "false, "; out << "\"" << e->name << "\" },\n"; e = list_image.next(); } @@ -258,7 +258,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima " );\n" #endif " if ( embed_image_vec[i].alpha )\n" - " img.setAlphaBuffer(TRUE);\n" + " img.setAlphaBuffer(true);\n" " return img;\n" " }\n" " }\n" diff --git a/tools/designer/uic/form.cpp b/tools/designer/uic/form.cpp index 42ee08cb1..5db986f6a 100644 --- a/tools/designer/uic/form.cpp +++ b/tools/designer/uic/form.cpp @@ -87,9 +87,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() ) { @@ -263,7 +263,7 @@ void Uic::createFormDecl( const TQDomElement &e ) out << "class TQPopupMenu;" << endl; } - bool dbForm = FALSE; + bool dbForm = false; registerDatabases( e ); dbConnections = unique( dbConnections ); if ( dbConnections.count() ) @@ -271,12 +271,12 @@ void Uic::createFormDecl( const TQDomElement &e ) if ( dbCursors.count() ) forwardDecl += "TQSqlCursor"; 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; } } @@ -380,12 +380,12 @@ void Uic::createFormDecl( const TQDomElement &e ) // constructor if ( objClass == "TQDialog" || objClass == "TQWizard" ) { - out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );" << endl; + out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );" << endl; } else if ( objClass == "TQWidget" ) { out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );" << endl; } else if ( objClass == "TQMainWindow" ) { out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );" << endl; - isMainWindow = TRUE; + isMainWindow = true; } else { out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0 );" << endl; } @@ -395,7 +395,7 @@ void Uic::createFormDecl( const TQDomElement &e ) out << endl; // children - bool needPolish = FALSE; + bool needPolish = false; nl = e.parentNode().toElement().elementsByTagName( "widget" ); for ( i = 1; i < (int) nl.length(); i++ ) { // start at 1, 0 is the toplevel widget n = nl.item(i).toElement(); @@ -406,7 +406,7 @@ void Uic::createFormDecl( const TQDomElement &e ) TQString s = getClassName( n ); if ( s == "TQDataTable" || s == "TQDataBrowser" ) { if ( isFrameworkCodeGenerated( n ) ) - needPolish = TRUE; + needPolish = true; } } @@ -428,13 +428,13 @@ void Uic::createFormDecl( const TQDomElement &e ) // database connections dbConnections = unique( dbConnections ); - bool hadOutput = FALSE; + bool hadOutput = false; for ( it = dbConnections.begin(); it != dbConnections.end(); ++it ) { if ( !(*it).isEmpty() ) { // only need pointers to non-default connections if ( (*it) != "(default)" && !(*it).isEmpty() ) { out << indent << "TQSqlDatabase* " << *it << "Connection;" << endl; - hadOutput = TRUE; + hadOutput = true; } } } @@ -756,14 +756,14 @@ void Uic::createFormImpl( const TQDomElement &e ) globalIncludes += "ntqsqldatabase.h"; if ( dbCursors.count() ) globalIncludes += "ntqsqlcursor.h"; - 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; } } @@ -869,7 +869,7 @@ void Uic::createFormImpl( const TQDomElement &e ) if ( !outputFileName.isEmpty() ) uiDotH = combinePath( uiDotH, outputFileName ); out << "#include \"" << uiDotH << "\"" << endl; - writeFunctImpl = FALSE; + writeFunctImpl = false; } // register the object and unify its name @@ -900,7 +900,7 @@ void Uic::createFormImpl( const TQDomElement &e ) // resulting 'length' to catch corrupt UIC files? int a = 0; int column = 0; - bool inQuote = FALSE; + bool inQuote = false; out << "static const char* const " << img << "_data[] = { " << endl; while ( baunzip[a] != '\"' ) a++; @@ -948,7 +948,7 @@ void Uic::createFormImpl( const TQDomElement &e ) out << " * name 'name' and widget flags set to 'f'." << endl; out << " *" << endl; out << " * The " << objClass.mid(1).lower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * TRUE to construct a modal " << objClass.mid(1).lower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).lower() << "." << endl; out << " */" << endl; out << nameOfClass << "::" << bareNameOfClass << "( TQWidget* parent, const char* name, bool modal, WFlags fl )" << endl; out << " : " << objClass << "( parent, name, modal, fl )"; @@ -967,7 +967,7 @@ void Uic::createFormImpl( const TQDomElement &e ) out << " */" << endl; out << nameOfClass << "::" << bareNameOfClass << "( TQWidget* parent, const char* name, WFlags fl )" << endl; out << " : " << objClass << "( parent, name, fl )"; - isMainWindow = TRUE; + isMainWindow = true; } else { out << "/*" << endl; out << " * Constructs a " << nameOfClass << " which is a child of 'parent', with the" << endl; @@ -1099,35 +1099,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 << indent << "// actions" << endl; createActionImpl( n.firstChild().toElement(), "this" ); - 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 << indent << "// toolbars" << 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 << indent << "// menubar" << endl; createMenuBarImpl( n, objClass, objName ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) @@ -1201,14 +1201,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 << indent << "// buddies" << endl; } out << indent << (*buddy).key << "->setBuddy( " << registeredName( (*buddy).buddy ) << " );" << endl; - firstBuddy = FALSE; + firstBuddy = false; } } @@ -1232,26 +1232,26 @@ void Uic::createFormImpl( const TQDomElement &e ) out << endl; // 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; @@ -1301,10 +1301,10 @@ void Uic::createFormImpl( const TQDomElement &e ) if ( conn == "(default)" ) out << indent << indent << indent << "cursor = new TQSqlCursor( \"" << tab << "\" );" << endl; else - out << indent << indent << indent << "cursor = new TQSqlCursor( \"" << tab << "\", TRUE, " << conn << "Connection );" << endl; + out << indent << indent << indent << "cursor = new TQSqlCursor( \"" << tab << "\", true, " << conn << "Connection );" << endl; out << indent << indent << indent << "if ( " << c << "->isReadOnly() ) " << endl; out << indent << indent << indent << indent << "cursor->setMode( TQSqlCursor::ReadOnly );" << endl; - out << indent << indent << indent << c << "->setSqlCursor( cursor, FALSE, TRUE );" << endl; + out << indent << indent << indent << c << "->setSqlCursor( cursor, false, true );" << endl; out << indent << indent << "}" << endl; out << indent << indent << "if ( !cursor->isActive() )" << endl; out << indent << indent << indent << c << "->refresh( TQDataTable::RefreshAll );" << endl; @@ -1329,8 +1329,8 @@ void Uic::createFormImpl( const TQDomElement &e ) if ( conn == "(default)" ) out << indent << indent << indent << "TQSqlCursor* cursor = new TQSqlCursor( \"" << tab << "\" );" << endl; else - out << indent << indent << indent << "TQSqlCursor* cursor = new TQSqlCursor( \"" << tab << "\", TRUE, " << conn << "Connection );" << endl; - out << indent << indent << indent << obj << "->setSqlCursor( cursor, TRUE );" << endl; + out << indent << indent << indent << "TQSqlCursor* cursor = new TQSqlCursor( \"" << tab << "\", true, " << conn << "Connection );" << endl; + out << indent << indent << indent << obj << "->setSqlCursor( cursor, true );" << endl; out << indent << indent << indent << obj << "->refresh();" << endl; out << indent << indent << indent << obj << "->first();" << endl; out << indent << indent << "}" << endl; @@ -1380,7 +1380,7 @@ void Uic::createFormImpl( const TQDomElement &e ) 1. If the type is 'void', we return nothing. - 2. If the type is 'bool', we return 'FALSE'. + 2. If the type is 'bool', we return 'false'. 3. If the type is 'unsigned long' or 'TQ_UINT16' or 'double' or similar, we @@ -1400,7 +1400,7 @@ void Uic::createFormImpl( const TQDomElement &e ) ( toks.grep(numeric).count() == toks.count() ); if ( type == "bool" ) { - retVal = "FALSE"; + retVal = "false"; } else if ( isBasicNumericType || type.endsWith("*") ) { retVal = "0"; } else if ( type.endsWith("&") ) { diff --git a/tools/designer/uic/main.cpp b/tools/designer/uic/main.cpp index af06821e2..bd0441c75 100644 --- a/tools/designer/uic/main.cpp +++ b/tools/designer/uic/main.cpp @@ -52,12 +52,12 @@ extern TQStringList *dbpaths; int main( int argc, char * argv[] ) { - bool impl = FALSE; - bool subcl = FALSE; - bool imagecollection = FALSE; - bool imagecollection_tmpfile = FALSE; + bool impl = false; + bool subcl = false; + bool imagecollection = false; + bool imagecollection_tmpfile = false; #if defined(UIB) - bool binary = FALSE; + bool binary = false; #endif TQStringList images; const char *error = 0; @@ -68,10 +68,10 @@ int main( int argc, char * argv[] ) TQCString image_tmpfile; const char* projectName = 0; const char* trmacro = 0; - bool nofwd = FALSE; - bool fix = FALSE; + bool nofwd = false; + bool fix = false; TQCString pchFile; - TQApplication app(argc, argv, FALSE); + TQApplication app(argc, argv, false); TQString keybase( "/TQt Designer/" + TQString::number( (TQT_VERSION >> 16) & 0xff ) +"." + TQString::number( (TQT_VERSION >> 8) & 0xff ) + "/" ); @@ -95,7 +95,7 @@ int main( int argc, char * argv[] ) } else outputFile = &opt[1]; } else if ( opt[0] == 'i' || opt == "impl" ) { - impl = TRUE; + impl = true; if ( opt == "impl" || opt[1] == '\0' ) { if ( !(n < argc-1) ) { error = "Missing name of header file"; @@ -105,7 +105,7 @@ int main( int argc, char * argv[] ) } else headerFile = &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"; @@ -116,21 +116,21 @@ int main( int argc, char * argv[] ) projectName = &opt[1]; } if ( argc > n+1 && qstrcmp( argv[n+1], "-f" ) == 0 ) { - imagecollection_tmpfile = TRUE; + imagecollection_tmpfile = true; image_tmpfile = argv[n+2]; n += 2; } #if defined(UIB) } else if ( opt == "binary" ) { - binary = TRUE; + binary = true; #endif } else if ( opt == "nofwd" ) { - nofwd = TRUE; + nofwd = true; } else if ( opt == "nounload" ) { - dbnounload = TRUE; + dbnounload = true; } else if ( opt == "subdecl" ) { - subcl = TRUE; + subcl = true; if ( !(n < argc-2) ) { error = "Missing arguments"; break; @@ -138,8 +138,8 @@ int main( int argc, char * argv[] ) className = argv[++n]; headerFile = argv[++n]; } else if ( opt == "subimpl" ) { - subcl = TRUE; - impl = TRUE; + subcl = true; + impl = true; if ( !(n < argc-2) ) { error = "Missing arguments"; break; @@ -174,7 +174,7 @@ int main( int argc, char * argv[] ) } else if ( opt == "help" ) { break; } else if ( opt == "fix" ) { - fix = TRUE; + fix = true; } else if ( opt == "pch") { if ( !(n < argc-1) ) { error = "Missing name of PCH file"; diff --git a/tools/designer/uic/object.cpp b/tools/designer/uic/object.cpp index 1306e9c06..305d01b4b 100644 --- a/tools/designer/uic/object.cpp +++ b/tools/designer/uic/object.cpp @@ -88,7 +88,7 @@ void Uic::createObjectDecl( const TQDomElement& e ) \sa createObjectDecl() */ -static bool createdCentralWidget = FALSE; +static bool createdCentralWidget = false; TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& par, const TQString& layout ) { @@ -96,7 +96,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla if ( parent == "this" && isMainWindow ) { if ( !createdCentralWidget ) out << indent << "setCentralWidget( new TQWidget( this, \"qt_central_widget\" ) );" << endl; - createdCentralWidget = TRUE; + createdCentralWidget = true; parent = "centralWidget()"; } TQDomElement n; @@ -164,7 +164,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla lastItem = "0"; // 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; @@ -179,7 +179,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; @@ -628,12 +628,12 @@ TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj, TQString palette = "pal"; if ( !pal_used ) { out << indent << "TQPalette " << palette << ";" << endl; - pal_used = TRUE; + pal_used = true; } TQString cg = "cg"; if ( !cg_used ) { out << indent << "TQColorGroup " << cg << ";" << endl; - cg_used = TRUE; + cg_used = true; } n = e.firstChild().toElement(); while ( !n.isNull() && n.tagName() != "active" ) diff --git a/tools/designer/uic/subclassing.cpp b/tools/designer/uic/subclassing.cpp index 17e651f06..cb7a1a92b 100644 --- a/tools/designer/uic/subclassing.cpp +++ b/tools/designer/uic/subclassing.cpp @@ -70,7 +70,7 @@ void Uic::createSubDecl( const TQDomElement &e, const TQString& subClass ) // constructor if ( objClass == "TQDialog" || objClass == "TQWizard" ) { - out << " " << subClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );" << endl; + out << " " << subClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );" << endl; } else { // standard TQWidget out << " " << subClass << "( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );" << endl; } @@ -215,7 +215,7 @@ void Uic::createSubImpl( const TQDomElement &e, const TQString& subClass ) out << " * name 'name' and widget flags set to 'f' " << endl; out << " *" << endl; out << " * The " << objClass.mid(1).lower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * TRUE to construct a modal " << objClass.mid(1).lower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).lower() << "." << endl; out << " */" << endl; out << subClass << "::" << subClass << "( TQWidget* parent, const char* name, bool modal, WFlags fl )" << endl; out << " : " << nameOfClass << "( parent, name, modal, fl )" << endl; diff --git a/tools/designer/uic/uic.cpp b/tools/designer/uic/uic.cpp index c38802714..9f54a216a 100644 --- a/tools/designer/uic/uic.cpp +++ b/tools/designer/uic/uic.cpp @@ -44,7 +44,7 @@ #include <stdio.h> #include <stdlib.h> -bool Uic::isMainWindow = FALSE; +bool Uic::isMainWindow = false; TQString Uic::getComment( const TQDomNode& n ) { @@ -59,7 +59,7 @@ TQString Uic::getComment( const TQDomNode& n ) TQString Uic::mkBool( bool b ) { - return b? "TRUE" : "FALSE"; + return b? "true" : "false"; } TQString Uic::mkBool( const TQString& s ) @@ -104,13 +104,13 @@ 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 = "tr"; for ( int i = 0; i < (int) sourceText.length(); i++ ) { if ( sourceText[i].unicode() >= 0x80 ) { t = "trUtf8"; - encode = TRUE; + encode = true; break; } } @@ -144,10 +144,10 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, outputFileName( outputFn ), trmacro( trm ), nofwd( omitForwardDecls ) { fileName = fn; - writeFunctImpl = TRUE; + writeFunctImpl = true; defMargin = BOXLAYOUT_DEFAULT_MARGIN; defSpacing = BOXLAYOUT_DEFAULT_SPACING; - externPixmaps = FALSE; + externPixmaps = false; indent = " "; // default indent item_used = cg_used = pal_used = 0; @@ -170,7 +170,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() ); @@ -256,7 +256,7 @@ 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 ) @@ -264,8 +264,8 @@ 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; + return false; + return true; } /*! Extracts an object name from \a e. It's stored in the 'name' @@ -407,8 +407,8 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) out << indent << objName << " = new TQActionGroup( " << parent << ", \"" << 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" ) { @@ -431,7 +431,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) call += value + " );"; if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; else if (prop == "text") actionText = value; @@ -442,7 +442,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) } } else if ( !subActionsDone && ( n2.tagName() == "actiongroup" || n2.tagName() == "action" ) ) { createActionImpl( n2, objName ); - subActionsDone = TRUE; + subActionsDone = true; } } // workaround for loading pre-3.3 files expecting bogus TQAction behavior @@ -647,7 +647,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par s = indent + item + " = "; else s = indent + "TQListViewItem * " + item + " = "; - item_used = TRUE; + item_used = true; } if ( !parentItem.isEmpty() ) @@ -672,7 +672,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par pixmaps << pix; } } else if ( n.tagName() == "item" ) { - s += indent + item + "->setOpen( TRUE );\n"; + s += indent + item + "->setOpen( true );\n"; s += createListViewItemImpl( n, parent, item ); } n = n.nextSibling().toElement(); @@ -700,7 +700,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"); @@ -730,9 +730,9 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p if ( !pix.isEmpty() ) s += indent + parent + "->header()->setLabel( " + parent + "->header()->count() - 1, " + pix + ", " + trcall( txt, com ) + " );\n"; if ( !clickable ) - s += indent + parent + "->header()->setClickEnabled( FALSE, " + parent + "->header()->count() - 1 );\n"; + s += indent + parent + "->header()->setClickEnabled( false, " + parent + "->header()->count() - 1 );\n"; if ( !resizable ) - s += indent + parent + "->header()->setResizeEnabled( FALSE, " + parent + "->header()->count() - 1 );\n"; + s += indent + parent + "->header()->setResizeEnabled( false, " + parent + "->header()->count() - 1 );\n"; return s; } @@ -993,7 +993,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. */ @@ -1002,8 +1002,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; } /*! @@ -1115,7 +1115,7 @@ TQString Uic::createObjectInstance( const TQString& objClass, const TQString& pa { if (( objClass.mid( 1 ) == "ComboBox" ) || ( objClass.mid( 2 ) == "ComboBox" )) { - return objClass + "( FALSE, " + parent + ", \"" + objName + "\" )"; + return objClass + "( false, " + parent + ", \"" + objName + "\" )"; } return objClass + "( " + parent + ", \"" + objName + "\" )"; } diff --git a/tools/designer/uic/uic.h b/tools/designer/uic/uic.h index f7e62f6e2..2de6015e8 100644 --- a/tools/designer/uic/uic.h +++ b/tools/designer/uic/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 ); |
