diff options
Diffstat (limited to 'quanta/parsers')
-rw-r--r-- | quanta/parsers/dtd/dtdparser.cpp | 8 | ||||
-rw-r--r-- | quanta/parsers/node.cpp | 44 | ||||
-rw-r--r-- | quanta/parsers/node.h | 22 | ||||
-rw-r--r-- | quanta/parsers/parser.cpp | 142 | ||||
-rw-r--r-- | quanta/parsers/parsercommon.cpp | 8 | ||||
-rw-r--r-- | quanta/parsers/parsercommon.h | 6 | ||||
-rw-r--r-- | quanta/parsers/qtag.h | 4 | ||||
-rw-r--r-- | quanta/parsers/sagroupparser.cpp | 10 | ||||
-rw-r--r-- | quanta/parsers/sagroupparser.h | 2 | ||||
-rw-r--r-- | quanta/parsers/saparser.cpp | 12 |
10 files changed, 129 insertions, 129 deletions
diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 72e7ea18..b384e456 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -154,7 +154,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) file.close(); } else { - KMessageBox::error(0L, i18n("<qt>Cannot create the <br><b>%1</b> file.<br>Check that you have write permission in the tqparent folder.</qt>") + KMessageBox::error(0L, i18n("<qt>Cannot create the <br><b>%1</b> file.<br>Check that you have write permission in the parent folder.</qt>") .tqarg(file.name())); return false; } @@ -325,14 +325,14 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) { if (content_ptr == el_ptr->content) break; - if (content_ptr->tqparent) + if (content_ptr->parent) { - if (content_ptr == content_ptr->tqparent->c1) + if (content_ptr == content_ptr->parent->c1) content_ptr->c1 = 0L; else content_ptr->c2 = 0L; } - content_ptr = content_ptr->tqparent; + content_ptr = content_ptr->parent; } } stream << "</tqchildren>" << endl; diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp index 591b557e..0589855a 100644 --- a/quanta/parsers/node.cpp +++ b/quanta/parsers/node.cpp @@ -33,9 +33,9 @@ int NN = 0; //for debugging purposes: count the Node objects GroupElementMapList globalGroupMap; -Node::Node(Node *tqparent) +Node::Node(Node *parent) { - this->tqparent = tqparent; + this->parent = parent; prev = next = child = 0L; tag = 0L; mainListItem = 0L; @@ -89,8 +89,8 @@ Node::~Node() nodes.erase(this); if (prev && prev->next == this) prev->next = 0L; - if (tqparent && tqparent->child == this) - tqparent->child = 0L; + if (parent && parent->child == this) + parent->child = 0L; if (removeAll) { deleteNode(child); @@ -101,8 +101,8 @@ Node::~Node() { if (next && next->prev == this) next->prev = 0L; - if (child && child->tqparent == this) - child->tqparent = 0L; + if (child && child->parent == this) + child->parent = 0L; } delete tag; @@ -174,13 +174,13 @@ bool Node::load(TQDomElement const& element) { next = new Node(0); next->prev = this; - next->tqparent = this->tqparent; + next->parent = this->parent; next->load(e); } else if(e.tagName() == "nodeChild") { child = new Node(0); - child->tqparent = this; + child->parent = this; child->load(e); } else if(e.tagName() == "nodeClosing") @@ -225,14 +225,14 @@ Node *Node::nextSibling() Node *n = this; while (n) { - if (n->tqparent && n->tqparent->next) + if (n->parent && n->parent->next) { - result = n->tqparent->next; + result = n->parent->next; break; } else { - n = n->tqparent; + n = n->parent; } } } @@ -257,7 +257,7 @@ Node *Node::previousSibling() } else { - result = tqparent; + result = parent; } return result; @@ -272,14 +272,14 @@ Node *Node::nextNotChild() Node *n = this; while (n) { - if (n->tqparent && n->tqparent->next) + if (n->parent && n->parent->next) { - n = n->tqparent->next; + n = n->parent->next; break; } else { - n = n->tqparent; + n = n->parent; } } @@ -358,15 +358,15 @@ Node *Node::SPrev() Node *node = prev; int bCol, bLine, eCol, eLine, col, line; - if(tqparent) + if(parent) { - tqparent->tag->beginPos(bLine, bCol); - tqparent->tag->endPos(eLine, eCol); + parent->tag->beginPos(bLine, bCol); + parent->tag->endPos(eLine, eCol); } while(node && node->tag->type != Tag::XmlTag && node->tag->type != Tag::Text) { - if (tqparent && node->tag->type == Tag::ScriptTag) + if (parent && node->tag->type == Tag::ScriptTag) { //Check if it is an embedded ScriptTag. If it is, continue. node->tag->beginPos(line, col); @@ -384,7 +384,7 @@ Node *Node::SNext() Node *node = next; int bCol, bLine, eCol, eLine, col, line; - if(tqparent) + if(parent) { tag->beginPos(bLine, bCol); tag->endPos(eLine, eCol); @@ -392,7 +392,7 @@ Node *Node::SNext() while(node && node->tag->type != Tag::XmlTag && node->tag->type != Tag::Text) { - if (tqparent && node->tag->type == Tag::ScriptTag) + if (parent && node->tag->type == Tag::ScriptTag) { //Check if it is an embedded ScriptTag. If it is, continue. node->tag->beginPos(line, col); @@ -509,7 +509,7 @@ void Node::operator =(Node* node) (*this) = (*node); prev = 0L; next = 0L; - tqparent = 0L; + parent = 0L; child = 0L; mainListItem = 0L; m_groupElements.clear(); diff --git a/quanta/parsers/node.h b/quanta/parsers/node.h index d2007482..4e3451af 100644 --- a/quanta/parsers/node.h +++ b/quanta/parsers/node.h @@ -36,7 +36,7 @@ struct GroupElement{ Node *node; /* The tag which point to the actual place in the node */ Tag *tag; - /*The tqparent node indicating the beginning of a structure */ + /*The parent node indicating the beginning of a structure */ Node *parentNode; bool global; bool deleted; @@ -48,7 +48,7 @@ typedef TQValueList<GroupElement*> GroupElementList; typedef TQMap<TQString, GroupElementList> GroupElementMapList; /** - * A Node is a basic unit of a Tree. It keeps track of his tqparent, his left neighbour, his right neighbour + * A Node is a basic unit of a Tree. It keeps track of his parent, his left neighbour, his right neighbour * and his first child. * It contains some functions to navigate through the tree, but some more are located at kafkacommon.h * (and should be moved here...) @@ -61,7 +61,7 @@ typedef TQMap<TQString, GroupElementList> GroupElementMapList; class Node { public: - Node( Node *tqparent ); + Node( Node *parent ); ~Node(); /** @@ -73,7 +73,7 @@ public: static bool deleteNode(Node *node); /** - * Copy everything from node except prev, next, child, tqparent, listItem, group, groupTag, which are set to Null + * Copy everything from node except prev, next, child, parent, listItem, group, groupTag, which are set to Null * The groupElementsList is cleared. */ void operator =(Node* node); @@ -84,22 +84,22 @@ public: Node *next; Node *prev; - Node *tqparent; + Node *parent; Node *child; - /** Returns the child if available, else the next node, else the next node of the first tqparent which has one, else 0L. + /** Returns the child if available, else the next node, else the next node of the first parent which has one, else 0L. WARNING: it doesn't behave like DOM::Node::nextSibling() which give the next Node, or 0L if there is no next Node */ Node *nextSibling(); Node *previousSibling(); - /** Returns the next node, or the tqparent's next, if next doesn't exists, - or the grantqparent's next, if tqparent's next doesn't exists, etc. */ + /** Returns the next node, or the parent's next, if next doesn't exists, + or the granparent's next, if parent's next doesn't exists, etc. */ Node *nextNotChild(); /** DOM like functions cf dom/dom_node.h */ TQString nodeName(); TQString nodeValue(); void setNodeValue(const TQString &value); - Node* parentNode() {return tqparent;} + Node* parentNode() {return parent;} Node* firstChild() {return child;} Node* lastChild(); Node* DOMpreviousSibling() {return prev;} @@ -113,7 +113,7 @@ public: /** Others functions. */ // check if Node has node in its child subtree (and grand-child,...) bool hasForChild(Node *node); - void setParent(Node *nodeParent) {tqparent = nodeParent;} + void setParent(Node *nodeParent) {parent = nodeParent;} //If Node is of type XmlTag or ScriptTag, return the corresponding XmlTagEnd if available Node *getClosingNode(); //If Node is of type XmlTagEnd, return the corresponding XmlTag or ScriptTag if available @@ -130,7 +130,7 @@ public: Node *lastChildNE(); /** - * The main problem manipulating the default links prev/next/tqparent/child is that we often want + * The main problem manipulating the default links prev/next/parent/child is that we often want * to manipulate only the "significant" Nodes e.g. XmlTag, Text, ScriptNode, like in a DOM::Node tree. * These functions, prefixed with "S" which stands for "simplified" or "significant", will only return * and manipulate XmlTag, Text and ScriptNode. diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp index b8e5e619..8206ac29 100644 --- a/quanta/parsers/parser.cpp +++ b/quanta/parsers/parser.cpp @@ -119,7 +119,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No Node *currentNode = a_node; if (currentNode && (currentNode->tag->type != Tag::XmlTag || currentNode->tag->single)) - parentNode = currentNode->tqparent; + parentNode = currentNode->parent; Tag *tag = 0L; TQTag *qTag = 0L; textLine.append(write->text(startLine, startCol, startLine, write->editIf->lineLength(startLine))); @@ -151,7 +151,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No //create a toplevel node for the special area AreaStruct area(line, specialStartPos, line, specialStartPos + foundText.length() - 1); Node *node = ParserCommon::createScriptTagNode(write, area, foundText, m_dtd, parentNode, currentNode); - if (node->tqparent && node->prev == node->tqparent) //some strange cases, but it's possible, eg.: <a href="<? foo ?>""></a><input size="<? foo ?>" > + if (node->parent && node->prev == node->parent) //some strange cases, but it's possible, eg.: <a href="<? foo ?>""></a><input size="<? foo ?>" > { node->prev->next = 0L; node->prev = 0L; @@ -329,7 +329,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No searchFor.remove('/'); if ( qTag->stoppingTags.contains(searchFor)) { - parentNode->tag->closingMissing = true; //tqparent is single... + parentNode->tag->closingMissing = true; //parent is single... goUp = true; } } @@ -353,16 +353,16 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No //handle cases like <ul><li></ul> if (tag->type == Tag::XmlTagEnd && !QuantaCommon::closesTag(parentNode->tag, tag)) { - while ( parentNode->tqparent && - QuantaCommon::closesTag(parentNode->tqparent->tag, tag) + while ( parentNode->parent && + QuantaCommon::closesTag(parentNode->parent->tag, tag) ) { - parentNode = parentNode->tqparent; + parentNode = parentNode->parent; } } else if (qTag && tag->type != Tag::XmlTagEnd) { - //handle the case when a tag is a stopping tag for tqparent, and grandtqparent and so on. + //handle the case when a tag is a stopping tag for parent, and grandparent and so on. Node *n = parentNode; TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); while (qTag && n) @@ -372,10 +372,10 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No { if ( qTag->stoppingTags.contains(searchFor) ) { - n->tag->closingMissing = true; //tqparent is single... - if (n->tqparent) + n->tag->closingMissing = true; //parent is single... + if (n->parent) parentNode = n; - n = n->tqparent; + n = n->parent; } else { break; @@ -384,11 +384,11 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No } } - node = new Node(parentNode->tqparent); + node = new Node(parentNode->parent); nodeNum++; node->prev = parentNode; parentNode->next = node; - parentNode = parentNode->tqparent; + parentNode = parentNode->parent; node->closesPrevious = true; } else { @@ -621,13 +621,13 @@ Node *Parser::nodeAt(int line, int col, bool findDeepest, bool exact) node = node->child; } else { - if (node->tqparent) + if (node->parent) { int parentEl, parentEc; - node->tqparent->tag->endPos(parentEl, parentEc); + node->parent->tag->endPos(parentEl, parentEc); if (!exact && QuantaCommon::isBetween(line, col, bl, bc, parentEl, parentEc) == 0) { - node = node->tqparent; + node = node->parent; } } break; //we found the node @@ -635,8 +635,8 @@ Node *Parser::nodeAt(int line, int col, bool findDeepest, bool exact) } else if (result == -1) { - if (node->tqparent) - node = node->tqparent; + if (node->parent) + node = node->parent; break; //we found the node } else { @@ -653,9 +653,9 @@ Node *Parser::nodeAt(int line, int col, bool findDeepest, bool exact) if (node && node->tag->type == Tag::Empty && (findDeepest || (bl == el && ec < bc)) ) { - if (node->tqparent) + if (node->parent) { - node = node->tqparent; + node = node->parent; } else if (node->prev) { @@ -807,7 +807,7 @@ bool Parser::invalidArea(Document *w, AreaStruct &area, Node **firstNode, Node * void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) { - Node *nextNode, *child, *tqparent, *next, *prev; + Node *nextNode, *child, *parent, *next, *prev; int i, j; Node *node = firstNode; bool closesPrevious = false; @@ -819,7 +819,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) nextNode = node->nextSibling(); node->removeAll = false; child = node->child; - tqparent = node->tqparent; + parent = node->parent; next = node->next; prev = node->prev; closesPrevious = node->closesPrevious; @@ -827,9 +827,9 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) { nextNode->prev = prev; } - if (nextNode && nextNode->tqparent == node) + if (nextNode && nextNode->parent == node) { - nextNode->tqparent = tqparent; + nextNode->parent = parent; } if (next) next->prev = prev; @@ -845,9 +845,9 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) modif->setLocation(kafkaCommon::getLocation(node)); if (prev && prev->next == node) prev->next = 0L; - if(tqparent && tqparent->child == node) - tqparent->child = 0L; - node->tqparent = 0L; + if(parent && parent->child == node) + parent->child = 0L; + node->parent = 0L; node->next = 0L; node->prev = 0L; @@ -866,11 +866,11 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) while (n) { m = n; - n->tqparent = tqparent; + n->parent = parent; n = n->next; i++; } - //connect the first child to the tree (after prev, or as the first child of the tqparent) + //connect the first child to the tree (after prev, or as the first child of the parent) if (prev && child) { prev->next = child; @@ -882,7 +882,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) } } else { - if (!child) //when there is no child, connect the next as the first child of the tqparent + if (!child) //when there is no child, connect the next as the first child of the parent child = next; else if (next) @@ -893,14 +893,14 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) n->next = next; next->prev = n; } - if (tqparent && !tqparent->child) + if (parent && !parent->child) { - tqparent->child = child; + parent->child = child; } } } else { - //change the tqparent of tqchildren, so the prev will be the new tqparent + //change the parent of tqchildren, so the prev will be the new parent if (child) { Node *n = child; @@ -908,7 +908,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) while (n) { m = n; - n->tqparent = prev; + n->parent = prev; n = n->next; i++; } @@ -953,7 +953,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) Node *n = next; while (n) { - n->tqparent = prev; + n->parent = prev; n = n->next; j++; } @@ -1053,8 +1053,8 @@ Node *Parser::rebuild(Document *w) { if (lastNode->prev ) lastNode->prev->next = 0L; - if (lastNode->tqparent && lastNode->tqparent->child == lastNode) - lastNode->tqparent->child = 0L; + if (lastNode->parent && lastNode->parent->child == lastNode) + lastNode->parent->child = 0L; } Node::deleteNode(lastNode); nodeNum--; @@ -1077,7 +1077,7 @@ Node *Parser::rebuild(Document *w) lastNode->prev = lastInserted->prev; if (lastInserted->prev) lastInserted->prev->next = lastNode; - lastNode->tqparent = lastInserted->tqparent; + lastNode->parent = lastInserted->parent; lastInserted->tag->beginPos(area.bLine, area.bCol); lastNode->tag->endPos(area.eLine, area.eCol); Tag *_tag = new Tag(*(lastNode->tag)); @@ -1091,9 +1091,9 @@ Node *Parser::rebuild(Document *w) { lastNode->tag->type = Tag::Empty; } - if (lastInserted->tqparent && lastInserted->tqparent->child == lastInserted) - //lastInserted->tqparent->child = lastInserted->next; lastInserted has no next! - lastInserted->tqparent->child = lastNode; + if (lastInserted->parent && lastInserted->parent->child == lastInserted) + //lastInserted->parent->child = lastInserted->next; lastInserted has no next! + lastInserted->parent->child = lastNode; //here, lastNode is at the pos of lastInserted. modif = new NodeModif(); @@ -1102,11 +1102,11 @@ Node *Parser::rebuild(Document *w) if(lastInserted->prev) lastInserted->prev->next = 0L; - if(lastInserted->tqparent && lastInserted->tqparent->child == lastInserted) - lastInserted->tqparent->child = 0L; + if(lastInserted->parent && lastInserted->parent->child == lastInserted) + lastInserted->parent->child = 0L; lastInserted->prev = 0L; lastInserted->next = 0L; - lastInserted->tqparent = 0L; + lastInserted->parent = 0L; lastInserted->child = 0L; // delete lastInserted; @@ -1132,46 +1132,46 @@ Node *Parser::rebuild(Document *w) { // kdDebug(24000) << "lastNode6: " << lastNode << " " << lastNode->tag << endl; qTag = 0L; - goUp = ( node->tqparent && - ( (lastNode->tag->type == Tag::XmlTagEnd && QuantaCommon::closesTag(node->tqparent->tag, lastNode->tag) ) || - node->tqparent->tag->single ) + goUp = ( node->parent && + ( (lastNode->tag->type == Tag::XmlTagEnd && QuantaCommon::closesTag(node->parent->tag, lastNode->tag) ) || + node->parent->tag->single ) ); - if (node->tqparent && !goUp) + if (node->parent && !goUp) { - qTag = QuantaCommon::tagFromDTD(m_dtd, node->tqparent->tag->name); + qTag = QuantaCommon::tagFromDTD(m_dtd, node->parent->tag->name); if ( qTag ) { TQString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper(); searchFor.remove('/'); if ( qTag->stoppingTags.contains( searchFor ) ) { - node->tqparent->tag->closingMissing = true; //tqparent is single... + node->parent->tag->closingMissing = true; //parent is single... goUp = true; } } } if (goUp && - ( (m_dtd->caseSensitive && node->tag->name == node->tqparent->tag->name) || - (!m_dtd->caseSensitive && node->tag->name.lower() == node->tqparent->tag->name.lower())) ) - goUp = false; //it can happen that the tag closes the previous and not the tqparent + ( (m_dtd->caseSensitive && node->tag->name == node->parent->tag->name) || + (!m_dtd->caseSensitive && node->tag->name.lower() == node->parent->tag->name.lower())) ) + goUp = false; //it can happen that the tag closes the previous and not the parent - if (goUp) //lastnode closes the node->tqparent + if (goUp) //lastnode closes the node->parent { //handle cases like <ul><li></ul> if (lastNode->tag->type == Tag::XmlTagEnd && - !QuantaCommon::closesTag(node->tqparent->tag, lastNode->tag)) + !QuantaCommon::closesTag(node->parent->tag, lastNode->tag)) { - while ( node->tqparent->tqparent && - QuantaCommon::closesTag(node->tqparent->tqparent->tag, lastNode->tag) + while ( node->parent->parent && + QuantaCommon::closesTag(node->parent->parent->tag, lastNode->tag) ) { - node = node->tqparent; + node = node->parent; } } else if (qTag && lastNode->tag->type != Tag::XmlTagEnd) { - //handle the case when a tag is a stopping tag for tqparent, and grandtqparent and so on. I'm not sure it's needed here, but anyway... - Node *n = node->tqparent; + //handle the case when a tag is a stopping tag for parent, and grandparent and so on. I'm not sure it's needed here, but anyway... + Node *n = node->parent; TQString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper(); while (qTag && n) { @@ -1180,10 +1180,10 @@ Node *Parser::rebuild(Document *w) { if ( qTag->stoppingTags.contains(searchFor) ) { - n->tag->closingMissing = true; //tqparent is single... - if (n->tqparent) + n->tag->closingMissing = true; //parent is single... + if (n->parent) node = n; - n = n->tqparent; + n = n->parent; } else { break; @@ -1193,15 +1193,15 @@ Node *Parser::rebuild(Document *w) } if (lastNode->prev && lastNode->prev->next == lastNode) lastNode->prev->next = 0L; - if (lastNode->tqparent && lastNode->tqparent->child == lastNode) - lastNode->tqparent->child = 0L; - if (node->tqparent) - node->tqparent->next = lastNode; - lastNode->prev = node->tqparent; - if (node->tqparent) - lastNode->tqparent = node->tqparent->tqparent; + if (lastNode->parent && lastNode->parent->child == lastNode) + lastNode->parent->child = 0L; + if (node->parent) + node->parent->next = lastNode; + lastNode->prev = node->parent; + if (node->parent) + lastNode->parent = node->parent->parent; else - lastNode->tqparent = 0L; + lastNode->parent = 0L; node->next = 0L; lastNode->closesPrevious = true; } else @@ -1210,7 +1210,7 @@ Node *Parser::rebuild(Document *w) lastNode->prev->next = 0L; node->next = lastNode; lastNode->prev = node; - lastNode->tqparent = node->tqparent; + lastNode->parent = node->parent; // kdDebug(24000) << "lastNode7: " << lastNode << " " << lastNode->tag << endl; } node = lastNode; diff --git a/quanta/parsers/parsercommon.cpp b/quanta/parsers/parsercommon.cpp index 860b46e0..9d1f9d0d 100644 --- a/quanta/parsers/parsercommon.cpp +++ b/quanta/parsers/parsercommon.cpp @@ -112,11 +112,11 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par if (parentNode && parentNode->tag->single) { - textNode = new Node(parentNode->tqparent); + textNode = new Node(parentNode->parent); nodeNum++; textNode->prev = parentNode; parentNode->next = textNode; - parentNode = parentNode->tqparent; + parentNode = parentNode->parent; } else { if ( node && @@ -220,7 +220,7 @@ void coutTree(Node *node, int indent) else output+= node->tag->tagStr().replace('\n'," "); kdDebug(24000) << output <<" (" << node->tag->type << ") at pos " << - bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->tqparent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << " Tag:" << node->tag << endl; + bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->parent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << " Tag:" << node->tag << endl; /* for(j = 0; j < node->tag->attrCount(); j++) { kdDebug(24000)<< " attr" << j << " " << @@ -245,7 +245,7 @@ void verifyTree(Node *node) if (!node->tag) { kdDebug(24000) << "Bad node: " << node << endl; - kdDebug(24000) << "Parent: " << node->tqparent << " " << node->tqparent->tag->tagStr() << endl; + kdDebug(24000) << "Parent: " << node->parent << " " << node->parent->tag->tagStr() << endl; } if (node->child) verifyTree(node->child); diff --git a/quanta/parsers/parsercommon.h b/quanta/parsers/parsercommon.h index d1c76092..9b0c01f4 100644 --- a/quanta/parsers/parsercommon.h +++ b/quanta/parsers/parsercommon.h @@ -43,9 +43,9 @@ namespace ParserCommon{ /** Creates a head node for special areas. area: the area belonging to this node areaName: the special area name (type) - dtd: the tqparent DTD - parentNode: the tqparent of the node - currentNode: the last child of the tqparent, if it exists + dtd: the parent DTD + parentNode: the parent of the node + currentNode: the last child of the parent, if it exists */ Node* createScriptTagNode(Document *write, const AreaStruct &area, const TQString &areaName, const DTDStruct *dtd, Node *parentNode, Node *currentNode); diff --git a/quanta/parsers/qtag.h b/quanta/parsers/qtag.h index ed4b594a..f19bcf5d 100644 --- a/quanta/parsers/qtag.h +++ b/quanta/parsers/qtag.h @@ -58,7 +58,7 @@ class XMLStructGroup { bool hasFileName; ///<the group contains filename(s) TQRegExp fileNameRx; ///<delete the matches of this regexp to obtain a filename (eg. linked, included file name) bool appendToTags; ///<true if the group elements must be used as normal tags in autocompletion - TQString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the tqparent name. Makes sense only if appentToTags is true + TQString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the parent name. Makes sense only if appentToTags is true }; @@ -247,7 +247,7 @@ public: bool isChild(const TQString& tag, bool trueIfNoChildsDefined = true); //prefer using this variant, it handle Text, Empty, XmlTagEnd nodes! bool isChild(Node *node, bool trueIfNoChildsDefined = true, bool treatEmptyNodesAsText = false); - /*** Returns the list of tqparent of this tag. */ + /*** Returns the list of parent of this tag. */ TQPtrList<TQTag> parents(); /** No descriptions */ diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp index c6c6b57a..000ba002 100644 --- a/quanta/parsers/sagroupparser.cpp +++ b/quanta/parsers/sagroupparser.cpp @@ -35,14 +35,14 @@ extern GroupElementMapList globalGroupMap; -SAGroupParser::SAGroupParser(SAParser *tqparent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup) +SAGroupParser::SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup) { g_node = startNode; g_endNode = endNode; m_synchronous = synchronous; m_lastGroupParsed = paringLastGroup; m_parsingLastNode = parsingLastNode; - m_parent = tqparent; + m_parent = parent; m_write = write; m_count = 0; m_parseForGroupTimer = new TQTimer(this); @@ -178,7 +178,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) Node *tmpNode = node; while (tmpNode && tmpNode->tag->dtd() == dtd && tmpNode->tag->type != Tag::ScriptStructureBegin) { - tmpNode = tmpNode->tqparent; + tmpNode = tmpNode->parent; } if (tmpNode && tmpNode->tag->type == Tag::ScriptStructureBegin) { @@ -188,7 +188,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) groupElement->parentNode = 0L; } groupElement->global = true; - tmpNode = node->tqparent; + tmpNode = node->parent; while (tmpNode && tmpNode->tag->dtd() == dtd) { if ( tmpNode->tag->type == Tag::ScriptStructureBegin && tmpNode->tag->dtd()->localScopeKeywordsRx.search(tmpNode->tag->cleanStr) != -1) @@ -197,7 +197,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) groupElement->parentNode = tmpNode; break; } - tmpNode = tmpNode->tqparent; + tmpNode = tmpNode->parent; } if (group.appendToTags) diff --git a/quanta/parsers/sagroupparser.h b/quanta/parsers/sagroupparser.h index 35e8d1f9..082bf3d7 100644 --- a/quanta/parsers/sagroupparser.h +++ b/quanta/parsers/sagroupparser.h @@ -35,7 +35,7 @@ Q_OBJECT TQ_OBJECT public: public: - SAGroupParser(SAParser *tqparent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup); + SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup); ~SAGroupParser() {}; TQTimer *m_parseForGroupTimer; diff --git a/quanta/parsers/saparser.cpp b/quanta/parsers/saparser.cpp index aa9bbd55..1dab9ccc 100644 --- a/quanta/parsers/saparser.cpp +++ b/quanta/parsers/saparser.cpp @@ -363,7 +363,7 @@ bool SAParser::slotParseOneLine() tag->single = true; //at this point s_parentNode = the opening node of the special area (eg. <?) //and it should always exist - Node *node = new Node(s_parentNode->tqparent); + Node *node = new Node(s_parentNode->parent); nodeNum++; s_parentNode->next = node; node->prev = s_parentNode; @@ -575,13 +575,13 @@ bool SAParser::slotParseOneLine() node->tag = tag; node->insideSpecial = true; node->specialInsideXml = m_specialInsideXml; - if (s_currentNode && s_currentNode != node->tqparent) + if (s_currentNode && s_currentNode != node->parent) { s_currentNode->next = node; node->prev = s_currentNode; } else - if (node->tqparent && !node->tqparent->child) - node->tqparent->child = node; + if (node->parent && !node->parent->child) + node->parent->child = node; s_currentNode = node; } s_previousContext = s_contextStack.pop(); @@ -657,8 +657,8 @@ Node* SAParser::parseArea(const AreaStruct &specialArea, if (s_parentNode && !areaStartString.isEmpty()) { const DTDStruct *parentDTD = m_dtd; - if (s_parentNode->tqparent) - parentDTD = s_parentNode->tqparent->tag->dtd(); + if (s_parentNode->parent) + parentDTD = s_parentNode->parent->tag->dtd(); s_dtd = DTDs::ref()->find(parentDTD->specialAreaNames[areaStartString]); s_areaEndString = parentDTD->specialAreas[areaStartString]; s_searchForAreaEnd = true; |