summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/xml/tqdom.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-09 22:25:47 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-09 22:25:47 -0500
commiteaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch)
tree4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/xml/tqdom.cpp
parent79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff)
downloadexperimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz
experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/xml/tqdom.cpp')
-rw-r--r--tqtinterface/qt4/src/xml/tqdom.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/tqtinterface/qt4/src/xml/tqdom.cpp b/tqtinterface/qt4/src/xml/tqdom.cpp
index ef453c3..4b85e22 100644
--- a/tqtinterface/qt4/src/xml/tqdom.cpp
+++ b/tqtinterface/qt4/src/xml/tqdom.cpp
@@ -82,7 +82,7 @@
*/
static void qt_split_namespace( TQString& prefix, TQString& name, const TQString& qName, bool hasURI )
{
- int i = qName.tqfind( ':' );
+ int i = qName.find( ':' );
if ( i == -1 ) {
if ( hasURI )
prefix = "";
@@ -134,7 +134,7 @@ public:
virtual bool hasAttributes() { return FALSE; }
virtual TQDomNodePrivate* insertBefore( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
virtual TQDomNodePrivate* insertAfter( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
- virtual TQDomNodePrivate* tqreplaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild );
+ virtual TQDomNodePrivate* replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild );
virtual TQDomNodePrivate* removeChild( TQDomNodePrivate* oldChild );
virtual TQDomNodePrivate* appendChild( TQDomNodePrivate* newChild );
@@ -219,8 +219,8 @@ public:
TQDomNodePrivate* removeNamedItem( const TQString& name );
TQDomNodePrivate* item( int index ) const;
uint length() const;
- bool tqcontains( const TQString& name ) const;
- bool tqcontainsNS( const TQString& nsURI, const TQString & localName ) const;
+ bool contains( const TQString& name ) const;
+ bool containsNS( const TQString& nsURI, const TQString & localName ) const;
/**
* Remove all tqchildren from the map.
@@ -233,7 +233,7 @@ public:
* If TRUE, then the node will redirect insert/remove calls
* to its tqparent by calling TQDomNodePrivate::appendChild or removeChild.
* In addition the map wont increase or decrease the reference count
- * of the nodes it tqcontains.
+ * of the nodes it contains.
*
* By default this value is FALSE and the map will handle reference counting
* by itself.
@@ -265,7 +265,7 @@ public:
TQDomNodePrivate* cloneNode( bool deep = TRUE );
TQDomNodePrivate* insertBefore( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
TQDomNodePrivate* insertAfter( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
- TQDomNodePrivate* tqreplaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild );
+ TQDomNodePrivate* replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild );
TQDomNodePrivate* removeChild( TQDomNodePrivate* oldChild );
TQDomNodePrivate* appendChild( TQDomNodePrivate* newChild );
@@ -307,7 +307,7 @@ public:
void appendData( const TQString& arg );
void insertData( unsigned long offset, const TQString& arg );
void deleteData( unsigned long offset, unsigned long count );
- void tqreplaceData( unsigned long offset, unsigned long count, const TQString& arg );
+ void replaceData( unsigned long offset, unsigned long count, const TQString& arg );
// Reimplemented from TQDomNodePrivate
bool isCharacterData() { return TRUE; }
@@ -1332,7 +1332,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
return newChild;
}
-TQDomNodePrivate* TQDomNodePrivate::tqreplaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild )
+TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild )
{
if ( oldChild->tqparent() != this )
return 0;
@@ -1541,7 +1541,7 @@ void TQDomNodePrivate::save( TQTextStream& s, int depth, int indent ) const
Many functions in the DOM return a TQDomNode.
- You can tqfind out the type of a node using isAttr(),
+ You can find out the type of a node using isAttr(),
isCDATASection(), isDocumentFragment(), isDocument(),
isDocumentType(), isElement(), isEntityReference(), isText(),
isEntity(), isNotation(), isProcessingInstruction(),
@@ -1561,15 +1561,15 @@ void TQDomNodePrivate::save( TQTextStream& s, int depth, int indent ) const
independent (deep) copy of the node with cloneNode().
Nodes are inserted with insertBefore(), insertAfter() or
- appendChild(). You can tqreplace one node with another using
- tqreplaceChild() and remove a node with removeChild().
+ appendChild(). You can replace one node with another using
+ replaceChild() and remove a node with removeChild().
To traverse nodes use firstChild() to get a node's first child (if
any), and nextSibling() to traverse. TQDomNode also provides
- lastChild(), previousSibling() and parentNode(). To tqfind the first
+ lastChild(), previousSibling() and parentNode(). To find the first
child node with a particular node name use namedItem().
- To tqfind out if a node has tqchildren use hasChildNodes() and to get
+ To find out if a node has tqchildren use hasChildNodes() and to get
a list of all of a node's tqchildren use childNodes().
The node's name and value (the meaning of which varies depending
@@ -2086,7 +2086,7 @@ bool TQDomNode::hasAttributes() const
Returns a new reference to \a newChild on success or a \link
isNull() null node\endlink on failure.
- \sa insertAfter() tqreplaceChild() removeChild() appendChild()
+ \sa insertAfter() replaceChild() removeChild() appendChild()
*/
TQDomNode TQDomNode::insertBefore( const TQDomNode& newChild, const TQDomNode& refChild )
{
@@ -2116,7 +2116,7 @@ TQDomNode TQDomNode::insertBefore( const TQDomNode& newChild, const TQDomNode& r
Returns a new reference to \a newChild on success or a \link
isNull() null node\endlink on failure.
- \sa insertBefore() tqreplaceChild() removeChild() appendChild()
+ \sa insertBefore() replaceChild() removeChild() appendChild()
*/
TQDomNode TQDomNode::insertAfter( const TQDomNode& newChild, const TQDomNode& refChild )
{
@@ -2138,14 +2138,14 @@ TQDomNode TQDomNode::insertAfter( const TQDomNode& newChild, const TQDomNode& re
position in the list of tqchildren is changed.
If \a newChild is a TQDomDocumentFragment, then \a oldChild is
- tqreplaced by all of the tqchildren of the fragment.
+ replaced by all of the tqchildren of the fragment.
Returns a new reference to \a oldChild on success or a \link
isNull() null node\endlink an failure.
\sa insertBefore() insertAfter() removeChild() appendChild()
*/
-TQDomNode TQDomNode::tqreplaceChild( const TQDomNode& newChild, const TQDomNode& oldChild )
+TQDomNode TQDomNode::replaceChild( const TQDomNode& newChild, const TQDomNode& oldChild )
{
if ( !impl ) {
if (nodeType() == DocumentNode)
@@ -2153,7 +2153,7 @@ TQDomNode TQDomNode::tqreplaceChild( const TQDomNode& newChild, const TQDomNode&
else
return TQDomNode();
}
- return TQDomNode( IMPL->tqreplaceChild( newChild.impl, oldChild.impl ) );
+ return TQDomNode( IMPL->replaceChild( newChild.impl, oldChild.impl ) );
}
/*!
@@ -2163,7 +2163,7 @@ TQDomNode TQDomNode::tqreplaceChild( const TQDomNode& newChild, const TQDomNode&
Returns a new reference to \a oldChild on success or a \link
isNull() null node\endlink on failure.
- \sa insertBefore() insertAfter() tqreplaceChild() appendChild()
+ \sa insertBefore() insertAfter() replaceChild() appendChild()
*/
TQDomNode TQDomNode::removeChild( const TQDomNode& oldChild )
{
@@ -2188,7 +2188,7 @@ TQDomNode TQDomNode::removeChild( const TQDomNode& oldChild )
Returns a new reference to \a newChild.
- \sa insertBefore() insertAfter() tqreplaceChild() removeChild()
+ \sa insertBefore() insertAfter() replaceChild() removeChild()
*/
TQDomNode TQDomNode::appendChild( const TQDomNode& newChild )
{
@@ -2621,12 +2621,12 @@ uint TQDomNamedNodeMapPrivate::length() const
return map.count();
}
-bool TQDomNamedNodeMapPrivate::tqcontains( const TQString& name ) const
+bool TQDomNamedNodeMapPrivate::contains( const TQString& name ) const
{
return ( map[ name ] != 0 );
}
-bool TQDomNamedNodeMapPrivate::tqcontainsNS( const TQString& nsURI, const TQString & localName ) const
+bool TQDomNamedNodeMapPrivate::containsNS( const TQString& nsURI, const TQString & localName ) const
{
return ( namedItemNS( nsURI, localName ) != 0 );
}
@@ -2642,7 +2642,7 @@ bool TQDomNamedNodeMapPrivate::tqcontainsNS( const TQString& nsURI, const TQStri
/*!
\class TQDomNamedNodeMap tqdom.h
\reentrant
- \brief The TQDomNamedNodeMap class tqcontains a collection of nodes
+ \brief The TQDomNamedNodeMap class contains a collection of nodes
that can be accessed by name.
\if defined(commercial)
It is part of the <a href="commercialeditions.html">TQt Enterprise Edition</a>.
@@ -2672,7 +2672,7 @@ bool TQDomNamedNodeMapPrivate::tqcontainsNS( const TQString& nsURI, const TQStri
returns. Nodes are retrieved using namedItem(), namedItemNS() or
item(). New nodes are inserted with setNamedItem() or
setNamedItemNS() and removed with removeNamedItem() or
- removeNamedItemNS(). Use tqcontains() to see if an item with the
+ removeNamedItemNS(). Use contains() to see if an item with the
given name is in the named node map. The number of items is
returned by length().
@@ -2767,8 +2767,8 @@ TQDomNode TQDomNamedNodeMap::namedItem( const TQString& name ) const
by the map is the node name of \a newNode as returned by
TQDomNode::nodeName().
- If the new node tqreplaces an existing node, i.e. the map tqcontains a
- node with the same name, the tqreplaced node is returned.
+ If the new node replaces an existing node, i.e. the map contains a
+ node with the same name, the replaced node is returned.
\sa namedItem() removeNamedItem() setNamedItemNS()
*/
@@ -2829,8 +2829,8 @@ TQDomNode TQDomNamedNodeMap::namedItemNS( const TQString& nsURI, const TQString&
/*!
Inserts the node \a newNode in the map. If a node with the same
namespace URI and the same local name already exists in the map,
- it is tqreplaced by \a newNode. If the new node tqreplaces an existing
- node, the tqreplaced node is returned.
+ it is replaced by \a newNode. If the new node replaces an existing
+ node, the replaced node is returned.
\sa namedItemNS() removeNamedItemNS() setNamedItem()
*/
@@ -2883,14 +2883,14 @@ uint TQDomNamedNodeMap::length() const
*/
/*!
- Returns TRUE if the map tqcontains a node called \a name; otherwise
+ Returns TRUE if the map contains a node called \a name; otherwise
returns FALSE.
*/
-bool TQDomNamedNodeMap::tqcontains( const TQString& name ) const
+bool TQDomNamedNodeMap::contains( const TQString& name ) const
{
if ( !impl )
return FALSE;
- return IMPL->tqcontains( name );
+ return IMPL->contains( name );
}
#undef IMPL
@@ -2977,10 +2977,10 @@ TQDomNodePrivate* TQDomDocumentTypePrivate::insertAfter( TQDomNodePrivate* newCh
return p;
}
-TQDomNodePrivate* TQDomDocumentTypePrivate::tqreplaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild )
+TQDomNodePrivate* TQDomDocumentTypePrivate::replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild )
{
// Call the origianl implementation
- TQDomNodePrivate* p = TQDomNodePrivate::tqreplaceChild( newChild, oldChild );
+ TQDomNodePrivate* p = TQDomNodePrivate::replaceChild( newChild, oldChild );
// Update the maps
if ( p ) {
if ( oldChild && oldChild->isEntity() )
@@ -3275,7 +3275,7 @@ TQDomNodePrivate* TQDomDocumentFragmentPrivate::cloneNode( bool deep)
The most important feature of TQDomDocumentFragment is that it is
treated in a special way by TQDomNode::insertAfter(),
- TQDomNode::insertBefore(), TQDomNode::tqreplaceChild() and
+ TQDomNode::insertBefore(), TQDomNode::replaceChild() and
TQDomNode::appendChild(): instead of inserting the fragment itself, all
the fragment's tqchildren are inserted.
*/
@@ -3397,9 +3397,9 @@ void TQDomCharacterDataPrivate::deleteData( unsigned long offset, unsigned long
value.remove( offset, n );
}
-void TQDomCharacterDataPrivate::tqreplaceData( unsigned long offset, unsigned long n, const TQString& arg )
+void TQDomCharacterDataPrivate::replaceData( unsigned long offset, unsigned long n, const TQString& arg )
{
- value.tqreplace( offset, n, arg );
+ value.replace( offset, n, arg );
}
void TQDomCharacterDataPrivate::appendData( const TQString& arg )
@@ -3434,7 +3434,7 @@ void TQDomCharacterDataPrivate::appendData( const TQString& arg )
You can retrieve a portion of the data string using
substringData(). Extra data can be appended with appendData(), or
inserted with insertData(). Portions of the data string can be
- deleted with deleteData() or tqreplaced with tqreplaceData(). The
+ deleted with deleteData() or replaced with replaceData(). The
length of the data string is returned by length().
The node type of the node containing this character data is
@@ -3559,10 +3559,10 @@ void TQDomCharacterData::deleteData( unsigned long offset, unsigned long count )
Replaces the substring of length \a count starting at position \a
offset with the string \a arg.
*/
-void TQDomCharacterData::tqreplaceData( unsigned long offset, unsigned long count, const TQString& arg )
+void TQDomCharacterData::replaceData( unsigned long offset, unsigned long count, const TQString& arg )
{
if ( impl )
- IMPL->tqreplaceData( offset, count, arg );
+ IMPL->replaceData( offset, count, arg );
}
/*!
@@ -3669,25 +3669,25 @@ static TQString encodeAttr( const TQString& str )
uint i = 0;
while ( i < len ) {
if ( tmp[(int)i] == '<' ) {
- tmp.tqreplace( i, 1, "&lt;" );
+ tmp.replace( i, 1, "&lt;" );
len += 3;
i += 4;
} else if ( tmp[(int)i] == '"' ) {
- tmp.tqreplace( i, 1, "&quot;" );
+ tmp.replace( i, 1, "&quot;" );
len += 5;
i += 6;
} else if ( tmp[(int)i] == '&' ) {
- tmp.tqreplace( i, 1, "&amp;" );
+ tmp.replace( i, 1, "&amp;" );
len += 4;
i += 5;
} else if ( tmp[(int)i] == '>' && i>=2 && tmp[(int)i-1]==']' && tmp[(int)i-2]==']' ) {
- tmp.tqreplace( i, 1, "&gt;" );
+ tmp.replace( i, 1, "&gt;" );
len += 3;
i += 4;
} else if (!isXmlChar(tmp[(int)i])) {
TQString repl = "&#x" + TQString::number(tmp[(int)i].tqunicode(), 16) + ';';
qWarning("TQDom: saving invalid character %s, the document will not be well-formed", repl.latin1());
- tmp.tqreplace(i, 1, repl);
+ tmp.replace(i, 1, repl);
len += repl.length() - 1;
i += repl.length();
} else {
@@ -4034,12 +4034,12 @@ TQDomAttrPrivate* TQDomElementPrivate::removeAttributeNode( TQDomAttrPrivate* ol
bool TQDomElementPrivate::hasAttribute( const TQString& aname )
{
- return m_attr->tqcontains( aname );
+ return m_attr->contains( aname );
}
bool TQDomElementPrivate::hasAttributeNS( const TQString& nsURI, const TQString& localName )
{
- return m_attr->tqcontainsNS( nsURI, localName );
+ return m_attr->containsNS( nsURI, localName );
}
TQString TQDomElementPrivate::text()
@@ -4146,8 +4146,8 @@ void TQDomElementPrivate::save( TQTextStream& s, int depth, int indent ) const
//...
TQString s = e.text()
\endcode
- The text() function operates recursively to tqfind the text (since
- not all elements contain text). If you want to tqfind all the text
+ The text() function operates recursively to find the text (since
+ not all elements contain text). If you want to find all the text
in all of a node's tqchildren, iterate over the tqchildren looking for
TQDomText nodes, e.g.
\code
@@ -4271,7 +4271,7 @@ TQString TQDomElement::attribute( const TQString& name, const TQString& defValu
/*!
Adds an attribute called \a name with value \a value. If an
- attribute with the same name exists, its value is tqreplaced by \a
+ attribute with the same name exists, its value is replaced by \a
value.
\sa attribute() setAttributeNode() setAttributeNS()
@@ -4367,7 +4367,7 @@ TQDomAttr TQDomElement::attributeNode( const TQString& name)
Adds the attribute \a newAttr to this element.
If the element has another attribute that has the same name as \a
- newAttr, this function tqreplaces that attribute and returns it;
+ newAttr, this function replaces that attribute and returns it;
otherwise the function returns a \link TQDomNode::isNull() null
attribute\endlink.
@@ -4454,11 +4454,11 @@ TQString TQDomElement::attributeNS( const TQString nsURI, const TQString& localN
Adds an attribute with the qualified name \a qName and the
namespace URI \a nsURI with the value \a value. If an attribute
with the same local name and namespace URI exists, its prefix is
- tqreplaced by the prefix of \a qName and its value is repaced by \a
+ replaced by the prefix of \a qName and its value is repaced by \a
value.
Although \a qName is the qualified name, the local name is used to
- decide if an existing attribute's value should be tqreplaced.
+ decide if an existing attribute's value should be replaced.
\sa attributeNS() setAttributeNodeNS() setAttribute()
*/
@@ -4558,7 +4558,7 @@ TQDomAttr TQDomElement::attributeNodeNS( const TQString& nsURI, const TQString&
Adds the attribute \a newAttr to this element.
If the element has another attribute that has the same local name
- and namespace URI as \a newAttr, this function tqreplaces that
+ and namespace URI as \a newAttr, this function replaces that
attribute and returns it; otherwise the function returns a \link
TQDomNode::isNull() null attribute\endlink.
@@ -5261,20 +5261,20 @@ static TQCString encodeEntity( const TQCString& str )
const char* d = tmp.data();
while ( i < len ) {
if ( d[i] == '%' ){
- tmp.tqreplace( i, 1, "&#60;" );
+ tmp.replace( i, 1, "&#60;" );
d = tmp.data();
len += 4;
i += 5;
}
else if ( d[i] == '"' ) {
- tmp.tqreplace( i, 1, "&#34;" );
+ tmp.replace( i, 1, "&#34;" );
d = tmp.data();
len += 4;
i += 5;
} else if ( d[i] == '&' && i + 1 < len && d[i+1] == '#' ) {
// Dont encode &lt; or &quot; or &custom;.
// Only encode character references
- tmp.tqreplace( i, 1, "&#38;" );
+ tmp.replace( i, 1, "&#38;" );
d = tmp.data();
len += 4;
i += 5;
@@ -5329,7 +5329,7 @@ void TQDomEntityPrivate::save( TQTextStream& s, int, int ) const
DOM does not support editing entity nodes; if a user wants to make
changes to the contents of an entity, every related
- TQDomEntityReference node must be tqreplaced in the DOM tree by a
+ TQDomEntityReference node must be replaced in the DOM tree by a
clone of the entity's contents, and then the desired changes must
be made to each of the clones instead. All the descendents of an
entity node are read-only.
@@ -6060,7 +6060,7 @@ void TQDomDocumentPrivate::save( TQTextStream& s, int, int indent ) const
Since elements, text nodes, comments, processing instructions,
etc., cannot exist outside the context of a document, the document
- class also tqcontains the factory functions needed to create these
+ class also contains the factory functions needed to create these
objects. The node objects created have an ownerDocument() function
which associates them with the document within whose context they
were created. The DOM classes that will be used most often are
@@ -6580,7 +6580,7 @@ TQDomEntityReference TQDomDocument::createEntityReference( const TQString& name
}
/*!
- Returns a TQDomNodeList, that tqcontains all the elements in the
+ Returns a TQDomNodeList, that contains all the elements in the
document with the name \a tagname. The order of the node list is
the order they are encountered in a preorder traversal of the
element tree.
@@ -6655,7 +6655,7 @@ TQDomNodeList TQDomDocument::elementsByTagName( const TQString& tagname ) const
\endtable
\sa TQDomElement::setAttribute() TQDomNode::insertBefore()
- TQDomNode::insertAfter() TQDomNode::tqreplaceChild() TQDomNode::removeChild()
+ TQDomNode::insertAfter() TQDomNode::replaceChild() TQDomNode::removeChild()
TQDomNode::appendChild()
*/
TQDomNode TQDomDocument::importNode( const TQDomNode& importedNode, bool deep )
@@ -6698,7 +6698,7 @@ TQDomAttr TQDomDocument::createAttributeNS( const TQString& nsURI, const TQStrin
}
/*!
- Returns a TQDomNodeList that tqcontains all the elements in the
+ Returns a TQDomNodeList that contains all the elements in the
document with the local name \a localName and a namespace URI of
\a nsURI. The order of the node list is the order they are
encountered in a preorder traversal of the element tree.