diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/parts/kafka/undoredo.cpp | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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; |