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 /pytquic3/uic.cpp | |
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)
Diffstat (limited to 'pytquic3/uic.cpp')
-rw-r--r-- | pytquic3/uic.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
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; } /*! |