[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdewebdev/quanta/parsers
From: Paulo Moura Guedes <pmg () netcabo ! pt>
Date: 2004-10-12 19:38:15
Message-ID: 20041012193815.A7B7F16C80 () office ! kde ! org
[Download RAW message or body]
CVS commit by mojo:
Always save the parent node on loading.
M +10 -5 node.cpp 1.56
--- kdewebdev/quanta/parsers/node.cpp #1.55:1.56
@@ -27,4 +27,5 @@
#include "structtreetag.h"
#include "kafkacommon.h"
+#include "wkafkapart.h"
GroupElementMapList globalGroupMap;
@@ -79,5 +80,5 @@ Node::~Node()
void Node::save(QDomElement& element) const
{
- kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl;
+ //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl;
QDomElement child_element;
if(next)
@@ -111,5 +112,5 @@ void Node::save(QDomElement& element) co
element.setAttribute("specialInsideXml", specialInsideXml); // bool
element.setAttribute("fileName", fileName); // QString
-
+ /*
QString s_element;
QTextStream stream(&s_element, IO_WriteOnly);
@@ -117,13 +118,15 @@ void Node::save(QDomElement& element) co
kdDebug(25001) << "Load:\n" << s_element << endl;
kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl;
+ */
}
bool Node::load(QDomElement const& element)
{
+ /*
QString s_element;
QTextStream stream(&s_element, IO_WriteOnly);
element.save(stream, 3);
kdDebug(25001) << "Load:\n" << s_element << endl;
-
+ */
QDomNodeList list = element.childNodes();
for(unsigned int i = 0; i != list.count(); ++i)
@@ -135,12 +138,13 @@ bool Node::load(QDomElement const& eleme
{
next = new Node(0);
- next->load(e);
next->prev = this;
+ next->parent = this->parent;
+ next->load(e);
}
else if(e.tagName() == "nodeChild")
{
child = new Node(0);
- child->load(e);
child->parent = this;
+ child->load(e);
}
else if(e.tagName() == "nodeClosing")
@@ -164,4 +168,5 @@ bool Node::load(QDomElement const& eleme
fileName = element.attribute("fileName"); // QString
+ kafkaCommon::restorePastedNode(this, KafkaDocument::ref()->getCurrentDoc());
//kafkaCommon::coutTree(this, 3);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic