Diffstat (limited to 'libopie2/opiecore/xmltree.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/xmltree.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libopie2/opiecore/xmltree.cc b/libopie2/opiecore/xmltree.cc index 27db5b3..059791b 100644 --- a/libopie2/opiecore/xmltree.cc +++ b/libopie2/opiecore/xmltree.cc | |||
@@ -14,14 +14,15 @@ | |||
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 <opie2/xmltree.h> | ||
21 | |||
20 | #include <qpe/stringutil.h> | 22 | #include <qpe/stringutil.h> |
21 | #include <opie/xmltree.h> | ||
22 | 23 | ||
23 | #include <qxml.h> | 24 | #include <qxml.h> |
24 | 25 | ||
25 | #include <assert.h> | 26 | #include <assert.h> |
26 | 27 | ||
27 | using namespace Opie; | 28 | using namespace Opie; |
@@ -83,22 +84,22 @@ void XMLElement::insertAfter( XMLElement *newChild, XMLElement *refChild ) | |||
83 | XMLElement *next = refChild->m_next; | 84 | XMLElement *next = refChild->m_next; |
84 | 85 | ||
85 | refChild->m_next = newChild; | 86 | refChild->m_next = newChild; |
86 | 87 | ||
87 | newChild->m_prev = refChild; | 88 | newChild->m_prev = refChild; |
88 | newChild->m_next = next; | 89 | newChild->m_next = next; |
89 | 90 | ||
90 | if ( next ) | 91 | if ( next ) |
91 | next->m_prev = newChild; | 92 | next->m_prev = newChild; |
92 | } | 93 | } |
93 | 94 | ||
94 | QString XMLElement::attribute( const QString &attr ) const | 95 | QString XMLElement::attribute( const QString &attr ) const |
95 | { | 96 | { |
96 | AttributeMap::ConstIterator it = m_attributes.find( attr ); | 97 | AttributeMap::ConstIterator it = m_attributes.find( attr ); |
97 | if ( it == m_attributes.end() ) | 98 | if ( it == m_attributes.end() ) |
98 | return QString::null; | 99 | return QString::null; |
99 | return it.data(); | 100 | return it.data(); |
100 | } | 101 | } |
101 | 102 | ||
102 | void XMLElement::setAttribute( const QString &attr, const QString &value ) | 103 | void XMLElement::setAttribute( const QString &attr, const QString &value ) |
103 | { | 104 | { |
104 | m_attributes.replace( attr, value ); | 105 | m_attributes.replace( attr, value ); |
@@ -116,13 +117,13 @@ void XMLElement::insertBefore( XMLElement *newChild, XMLElement *refChild ) | |||
116 | 117 | ||
117 | newChild->m_parent = this; | 118 | newChild->m_parent = this; |
118 | 119 | ||
119 | XMLElement *prev = refChild->m_prev; | 120 | XMLElement *prev = refChild->m_prev; |
120 | 121 | ||
121 | refChild->m_prev = newChild; | 122 | refChild->m_prev = newChild; |
122 | 123 | ||
123 | newChild->m_prev = prev; | 124 | newChild->m_prev = prev; |
124 | newChild->m_next = refChild; | 125 | newChild->m_next = refChild; |
125 | 126 | ||
126 | if ( prev ) | 127 | if ( prev ) |
127 | prev->m_next = newChild; | 128 | prev->m_next = newChild; |
128 | 129 | ||
@@ -278,13 +279,13 @@ XMLElement *XMLElement::namedItem( const QString &name ) | |||
278 | XMLElement *e = m_first; | 279 | XMLElement *e = m_first; |
279 | 280 | ||
280 | for (; e; e = e->nextChild() ) | 281 | for (; e; e = e->nextChild() ) |
281 | if ( e->tagName() == name ) | 282 | if ( e->tagName() == name ) |
282 | return e; | 283 | return e; |
283 | 284 | ||
284 | return 0; | 285 | return 0; |
285 | } | 286 | } |
286 | 287 | ||
287 | XMLElement *XMLElement::clone() const | 288 | XMLElement *XMLElement::clone() const |
288 | { | 289 | { |
289 | XMLElement *res = new XMLElement; | 290 | XMLElement *res = new XMLElement; |
290 | 291 | ||