diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/src/xml/tqdom.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/src/xml/tqdom.cpp | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/experimental/tqtinterface/qt4/src/xml/tqdom.cpp b/experimental/tqtinterface/qt4/src/xml/tqdom.cpp index 4b85e222c..ddc64de5a 100644 --- a/experimental/tqtinterface/qt4/src/xml/tqdom.cpp +++ b/experimental/tqtinterface/qt4/src/xml/tqdom.cpp @@ -58,7 +58,7 @@ which can not be deleted at this time. If a node dies and has direct tqchildren which can not be deleted, - then remove the pointer to the tqparent. + then remove the pointer to the parent. createElement and friends create double reference counts. */ @@ -119,7 +119,7 @@ public: class TQDomNodePrivate : public TQShared { public: - TQDomNodePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent = 0 ); + TQDomNodePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = 0 ); TQDomNodePrivate( TQDomNodePrivate* n, bool deep ); virtual ~TQDomNodePrivate(); @@ -144,7 +144,7 @@ public: virtual void normalize(); virtual void clear(); - TQDomNodePrivate* tqparent() { return hasParent ? ownerNode : 0; } + TQDomNodePrivate* parent() { return hasParent ? ownerNode : 0; } void setParent( TQDomNodePrivate *p ) { ownerNode = p; hasParent = TRUE; } void setNoParent() { ownerNode = hasParent ? (TQDomNodePrivate*)ownerDocument() : 0; @@ -172,7 +172,7 @@ public: // Variables TQDomNodePrivate* prev; TQDomNodePrivate* next; - TQDomNodePrivate* ownerNode; // either the node's tqparent or the node's owner document + TQDomNodePrivate* ownerNode; // either the node's parent or the node's owner document TQDomNodePrivate* first; TQDomNodePrivate* last; @@ -231,7 +231,7 @@ public: bool isAppendToParent() { return appendToParent; } /** * If TRUE, then the node will redirect insert/remove calls - * to its tqparent by calling TQDomNodePrivate::appendChild or removeChild. + * to its parent by calling TQDomNodePrivate::appendChild or removeChild. * In addition the map wont increase or decrease the reference count * of the nodes it contains. * @@ -244,11 +244,11 @@ public: * Creates a copy of the map. It is a deep copy * that means that all tqchildren are cloned. */ - TQDomNamedNodeMapPrivate* clone( TQDomNodePrivate* tqparent ); + TQDomNamedNodeMapPrivate* clone( TQDomNodePrivate* parent ); // Variables TQDict<TQDomNodePrivate> map; - TQDomNodePrivate* tqparent; + TQDomNodePrivate* parent; bool readonly; bool appendToParent; }; @@ -256,7 +256,7 @@ public: class TQDomDocumentTypePrivate : public TQDomNodePrivate { public: - TQDomDocumentTypePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent = 0 ); + TQDomDocumentTypePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = 0 ); TQDomDocumentTypePrivate( TQDomDocumentTypePrivate* n, bool deep ); ~TQDomDocumentTypePrivate(); void init(); @@ -285,7 +285,7 @@ public: class TQDomDocumentFragmentPrivate : public TQDomNodePrivate { public: - TQDomDocumentFragmentPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent = 0 ); + TQDomDocumentFragmentPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = 0 ); TQDomDocumentFragmentPrivate( TQDomNodePrivate* n, bool deep ); ~TQDomDocumentFragmentPrivate(); @@ -298,7 +298,7 @@ public: class TQDomCharacterDataPrivate : public TQDomNodePrivate { public: - TQDomCharacterDataPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& data ); + TQDomCharacterDataPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& data ); TQDomCharacterDataPrivate( TQDomCharacterDataPrivate* n, bool deep ); ~TQDomCharacterDataPrivate(); @@ -319,7 +319,7 @@ public: class TQDomTextPrivate : public TQDomCharacterDataPrivate { public: - TQDomTextPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& value ); + TQDomTextPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& value ); TQDomTextPrivate( TQDomTextPrivate* n, bool deep ); ~TQDomTextPrivate(); @@ -357,8 +357,8 @@ public: class TQDomElementPrivate : public TQDomNodePrivate { public: - TQDomElementPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& name ); - TQDomElementPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& nsURI, const TQString& qName ); + TQDomElementPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& name ); + TQDomElementPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& nsURI, const TQString& qName ); TQDomElementPrivate( TQDomElementPrivate* n, bool deep ); ~TQDomElementPrivate(); @@ -393,7 +393,7 @@ public: class TQDomCommentPrivate : public TQDomCharacterDataPrivate { public: - TQDomCommentPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& value ); + TQDomCommentPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& value ); TQDomCommentPrivate( TQDomCommentPrivate* n, bool deep ); ~TQDomCommentPrivate(); @@ -408,7 +408,7 @@ public: class TQDomCDATASectionPrivate : public TQDomTextPrivate { public: - TQDomCDATASectionPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& value ); + TQDomCDATASectionPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& value ); TQDomCDATASectionPrivate( TQDomCDATASectionPrivate* n, bool deep ); ~TQDomCDATASectionPrivate(); @@ -423,7 +423,7 @@ public: class TQDomNotationPrivate : public TQDomNodePrivate { public: - TQDomNotationPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& name, + TQDomNotationPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& name, const TQString& pub, const TQString& sys ); TQDomNotationPrivate( TQDomNotationPrivate* n, bool deep ); ~TQDomNotationPrivate(); @@ -442,7 +442,7 @@ public: class TQDomEntityPrivate : public TQDomNodePrivate { public: - TQDomEntityPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& name, + TQDomEntityPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& name, const TQString& pub, const TQString& sys, const TQString& notation ); TQDomEntityPrivate( TQDomEntityPrivate* n, bool deep ); ~TQDomEntityPrivate(); @@ -462,7 +462,7 @@ public: class TQDomEntityReferencePrivate : public TQDomNodePrivate { public: - TQDomEntityReferencePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& name ); + TQDomEntityReferencePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& name ); TQDomEntityReferencePrivate( TQDomNodePrivate* n, bool deep ); ~TQDomEntityReferencePrivate(); @@ -476,7 +476,7 @@ public: class TQDomProcessingInstructionPrivate : public TQDomNodePrivate { public: - TQDomProcessingInstructionPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* tqparent, const TQString& target, + TQDomProcessingInstructionPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent, const TQString& target, const TQString& data); TQDomProcessingInstructionPrivate( TQDomProcessingInstructionPrivate* n, bool deep ); ~TQDomProcessingInstructionPrivate(); @@ -860,9 +860,9 @@ void TQDomNodeListPrivate::createList() else if ( p->next ) p = p->next; else { - p = p->tqparent(); + p = p->parent(); while ( p && p != node_impl && !p->next ) - p = p->tqparent(); + p = p->parent(); if ( p && p != node_impl ) p = p->next; } @@ -877,9 +877,9 @@ void TQDomNodeListPrivate::createList() else if ( p->next ) p = p->next; else { - p = p->tqparent(); + p = p->parent(); while ( p && p != node_impl && !p->next ) - p = p->tqparent(); + p = p->parent(); if ( p && p != node_impl ) p = p->next; } @@ -1156,7 +1156,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ return 0; // Error check - if ( refChild && refChild->tqparent() != this ) + if ( refChild && refChild->parent() != this ) return 0; // "mark lists as dirty" @@ -1169,7 +1169,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ if ( newChild->first == 0 ) return newChild; - // New tqparent + // New parent TQDomNodePrivate* n = newChild->first; while ( n ) { n->setParent( this ); @@ -1205,8 +1205,8 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ // ownership of the node. newChild->ref(); - if ( newChild->tqparent() ) - newChild->tqparent()->removeChild( newChild ); + if ( newChild->parent() ) + newChild->parent()->removeChild( newChild ); newChild->setParent( this ); @@ -1249,7 +1249,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD return 0; // Error check - if ( refChild && refChild->tqparent() != this ) + if ( refChild && refChild->parent() != this ) return 0; // "mark lists as dirty" @@ -1262,7 +1262,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD if ( newChild->first == 0 ) return newChild; - // New tqparent + // New parent TQDomNodePrivate* n = newChild->first; while ( n ) { n->setParent( this ); @@ -1293,9 +1293,9 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD return newChild; } - // Release new node from its current tqparent - if ( newChild->tqparent() ) - newChild->tqparent()->removeChild( newChild ); + // Release new node from its current parent + if ( newChild->parent() ) + newChild->parent()->removeChild( newChild ); // No more errors can occur now, so we take // ownership of the node @@ -1334,7 +1334,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild ) { - if ( oldChild->tqparent() != this ) + if ( oldChild->parent() != this ) return 0; if ( !newChild || !oldChild ) return 0; @@ -1351,7 +1351,7 @@ TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQ if ( newChild->first == 0 ) return newChild; - // New tqparent + // New parent TQDomNodePrivate* n = newChild->first; while ( n ) { n->setParent( this ); @@ -1393,9 +1393,9 @@ TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQ // ownership of the node newChild->ref(); - // Release new node from its current tqparent - if ( newChild->tqparent() ) - newChild->tqparent()->removeChild( newChild ); + // Release new node from its current parent + if ( newChild->parent() ) + newChild->parent()->removeChild( newChild ); newChild->setParent( this ); @@ -1425,14 +1425,14 @@ TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQ TQDomNodePrivate* TQDomNodePrivate::removeChild( TQDomNodePrivate* oldChild ) { // Error check - if ( oldChild->tqparent() != this ) + if ( oldChild->parent() != this ) return 0; // "mark lists as dirty" qt_nodeListTime++; // Perhaps oldChild was just created with "createElement" or that. In this case - // its tqparent is TQDomDocument but it is not part of the documents child list. + // its parent is TQDomDocument but it is not part of the documents child list. if ( oldChild->next == 0 && oldChild->prev == 0 && first != oldChild ) return 0; @@ -1468,7 +1468,7 @@ TQDomDocumentPrivate* TQDomNodePrivate::ownerDocument() while ( p && !p->isDocument() ) { if ( !p->hasParent ) return (TQDomDocumentPrivate*)p->ownerNode; - p = p->tqparent(); + p = p->parent(); } return (TQDomDocumentPrivate*)p; @@ -1794,14 +1794,14 @@ TQDomNode::NodeType TQDomNode::nodeType() const } /*! - Returns the tqparent node. If this node has no tqparent, a null node + Returns the parent node. If this node has no parent, a null node is returned (i.e. a node for which isNull() returns TRUE). */ TQDomNode TQDomNode::parentNode() const { if ( !impl ) return TQDomNode(); - return TQDomNode( IMPL->tqparent() ); + return TQDomNode( IMPL->parent() ); } /*! @@ -2492,7 +2492,7 @@ bool TQDomNode::isComment() const TQDomNamedNodeMapPrivate::TQDomNamedNodeMapPrivate( TQDomNodePrivate* n ) { readonly = FALSE; - tqparent = n; + parent = n; appendToParent = FALSE; } @@ -2558,7 +2558,7 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::setNamedItem( TQDomNodePrivate* arg return 0; if ( appendToParent ) - return tqparent->appendChild( arg ); + return parent->appendChild( arg ); TQDomNodePrivate *n = map[ arg->nodeName() ]; // We take a reference @@ -2573,7 +2573,7 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::setNamedItemNS( TQDomNodePrivate* ar return 0; if ( appendToParent ) - return tqparent->appendChild( arg ); + return parent->appendChild( arg ); if ( !arg->prefix.isNull() ) { // node has a namespace @@ -2597,7 +2597,7 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::removeNamedItem( const TQString& nam if ( p == 0 ) return 0; if ( appendToParent ) - return tqparent->removeChild( p ); + return parent->removeChild( p ); map.remove( p->nodeName() ); // We took a reference, so we have to free one here @@ -2901,8 +2901,8 @@ bool TQDomNamedNodeMap::contains( const TQString& name ) const * **************************************************************/ -TQDomDocumentTypePrivate::TQDomDocumentTypePrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate* tqparent ) - : TQDomNodePrivate( doc, tqparent ) +TQDomDocumentTypePrivate::TQDomDocumentTypePrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate* parent ) + : TQDomNodePrivate( doc, parent ) { init(); } @@ -3221,8 +3221,8 @@ bool TQDomDocumentType::isDocumentType() const * **************************************************************/ -TQDomDocumentFragmentPrivate::TQDomDocumentFragmentPrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate* tqparent ) - : TQDomNodePrivate( doc, tqparent ) +TQDomDocumentFragmentPrivate::TQDomDocumentFragmentPrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate* parent ) + : TQDomNodePrivate( doc, parent ) { name = "#document-fragment"; } @@ -3594,8 +3594,8 @@ bool TQDomCharacterData::isCharacterData() const * **************************************************************/ -TQDomAttrPrivate::TQDomAttrPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, const TQString& name_ ) - : TQDomNodePrivate( d, tqparent ) +TQDomAttrPrivate::TQDomAttrPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& name_ ) + : TQDomNodePrivate( d, parent ) { name = name_; m_specified = FALSE; @@ -3840,9 +3840,9 @@ bool TQDomAttr::specified() const */ TQDomElement TQDomAttr::ownerElement() const { - if ( !impl && !impl->tqparent()->isElement() ) + if ( !impl && !impl->parent()->isElement() ) return TQDomElement(); - return TQDomElement( (TQDomElementPrivate*)(impl->tqparent()) ); + return TQDomElement( (TQDomElementPrivate*)(impl->parent()) ); } /*! @@ -4625,8 +4625,8 @@ TQString TQDomElement::text() const * **************************************************************/ -TQDomTextPrivate::TQDomTextPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, const TQString& value ) - : TQDomCharacterDataPrivate( d, tqparent, value ) +TQDomTextPrivate::TQDomTextPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& value ) + : TQDomCharacterDataPrivate( d, parent, value ) { name = "#text"; } @@ -4650,15 +4650,15 @@ TQDomNodePrivate* TQDomTextPrivate::cloneNode( bool deep) TQDomTextPrivate* TQDomTextPrivate::splitText( int offset ) { - if ( !tqparent() ) { - qWarning( "TQDomText::splitText The node has no tqparent. So I can not split" ); + if ( !parent() ) { + qWarning( "TQDomText::splitText The node has no parent. So I can not split" ); return 0; } TQDomTextPrivate* t = new TQDomTextPrivate( ownerDocument(), 0, value.mid( offset ) ); value.truncate( offset ); - tqparent()->insertAfter( t, this ); + parent()->insertAfter( t, this ); return t; } @@ -4784,8 +4784,8 @@ bool TQDomText::isText() const * **************************************************************/ -TQDomCommentPrivate::TQDomCommentPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, const TQString& value ) - : TQDomCharacterDataPrivate( d, tqparent, value ) +TQDomCommentPrivate::TQDomCommentPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& value ) + : TQDomCharacterDataPrivate( d, parent, value ) { name = "#comment"; } @@ -4913,9 +4913,9 @@ bool TQDomComment::isComment() const * **************************************************************/ -TQDomCDATASectionPrivate::TQDomCDATASectionPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, +TQDomCDATASectionPrivate::TQDomCDATASectionPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& value ) - : TQDomTextPrivate( d, tqparent, value ) + : TQDomTextPrivate( d, parent, value ) { name = "#cdata-section"; } @@ -5049,10 +5049,10 @@ bool TQDomCDATASection::isCDATASection() const * **************************************************************/ -TQDomNotationPrivate::TQDomNotationPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, +TQDomNotationPrivate::TQDomNotationPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& aname, const TQString& pub, const TQString& sys ) - : TQDomNodePrivate( d, tqparent ) + : TQDomNodePrivate( d, parent ) { name = aname; m_pub = pub; @@ -5118,7 +5118,7 @@ void TQDomNotationPrivate::save( TQTextStream& s, int, int ) const DOM does not support editing notation nodes; they are therefore read-only. - A notation node does not have any tqparent. + A notation node does not have any parent. You can retrieve the publicId() and systemId() from a notation node. @@ -5219,10 +5219,10 @@ bool TQDomNotation::isNotation() const * **************************************************************/ -TQDomEntityPrivate::TQDomEntityPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, +TQDomEntityPrivate::TQDomEntityPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& aname, const TQString& pub, const TQString& sys, const TQString& notation ) - : TQDomNodePrivate( d, tqparent ) + : TQDomNodePrivate( d, parent ) { name = aname; m_pub = pub; @@ -5334,7 +5334,7 @@ void TQDomEntityPrivate::save( TQTextStream& s, int, int ) const be made to each of the clones instead. All the descendents of an entity node are read-only. - An entity node does not have any tqparent. + An entity node does not have any parent. You can access the entity's publicId(), systemId() and notationName() when available. @@ -5450,8 +5450,8 @@ bool TQDomEntity::isEntity() const * **************************************************************/ -TQDomEntityReferencePrivate::TQDomEntityReferencePrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* tqparent, const TQString& aname ) - : TQDomNodePrivate( d, tqparent ) +TQDomEntityReferencePrivate::TQDomEntityReferencePrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* parent, const TQString& aname ) + : TQDomNodePrivate( d, parent ) { name = aname; } @@ -5595,8 +5595,8 @@ bool TQDomEntityReference::isEntityReference() const **************************************************************/ TQDomProcessingInstructionPrivate::TQDomProcessingInstructionPrivate( TQDomDocumentPrivate* d, - TQDomNodePrivate* tqparent, const TQString& target, const TQString& data ) - : TQDomNodePrivate( d, tqparent ) + TQDomNodePrivate* parent, const TQString& target, const TQString& data ) + : TQDomNodePrivate( d, parent ) { name = target; value = data; @@ -6598,7 +6598,7 @@ TQDomNodeList TQDomDocument::elementsByTagName( const TQString& tagname ) const function creates a copy that can be used within this document. This function returns the imported node that belongs to this - document. The returned node has no tqparent. It is not possible to + document. The returned node has no parent. It is not possible to import TQDomDocument and TQDomDocumentType nodes. In those cases this function returns a \link TQDomNode::isNull() null node\endlink. @@ -6993,7 +6993,7 @@ bool TQDomHandler::endElement( const TQString&, const TQString&, const TQString& { if ( node == doc ) return FALSE; - node = node->tqparent(); + node = node->parent(); return TRUE; } |