summaryrefslogtreecommitdiffstats
path: root/doc/html/xml-sax-walkthrough.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-11-26 15:11:22 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-11-26 15:11:22 +0900
commitb87533f9904c10f24d6b2e8177c00944e3efe15b (patch)
treec1106a381c851b51e86004698457aef1211b77be /doc/html/xml-sax-walkthrough.html
parent894037c3e68e1573a34183d936171f8cda5085f3 (diff)
downloadtqt-r14.1.x.tar.gz
tqt-r14.1.x.zip
Replace TRUE/FALSE with boolean values true/false - part 4r14.1.x
Manually cherry-picked from commit 4d495175 Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/xml-sax-walkthrough.html')
-rw-r--r--doc/html/xml-sax-walkthrough.html10
1 files changed, 5 insertions, 5 deletions
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
<p> <pre> <a name="x2137"></a>bool StructureParser::<a href="qxmlcontenthandler.html#startDocument">startDocument</a>()
{
indent = "";
- return TRUE;
+ return true;
}
</pre>
<p> At the beginning of the document we simply
set <em>indent</em> 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.
<p> 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 <a href="qxmlcontenthandler.html#startElement">TQXmlContentHand
{
printf( "%s%s\n", (const char*)indent, (const char*)qName );
indent += " ";
- return TRUE;
+ return true;
}
</pre>
<p> This is what the implementation does: The name of the element with
@@ -127,14 +127,14 @@ without an eventual prefix denoting the <a href="xml.html#namespaces">namespace.
<p> If another element follows before the current element's end tag
it should be indented. Therefore we add four spaces to the
<em>indent</em> string.
-<p> Finally we return TRUE in order to let the parser continue without
+<p> Finally we return true in order to let the parser continue without
errors.
<p> The last functionality we need to add is the parser's behaviour when an
end tag occurs. This means overloading <a href="qxmlcontenthandler.html#endElement">TQXmlContentHandler::endElement</a>().
<p> <pre> <a name="x2136"></a>bool StructureParser::<a href="qxmlcontenthandler.html#endElement">endElement</a>( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp; )
{
indent.remove( (uint)0, 4 );
- return TRUE;
+ return true;
}
</pre>
<p> Obviously we then should shorten the <em>indent</em> string by the four