diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | 6c79d50fa9fbdff7f69ca57a8ab5fcc942375593 (patch) | |
tree | f47737d56c3239a0d8bc600674f0ca04b6e30d6e /quanta/parts/kafka/wkafkapart.cpp | |
parent | 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (diff) | |
download | tdewebdev-6c79d50fa9fbdff7f69ca57a8ab5fcc942375593.tar.gz tdewebdev-6c79d50fa9fbdff7f69ca57a8ab5fcc942375593.zip |
rename the following methods:
tqparent parent
tqmask mask
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parts/kafka/wkafkapart.cpp')
-rw-r--r-- | quanta/parts/kafka/wkafkapart.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp index 735e8c51..3ed2c464 100644 --- a/quanta/parts/kafka/wkafkapart.cpp +++ b/quanta/parts/kafka/wkafkapart.cpp @@ -61,7 +61,7 @@ KafkaWidget *kafkaWidget; KafkaDocument *kafkaDoc; -KafkaDocument::KafkaDocument(TQWidget *tqparent, TQWidget *widgetParent, const char *name) +KafkaDocument::KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name) :domNodeProps(1021), _docLoaded(false) { // i18n reserve @@ -88,7 +88,7 @@ TQString ab = i18n("Ident all"); kafkaDoc = this; - m_kafkaPart = new KafkaWidget(tqparent, widgetParent,this, name); + m_kafkaPart = new KafkaWidget(parent, widgetParent,this, name); kafkaWidget = m_kafkaPart; //m_kafkaPart->showDomTree(); m_currentDoc = 0L; @@ -513,7 +513,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) DOM::Node newNode, newNode2, attr, nextNode, parentNode, *ptDomNode; bool removeLeftWhitespaces, removeRightWhitespaces; TQString str, nodeValue; - Node *n, *tqparent; + Node *n, *parent; int i; // Don't create DOM::Nodes from Quanta empty nodes outside the body or inside other not allowed element, or KHTML @@ -526,7 +526,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) else canInsertEmptyNode = kafkaCommon::hasParent(node, "body"); - Node* parent_node = node->tqparent; + Node* parent_node = node->parent; TQTag* parent_node_description_tag = QuantaCommon::tagFromDTD(parent_node); if(parent_node_description_tag && !parent_node_description_tag->isChild(node, false, true)) canInsertEmptyNode = false; @@ -540,7 +540,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) //The basics DOM::Nodes HTML, HEAD and BODY are loaded anyway, but we must now // link the real HTML,... to their Nodes. //A basic Common tree is !doctype<-html<-(head, body) - if(!node->tqparent) + if(!node->parent) {//FIXME:html, head and body are HTML-specific tag, for others DTDs it might result to some pbs. if(str == "html") { @@ -575,30 +575,30 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) } } } - else if(str == "html" && (!node->tqparent || (node->tqparent && !node->tqparent->tqparent))) + else if(str == "html" && (!node->parent || (node->parent && !node->parent->parent))) { if(!html.isNull())//delete the empty Node disconnectDomNodeFromQuantaNode(html); newNode = html; insertNode = false; } - else if(str == "body" && ((node->tqparent && !node->tqparent->tqparent) || (node->tqparent && - node->tqparent->tqparent && !node->tqparent->tqparent->tqparent))) + else if(str == "body" && ((node->parent && !node->parent->parent) || (node->parent && + node->parent->parent && !node->parent->parent->parent))) { if(!body.isNull()) disconnectDomNodeFromQuantaNode(body); newNode = body; insertNode = false; } - else if(str == "head" && ((node->tqparent && !node->tqparent->tqparent) || (node->tqparent && - node->tqparent->tqparent && !node->tqparent->tqparent->tqparent))) + else if(str == "head" && ((node->parent && !node->parent->parent) || (node->parent && + node->parent->parent && !node->parent->parent->parent))) { if(!head.isNull()) disconnectDomNodeFromQuantaNode(head); newNode = head; insertNode = false; } - /** else if(node->tqparent->tag->str == "html")*/ + /** else if(node->parent->tag->str == "html")*/ else { if(node->tag->type == Tag::Text || node->tag->type == Tag::Empty) @@ -631,16 +631,16 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) //- It is the last child of a BLOCK removeLeftWhitespaces = false; n = node; - tqparent = node->tqparent; - while(tqparent && tqparent->SFirstChild() == n) + parent = node->parent; + while(parent && parent->SFirstChild() == n) { - if(!kafkaCommon::isInline(tqparent->tag->name)) + if(!kafkaCommon::isInline(parent->tag->name)) { removeLeftWhitespaces = true; break; } - n = tqparent; - tqparent = tqparent->tqparent; + n = parent; + parent = parent->parent; } if(!removeLeftWhitespaces) { @@ -661,16 +661,16 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) removeRightWhitespaces = false; n = node; - tqparent = node->tqparent; - while(tqparent && tqparent->SLastChild() == n) + parent = node->parent; + while(parent && parent->SLastChild() == n) { - if(!kafkaCommon::isInline(tqparent->tag->name)) + if(!kafkaCommon::isInline(parent->tag->name)) { removeRightWhitespaces = true; break; } - n = tqparent; - tqparent = tqparent->tqparent; + n = parent; + parent = parent->parent; } nodeValue = node->tag->tagStr(); @@ -714,11 +714,11 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) break; } } - if(node->tqparent && node->tqparent->leafNode()) - parentNode = *node->tqparent->leafNode(); - else if(node->tqparent && !node->tqparent->leafNode()) + if(node->parent && node->parent->leafNode()) + parentNode = *node->parent->leafNode(); + else if(node->parent && !node->parent->leafNode()) { - //the tqparent tag was invalid and khtml refuse to insert it + //the parent tag was invalid and khtml refuse to insert it //so impossible to inser the current node disconnectDomNodeFromQuantaNode(newNode); if(node->rootNode()) @@ -774,8 +774,8 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) } else { - if(node->tqparent && node->tqparent->leafNode()) - parentNode = *node->tqparent->leafNode(); + if(node->parent && node->parent->leafNode()) + parentNode = *node->parent->leafNode(); else parentNode = body; n = node; @@ -1697,13 +1697,13 @@ void KafkaDocument::translateNodeIntoQuantaCursorPosition(Node *node, int offset } } -bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node tqparent, +bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node parent, DOM::Node nextSibling, DOM::Node rootNode) { DOM::Node siblingNSpecial; //First insert the node - if(!kafkaCommon::insertDomNode(node, tqparent, nextSibling, rootNode)) + if(!kafkaCommon::insertDomNode(node, parent, nextSibling, rootNode)) return false; //Then unEnhance and reEnhance the nearest non special nodes so that everything's fine. @@ -1728,12 +1728,12 @@ bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node tqparent, bool KafkaDocument::removeDomNode(DOM::Node node) { - DOM::Node nextSiblingNSpecial, prevSiblingNSpecial, tqparent; + DOM::Node nextSiblingNSpecial, prevSiblingNSpecial, parent; //First remove the node prevSiblingNSpecial = getPrevSiblingNSpecial(node); nextSiblingNSpecial = getNextSiblingNSpecial(node); - tqparent = node.parentNode(); + parent = node.parentNode(); if(!kafkaCommon::removeDomNode(node)) return false; @@ -1748,8 +1748,8 @@ bool KafkaDocument::removeDomNode(DOM::Node node) mainEnhancer->postUnenhanceNode(nextSiblingNSpecial); mainEnhancer->postEnhanceNode(nextSiblingNSpecial); } - mainEnhancer->postUnenhanceNode(tqparent); - mainEnhancer->postEnhanceNode(tqparent); + mainEnhancer->postUnenhanceNode(parent); + mainEnhancer->postEnhanceNode(parent); return true; } @@ -2080,13 +2080,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC //If we are deleting a PHP Node which is embedded into a tag e.g. <a <? echo boo; ?> > //We must regenerate the <a> tag string. - if(_node->tag->type == Tag::ScriptTag && _node->tqparent) + if(_node->tag->type == Tag::ScriptTag && _node->parent) { - _node->tqparent->tag->beginPos(bLine, bCol); - _node->tqparent->tag->endPos(eLine, eCol); + _node->parent->tag->beginPos(bLine, bCol); + _node->parent->tag->endPos(eLine, eCol); _node->tag->beginPos(bLine2, bCol2); if(QuantaCommon::isBetween(bLine2, bCol2, bLine, bCol, eLine,eCol) == 0) - _node->tqparent->tag->setCleanStrBuilt(false); + _node->parent->tag->setCleanStrBuilt(false); } if(_node->prev) @@ -2099,15 +2099,15 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC modif = new NodeModif(); modif->setType(NodeModif::NodeRemoved); modif->setLocation(kafkaCommon::getLocation(_node)); - if(_node->tqparent && _node->tqparent->child == _node) - _node->tqparent->child = _node->next; + if(_node->parent && _node->parent->child == _node) + _node->parent->child = _node->next; if(_node->prev) _node->prev->next = _node->next; if(_node->next) _node->next->prev = _node->prev; if(_node == baseNode) baseNode = _node->next; - _node->tqparent = 0L; + _node->parent = 0L; _node->prev = 0L; _node->next = 0L; _node->child = 0L; @@ -2131,8 +2131,8 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC hasClosingNode = false; //_node->removeAll = false; - if(_node->tqparent && _node->tqparent->child == _node) - _node->tqparent->child = _node->next; + if(_node->parent && _node->parent->child == _node) + _node->parent->child = _node->next; if(_node->next) _node->next->prev = _node->prev; if(_node->prev) @@ -2155,15 +2155,15 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC } else if(_node->child)// && !deleteChilds { - if(_node->tqparent && !_node->tqparent->child) - _node->tqparent->child = _node->child; + if(_node->parent && !_node->parent->child) + _node->parent->child = _node->child; if(_node->prev) _node->prev->next = _node->child; _tmpNode = _node->child; while(_tmpNode) { i++; - _tmpNode->tqparent = _node->tqparent; + _tmpNode->parent = _node->parent; n = _tmpNode; _tmpNode = _tmpNode->next; if(!_tmpNode) @@ -2181,7 +2181,7 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC disconnectDomNodeFromQuantaNode(*_node->rootNode()); if(_node->leafNode()) disconnectDomNodeFromQuantaNode(*_node->leafNode()); - _node->tqparent = 0L; + _node->parent = 0L; _nodeNext = _node->next; _node->next = 0L; _node->prev = 0L; @@ -2195,13 +2195,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC if(hasClosingNode) { //delete the closing Node if present - if(_node->tqparent && _node->tqparent->child == _node) - _node->tqparent->child = _node->next; + if(_node->parent && _node->parent->child == _node) + _node->parent->child = _node->next; if(_node->prev) _node->prev->next = _node->next; if(_node->next) _node->next->prev = _node->prev; - _node->tqparent = 0L; + _node->parent = 0L; _nodeNext = _node->next; _node->next = 0L; _node->prev = 0L; @@ -2221,13 +2221,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC modif = new NodeModif(); modif->setType(NodeModif::NodeRemoved); modif->setLocation(kafkaCommon::getLocation(_node)); - if(_node->tqparent && _node->tqparent->child == _node) - _node->tqparent->child = _node->next; + if(_node->parent && _node->parent->child == _node) + _node->parent->child = _node->next; if(_node->prev) _node->prev->next = _node->next; if(_node->next) _node->next->prev = _node->prev; - _node->tqparent = 0L; + _node->parent = 0L; _nodeNext = _node->next; _node->prev = 0L; _node->next = 0L; @@ -2251,13 +2251,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC void KafkaDocument::slotDomNodeIsAboutToBeMoved(DOM::Node domNode, DOM::Node newParent, DOM::Node before, NodeModifsSet* modifs) { - Node *node, *tqparent, *nextSibling, *closingNode; + Node *node, *parent, *nextSibling, *closingNode; if(domNode.isNull()) return; node = getNode(domNode); - tqparent = getNode(newParent); + parent = getNode(newParent); nextSibling = getNode(before); if(!node) @@ -2265,10 +2265,10 @@ void KafkaDocument::slotDomNodeIsAboutToBeMoved(DOM::Node domNode, DOM::Node new closingNode = node->getClosingNode(); - kafkaCommon::moveNode(node, tqparent, nextSibling, modifs, false); + kafkaCommon::moveNode(node, parent, nextSibling, modifs, false); if(closingNode) - kafkaCommon::moveNode(closingNode, tqparent, nextSibling, modifs, false); + kafkaCommon::moveNode(closingNode, parent, nextSibling, modifs, false); } |