From b87533f9904c10f24d6b2e8177c00944e3efe15b Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 26 Nov 2025 15:11:22 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Manually cherry-picked from commit 4d495175 Signed-off-by: Michele Calgaro --- doc/html/xml-sax-walkthrough.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc/html/xml-sax-walkthrough.html') diff --git a/doc/html/xml-sax-walkthrough.html b/doc/html/xml-sax-walkthrough.html index 4703e6cba..be4aa2572 100644 --- a/doc/html/xml-sax-walkthrough.html +++ b/doc/html/xml-sax-walkthrough.html @@ -100,13 +100,13 @@ get indentation right, there is nothing special about our new

    bool StructureParser::startDocument()
     {
         indent = "";
-        return TRUE;
+        return true;
     }
 

At the beginning of the document we simply set indent to an empty string because we want to print out the root element without any indentation. -Also we return TRUE so that the parser continues without +Also we return true so that the parser continues without reporting an error.

Because we want to be informed when the parser comes accross a start tag of an element and subsequently print it out, we @@ -117,7 +117,7 @@ have to overload TQXmlContentHand { printf( "%s%s\n", (const char*)indent, (const char*)qName ); indent += " "; - return TRUE; + return true; }

This is what the implementation does: The name of the element with @@ -127,14 +127,14 @@ without an eventual prefix denoting the namespace.

If another element follows before the current element's end tag it should be indented. Therefore we add four spaces to the indent string. -

Finally we return TRUE in order to let the parser continue without +

Finally we return true in order to let the parser continue without errors.

The last functionality we need to add is the parser's behaviour when an end tag occurs. This means overloading TQXmlContentHandler::endElement().

    bool StructureParser::endElement( const TQString&, const TQString&, const TQString& )
     {
         indent.remove( (uint)0, 4 );
-        return TRUE;
+        return true;
     }
 

Obviously we then should shorten the indent string by the four -- cgit v1.2.3