diff options
Diffstat (limited to 'quanta/parts/kafka/undoredo.cpp')
-rw-r--r-- | quanta/parts/kafka/undoredo.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/quanta/parts/kafka/undoredo.cpp b/quanta/parts/kafka/undoredo.cpp index dfe07142..8eb6cfbe 100644 --- a/quanta/parts/kafka/undoredo.cpp +++ b/quanta/parts/kafka/undoredo.cpp @@ -51,7 +51,7 @@ NodeModif::NodeModif() m_type = -1; m_node = 0L; m_tag = 0L; - m_childrenMovedUp = 0; + m_tqchildrenMovedUp = 0; m_neighboursMovedDown = 0; } @@ -59,7 +59,7 @@ NodeModif::~NodeModif() { if(m_node) { - m_node->parent = 0L; + m_node->tqparent = 0L; m_node->next = 0L; m_node->prev = 0L; if(m_type == NodeRemoved) @@ -87,7 +87,7 @@ void NodeModif::setNode(Node *node) m_node = node; if(m_node) { - m_node->parent = 0L; + m_node->tqparent = 0L; m_node->next = 0L; m_node->prev = 0L; if(m_type == NodeRemoved) @@ -544,14 +544,14 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif) node = kafkaCommon::getNodeFromLocation(nodeModif->location()); if(!node) { - // No node at this location, getting the parent Node and appending newNode after - // the last child of the parent. + // No node at this location, getting the tqparent Node and appending newNode after + // the last child of the tqparent. ref = nodeModif->location(); TQValueList<int> loc(ref); loc.remove(loc.fromLast()); if(loc.empty()) { - // No parent, adding it on top of the tree. + // No tqparent, adding it on top of the tree. kafkaCommon::insertNode(newNode, 0L, 0L, 0L, false); } else @@ -568,7 +568,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif) else { // A node is already here. Moving it to the right and adding newNode here. - kafkaCommon::insertNode(newNode, node->parent, node, 0L, false); + kafkaCommon::insertNode(newNode, node->tqparent, node, 0L, false); } } if(nodeModif->type() == NodeModif::NodeTreeRemoved) @@ -703,10 +703,10 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) { //try //{ - dn = n->_rootNode.parentNode().removeChild(n->_rootNode); + dn = n->_rootNode.tqparentNode().removeChild(n->_rootNode); //} catch(DOM::DOMException e) {kafkaSyncError();} //try{ - domNode.parentNode().insertBefore(dn, domNode); + domNode.tqparentNode().insertBefore(dn, domNode); //} catch(DOM::DOMException e) {} } else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text) @@ -733,7 +733,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) } } //try{ - domNode.parentNode().removeChild(domNode); + domNode.tqparentNode().removeChild(domNode); //} catch(DOM::DOMException e) {kafkaSyncError();} } else if(_node->tag->type == Tag::XmlTagEnd && _node->closesPrevious && @@ -756,7 +756,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) while(n->next) n = n->next; } - if(n->parent->_leafNode.isNull()) + if(n->tqparent->_leafNode.isNull()) { dm = domNode.nextSibling(); goUp = false; @@ -764,18 +764,18 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) { kafkaInterface->disconnectDomNodeFromQuantaNode(dm); //try{ - dm.parentNode().removeChild(dm); + dm.tqparentNode().removeChild(dm); //} catch(DOM::DOMException e) {kafkaSyncError();} - dm = kafkaCommon::getNextDomNode(dm, goUp, false, domNode.parentNode()); + dm = kafkaCommon::getNextDomNode(dm, goUp, false, domNode.tqparentNode()); } } else { - domNode2 = n->parent->_leafNode; + domNode2 = n->tqparent->_leafNode; while(!domNode.nextSibling().isNull()) { //try{ - dn = domNode.parentNode().removeChild(domNode.nextSibling()); + dn = domNode.tqparentNode().removeChild(domNode.nextSibling()); //} catch(DOM::DOMException e) {kafkaSyncError();} //try{ domNode2.appendChild(dn); @@ -788,7 +788,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) while(!domNode.nextSibling().isNull()) { //try{ - dn = domNode.parentNode().removeChild(domNode.nextSibling()); + dn = domNode.tqparentNode().removeChild(domNode.nextSibling()); //} catch(DOM::DOMException e) {kafkaSyncError();} //try{ domNode2.appendChild(dn); @@ -810,7 +810,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) return true;//no kafka node here, due to an invalid pos. domNode = _node->_rootNode; //try{ - domNode.parentNode().removeChild(domNode); + domNode.tqparentNode().removeChild(domNode); //} catch(DOM::DOMException e) {kafkaSyncError();} kafkaInterface->disconnectDomNodeFromQuantaNode(domNode); kafkaInterface->buildKafkaNodeFromNode(_node); @@ -837,7 +837,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) if(!n->_rootNode.isNull()) { //try{ - dn = n->_rootNode.parentNode().removeChild(n->_rootNode); + dn = n->_rootNode.tqparentNode().removeChild(n->_rootNode); //} catch(DOM::DOMException e) {kafkaSyncError();} //try{ domNode.appendChild(dn); @@ -857,10 +857,10 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/) if(!n->_rootNode.isNull()) { //try{ - dn = n->_rootNode.parentNode().removeChild(n->_rootNode); + dn = n->_rootNode.tqparentNode().removeChild(n->_rootNode); //} catch(DOM::DOMException e) {kafkaSyncError();} //try{ - domNode.parentNode().appendChild(dn); + domNode.tqparentNode().appendChild(dn); //} catch(DOM::DOMException e) {} } else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text) @@ -968,15 +968,15 @@ void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encode while(node) { //kdDebug(25001)<< "CurNode : " << _node->tag->name << " - " << _node->tag->tagStr() << endl; - if(node->parent) + if(node->tqparent) { - node->parent->tag->beginPos(bLine3, bCol3); - node->parent->tag->endPos(eLine3, eCol3); + node->tqparent->tag->beginPos(bLine3, bCol3); + node->tqparent->tag->endPos(eLine3, eCol3); } node->tag->beginPos(bLine2, bCol2); //if we are in a Script inside a tag e.g. <a href="<? PHP stuff here ?>">, skip it - if(node->tag->type == Tag::ScriptTag && node->parent && + if(node->tag->type == Tag::ScriptTag && node->tqparent && QuantaCommon::isBetween(bLine2, bCol2, bLine3, bCol3, eLine3,eCol3) == 0) { goUp = true; @@ -990,7 +990,7 @@ void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encode allText += node->tag->tagStr(); //If a child is a Script inside this Tag e.g. <a href="<? PHP stuff here ?>">, make - //its position fits inside the parent + //its position fits inside the tqparent node->tag->beginPos(bLine3, bCol3); node->tag->endPos(eLine3, eCol3); child = node->firstChild(); @@ -1477,7 +1477,7 @@ void undoRedo::debugOutput() " - contents: " << (*it2)->tag()->tagStr() << endl; if(((*it2)->type() == NodeModif::NodeRemoved && !afterEditorIt) || ((*it2)->type() == NodeModif::NodeAdded && afterEditorIt)) - kdDebug(24000)<< "==== ChildsNumber1 : " << (*it2)->childrenMovedUp() << + kdDebug(24000)<< "==== ChildsNumber1 : " << (*it2)->tqchildrenMovedUp() << " - ChildsNumber2 : " << (*it2)->neighboursMovedDown() << endl; } kdDebug(24000)<< "== End Node Modifications set #" << i << endl; |