summaryrefslogtreecommitdiff
path: root/libopie/xmltree.cc
Unidiff
Diffstat (limited to 'libopie/xmltree.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/xmltree.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/xmltree.cc b/libopie/xmltree.cc
index 408e3c6..27db5b3 100644
--- a/libopie/xmltree.cc
+++ b/libopie/xmltree.cc
@@ -3,48 +3,49 @@
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qpe/stringutil.h> 20#include <qpe/stringutil.h>
21#include <opie/xmltree.h> 21#include <opie/xmltree.h>
22 22
23#include <qxml.h> 23#include <qxml.h>
24 24
25#include <assert.h> 25#include <assert.h>
26 26
27using namespace Opie;
27 28
28XMLElement::XMLElement() 29XMLElement::XMLElement()
29 : m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 ) 30 : m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 )
30{ 31{
31} 32}
32 33
33XMLElement::~XMLElement() 34XMLElement::~XMLElement()
34{ 35{
35 XMLElement *n = m_first; 36 XMLElement *n = m_first;
36 37
37 while ( n ) 38 while ( n )
38 { 39 {
39 XMLElement *tmp = n; 40 XMLElement *tmp = n;
40 n = n->m_next; 41 n = n->m_next;
41 delete tmp; 42 delete tmp;
42 } 43 }
43} 44}
44 45
45void XMLElement::appendChild( XMLElement *child ) 46void XMLElement::appendChild( XMLElement *child )
46{ 47{
47 if ( child->m_parent ) 48 if ( child->m_parent )
48 child->m_parent->removeChild( child ); 49 child->m_parent->removeChild( child );
49 50
50 child->m_parent = this; 51 child->m_parent = this;