qdom.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/xml/dom/qdom.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7static void qt_split_namespace(QString& prefix, QString& name, const QString& qName, bool hasURI)-
8{-
9 int i = qName.indexOf(QLatin1Char(':'));-
10 if (i == -1
i == -1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
4
11 if (hasURI
hasURIDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
2
12 prefix = QLatin1String("");
executed 2 times by 1 test: prefix = QLatin1String("");
Executed by:
  • tst_qxmlsimplereader - unknown status
2
13 else-
14 prefix.clear();
executed 2 times by 1 test: prefix.clear();
Executed by:
  • tst_qxmlsimplereader - unknown status
2
15 name = qName;-
16 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else {
4
17 prefix = qName.left(i);-
18 name = qName.mid(i + 1);-
19 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
4
20}-
21-
22-
23-
24-
25-
26-
27-
28class QDomImplementationPrivate-
29{-
30public:-
31 inline QDomImplementationPrivate() {}-
32-
33 QDomImplementationPrivate* clone();-
34 QAtomicInt ref;-
35 static QDomImplementation::InvalidDataPolicy invalidDataPolicy;-
36};-
37-
38class QDomNodePrivate-
39{-
40public:-
41 QDomNodePrivate(QDomDocumentPrivate*, QDomNodePrivate* parent = 0);-
42 QDomNodePrivate(QDomNodePrivate* n, bool deep);-
43 virtual ~QDomNodePrivate();-
44-
45 QString nodeName() const { return
executed 1982 times by 4 tests: return name;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
name;
executed 1982 times by 4 tests: return name;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
}
1982
46 QString nodeValue() const { return
executed 33 times by 1 test: return value;
Executed by:
  • tst_qcssparser - unknown status
value;
executed 33 times by 1 test: return value;
Executed by:
  • tst_qcssparser - unknown status
}
33
47 virtual void setNodeValue(const QString& v) { value = v; }
never executed: end of block
0
48-
49 QDomDocumentPrivate* ownerDocument();-
50 void setOwnerDocument(QDomDocumentPrivate* doc);-
51-
52 virtual QDomNodePrivate* insertBefore(QDomNodePrivate* newChild, QDomNodePrivate* refChild);-
53 virtual QDomNodePrivate* insertAfter(QDomNodePrivate* newChild, QDomNodePrivate* refChild);-
54 virtual QDomNodePrivate* replaceChild(QDomNodePrivate* newChild, QDomNodePrivate* oldChild);-
55 virtual QDomNodePrivate* removeChild(QDomNodePrivate* oldChild);-
56 virtual QDomNodePrivate* appendChild(QDomNodePrivate* newChild);-
57-
58 QDomNodePrivate* namedItem(const QString& name);-
59-
60 virtual QDomNodePrivate* cloneNode(bool deep = true);-
61 virtual void normalize();-
62 virtual void clear();-
63-
64 inline QDomNodePrivate* parent() const { return
executed 15338 times by 5 tests: return hasParent ? ownerNode : 0;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
hasParent ? ownerNode : 0;
executed 15338 times by 5 tests: return hasParent ? ownerNode : 0;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
15338
65 inline void setParent(QDomNodePrivate *p) { ownerNode = p; hasParent = true; }
executed 4239 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
4239
66-
67 void setNoParent() {-
68 ownerNode = hasParent
hasParentDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
FALSEnever evaluated
? (QDomNodePrivate*)ownerDocument() : 0;
0-1
69 hasParent = false;-
70 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qtextdocument - unknown status
1
71-
72-
73 bool isAttr() const { return
never executed: return nodeType() == QDomNode::AttributeNode;
nodeType() == QDomNode::AttributeNode;
never executed: return nodeType() == QDomNode::AttributeNode;
}
0
74 bool isCDATASection() const { return
never executed: return nodeType() == QDomNode::CDATASectionNode;
nodeType() == QDomNode::CDATASectionNode;
never executed: return nodeType() == QDomNode::CDATASectionNode;
}
0
75 bool isDocumentFragment() const { return
executed 2016 times by 5 tests: return nodeType() == QDomNode::DocumentFragmentNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
nodeType() == QDomNode::DocumentFragmentNode;
executed 2016 times by 5 tests: return nodeType() == QDomNode::DocumentFragmentNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
2016
76 bool isDocument() const { return
executed 14368 times by 5 tests: return nodeType() == QDomNode::DocumentNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
nodeType() == QDomNode::DocumentNode;
executed 14368 times by 5 tests: return nodeType() == QDomNode::DocumentNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
14368
77 bool isDocumentType() const { return
never executed: return nodeType() == QDomNode::DocumentTypeNode;
nodeType() == QDomNode::DocumentTypeNode;
never executed: return nodeType() == QDomNode::DocumentTypeNode;
}
0
78 bool isElement() const { return
executed 365 times by 1 test: return nodeType() == QDomNode::ElementNode;
Executed by:
  • tst_qcssparser - unknown status
nodeType() == QDomNode::ElementNode;
executed 365 times by 1 test: return nodeType() == QDomNode::ElementNode;
Executed by:
  • tst_qcssparser - unknown status
}
365
79 bool isEntityReference() const { return
never executed: return nodeType() == QDomNode::EntityReferenceNode;
nodeType() == QDomNode::EntityReferenceNode;
never executed: return nodeType() == QDomNode::EntityReferenceNode;
}
0
80 bool isText() const { const QDomNode::NodeType nt = nodeType();-
81 return
executed 320 times by 1 test: return (nt == QDomNode::TextNode) || (nt == QDomNode::CDATASectionNode);
Executed by:
  • tst_qdbusxmlparser - unknown status
(nt == QDomNode::TextNode)
executed 320 times by 1 test: return (nt == QDomNode::TextNode) || (nt == QDomNode::CDATASectionNode);
Executed by:
  • tst_qdbusxmlparser - unknown status
320
82 || (nt == QDomNode::CDATASectionNode);
executed 320 times by 1 test: return (nt == QDomNode::TextNode) || (nt == QDomNode::CDATASectionNode);
Executed by:
  • tst_qdbusxmlparser - unknown status
}
320
83 bool isEntity() const { return
never executed: return nodeType() == QDomNode::EntityNode;
nodeType() == QDomNode::EntityNode;
never executed: return nodeType() == QDomNode::EntityNode;
}
0
84 bool isNotation() const { return
never executed: return nodeType() == QDomNode::NotationNode;
nodeType() == QDomNode::NotationNode;
never executed: return nodeType() == QDomNode::NotationNode;
}
0
85 bool isProcessingInstruction() const { return
executed 172 times by 2 tests: return nodeType() == QDomNode::ProcessingInstructionNode;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
nodeType() == QDomNode::ProcessingInstructionNode;
executed 172 times by 2 tests: return nodeType() == QDomNode::ProcessingInstructionNode;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
}
172
86 bool isCharacterData() const { const QDomNode::NodeType nt = nodeType();-
87 return
never executed: return (nt == QDomNode::CharacterDataNode) || (nt == QDomNode::TextNode) || (nt == QDomNode::CommentNode);
(nt == QDomNode::CharacterDataNode)
never executed: return (nt == QDomNode::CharacterDataNode) || (nt == QDomNode::TextNode) || (nt == QDomNode::CommentNode);
0
88 || (nt == QDomNode::TextNode)
never executed: return (nt == QDomNode::CharacterDataNode) || (nt == QDomNode::TextNode) || (nt == QDomNode::CommentNode);
0
89 || (nt == QDomNode::CommentNode);
never executed: return (nt == QDomNode::CharacterDataNode) || (nt == QDomNode::TextNode) || (nt == QDomNode::CommentNode);
}
0
90 bool isComment() const { return
never executed: return nodeType() == QDomNode::CommentNode;
nodeType() == QDomNode::CommentNode;
never executed: return nodeType() == QDomNode::CommentNode;
}
0
91-
92 virtual QDomNode::NodeType nodeType() const { return
never executed: return QDomNode::BaseNode;
QDomNode::BaseNode;
never executed: return QDomNode::BaseNode;
}
0
93-
94 virtual void save(QTextStream&, int, int) const;-
95-
96 void setLocation(int lineNumber, int columnNumber);-
97-
98-
99 QAtomicInt ref;-
100 QDomNodePrivate* prev;-
101 QDomNodePrivate* next;-
102 QDomNodePrivate* ownerNode;-
103 QDomNodePrivate* first;-
104 QDomNodePrivate* last;-
105-
106 QString name;-
107 QString value;-
108 QString prefix;-
109 QString namespaceURI;-
110 bool createdWithDom1Interface : 1;-
111 bool hasParent : 1;-
112-
113 int lineNumber;-
114 int columnNumber;-
115};-
116-
117class QDomNodeListPrivate-
118{-
119public:-
120 QDomNodeListPrivate(QDomNodePrivate*);-
121 QDomNodeListPrivate(QDomNodePrivate*, const QString& );-
122 QDomNodeListPrivate(QDomNodePrivate*, const QString&, const QString& );-
123 ~QDomNodeListPrivate();-
124-
125 bool operator== (const QDomNodeListPrivate&) const;-
126 bool operator!= (const QDomNodeListPrivate&) const;-
127-
128 void createList();-
129 QDomNodePrivate* item(int index);-
130 int length() const;-
131-
132 QAtomicInt ref;-
133-
134-
135-
136 QDomNodePrivate* node_impl;-
137 QString tagname;-
138 QString nsURI;-
139 QList<QDomNodePrivate*> list;-
140 long timestamp;-
141};-
142-
143class QDomNamedNodeMapPrivate-
144{-
145public:-
146 QDomNamedNodeMapPrivate(QDomNodePrivate*);-
147 ~QDomNamedNodeMapPrivate();-
148-
149 QDomNodePrivate* namedItem(const QString& name) const;-
150 QDomNodePrivate* namedItemNS(const QString& nsURI, const QString& localName) const;-
151 QDomNodePrivate* setNamedItem(QDomNodePrivate* arg);-
152 QDomNodePrivate* setNamedItemNS(QDomNodePrivate* arg);-
153 QDomNodePrivate* removeNamedItem(const QString& name);-
154 QDomNodePrivate* item(int index) const;-
155 int length() const;-
156 bool contains(const QString& name) const;-
157 bool containsNS(const QString& nsURI, const QString & localName) const;-
158-
159-
160-
161-
162 void clearMap();-
163 bool isReadOnly() { return
never executed: return readonly;
readonly;
never executed: return readonly;
}
0
164 void setReadOnly(bool r) { readonly = r; }
never executed: end of block
0
165 bool isAppendToParent() { return
never executed: return appendToParent;
appendToParent;
never executed: return appendToParent;
}
0
166 void setAppendToParent(bool b) { appendToParent = b; }
executed 976 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
976
167-
168-
169-
170-
171-
172 QDomNamedNodeMapPrivate* clone(QDomNodePrivate* parent);-
173-
174-
175 QAtomicInt ref;-
176 QHash<QString, QDomNodePrivate *> map;-
177 QDomNodePrivate* parent;-
178 bool readonly;-
179 bool appendToParent;-
180};-
181-
182class QDomDocumentTypePrivate : public QDomNodePrivate-
183{-
184public:-
185 QDomDocumentTypePrivate(QDomDocumentPrivate*, QDomNodePrivate* parent = 0);-
186 QDomDocumentTypePrivate(QDomDocumentTypePrivate* n, bool deep);-
187 ~QDomDocumentTypePrivate();-
188 void init();-
189-
190-
191 QDomNodePrivate* cloneNode(bool deep = true) override;-
192 QDomNodePrivate* insertBefore(QDomNodePrivate* newChild, QDomNodePrivate* refChild) override;-
193 QDomNodePrivate* insertAfter(QDomNodePrivate* newChild, QDomNodePrivate* refChild) override;-
194 QDomNodePrivate* replaceChild(QDomNodePrivate* newChild, QDomNodePrivate* oldChild) override;-
195 QDomNodePrivate* removeChild(QDomNodePrivate* oldChild) override;-
196 QDomNodePrivate* appendChild(QDomNodePrivate* newChild) override;-
197-
198 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::DocumentTypeNode;
QDomNode::DocumentTypeNode;
never executed: return QDomNode::DocumentTypeNode;
}
0
199-
200 void save(QTextStream& s, int, int) const override;-
201-
202-
203 QDomNamedNodeMapPrivate* entities;-
204 QDomNamedNodeMapPrivate* notations;-
205 QString publicId;-
206 QString systemId;-
207 QString internalSubset;-
208};-
209-
210class QDomDocumentFragmentPrivate : public QDomNodePrivate-
211{-
212public:-
213 QDomDocumentFragmentPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent = 0);-
214 QDomDocumentFragmentPrivate(QDomNodePrivate* n, bool deep);-
215-
216-
217 virtual QDomNodePrivate* cloneNode(bool deep = true) override;-
218 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::DocumentFragmentNode;
QDomNode::DocumentFragmentNode;
never executed: return QDomNode::DocumentFragmentNode;
}
0
219};-
220-
221class QDomCharacterDataPrivate : public QDomNodePrivate-
222{-
223public:-
224 QDomCharacterDataPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& data);-
225 QDomCharacterDataPrivate(QDomCharacterDataPrivate* n, bool deep);-
226-
227 int dataLength() const;-
228 QString substringData(unsigned long offset, unsigned long count) const;-
229 void appendData(const QString& arg);-
230 void insertData(unsigned long offset, const QString& arg);-
231 void deleteData(unsigned long offset, unsigned long count);-
232 void replaceData(unsigned long offset, unsigned long count, const QString& arg);-
233-
234-
235 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::CharacterDataNode;
QDomNode::CharacterDataNode;
never executed: return QDomNode::CharacterDataNode;
}
0
236 QDomNodePrivate* cloneNode(bool deep = true) override;-
237};-
238-
239class QDomTextPrivate : public QDomCharacterDataPrivate-
240{-
241public:-
242 QDomTextPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& val);-
243 QDomTextPrivate(QDomTextPrivate* n, bool deep);-
244-
245 QDomTextPrivate* splitText(int offset);-
246-
247-
248 QDomNodePrivate* cloneNode(bool deep = true) override;-
249 QDomNode::NodeType nodeType() const override { return
executed 994 times by 5 tests: return QDomNode::TextNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
QDomNode::TextNode;
executed 994 times by 5 tests: return QDomNode::TextNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
994
250 virtual void save(QTextStream& s, int, int) const override;-
251};-
252-
253class QDomAttrPrivate : public QDomNodePrivate-
254{-
255public:-
256 QDomAttrPrivate(QDomDocumentPrivate*, QDomNodePrivate*, const QString& name);-
257 QDomAttrPrivate(QDomDocumentPrivate*, QDomNodePrivate*, const QString& nsURI, const QString& qName);-
258 QDomAttrPrivate(QDomAttrPrivate* n, bool deep);-
259-
260 bool specified() const;-
261-
262-
263 void setNodeValue(const QString& v) override;-
264 QDomNodePrivate* cloneNode(bool deep = true) override;-
265 QDomNode::NodeType nodeType() const override { return
executed 1738 times by 4 tests: return QDomNode::AttributeNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
QDomNode::AttributeNode;
executed 1738 times by 4 tests: return QDomNode::AttributeNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
}
1738
266 virtual void save(QTextStream& s, int, int) const override;-
267-
268-
269 bool m_specified;-
270};-
271-
272class QDomElementPrivate : public QDomNodePrivate-
273{-
274public:-
275 QDomElementPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name);-
276 QDomElementPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& nsURI, const QString& qName);-
277 QDomElementPrivate(QDomElementPrivate* n, bool deep);-
278 ~QDomElementPrivate();-
279-
280 QString attribute(const QString& name, const QString& defValue) const;-
281 QString attributeNS(const QString& nsURI, const QString& localName, const QString& defValue) const;-
282 void setAttribute(const QString& name, const QString& value);-
283 void setAttributeNS(const QString& nsURI, const QString& qName, const QString& newValue);-
284 void removeAttribute(const QString& name);-
285 QDomAttrPrivate* attributeNode(const QString& name);-
286 QDomAttrPrivate* attributeNodeNS(const QString& nsURI, const QString& localName);-
287 QDomAttrPrivate* setAttributeNode(QDomAttrPrivate* newAttr);-
288 QDomAttrPrivate* setAttributeNodeNS(QDomAttrPrivate* newAttr);-
289 QDomAttrPrivate* removeAttributeNode(QDomAttrPrivate* oldAttr);-
290 bool hasAttribute(const QString& name);-
291 bool hasAttributeNS(const QString& nsURI, const QString& localName);-
292-
293 QString text();-
294-
295-
296 QDomNamedNodeMapPrivate* attributes() { return
never executed: return m_attr;
m_attr;
never executed: return m_attr;
}
0
297 bool hasAttributes() { return
executed 26 times by 1 test: return (m_attr->length() > 0);
Executed by:
  • tst_qcssparser - unknown status
(m_attr->length() > 0);
executed 26 times by 1 test: return (m_attr->length() > 0);
Executed by:
  • tst_qcssparser - unknown status
}
26
298 QDomNode::NodeType nodeType() const override { return
executed 10667 times by 5 tests: return QDomNode::ElementNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
QDomNode::ElementNode;
executed 10667 times by 5 tests: return QDomNode::ElementNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
10667
299 QDomNodePrivate* cloneNode(bool deep = true) override;-
300 virtual void save(QTextStream& s, int, int) const override;-
301-
302-
303 QDomNamedNodeMapPrivate* m_attr;-
304};-
305-
306-
307class QDomCommentPrivate : public QDomCharacterDataPrivate-
308{-
309public:-
310 QDomCommentPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& val);-
311 QDomCommentPrivate(QDomCommentPrivate* n, bool deep);-
312-
313-
314 QDomNodePrivate* cloneNode(bool deep = true) override;-
315 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::CommentNode;
QDomNode::CommentNode;
never executed: return QDomNode::CommentNode;
}
0
316 virtual void save(QTextStream& s, int, int) const override;-
317};-
318-
319class QDomCDATASectionPrivate : public QDomTextPrivate-
320{-
321public:-
322 QDomCDATASectionPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& val);-
323 QDomCDATASectionPrivate(QDomCDATASectionPrivate* n, bool deep);-
324-
325-
326 QDomNodePrivate* cloneNode(bool deep = true) override;-
327 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::CDATASectionNode;
QDomNode::CDATASectionNode;
never executed: return QDomNode::CDATASectionNode;
}
0
328 virtual void save(QTextStream& s, int, int) const override;-
329};-
330-
331class QDomNotationPrivate : public QDomNodePrivate-
332{-
333public:-
334 QDomNotationPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name,-
335 const QString& pub, const QString& sys);-
336 QDomNotationPrivate(QDomNotationPrivate* n, bool deep);-
337-
338-
339 QDomNodePrivate* cloneNode(bool deep = true) override;-
340 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::NotationNode;
QDomNode::NotationNode;
never executed: return QDomNode::NotationNode;
}
0
341 virtual void save(QTextStream& s, int, int) const override;-
342-
343-
344 QString m_sys;-
345 QString m_pub;-
346};-
347-
348class QDomEntityPrivate : public QDomNodePrivate-
349{-
350public:-
351 QDomEntityPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name,-
352 const QString& pub, const QString& sys, const QString& notation);-
353 QDomEntityPrivate(QDomEntityPrivate* n, bool deep);-
354-
355-
356 QDomNodePrivate* cloneNode(bool deep = true) override;-
357 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::EntityNode;
QDomNode::EntityNode;
never executed: return QDomNode::EntityNode;
}
0
358 virtual void save(QTextStream& s, int, int) const override;-
359-
360-
361 QString m_sys;-
362 QString m_pub;-
363 QString m_notationName;-
364};-
365-
366class QDomEntityReferencePrivate : public QDomNodePrivate-
367{-
368public:-
369 QDomEntityReferencePrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name);-
370 QDomEntityReferencePrivate(QDomNodePrivate* n, bool deep);-
371-
372-
373 QDomNodePrivate* cloneNode(bool deep = true) override;-
374 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::EntityReferenceNode;
QDomNode::EntityReferenceNode;
never executed: return QDomNode::EntityReferenceNode;
}
0
375 virtual void save(QTextStream& s, int, int) const override;-
376};-
377-
378class QDomProcessingInstructionPrivate : public QDomNodePrivate-
379{-
380public:-
381 QDomProcessingInstructionPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& target,-
382 const QString& data);-
383 QDomProcessingInstructionPrivate(QDomProcessingInstructionPrivate* n, bool deep);-
384-
385-
386 QDomNodePrivate* cloneNode(bool deep = true) override;-
387 QDomNode::NodeType nodeType() const override { return
never executed: return QDomNode::ProcessingInstructionNode;
QDomNode::ProcessingInstructionNode;
never executed: return QDomNode::ProcessingInstructionNode;
}
0
388 virtual void save(QTextStream& s, int, int) const override;-
389};-
390-
391class QDomDocumentPrivate : public QDomNodePrivate-
392{-
393public:-
394 QDomDocumentPrivate();-
395 QDomDocumentPrivate(const QString& name);-
396 QDomDocumentPrivate(QDomDocumentTypePrivate* dt);-
397 QDomDocumentPrivate(QDomDocumentPrivate* n, bool deep);-
398 ~QDomDocumentPrivate();-
399-
400 bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn);-
401 bool setContent(QXmlInputSource *source, QXmlReader *reader, QXmlSimpleReader *simpleReader, QString *errorMsg, int *errorLine, int *errorColumn);-
402-
403-
404 QDomDocumentTypePrivate* doctype() { return
executed 471 times by 2 tests: return type.data();
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
type.data();
executed 471 times by 2 tests: return type.data();
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
}
471
405 QDomImplementationPrivate* implementation() { return
never executed: return impl.data();
impl.data();
never executed: return impl.data();
}
0
406 QDomElementPrivate* documentElement();-
407-
408-
409 QDomElementPrivate* createElement(const QString& tagName);-
410 QDomElementPrivate* createElementNS(const QString& nsURI, const QString& qName);-
411 QDomDocumentFragmentPrivate* createDocumentFragment();-
412 QDomTextPrivate* createTextNode(const QString& data);-
413 QDomCommentPrivate* createComment(const QString& data);-
414 QDomCDATASectionPrivate* createCDATASection(const QString& data);-
415 QDomProcessingInstructionPrivate* createProcessingInstruction(const QString& target, const QString& data);-
416 QDomAttrPrivate* createAttribute(const QString& name);-
417 QDomAttrPrivate* createAttributeNS(const QString& nsURI, const QString& qName);-
418 QDomEntityReferencePrivate* createEntityReference(const QString& name);-
419-
420 QDomNodePrivate* importNode(QDomNodePrivate* importedNode, bool deep);-
421-
422-
423 QDomNodePrivate* cloneNode(bool deep = true) override;-
424 QDomNode::NodeType nodeType() const override { return
executed 3842 times by 5 tests: return QDomNode::DocumentNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
QDomNode::DocumentNode;
executed 3842 times by 5 tests: return QDomNode::DocumentNode;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
3842
425 void clear() override;-
426-
427-
428 QExplicitlySharedDataPointer<QDomImplementationPrivate> impl;-
429 QExplicitlySharedDataPointer<QDomDocumentTypePrivate> type;-
430-
431 void saveDocument(QTextStream& stream, const int indent, QDomNode::EncodingPolicy encUsed) const;-
432 long nodeListTime;-
433};-
434-
435-
436-
437-
438-
439-
440-
441class QDomHandler : public QXmlDefaultHandler-
442{-
443public:-
444 QDomHandler(QDomDocumentPrivate* d, QXmlSimpleReader *reader, bool namespaceProcessing);-
445 ~QDomHandler();-
446-
447-
448 bool endDocument() override;-
449 bool startElement(const QString& nsURI, const QString& localName, const QString& qName, const QXmlAttributes& atts) override;-
450 bool endElement(const QString& nsURI, const QString& localName, const QString& qName) override;-
451 bool characters(const QString& ch) override;-
452 bool processingInstruction(const QString& target, const QString& data) override;-
453 bool skippedEntity(const QString& name) override;-
454-
455-
456 bool fatalError(const QXmlParseException& exception) override;-
457-
458-
459 bool startCDATA() override;-
460 bool endCDATA() override;-
461 bool startEntity(const QString &) override;-
462 bool endEntity(const QString &) override;-
463 bool startDTD(const QString& name, const QString& publicId, const QString& systemId) override;-
464 bool comment(const QString& ch) override;-
465-
466-
467 bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId) override ;-
468-
469-
470 bool notationDecl(const QString & name, const QString & publicId, const QString & systemId) override;-
471 bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString &notationName) override ;-
472-
473 void setDocumentLocator(QXmlLocator *locator) override;-
474-
475 QString errorMsg;-
476 int errorLine;-
477 int errorColumn;-
478-
479private:-
480 QDomDocumentPrivate *doc;-
481 QDomNodePrivate *node;-
482 QString entityName;-
483 bool cdata;-
484 bool nsProcessing;-
485 QXmlLocator *locator;-
486 QXmlSimpleReader *reader;-
487};-
488-
489-
490-
491-
492-
493-
494QDomImplementation::InvalidDataPolicy QDomImplementationPrivate::invalidDataPolicy-
495 = QDomImplementation::AcceptInvalidChars;-
496-
497-
498-
499static QString fixedXmlName(const QString &_name, bool *ok, bool namespaces = false)-
500{-
501 QString name, prefix;-
502 if (namespaces
namespacesDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1021 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
)
2-1021
503 qt_split_namespace(prefix, name, _name, true);
executed 2 times by 1 test: qt_split_namespace(prefix, name, _name, true);
Executed by:
  • tst_qxmlsimplereader - unknown status
2
504 else-
505 name = _name;
executed 1021 times by 4 tests: name = _name;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
1021
506-
507 if (name.isEmpty()
name.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-1023
508 *ok = false;-
509 return
never executed: return QString();
QString();
never executed: return QString();
0
510 }-
511-
512 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-1023
513 *ok = true;-
514 return
executed 1023 times by 5 tests: return _name;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
_name;
executed 1023 times by 5 tests: return _name;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1023
515 }-
516-
517 QString result;-
518 bool firstChar = true;-
519 for (int i = 0; i < name.size()
i < name.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
520 QChar c = name.at(i);-
521 if (firstChar
firstCharDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
522 if (QXmlUtils::isLetter(c)
QXmlUtils::isLetter(c)Description
TRUEnever evaluated
FALSEnever evaluated
|| c.unicode() == '_'
c.unicode() == '_'Description
TRUEnever evaluated
FALSEnever evaluated
|| c.unicode() == ':'
c.unicode() == ':'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
523 result.append(c);-
524 firstChar = false;-
525 }
never executed: end of block
else if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
526 *ok = false;-
527 return
never executed: return QString();
QString();
never executed: return QString();
0
528 }-
529 }
never executed: end of block
else {
0
530 if (QXmlUtils::isNameChar(c)
QXmlUtils::isNameChar(c)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
531 result.append(c);
never executed: result.append(c);
0
532 else if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
533 *ok = false;-
534 return
never executed: return QString();
QString();
never executed: return QString();
0
535 }-
536 }
never executed: end of block
0
537 }-
538-
539 if (result.isEmpty()
result.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
540 *ok = false;-
541 return
never executed: return QString();
QString();
never executed: return QString();
0
542 }-
543-
544 *ok = true;-
545 if (namespaces
namespacesDescription
TRUEnever evaluated
FALSEnever evaluated
&& !prefix.isEmpty()
!prefix.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
546 return
never executed: return prefix + QLatin1Char(':') + result;
prefix + QLatin1Char(':') + result;
never executed: return prefix + QLatin1Char(':') + result;
0
547 return
never executed: return result;
result;
never executed: return result;
0
548}-
549-
550-
551-
552-
553static QString fixedCharData(const QString &data, bool *ok)-
554{-
555 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEevaluated 125 times by 2 tests
Evaluated by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
FALSEnever evaluated
) {
0-125
556 *ok = true;-
557 return
executed 125 times by 2 tests: return data;
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
data;
executed 125 times by 2 tests: return data;
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
125
558 }-
559-
560 QString result;-
561 for (int i = 0; i < data.size()
i < data.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
562 QChar c = data.at(i);-
563 if (QXmlUtils::isChar(c)
QXmlUtils::isChar(c)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
564 result.append(c);-
565 }
never executed: end of block
else if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
566 *ok = false;-
567 return
never executed: return QString();
QString();
never executed: return QString();
0
568 }-
569 }
never executed: end of block
0
570-
571 *ok = true;-
572 return
never executed: return result;
result;
never executed: return result;
0
573}-
574-
575-
576-
577-
578static QString fixedComment(const QString &data, bool *ok)-
579{-
580 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
581 *ok = true;-
582 return
never executed: return data;
data;
never executed: return data;
0
583 }-
584-
585 QString fixedData = fixedCharData(data, ok);-
586 if (!*ok
!*okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
587 return
never executed: return QString();
QString();
never executed: return QString();
0
588-
589 for (;;) {-
590 int idx = fixedData.indexOf(QLatin1String("--"));-
591 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
592 break;
never executed: break;
0
593 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
594 *ok = false;-
595 return
never executed: return QString();
QString();
never executed: return QString();
0
596 }-
597 fixedData.remove(idx, 2);-
598 }
never executed: end of block
0
599-
600 *ok = true;-
601 return
never executed: return fixedData;
fixedData;
never executed: return fixedData;
0
602}-
603-
604-
605-
606-
607static QString fixedCDataSection(const QString &data, bool *ok)-
608{-
609 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
610 *ok = true;-
611 return
never executed: return data;
data;
never executed: return data;
0
612 }-
613-
614 QString fixedData = fixedCharData(data, ok);-
615 if (!*ok
!*okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
616 return
never executed: return QString();
QString();
never executed: return QString();
0
617-
618 for (;;) {-
619 int idx = fixedData.indexOf(QLatin1String("]]>"));-
620 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
621 break;
never executed: break;
0
622 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
623 *ok = false;-
624 return
never executed: return QString();
QString();
never executed: return QString();
0
625 }-
626 fixedData.remove(idx, 3);-
627 }
never executed: end of block
0
628-
629 *ok = true;-
630 return
never executed: return fixedData;
fixedData;
never executed: return fixedData;
0
631}-
632-
633-
634-
635static QString fixedPIData(const QString &data, bool *ok)-
636{-
637 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
638 *ok = true;-
639 return
never executed: return data;
data;
never executed: return data;
0
640 }-
641-
642 QString fixedData = fixedCharData(data, ok);-
643 if (!*ok
!*okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
644 return
never executed: return QString();
QString();
never executed: return QString();
0
645-
646 for (;;) {-
647 int idx = fixedData.indexOf(QLatin1String("?>"));-
648 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
649 break;
never executed: break;
0
650 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
651 *ok = false;-
652 return
never executed: return QString();
QString();
never executed: return QString();
0
653 }-
654 fixedData.remove(idx, 2);-
655 }
never executed: end of block
0
656-
657 *ok = true;-
658 return
never executed: return fixedData;
fixedData;
never executed: return fixedData;
0
659}-
660-
661-
662-
663-
664static QString fixedPubidLiteral(const QString &data, bool *ok)-
665{-
666 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
667 *ok = true;-
668 return
never executed: return data;
data;
never executed: return data;
0
669 }-
670-
671 QString result;-
672-
673 if(QXmlUtils::isPublicID(data)
QXmlUtils::isPublicID(data)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
674 result = data;
never executed: result = data;
0
675 else if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
676 *ok = false;-
677 return
never executed: return QString();
QString();
never executed: return QString();
0
678 }-
679-
680 if (result.indexOf(QLatin1Char('\'')) != -1
result.indexOf...r('\'')) != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
681 && result.indexOf(QLatin1Char('"')) != -1
result.indexOf...ar('"')) != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
682 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
683 *ok = false;-
684 return
never executed: return QString();
QString();
never executed: return QString();
0
685 } else {-
686 result.remove(QLatin1Char('\''));-
687 }
never executed: end of block
0
688 }-
689-
690 *ok = true;-
691 return
never executed: return result;
result;
never executed: return result;
0
692}-
693-
694-
695-
696-
697static QString fixedSystemLiteral(const QString &data, bool *ok)-
698{-
699 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::AcceptInvalidChars
QDomImplementa...ptInvalidCharsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
700 *ok = true;-
701 return
never executed: return data;
data;
never executed: return data;
0
702 }-
703-
704 QString result = data;-
705-
706 if (result.indexOf(QLatin1Char('\'')) != -1
result.indexOf...r('\'')) != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
707 && result.indexOf(QLatin1Char('"')) != -1
result.indexOf...ar('"')) != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
708 if (QDomImplementationPrivate::invalidDataPolicy == QDomImplementation::ReturnNullNode
QDomImplementa...ReturnNullNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
709 *ok = false;-
710 return
never executed: return QString();
QString();
never executed: return QString();
0
711 } else {-
712 result.remove(QLatin1Char('\''));-
713 }
never executed: end of block
0
714 }-
715-
716 *ok = true;-
717 return
never executed: return result;
result;
never executed: return result;
0
718}-
719-
720-
721-
722-
723-
724-
725-
726QDomImplementationPrivate* QDomImplementationPrivate::clone()-
727{-
728 return
never executed: return new QDomImplementationPrivate;
new QDomImplementationPrivate;
never executed: return new QDomImplementationPrivate;
0
729}-
730QDomImplementation::QDomImplementation()-
731{-
732 impl = 0;-
733}
never executed: end of block
0
734-
735-
736-
737-
738QDomImplementation::QDomImplementation(const QDomImplementation &x)-
739{-
740 impl = x.impl;-
741 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
742 impl->ref.ref();
never executed: impl->ref.ref();
0
743}
never executed: end of block
0
744-
745QDomImplementation::QDomImplementation(QDomImplementationPrivate *p)-
746{-
747-
748 impl = p;-
749 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
750 impl->ref.ref();
never executed: impl->ref.ref();
0
751}
never executed: end of block
0
752-
753-
754-
755-
756QDomImplementation& QDomImplementation::operator=(const QDomImplementation &x)-
757{-
758 if (x.impl
x.implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
759 x.impl->ref.ref();
never executed: x.impl->ref.ref();
0
760 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
761 delete impl;
never executed: delete impl;
0
762 impl = x.impl;-
763 return
never executed: return *this;
*this;
never executed: return *this;
0
764}-
765-
766-
767-
768-
769-
770bool QDomImplementation::operator==(const QDomImplementation &x) const-
771{-
772 return
never executed: return (impl == x.impl);
(impl == x.impl);
never executed: return (impl == x.impl);
0
773}-
774-
775-
776-
777-
778-
779bool QDomImplementation::operator!=(const QDomImplementation &x) const-
780{-
781 return
never executed: return (impl != x.impl);
(impl != x.impl);
never executed: return (impl != x.impl);
0
782}-
783-
784-
785-
786-
787QDomImplementation::~QDomImplementation()-
788{-
789 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
790 delete impl;
never executed: delete impl;
0
791}
never executed: end of block
0
792bool QDomImplementation::hasFeature(const QString& feature, const QString& version) const-
793{-
794 if (feature == QLatin1String("XML")
feature == QLa...1String("XML")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
795 if (version.isEmpty()
version.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| version == QLatin1String("1.0")
version == QLa...1String("1.0")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
796 return
never executed: return true;
true;
never executed: return true;
0
797 }-
798 }
never executed: end of block
0
799-
800 return
never executed: return false;
false;
never executed: return false;
0
801}-
802QDomDocumentType QDomImplementation::createDocumentType(const QString& qName, const QString& publicId, const QString& systemId)-
803{-
804 bool ok;-
805 QString fixedName = fixedXmlName(qName, &ok, true);-
806 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
807 return
never executed: return QDomDocumentType();
QDomDocumentType();
never executed: return QDomDocumentType();
0
808-
809 QString fixedPublicId = fixedPubidLiteral(publicId, &ok);-
810 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
811 return
never executed: return QDomDocumentType();
QDomDocumentType();
never executed: return QDomDocumentType();
0
812-
813 QString fixedSystemId = fixedSystemLiteral(systemId, &ok);-
814 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
815 return
never executed: return QDomDocumentType();
QDomDocumentType();
never executed: return QDomDocumentType();
0
816-
817 QDomDocumentTypePrivate *dt = new QDomDocumentTypePrivate(0);-
818 dt->name = fixedName;-
819 if (systemId.isNull()
systemId.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
820 dt->publicId.clear();-
821 dt->systemId.clear();-
822 }
never executed: end of block
else {
0
823 dt->publicId = fixedPublicId;-
824 dt->systemId = fixedSystemId;-
825 }
never executed: end of block
0
826 dt->ref.deref();-
827 return
never executed: return QDomDocumentType(dt);
QDomDocumentType(dt);
never executed: return QDomDocumentType(dt);
0
828}-
829-
830-
831-
832-
833-
834-
835QDomDocument QDomImplementation::createDocument(const QString& nsURI, const QString& qName, const QDomDocumentType& doctype)-
836{-
837 QDomDocument doc(doctype);-
838 QDomElement root = doc.createElementNS(nsURI, qName);-
839 if (root.isNull()
root.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
840 return
never executed: return QDomDocument();
QDomDocument();
never executed: return QDomDocument();
0
841 doc.appendChild(root);-
842 return
never executed: return doc;
doc;
never executed: return doc;
0
843}-
844-
845-
846-
847-
848-
849bool QDomImplementation::isNull()-
850{-
851 return
never executed: return (impl == 0);
(impl == 0);
never executed: return (impl == 0);
0
852}-
853QDomImplementation::InvalidDataPolicy QDomImplementation::invalidDataPolicy()-
854{-
855 return
never executed: return QDomImplementationPrivate::invalidDataPolicy;
QDomImplementationPrivate::invalidDataPolicy;
never executed: return QDomImplementationPrivate::invalidDataPolicy;
0
856}-
857void QDomImplementation::setInvalidDataPolicy(InvalidDataPolicy policy)-
858{-
859 QDomImplementationPrivate::invalidDataPolicy = policy;-
860}
never executed: end of block
0
861-
862-
863-
864-
865-
866-
867-
868QDomNodeListPrivate::QDomNodeListPrivate(QDomNodePrivate *n_impl) : ref(1)-
869{-
870 node_impl = n_impl;-
871 if (node_impl
node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
872 node_impl->ref.ref();
never executed: node_impl->ref.ref();
0
873 timestamp = 0;-
874}
never executed: end of block
0
875-
876QDomNodeListPrivate::QDomNodeListPrivate(QDomNodePrivate *n_impl, const QString &name) :-
877 ref(1)-
878{-
879 node_impl = n_impl;-
880 if (node_impl
node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
881 node_impl->ref.ref();
never executed: node_impl->ref.ref();
0
882 tagname = name;-
883 timestamp = 0;-
884}
never executed: end of block
0
885-
886QDomNodeListPrivate::QDomNodeListPrivate(QDomNodePrivate *n_impl, const QString &_nsURI, const QString &localName) :-
887 ref(1)-
888{-
889 node_impl = n_impl;-
890 if (node_impl
node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
891 node_impl->ref.ref();
never executed: node_impl->ref.ref();
0
892 tagname = localName;-
893 nsURI = _nsURI;-
894 timestamp = 0;-
895}
never executed: end of block
0
896-
897QDomNodeListPrivate::~QDomNodeListPrivate()-
898{-
899 if (node_impl
node_implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !node_impl->ref.deref()
!node_impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
900 delete node_impl;
never executed: delete node_impl;
0
901}
never executed: end of block
0
902-
903bool QDomNodeListPrivate::operator==(const QDomNodeListPrivate &other) const-
904{-
905 return
never executed: return (node_impl == other.node_impl) && (tagname == other.tagname);
(node_impl == other.node_impl) && (tagname == other.tagname);
never executed: return (node_impl == other.node_impl) && (tagname == other.tagname);
0
906}-
907-
908bool QDomNodeListPrivate::operator!=(const QDomNodeListPrivate &other) const-
909{-
910 return
never executed: return (node_impl != other.node_impl) || (tagname != other.tagname);
(node_impl != other.node_impl) || (tagname != other.tagname);
never executed: return (node_impl != other.node_impl) || (tagname != other.tagname);
0
911}-
912-
913void QDomNodeListPrivate::createList()-
914{-
915 if (!node_impl
!node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
916 return;
never executed: return;
0
917-
918 const QDomDocumentPrivate *const doc = node_impl->ownerDocument();-
919 if (doc
docDescription
TRUEnever evaluated
FALSEnever evaluated
&& timestamp != doc->nodeListTime
timestamp != doc->nodeListTimeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
920 timestamp = doc->nodeListTime;
never executed: timestamp = doc->nodeListTime;
0
921-
922 QDomNodePrivate* p = node_impl->first;-
923-
924 list.clear();-
925 if (tagname.isNull()
tagname.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
926 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
927 list.append(p);-
928 p = p->next;-
929 }
never executed: end of block
0
930 }
never executed: end of block
else if (nsURI.isNull()
nsURI.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
931 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p != node_impl
p != node_implDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
932 if (p->isElement()
p->isElement()Description
TRUEnever evaluated
FALSEnever evaluated
&& p->nodeName() == tagname
p->nodeName() == tagnameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
933 list.append(p);-
934 }
never executed: end of block
0
935 if (p->first
p->firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
936 p = p->first;
never executed: p = p->first;
0
937 else if (p->next
p->nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
938 p = p->next;
never executed: p = p->next;
0
939 else {-
940 p = p->parent();-
941 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p != node_impl
p != node_implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !p->next
!p->nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
942 p = p->parent();
never executed: p = p->parent();
0
943 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p != node_impl
p != node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
944 p = p->next;
never executed: p = p->next;
0
945 }
never executed: end of block
0
946 }-
947 }
never executed: end of block
else {
0
948 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p != node_impl
p != node_implDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
949 if (p->isElement()
p->isElement()Description
TRUEnever evaluated
FALSEnever evaluated
&& p->name==tagname
p->name==tagnameDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->namespaceURI==nsURI
p->namespaceURI==nsURIDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
950 list.append(p);-
951 }
never executed: end of block
0
952 if (p->first
p->firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
953 p = p->first;
never executed: p = p->first;
0
954 else if (p->next
p->nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
955 p = p->next;
never executed: p = p->next;
0
956 else {-
957 p = p->parent();-
958 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p != node_impl
p != node_implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !p->next
!p->nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
959 p = p->parent();
never executed: p = p->parent();
0
960 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p != node_impl
p != node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
961 p = p->next;
never executed: p = p->next;
0
962 }
never executed: end of block
0
963 }-
964 }
never executed: end of block
0
965}-
966-
967QDomNodePrivate* QDomNodeListPrivate::item(int index)-
968{-
969 if (!node_impl
!node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
970 return
never executed: return 0;
0;
never executed: return 0;
0
971-
972 const QDomDocumentPrivate *const doc = node_impl->ownerDocument();-
973 if (!doc
!docDescription
TRUEnever evaluated
FALSEnever evaluated
|| timestamp != doc->nodeListTime
timestamp != doc->nodeListTimeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
974 createList();
never executed: createList();
0
975-
976 if (index >= list.size()
index >= list.size()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
977 return
never executed: return 0;
0;
never executed: return 0;
0
978-
979 return
never executed: return list.at(index);
list.at(index);
never executed: return list.at(index);
0
980}-
981-
982int QDomNodeListPrivate::length() const-
983{-
984 if (!node_impl
!node_implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
985 return
never executed: return 0;
0;
never executed: return 0;
0
986-
987 const QDomDocumentPrivate *const doc = node_impl->ownerDocument();-
988 if (!doc
!docDescription
TRUEnever evaluated
FALSEnever evaluated
|| timestamp != doc->nodeListTime
timestamp != doc->nodeListTimeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
989 QDomNodeListPrivate *that = const_cast<QDomNodeListPrivate *>(this);-
990 that->createList();-
991 }
never executed: end of block
0
992-
993 return
never executed: return list.count();
list.count();
never executed: return list.count();
0
994}-
995QDomNodeList::QDomNodeList()-
996{-
997 impl = 0;-
998}
never executed: end of block
0
999-
1000QDomNodeList::QDomNodeList(QDomNodeListPrivate* p)-
1001{-
1002 impl = p;-
1003}
never executed: end of block
0
1004-
1005-
1006-
1007-
1008QDomNodeList::QDomNodeList(const QDomNodeList& n)-
1009{-
1010 impl = n.impl;-
1011 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1012 impl->ref.ref();
never executed: impl->ref.ref();
0
1013}
never executed: end of block
0
1014-
1015-
1016-
1017-
1018QDomNodeList& QDomNodeList::operator=(const QDomNodeList &n)-
1019{-
1020 if (n.impl
n.implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1021 n.impl->ref.ref();
never executed: n.impl->ref.ref();
0
1022 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1023 delete impl;
never executed: delete impl;
0
1024 impl = n.impl;-
1025 return
never executed: return *this;
*this;
never executed: return *this;
0
1026}-
1027-
1028-
1029-
1030-
1031-
1032bool QDomNodeList::operator==(const QDomNodeList &n) const-
1033{-
1034 if (impl == n.impl
impl == n.implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1035 return
never executed: return true;
true;
never executed: return true;
0
1036 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
|| !n.impl
!n.implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1037 return
never executed: return false;
false;
never executed: return false;
0
1038 return
never executed: return (*impl == *n.impl);
(*impl == *n.impl);
never executed: return (*impl == *n.impl);
0
1039}-
1040-
1041-
1042-
1043-
1044-
1045bool QDomNodeList::operator!=(const QDomNodeList &n) const-
1046{-
1047 return
never executed: return !operator==(n);
!operator==(n);
never executed: return !operator==(n);
0
1048}-
1049-
1050-
1051-
1052-
1053QDomNodeList::~QDomNodeList()-
1054{-
1055 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1056 delete impl;
never executed: delete impl;
0
1057}
never executed: end of block
0
1058QDomNode QDomNodeList::item(int index) const-
1059{-
1060 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1061 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1062-
1063 return
never executed: return QDomNode(impl->item(index));
QDomNode(impl->item(index));
never executed: return QDomNode(impl->item(index));
0
1064}-
1065-
1066-
1067-
1068-
1069int QDomNodeList::length() const-
1070{-
1071 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1072 return
never executed: return 0;
0;
never executed: return 0;
0
1073 return
never executed: return impl->length();
impl->length();
never executed: return impl->length();
0
1074}-
1075inline void QDomNodePrivate::setOwnerDocument(QDomDocumentPrivate *doc)-
1076{-
1077 ownerNode = doc;-
1078 hasParent = false;-
1079}
executed 1392 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1392
1080-
1081QDomNodePrivate::QDomNodePrivate(QDomDocumentPrivate *doc, QDomNodePrivate *par) : ref(1)-
1082{-
1083 if (par
parDescription
TRUEevaluated 2223 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1392 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
1392-2223
1084 setParent(par);
executed 2223 times by 5 tests: setParent(par);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2223
1085 else-
1086 setOwnerDocument(doc);
executed 1392 times by 5 tests: setOwnerDocument(doc);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1392
1087 prev = 0;-
1088 next = 0;-
1089 first = 0;-
1090 last = 0;-
1091 createdWithDom1Interface = true;-
1092 lineNumber = -1;-
1093 columnNumber = -1;-
1094}
executed 3615 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
3615
1095-
1096QDomNodePrivate::QDomNodePrivate(QDomNodePrivate *n, bool deep) : ref(1)-
1097{-
1098 setOwnerDocument(n->ownerDocument());-
1099 prev = 0;-
1100 next = 0;-
1101 first = 0;-
1102 last = 0;-
1103-
1104 name = n->name;-
1105 value = n->value;-
1106 prefix = n->prefix;-
1107 namespaceURI = n->namespaceURI;-
1108 createdWithDom1Interface = n->createdWithDom1Interface;-
1109 lineNumber = -1;-
1110 columnNumber = -1;-
1111-
1112 if (!deep
!deepDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1113 return;
never executed: return;
0
1114-
1115 for (QDomNodePrivate* x = n->first; x
xDescription
TRUEnever evaluated
FALSEnever evaluated
; x = x->next)
0
1116 appendChild(x->cloneNode(true));
never executed: appendChild(x->cloneNode(true));
0
1117}
never executed: end of block
0
1118-
1119QDomNodePrivate::~QDomNodePrivate()-
1120{-
1121 QDomNodePrivate* p = first;-
1122 QDomNodePrivate* n;-
1123-
1124 while (p
pDescription
TRUEevaluated 2015 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 3615 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
2015-3615
1125 n = p->next;-
1126 if (!p->ref.deref()
!p->ref.deref()Description
TRUEevaluated 2015 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-2015
1127 delete p;
executed 2015 times by 5 tests: delete p;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2015
1128 else-
1129 p->setNoParent();
never executed: p->setNoParent();
0
1130 p = n;-
1131 }
executed 2015 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2015
1132 first = 0;-
1133 last = 0;-
1134}
executed 3615 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
3615
1135-
1136void QDomNodePrivate::clear()-
1137{-
1138 QDomNodePrivate* p = first;-
1139 QDomNodePrivate* n;-
1140-
1141 while (p
pDescription
TRUEnever evaluated
FALSEevaluated 244 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-244
1142 n = p->next;-
1143 if (!p->ref.deref()
!p->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1144 delete p;
never executed: delete p;
0
1145 p = n;-
1146 }
never executed: end of block
0
1147 first = 0;-
1148 last = 0;-
1149}
executed 244 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
1150-
1151QDomNodePrivate* QDomNodePrivate::namedItem(const QString &n)-
1152{-
1153 QDomNodePrivate* p = first;-
1154 while (p
pDescription
TRUEevaluated 51 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
) {
0-51
1155 if (p->nodeName() == n
p->nodeName() == nDescription
TRUEevaluated 49 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
2-49
1156 return
executed 49 times by 1 test: return p;
Executed by:
  • tst_qcssparser - unknown status
p;
executed 49 times by 1 test: return p;
Executed by:
  • tst_qcssparser - unknown status
49
1157 p = p->next;-
1158 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
2
1159 return
never executed: return 0;
0;
never executed: return 0;
0
1160}-
1161-
1162-
1163QDomNodePrivate* QDomNodePrivate::insertBefore(QDomNodePrivate* newChild, QDomNodePrivate* refChild)-
1164{-
1165-
1166 if (!newChild
!newChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1167 return
never executed: return 0;
0;
never executed: return 0;
0
1168-
1169-
1170 if (newChild == refChild
newChild == refChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1171 return
never executed: return 0;
0;
never executed: return 0;
0
1172-
1173-
1174 if (refChild
refChildDescription
TRUEnever evaluated
FALSEnever evaluated
&& refChild->parent() != this
refChild->parent() != thisDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1175 return
never executed: return 0;
0;
never executed: return 0;
0
1176-
1177-
1178 QDomDocumentPrivate *const doc = ownerDocument();-
1179 if(doc
docDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1180 doc->nodeListTime++;
never executed: doc->nodeListTime++;
0
1181-
1182-
1183-
1184 if (newChild->isDocumentFragment()
newChild->isDocumentFragment()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1185-
1186 if (newChild->first == 0
newChild->first == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1187 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1188-
1189-
1190 QDomNodePrivate* n = newChild->first;-
1191 while (n
nDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1192 n->setParent(this);-
1193 n = n->next;-
1194 }
never executed: end of block
0
1195-
1196-
1197 if (!refChild
!refChildDescription
TRUEnever evaluated
FALSEnever evaluated
|| refChild->prev == 0
refChild->prev == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1198 if (first
firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1199 first->prev = newChild->last;
never executed: first->prev = newChild->last;
0
1200 newChild->last->next = first;-
1201 if (!last
!lastDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1202 last = newChild->last;
never executed: last = newChild->last;
0
1203 first = newChild->first;-
1204 }
never executed: end of block
else {
0
1205-
1206 newChild->last->next = refChild;-
1207 newChild->first->prev = refChild->prev;-
1208 refChild->prev->next = newChild->first;-
1209 refChild->prev = newChild->last;-
1210 }
never executed: end of block
0
1211-
1212-
1213-
1214-
1215-
1216 newChild->first = 0;-
1217 newChild->last = 0;-
1218 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1219 }-
1220-
1221-
1222-
1223 newChild->ref.ref();-
1224-
1225 if (newChild->parent()
newChild->parent()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1226 newChild->parent()->removeChild(newChild);
never executed: newChild->parent()->removeChild(newChild);
0
1227-
1228 newChild->setParent(this);-
1229-
1230 if (!refChild
!refChildDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1231 if (first
firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1232 first->prev = newChild;
never executed: first->prev = newChild;
0
1233 newChild->next = first;-
1234 if (!last
!lastDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1235 last = newChild;
never executed: last = newChild;
0
1236 first = newChild;-
1237 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1238 }-
1239-
1240 if (refChild->prev == 0
refChild->prev == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1241 if (first
firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1242 first->prev = newChild;
never executed: first->prev = newChild;
0
1243 newChild->next = first;-
1244 if (!last
!lastDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1245 last = newChild;
never executed: last = newChild;
0
1246 first = newChild;-
1247 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1248 }-
1249-
1250 newChild->next = refChild;-
1251 newChild->prev = refChild->prev;-
1252 refChild->prev->next = newChild;-
1253 refChild->prev = newChild;-
1254-
1255 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1256}-
1257-
1258QDomNodePrivate* QDomNodePrivate::insertAfter(QDomNodePrivate* newChild, QDomNodePrivate* refChild)-
1259{-
1260-
1261 if (!newChild
!newChildDescription
TRUEnever evaluated
FALSEevaluated 2016 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-2016
1262 return
never executed: return 0;
0;
never executed: return 0;
0
1263-
1264-
1265 if (newChild == refChild
newChild == refChildDescription
TRUEnever evaluated
FALSEevaluated 2016 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-2016
1266 return
never executed: return 0;
0;
never executed: return 0;
0
1267-
1268-
1269 if (refChild
refChildDescription
TRUEnever evaluated
FALSEevaluated 2016 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
&& refChild->parent() != this
refChild->parent() != thisDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-2016
1270 return
never executed: return 0;
0;
never executed: return 0;
0
1271-
1272-
1273 QDomDocumentPrivate *const doc = ownerDocument();-
1274 if(doc
docDescription
TRUEevaluated 2016 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-2016
1275 doc->nodeListTime++;
executed 2016 times by 5 tests: doc->nodeListTime++;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2016
1276-
1277-
1278-
1279 if (newChild->isDocumentFragment()
newChild->isDocumentFragment()Description
TRUEnever evaluated
FALSEevaluated 2016 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-2016
1280-
1281 if (newChild->first == 0
newChild->first == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1282 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1283-
1284-
1285 QDomNodePrivate* n = newChild->first;-
1286 while (n
nDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1287 n->setParent(this);-
1288 n = n->next;-
1289 }
never executed: end of block
0
1290-
1291-
1292 if (!refChild
!refChildDescription
TRUEnever evaluated
FALSEnever evaluated
|| refChild->next == 0
refChild->next == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1293 if (last
lastDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1294 last->next = newChild->first;
never executed: last->next = newChild->first;
0
1295 newChild->first->prev = last;-
1296 if (!first
!firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1297 first = newChild->first;
never executed: first = newChild->first;
0
1298 last = newChild->last;-
1299 }
never executed: end of block
else {
0
1300 newChild->first->prev = refChild;-
1301 newChild->last->next = refChild->next;-
1302 refChild->next->prev = newChild->last;-
1303 refChild->next = newChild->first;-
1304 }
never executed: end of block
0
1305-
1306-
1307-
1308-
1309-
1310 newChild->first = 0;-
1311 newChild->last = 0;-
1312 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1313 }-
1314-
1315-
1316 if (newChild->parent()
newChild->parent()Description
TRUEevaluated 868 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1148 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
868-1148
1317 newChild->parent()->removeChild(newChild);
executed 868 times by 4 tests: newChild->parent()->removeChild(newChild);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
868
1318-
1319-
1320-
1321 newChild->ref.ref();-
1322-
1323 newChild->setParent(this);-
1324-
1325-
1326 if (!refChild
!refChildDescription
TRUEevaluated 2016 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-2016
1327 if (last
lastDescription
TRUEevaluated 267 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
FALSEevaluated 1749 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
267-1749
1328 last->next = newChild;
executed 267 times by 4 tests: last->next = newChild;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
267
1329 newChild->prev = last;-
1330 if (!first
!firstDescription
TRUEevaluated 1749 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 267 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
)
267-1749
1331 first = newChild;
executed 1749 times by 5 tests: first = newChild;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1749
1332 last = newChild;-
1333 return
executed 2016 times by 5 tests: return newChild;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
newChild;
executed 2016 times by 5 tests: return newChild;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2016
1334 }-
1335-
1336 if (refChild->next == 0
refChild->next == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1337 if (last
lastDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1338 last->next = newChild;
never executed: last->next = newChild;
0
1339 newChild->prev = last;-
1340 if (!first
!firstDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1341 first = newChild;
never executed: first = newChild;
0
1342 last = newChild;-
1343 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1344 }-
1345-
1346 newChild->prev = refChild;-
1347 newChild->next = refChild->next;-
1348 refChild->next->prev = newChild;-
1349 refChild->next = newChild;-
1350-
1351 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1352}-
1353-
1354QDomNodePrivate* QDomNodePrivate::replaceChild(QDomNodePrivate* newChild, QDomNodePrivate* oldChild)-
1355{-
1356 if (!newChild
!newChildDescription
TRUEnever evaluated
FALSEnever evaluated
|| !oldChild
!oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1357 return
never executed: return 0;
0;
never executed: return 0;
0
1358 if (oldChild->parent() != this
oldChild->parent() != thisDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1359 return
never executed: return 0;
0;
never executed: return 0;
0
1360 if (newChild == oldChild
newChild == oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1361 return
never executed: return 0;
0;
never executed: return 0;
0
1362-
1363-
1364 QDomDocumentPrivate *const doc = ownerDocument();-
1365 if(doc
docDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1366 doc->nodeListTime++;
never executed: doc->nodeListTime++;
0
1367-
1368-
1369-
1370 if (newChild->isDocumentFragment()
newChild->isDocumentFragment()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1371-
1372 if (newChild->first == 0
newChild->first == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1373 return
never executed: return newChild;
newChild;
never executed: return newChild;
0
1374-
1375-
1376 QDomNodePrivate* n = newChild->first;-
1377 while (n
nDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1378 n->setParent(this);-
1379 n = n->next;-
1380 }
never executed: end of block
0
1381-
1382-
1383 if (oldChild->next
oldChild->nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1384 oldChild->next->prev = newChild->last;
never executed: oldChild->next->prev = newChild->last;
0
1385 if (oldChild->prev
oldChild->prevDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1386 oldChild->prev->next = newChild->first;
never executed: oldChild->prev->next = newChild->first;
0
1387-
1388 newChild->last->next = oldChild->next;-
1389 newChild->first->prev = oldChild->prev;-
1390-
1391 if (first == oldChild
first == oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1392 first = newChild->first;
never executed: first = newChild->first;
0
1393 if (last == oldChild
last == oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1394 last = newChild->last;
never executed: last = newChild->last;
0
1395-
1396 oldChild->setNoParent();-
1397 oldChild->next = 0;-
1398 oldChild->prev = 0;-
1399-
1400-
1401-
1402-
1403-
1404 newChild->first = 0;-
1405 newChild->last = 0;-
1406-
1407-
1408 if (oldChild
oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1409 oldChild->ref.deref();
never executed: oldChild->ref.deref();
0
1410-
1411 return
never executed: return oldChild;
oldChild;
never executed: return oldChild;
0
1412 }-
1413-
1414-
1415-
1416 newChild->ref.ref();-
1417-
1418-
1419 if (newChild->parent()
newChild->parent()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1420 newChild->parent()->removeChild(newChild);
never executed: newChild->parent()->removeChild(newChild);
0
1421-
1422 newChild->setParent(this);-
1423-
1424 if (oldChild->next
oldChild->nextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1425 oldChild->next->prev = newChild;
never executed: oldChild->next->prev = newChild;
0
1426 if (oldChild->prev
oldChild->prevDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1427 oldChild->prev->next = newChild;
never executed: oldChild->prev->next = newChild;
0
1428-
1429 newChild->next = oldChild->next;-
1430 newChild->prev = oldChild->prev;-
1431-
1432 if (first == oldChild
first == oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1433 first = newChild;
never executed: first = newChild;
0
1434 if (last == oldChild
last == oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1435 last = newChild;
never executed: last = newChild;
0
1436-
1437 oldChild->setNoParent();-
1438 oldChild->next = 0;-
1439 oldChild->prev = 0;-
1440-
1441-
1442 if (oldChild
oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1443 oldChild->ref.deref();
never executed: oldChild->ref.deref();
0
1444-
1445 return
never executed: return oldChild;
oldChild;
never executed: return oldChild;
0
1446}-
1447-
1448QDomNodePrivate* QDomNodePrivate::removeChild(QDomNodePrivate* oldChild)-
1449{-
1450-
1451 if (oldChild->parent() != this
oldChild->parent() != thisDescription
TRUEnever evaluated
FALSEevaluated 869 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-869
1452 return
never executed: return 0;
0;
never executed: return 0;
0
1453-
1454-
1455 QDomDocumentPrivate *const doc = ownerDocument();-
1456 if(doc
docDescription
TRUEevaluated 869 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-869
1457 doc->nodeListTime++;
executed 869 times by 4 tests: doc->nodeListTime++;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
869
1458-
1459-
1460-
1461 if (oldChild->next == 0
oldChild->next == 0Description
TRUEevaluated 869 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& oldChild->prev == 0
oldChild->prev == 0Description
TRUEevaluated 869 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& first != oldChild
first != oldChildDescription
TRUEevaluated 868 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
)
0-869
1462 return
executed 868 times by 4 tests: return 0;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
0;
executed 868 times by 4 tests: return 0;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
868
1463-
1464 if (oldChild->next
oldChild->nextDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
)
0-1
1465 oldChild->next->prev = oldChild->prev;
never executed: oldChild->next->prev = oldChild->prev;
0
1466 if (oldChild->prev
oldChild->prevDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
)
0-1
1467 oldChild->prev->next = oldChild->next;
never executed: oldChild->prev->next = oldChild->next;
0
1468-
1469 if (last == oldChild
last == oldChildDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
FALSEnever evaluated
)
0-1
1470 last = oldChild->prev;
executed 1 time by 1 test: last = oldChild->prev;
Executed by:
  • tst_qtextdocument - unknown status
1
1471 if (first == oldChild
first == oldChildDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
FALSEnever evaluated
)
0-1
1472 first = oldChild->next;
executed 1 time by 1 test: first = oldChild->next;
Executed by:
  • tst_qtextdocument - unknown status
1
1473-
1474 oldChild->setNoParent();-
1475 oldChild->next = 0;-
1476 oldChild->prev = 0;-
1477-
1478-
1479 oldChild->ref.deref();-
1480-
1481 return
executed 1 time by 1 test: return oldChild;
Executed by:
  • tst_qtextdocument - unknown status
oldChild;
executed 1 time by 1 test: return oldChild;
Executed by:
  • tst_qtextdocument - unknown status
1
1482}-
1483-
1484QDomNodePrivate* QDomNodePrivate::appendChild(QDomNodePrivate* newChild)-
1485{-
1486-
1487 return
executed 2016 times by 5 tests: return insertAfter(newChild, 0);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
insertAfter(newChild, 0);
executed 2016 times by 5 tests: return insertAfter(newChild, 0);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2016
1488}-
1489-
1490QDomDocumentPrivate* QDomNodePrivate::ownerDocument()-
1491{-
1492 QDomNodePrivate* p = this;-
1493 while (p
pDescription
TRUEevaluated 14282 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& !p->isDocument()
!p->isDocument()Description
TRUEevaluated 10529 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 3753 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-14282
1494 if (!p->hasParent
!p->hasParentDescription
TRUEnever evaluated
FALSEevaluated 10529 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-10529
1495 return
never executed: return (QDomDocumentPrivate*)p->ownerNode;
(QDomDocumentPrivate*)p->ownerNode;
never executed: return (QDomDocumentPrivate*)p->ownerNode;
0
1496 p = p->parent();-
1497 }
executed 10529 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
10529
1498-
1499 return
executed 3753 times by 5 tests: return static_cast<QDomDocumentPrivate *>(p);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
static_cast<QDomDocumentPrivate *>(p);
executed 3753 times by 5 tests: return static_cast<QDomDocumentPrivate *>(p);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
3753
1500}-
1501-
1502QDomNodePrivate* QDomNodePrivate::cloneNode(bool deep)-
1503{-
1504 QDomNodePrivate* p = new QDomNodePrivate(this, deep);-
1505-
1506 p->ref.deref();-
1507 return
never executed: return p;
p;
never executed: return p;
0
1508}-
1509-
1510static void qNormalizeNode(QDomNodePrivate* n)-
1511{-
1512 QDomNodePrivate* p = n->first;-
1513 QDomTextPrivate* t = 0;-
1514-
1515 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1516 if (p->isText()
p->isText()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1517 if (t
tDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1518 QDomNodePrivate* tmp = p->next;-
1519 t->appendData(p->nodeValue());-
1520 n->removeChild(p);-
1521 p = tmp;-
1522 }
never executed: end of block
else {
0
1523 t = (QDomTextPrivate*)p;-
1524 p = p->next;-
1525 }
never executed: end of block
0
1526 } else {-
1527 p = p->next;-
1528 t = 0;-
1529 }
never executed: end of block
0
1530 }-
1531}
never executed: end of block
0
1532void QDomNodePrivate::normalize()-
1533{-
1534-
1535-
1536 qNormalizeNode(this);-
1537}
never executed: end of block
0
1538-
1539-
1540-
1541-
1542void QDomNodePrivate::save(QTextStream& s, int depth, int indent) const-
1543{-
1544 const QDomNodePrivate* n = first;-
1545 while (n
nDescription
TRUEevaluated 160 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
) {
94-160
1546 n->save(s, depth, indent);-
1547 n = n->next;-
1548 }
executed 160 times by 1 test: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
160
1549}
executed 94 times by 1 test: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
94
1550-
1551void QDomNodePrivate::setLocation(int lineNumber, int columnNumber)-
1552{-
1553 this->lineNumber = lineNumber;-
1554 this->columnNumber = columnNumber;-
1555}
executed 1148 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1148
1556QDomNode::QDomNode()-
1557{-
1558 impl = 0;-
1559}
executed 247 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
247
1560QDomNode::QDomNode(const QDomNode &n)-
1561{-
1562 impl = n.impl;-
1563 if (impl
implDescription
TRUEevaluated 193 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
)
0-193
1564 impl->ref.ref();
executed 193 times by 1 test: impl->ref.ref();
Executed by:
  • tst_qcssparser - unknown status
193
1565}
executed 193 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
193
1566-
1567-
1568-
1569-
1570QDomNode::QDomNode(QDomNodePrivate *n)-
1571{-
1572 impl = n;-
1573 if (impl
implDescription
TRUEevaluated 418 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
)
0-418
1574 impl->ref.ref();
executed 418 times by 1 test: impl->ref.ref();
Executed by:
  • tst_qcssparser - unknown status
418
1575}
executed 418 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
418
1576QDomNode& QDomNode::operator=(const QDomNode &n)-
1577{-
1578 if (n.impl
n.implDescription
TRUEevaluated 71 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
)
0-71
1579 n.impl->ref.ref();
executed 71 times by 1 test: n.impl->ref.ref();
Executed by:
  • tst_qcssparser - unknown status
71
1580 if (impl
implDescription
TRUEevaluated 71 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEevaluated 71 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-71
1581 delete impl;
never executed: delete impl;
0
1582 impl = n.impl;-
1583 return
executed 71 times by 1 test: return *this;
Executed by:
  • tst_qcssparser - unknown status
*this;
executed 71 times by 1 test: return *this;
Executed by:
  • tst_qcssparser - unknown status
71
1584}-
1585bool QDomNode::operator== (const QDomNode& n) const-
1586{-
1587 return
never executed: return (impl == n.impl);
(impl == n.impl);
never executed: return (impl == n.impl);
0
1588}-
1589-
1590-
1591-
1592-
1593-
1594bool QDomNode::operator!= (const QDomNode& n) const-
1595{-
1596 return
never executed: return (impl != n.impl);
(impl != n.impl);
never executed: return (impl != n.impl);
0
1597}-
1598-
1599-
1600-
1601-
1602QDomNode::~QDomNode()-
1603{-
1604 if (impl
implDescription
TRUEevaluated 855 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEevaluated 244 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 611 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
3-855
1605 delete impl;
executed 244 times by 5 tests: delete impl;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
1606}
executed 858 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
858
1607QString QDomNode::nodeName() const-
1608{-
1609 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1610 return
never executed: return QString();
QString();
never executed: return QString();
0
1611-
1612 if (!((QDomNodePrivate*)impl)->prefix.isEmpty()
!((QDomNodePri...efix.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1613 return
never executed: return ((QDomNodePrivate*)impl)->prefix + QLatin1Char(':') + ((QDomNodePrivate*)impl)->name;
((QDomNodePrivate*)impl)->prefix + QLatin1Char(':') + ((QDomNodePrivate*)impl)->name;
never executed: return ((QDomNodePrivate*)impl)->prefix + QLatin1Char(':') + ((QDomNodePrivate*)impl)->name;
0
1614 return
never executed: return ((QDomNodePrivate*)impl)->name;
((QDomNodePrivate*)impl)->name;
never executed: return ((QDomNodePrivate*)impl)->name;
0
1615}-
1616QString QDomNode::nodeValue() const-
1617{-
1618 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1619 return
never executed: return QString();
QString();
never executed: return QString();
0
1620 return
never executed: return ((QDomNodePrivate*)impl)->value;
((QDomNodePrivate*)impl)->value;
never executed: return ((QDomNodePrivate*)impl)->value;
0
1621}-
1622-
1623-
1624-
1625-
1626-
1627-
1628void QDomNode::setNodeValue(const QString& v)-
1629{-
1630 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1631 return;
never executed: return;
0
1632 ((QDomNodePrivate*)impl)->setNodeValue(v);-
1633}
never executed: end of block
0
1634QDomNode::NodeType QDomNode::nodeType() const-
1635{-
1636 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1637 return
never executed: return QDomNode::BaseNode;
QDomNode::BaseNode;
never executed: return QDomNode::BaseNode;
0
1638 return
never executed: return ((QDomNodePrivate*)impl)->nodeType();
((QDomNodePrivate*)impl)->nodeType();
never executed: return ((QDomNodePrivate*)impl)->nodeType();
0
1639}-
1640-
1641-
1642-
1643-
1644-
1645QDomNode QDomNode::parentNode() const-
1646{-
1647 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 33 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-33
1648 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1649 return
executed 33 times by 1 test: return QDomNode(((QDomNodePrivate*)impl)->parent());
Executed by:
  • tst_qcssparser - unknown status
QDomNode(((QDomNodePrivate*)impl)->parent());
executed 33 times by 1 test: return QDomNode(((QDomNodePrivate*)impl)->parent());
Executed by:
  • tst_qcssparser - unknown status
33
1650}-
1651QDomNodeList QDomNode::childNodes() const-
1652{-
1653 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1654 return
never executed: return QDomNodeList();
QDomNodeList();
never executed: return QDomNodeList();
0
1655 return
never executed: return QDomNodeList(new QDomNodeListPrivate(impl));
QDomNodeList(new QDomNodeListPrivate(impl));
never executed: return QDomNodeList(new QDomNodeListPrivate(impl));
0
1656}-
1657QDomNode QDomNode::firstChild() const-
1658{-
1659 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-79
1660 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1661 return
executed 79 times by 1 test: return QDomNode(((QDomNodePrivate*)impl)->first);
Executed by:
  • tst_qcssparser - unknown status
QDomNode(((QDomNodePrivate*)impl)->first);
executed 79 times by 1 test: return QDomNode(((QDomNodePrivate*)impl)->first);
Executed by:
  • tst_qcssparser - unknown status
79
1662}-
1663QDomNode QDomNode::lastChild() const-
1664{-
1665 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1666 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1667 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->last);
QDomNode(((QDomNodePrivate*)impl)->last);
never executed: return QDomNode(((QDomNodePrivate*)impl)->last);
0
1668}-
1669QDomNode QDomNode::previousSibling() const-
1670{-
1671 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-1
1672 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1673 return
executed 1 time by 1 test: return QDomNode(((QDomNodePrivate*)impl)->prev);
Executed by:
  • tst_qcssparser - unknown status
QDomNode(((QDomNodePrivate*)impl)->prev);
executed 1 time by 1 test: return QDomNode(((QDomNodePrivate*)impl)->prev);
Executed by:
  • tst_qcssparser - unknown status
1
1674}-
1675QDomNode QDomNode::nextSibling() const-
1676{-
1677 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1678 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1679 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->next);
QDomNode(((QDomNodePrivate*)impl)->next);
never executed: return QDomNode(((QDomNodePrivate*)impl)->next);
0
1680}-
1681QDomNamedNodeMap QDomNode::attributes() const-
1682{-
1683 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
|| !impl->isElement()
!impl->isElement()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1684 return
never executed: return QDomNamedNodeMap();
QDomNamedNodeMap();
never executed: return QDomNamedNodeMap();
0
1685-
1686 return
never executed: return QDomNamedNodeMap(static_cast<QDomElementPrivate *>(impl)->attributes());
QDomNamedNodeMap(static_cast<QDomElementPrivate *>(impl)->attributes());
never executed: return QDomNamedNodeMap(static_cast<QDomElementPrivate *>(impl)->attributes());
0
1687}-
1688-
1689-
1690-
1691-
1692QDomDocument QDomNode::ownerDocument() const-
1693{-
1694 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1695 return
never executed: return QDomDocument();
QDomDocument();
never executed: return QDomDocument();
0
1696 return
never executed: return QDomDocument(((QDomNodePrivate*)impl)->ownerDocument());
QDomDocument(((QDomNodePrivate*)impl)->ownerDocument());
never executed: return QDomDocument(((QDomNodePrivate*)impl)->ownerDocument());
0
1697}-
1698QDomNode QDomNode::cloneNode(bool deep) const-
1699{-
1700 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1701 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1702 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->cloneNode(deep));
QDomNode(((QDomNodePrivate*)impl)->cloneNode(deep));
never executed: return QDomNode(((QDomNodePrivate*)impl)->cloneNode(deep));
0
1703}-
1704-
1705-
1706-
1707-
1708-
1709-
1710-
1711void QDomNode::normalize()-
1712{-
1713 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1714 return;
never executed: return;
0
1715 ((QDomNodePrivate*)impl)->normalize();-
1716}
never executed: end of block
0
1717bool QDomNode::isSupported(const QString& feature, const QString& version) const-
1718{-
1719 QDomImplementation i;-
1720 return
never executed: return i.hasFeature(feature, version);
i.hasFeature(feature, version);
never executed: return i.hasFeature(feature, version);
0
1721}-
1722QString QDomNode::namespaceURI() const-
1723{-
1724 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1725 return
never executed: return QString();
QString();
never executed: return QString();
0
1726 return
never executed: return ((QDomNodePrivate*)impl)->namespaceURI;
((QDomNodePrivate*)impl)->namespaceURI;
never executed: return ((QDomNodePrivate*)impl)->namespaceURI;
0
1727}-
1728QString QDomNode::prefix() const-
1729{-
1730 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1731 return
never executed: return QString();
QString();
never executed: return QString();
0
1732 return
never executed: return ((QDomNodePrivate*)impl)->prefix;
((QDomNodePrivate*)impl)->prefix;
never executed: return ((QDomNodePrivate*)impl)->prefix;
0
1733}-
1734void QDomNode::setPrefix(const QString& pre)-
1735{-
1736 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
|| ((
((QDomNodePriv...refix.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
QDomNodePrivate*)impl)->prefix.isNull()
((QDomNodePriv...refix.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1737 return;
never executed: return;
0
1738 if (isAttr()
isAttr()Description
TRUEnever evaluated
FALSEnever evaluated
|| isElement()
isElement()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1739 ((
never executed: ((QDomNodePrivate*)impl)->prefix = pre;
QDomNodePrivate*)impl)->prefix = pre;
never executed: ((QDomNodePrivate*)impl)->prefix = pre;
0
1740}
never executed: end of block
0
1741QString QDomNode::localName() const-
1742{-
1743 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
|| ((
((QDomNodePriv...hDom1InterfaceDescription
TRUEnever evaluated
FALSEnever evaluated
QDomNodePrivate*)impl)->createdWithDom1Interface
((QDomNodePriv...hDom1InterfaceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1744 return
never executed: return QString();
QString();
never executed: return QString();
0
1745 return
never executed: return ((QDomNodePrivate*)impl)->name;
((QDomNodePrivate*)impl)->name;
never executed: return ((QDomNodePrivate*)impl)->name;
0
1746}-
1747-
1748-
1749-
1750-
1751-
1752-
1753bool QDomNode::hasAttributes() const-
1754{-
1755 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
|| !impl->isElement()
!impl->isElement()Description
TRUEnever evaluated
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-26
1756 return
never executed: return false;
false;
never executed: return false;
0
1757 return
executed 26 times by 1 test: return static_cast<QDomElementPrivate *>(impl)->hasAttributes();
Executed by:
  • tst_qcssparser - unknown status
static_cast<QDomElementPrivate *>(impl)->hasAttributes();
executed 26 times by 1 test: return static_cast<QDomElementPrivate *>(impl)->hasAttributes();
Executed by:
  • tst_qcssparser - unknown status
26
1758}-
1759QDomNode QDomNode::insertBefore(const QDomNode& newChild, const QDomNode& refChild)-
1760{-
1761 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1762 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1763 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->insertBefore(newChild.impl, refChild.impl));
QDomNode(((QDomNodePrivate*)impl)->insertBefore(newChild.impl, refChild.impl));
never executed: return QDomNode(((QDomNodePrivate*)impl)->insertBefore(newChild.impl, refChild.impl));
0
1764}-
1765QDomNode QDomNode::insertAfter(const QDomNode& newChild, const QDomNode& refChild)-
1766{-
1767 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1768 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1769 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->insertAfter(newChild.impl, refChild.impl));
QDomNode(((QDomNodePrivate*)impl)->insertAfter(newChild.impl, refChild.impl));
never executed: return QDomNode(((QDomNodePrivate*)impl)->insertAfter(newChild.impl, refChild.impl));
0
1770}-
1771QDomNode QDomNode::replaceChild(const QDomNode& newChild, const QDomNode& oldChild)-
1772{-
1773 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
|| !newChild.impl
!newChild.implDescription
TRUEnever evaluated
FALSEnever evaluated
|| !oldChild.impl
!oldChild.implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1774 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1775 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->replaceChild(newChild.impl, oldChild.impl));
QDomNode(((QDomNodePrivate*)impl)->replaceChild(newChild.impl, oldChild.impl));
never executed: return QDomNode(((QDomNodePrivate*)impl)->replaceChild(newChild.impl, oldChild.impl));
0
1776}-
1777QDomNode QDomNode::removeChild(const QDomNode& oldChild)-
1778{-
1779 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1780 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1781-
1782 if (oldChild.isNull()
oldChild.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1783 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1784-
1785 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->removeChild(oldChild.impl));
QDomNode(((QDomNodePrivate*)impl)->removeChild(oldChild.impl));
never executed: return QDomNode(((QDomNodePrivate*)impl)->removeChild(oldChild.impl));
0
1786}-
1787QDomNode QDomNode::appendChild(const QDomNode& newChild)-
1788{-
1789 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1790 QMessageLogger(__FILE__, 2604, __PRETTY_FUNCTION__).warning("Calling appendChild() on a null node does nothing.");-
1791 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1792 }-
1793 return
never executed: return QDomNode(((QDomNodePrivate*)impl)->appendChild(newChild.impl));
QDomNode(((QDomNodePrivate*)impl)->appendChild(newChild.impl));
never executed: return QDomNode(((QDomNodePrivate*)impl)->appendChild(newChild.impl));
0
1794}-
1795-
1796-
1797-
1798-
1799-
1800bool QDomNode::hasChildNodes() const-
1801{-
1802 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1803 return
never executed: return false;
false;
never executed: return false;
0
1804 return
never executed: return ((QDomNodePrivate*)impl)->first != 0;
((QDomNodePrivate*)impl)->first != 0;
never executed: return ((QDomNodePrivate*)impl)->first != 0;
0
1805}-
1806-
1807-
1808-
1809-
1810-
1811bool QDomNode::isNull() const-
1812{-
1813 return
executed 154 times by 1 test: return (impl == 0);
Executed by:
  • tst_qcssparser - unknown status
(impl == 0);
executed 154 times by 1 test: return (impl == 0);
Executed by:
  • tst_qcssparser - unknown status
154
1814}-
1815-
1816-
1817-
1818-
1819-
1820-
1821-
1822void QDomNode::clear()-
1823{-
1824 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1825 delete impl;
never executed: delete impl;
0
1826 impl = 0;-
1827}
never executed: end of block
0
1828QDomNode QDomNode::namedItem(const QString& name) const-
1829{-
1830 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 49 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-49
1831 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
1832 return
executed 49 times by 1 test: return QDomNode(impl->namedItem(name));
Executed by:
  • tst_qcssparser - unknown status
QDomNode(impl->namedItem(name));
executed 49 times by 1 test: return QDomNode(impl->namedItem(name));
Executed by:
  • tst_qcssparser - unknown status
49
1833}-
1834void QDomNode::save(QTextStream& stream, int indent, EncodingPolicy encodingPolicy) const-
1835{-
1836 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-86
1837 return;
never executed: return;
0
1838-
1839 if(isDocument()
isDocument()Description
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-86
1840 static_cast<const
executed 86 times by 2 tests: static_cast<const QDomDocumentPrivate *>(impl)->saveDocument(stream, indent, encodingPolicy);
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
QDomDocumentPrivate *>(impl)->saveDocument(stream, indent, encodingPolicy);
executed 86 times by 2 tests: static_cast<const QDomDocumentPrivate *>(impl)->saveDocument(stream, indent, encodingPolicy);
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
1841 else-
1842 ((
never executed: ((QDomNodePrivate*)impl)->save(stream, 1, indent);
QDomNodePrivate*)impl)->save(stream, 1, indent);
never executed: ((QDomNodePrivate*)impl)->save(stream, 1, indent);
0
1843}-
1844-
1845-
1846-
1847-
1848-
1849-
1850-
1851QTextStream& operator<<(QTextStream& str, const QDomNode& node)-
1852{-
1853 node.save(str, 1);-
1854-
1855 return
never executed: return str;
str;
never executed: return str;
0
1856}-
1857bool QDomNode::isAttr() const-
1858{-
1859 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1860 return
never executed: return impl->isAttr();
impl->isAttr();
never executed: return impl->isAttr();
0
1861 return
never executed: return false;
false;
never executed: return false;
0
1862}-
1863bool QDomNode::isCDATASection() const-
1864{-
1865 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1866 return
never executed: return impl->isCDATASection();
impl->isCDATASection();
never executed: return impl->isCDATASection();
0
1867 return
never executed: return false;
false;
never executed: return false;
0
1868}-
1869bool QDomNode::isDocumentFragment() const-
1870{-
1871 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1872 return
never executed: return impl->isDocumentFragment();
impl->isDocumentFragment();
never executed: return impl->isDocumentFragment();
0
1873 return
never executed: return false;
false;
never executed: return false;
0
1874}-
1875bool QDomNode::isDocument() const-
1876{-
1877 if(impl
implDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-86
1878 return
executed 86 times by 2 tests: return impl->isDocument();
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
impl->isDocument();
executed 86 times by 2 tests: return impl->isDocument();
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
1879 return
never executed: return false;
false;
never executed: return false;
0
1880}-
1881bool QDomNode::isDocumentType() const-
1882{-
1883 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1884 return
never executed: return impl->isDocumentType();
impl->isDocumentType();
never executed: return impl->isDocumentType();
0
1885 return
never executed: return false;
false;
never executed: return false;
0
1886}-
1887bool QDomNode::isElement() const-
1888{-
1889 if(impl
implDescription
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
)
0-80
1890 return
executed 80 times by 1 test: return impl->isElement();
Executed by:
  • tst_qcssparser - unknown status
impl->isElement();
executed 80 times by 1 test: return impl->isElement();
Executed by:
  • tst_qcssparser - unknown status
80
1891 return
never executed: return false;
false;
never executed: return false;
0
1892}-
1893bool QDomNode::isEntityReference() const-
1894{-
1895 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1896 return
never executed: return impl->isEntityReference();
impl->isEntityReference();
never executed: return impl->isEntityReference();
0
1897 return
never executed: return false;
false;
never executed: return false;
0
1898}-
1899bool QDomNode::isText() const-
1900{-
1901 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1902 return
never executed: return impl->isText();
impl->isText();
never executed: return impl->isText();
0
1903 return
never executed: return false;
false;
never executed: return false;
0
1904}-
1905bool QDomNode::isEntity() const-
1906{-
1907 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1908 return
never executed: return impl->isEntity();
impl->isEntity();
never executed: return impl->isEntity();
0
1909 return
never executed: return false;
false;
never executed: return false;
0
1910}-
1911bool QDomNode::isNotation() const-
1912{-
1913 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1914 return
never executed: return impl->isNotation();
impl->isNotation();
never executed: return impl->isNotation();
0
1915 return
never executed: return false;
false;
never executed: return false;
0
1916}-
1917bool QDomNode::isProcessingInstruction() const-
1918{-
1919 if(impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1920 return
never executed: return impl->isProcessingInstruction();
impl->isProcessingInstruction();
never executed: return impl->isProcessingInstruction();
0
1921 return
never executed: return false;
false;
never executed: return false;
0
1922}-
1923bool QDomNode::isCharacterData() const-
1924{-
1925 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1926 return
never executed: return impl->isCharacterData();
impl->isCharacterData();
never executed: return impl->isCharacterData();
0
1927 return
never executed: return false;
false;
never executed: return false;
0
1928}-
1929bool QDomNode::isComment() const-
1930{-
1931 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1932 return
never executed: return impl->isComment();
impl->isComment();
never executed: return impl->isComment();
0
1933 return
never executed: return false;
false;
never executed: return false;
0
1934}-
1935QDomElement QDomNode::firstChildElement(const QString &tagName) const-
1936{-
1937 for (QDomNode child = firstChild(); !child.isNull()
!child.isNull()Description
TRUEevaluated 79 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
; child = child.nextSibling()) {
0-79
1938 if (child.isElement()
child.isElement()Description
TRUEevaluated 79 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
) {
0-79
1939 QDomElement elt = child.toElement();-
1940 if (tagName.isEmpty()
tagName.isEmpty()Description
TRUEevaluated 79 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
|| elt.tagName() == tagName
elt.tagName() == tagNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-79
1941 return
executed 79 times by 1 test: return elt;
Executed by:
  • tst_qcssparser - unknown status
elt;
executed 79 times by 1 test: return elt;
Executed by:
  • tst_qcssparser - unknown status
79
1942 }
never executed: end of block
0
1943 }
never executed: end of block
0
1944 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
1945}-
1946QDomElement QDomNode::lastChildElement(const QString &tagName) const-
1947{-
1948 for (QDomNode child = lastChild(); !child.isNull()
!child.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
; child = child.previousSibling()) {
0
1949 if (child.isElement()
child.isElement()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1950 QDomElement elt = child.toElement();-
1951 if (tagName.isEmpty()
tagName.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| elt.tagName() == tagName
elt.tagName() == tagNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1952 return
never executed: return elt;
elt;
never executed: return elt;
0
1953 }
never executed: end of block
0
1954 }
never executed: end of block
0
1955 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
1956}-
1957QDomElement QDomNode::nextSiblingElement(const QString &tagName) const-
1958{-
1959 for (QDomNode sib = nextSibling(); !sib.isNull()
!sib.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
; sib = sib.nextSibling()) {
0
1960 if (sib.isElement()
sib.isElement()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1961 QDomElement elt = sib.toElement();-
1962 if (tagName.isEmpty()
tagName.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| elt.tagName() == tagName
elt.tagName() == tagNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1963 return
never executed: return elt;
elt;
never executed: return elt;
0
1964 }
never executed: end of block
0
1965 }
never executed: end of block
0
1966 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
1967}-
1968QDomElement QDomNode::previousSiblingElement(const QString &tagName) const-
1969{-
1970 for (QDomNode sib = previousSibling(); !sib.isNull()
!sib.isNull()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
; sib = sib.previousSibling()) {
0-1
1971 if (sib.isElement()
sib.isElement()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
) {
0-1
1972 QDomElement elt = sib.toElement();-
1973 if (tagName.isEmpty()
tagName.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
|| elt.tagName() == tagName
elt.tagName() == tagNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1
1974 return
executed 1 time by 1 test: return elt;
Executed by:
  • tst_qcssparser - unknown status
elt;
executed 1 time by 1 test: return elt;
Executed by:
  • tst_qcssparser - unknown status
1
1975 }
never executed: end of block
0
1976 }
never executed: end of block
0
1977 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
1978}-
1979int QDomNode::lineNumber() const-
1980{-
1981 return
never executed: return impl ? impl->lineNumber : -1;
impl ? impl->lineNumber : -1;
never executed: return impl ? impl->lineNumber : -1;
0
1982}-
1983int QDomNode::columnNumber() const-
1984{-
1985 return
never executed: return impl ? impl->columnNumber : -1;
impl ? impl->columnNumber : -1;
never executed: return impl ? impl->columnNumber : -1;
0
1986}-
1987QDomNamedNodeMapPrivate::QDomNamedNodeMapPrivate(QDomNodePrivate* n) : ref(1)-
1988{-
1989 readonly = false;-
1990 parent = n;-
1991 appendToParent = false;-
1992}
executed 1999 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1999
1993-
1994QDomNamedNodeMapPrivate::~QDomNamedNodeMapPrivate()-
1995{-
1996 clearMap();-
1997}
executed 1999 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1999
1998-
1999QDomNamedNodeMapPrivate* QDomNamedNodeMapPrivate::clone(QDomNodePrivate* p)-
2000{-
2001 QScopedPointer<QDomNamedNodeMapPrivate> m(new QDomNamedNodeMapPrivate(p));-
2002 m->readonly = readonly;-
2003 m->appendToParent = appendToParent;-
2004-
2005 QHash<QString, QDomNodePrivate*>::const_iterator it = map.constBegin();-
2006 for (; it != map.constEnd()
it != map.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
2007 QDomNodePrivate *new_node = (*it)->cloneNode();-
2008 new_node->setParent(p);-
2009 m->setNamedItem(new_node);-
2010 }
never executed: end of block
0
2011-
2012-
2013 m->ref.deref();-
2014 return
never executed: return m.take();
m.take();
never executed: return m.take();
0
2015}-
2016-
2017void QDomNamedNodeMapPrivate::clearMap()-
2018{-
2019-
2020 if (!appendToParent
!appendToParentDescription
TRUEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 976 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
976-1023
2021 QHash<QString, QDomNodePrivate *>::const_iterator it = map.constBegin();-
2022 for (; it != map.constEnd()
it != map.constEnd()Description
TRUEevaluated 867 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
; ++it)
867-1023
2023 if (!(*it)->ref.deref()
!(*it)->ref.deref()Description
TRUEevaluated 867 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-867
2024 delete *it;
executed 867 times by 4 tests: delete *it;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
867
2025 }
executed 1023 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1023
2026 map.clear();-
2027}
executed 1999 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1999
2028-
2029QDomNodePrivate* QDomNamedNodeMapPrivate::namedItem(const QString& name) const-
2030{-
2031 QDomNodePrivate* p = map[name];-
2032 return
executed 900 times by 3 tests: return p;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
p;
executed 900 times by 3 tests: return p;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
900
2033}-
2034-
2035QDomNodePrivate* QDomNamedNodeMapPrivate::namedItemNS(const QString& nsURI, const QString& localName) const-
2036{-
2037 QHash<QString, QDomNodePrivate *>::const_iterator it = map.constBegin();-
2038 QDomNodePrivate *n;-
2039 for (; it != map.constEnd()
it != map.constEnd()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
; ++it) {
0-2
2040 n = *it;-
2041 if (!n->prefix.isNull()
!n->prefix.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2042-
2043 if (n->namespaceURI == nsURI
n->namespaceURI == nsURIDescription
TRUEnever evaluated
FALSEnever evaluated
&& n->name == localName
n->name == localNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2044 return
never executed: return n;
n;
never executed: return n;
0
2045 }
never executed: end of block
0
2046 }
never executed: end of block
0
2047 return
executed 2 times by 1 test: return 0;
Executed by:
  • tst_qxmlsimplereader - unknown status
0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_qxmlsimplereader - unknown status
2
2048}-
2049-
2050QDomNodePrivate* QDomNamedNodeMapPrivate::setNamedItem(QDomNodePrivate* arg)-
2051{-
2052 if (readonly
readonlyDescription
TRUEnever evaluated
FALSEevaluated 867 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
|| !arg
!argDescription
TRUEnever evaluated
FALSEevaluated 867 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-867
2053 return
never executed: return 0;
0;
never executed: return 0;
0
2054-
2055 if (appendToParent
appendToParentDescription
TRUEnever evaluated
FALSEevaluated 867 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-867
2056 return
never executed: return parent->appendChild(arg);
parent->appendChild(arg);
never executed: return parent->appendChild(arg);
0
2057-
2058 QDomNodePrivate *n = map.value(arg->nodeName());-
2059-
2060 arg->ref.ref();-
2061 map.insertMulti(arg->nodeName(), arg);-
2062 return
executed 867 times by 4 tests: return n;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
n;
executed 867 times by 4 tests: return n;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
867
2063}-
2064-
2065QDomNodePrivate* QDomNamedNodeMapPrivate::setNamedItemNS(QDomNodePrivate* arg)-
2066{-
2067 if (readonly
readonlyDescription
TRUEnever evaluated
FALSEnever evaluated
|| !arg
!argDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2068 return
never executed: return 0;
0;
never executed: return 0;
0
2069-
2070 if (appendToParent
appendToParentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2071 return
never executed: return parent->appendChild(arg);
parent->appendChild(arg);
never executed: return parent->appendChild(arg);
0
2072-
2073 if (!arg->prefix.isNull()
!arg->prefix.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2074-
2075 QDomNodePrivate *n = namedItemNS(arg->namespaceURI, arg->name);-
2076-
2077 arg->ref.ref();-
2078 map.insertMulti(arg->nodeName(), arg);-
2079 return
never executed: return n;
n;
never executed: return n;
0
2080 } else {-
2081-
2082 return
never executed: return setNamedItem(arg);
setNamedItem(arg);
never executed: return setNamedItem(arg);
0
2083 }-
2084}-
2085-
2086QDomNodePrivate* QDomNamedNodeMapPrivate::removeNamedItem(const QString& name)-
2087{-
2088 if (readonly
readonlyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2089 return
never executed: return 0;
0;
never executed: return 0;
0
2090-
2091 QDomNodePrivate* p = namedItem(name);-
2092 if (p == 0
p == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2093 return
never executed: return 0;
0;
never executed: return 0;
0
2094 if (appendToParent
appendToParentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2095 return
never executed: return parent->removeChild(p);
parent->removeChild(p);
never executed: return parent->removeChild(p);
0
2096-
2097 map.remove(p->nodeName());-
2098-
2099 p->ref.deref();-
2100 return
never executed: return p;
p;
never executed: return p;
0
2101}-
2102-
2103QDomNodePrivate* QDomNamedNodeMapPrivate::item(int index) const-
2104{-
2105 if (index >= length()
index >= length()Description
TRUEnever evaluated
FALSEnever evaluated
|| index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2106 return
never executed: return 0;
0;
never executed: return 0;
0
2107 return
never executed: return *(map.constBegin() + index);
*(map.constBegin() + index);
never executed: return *(map.constBegin() + index);
0
2108}-
2109-
2110int QDomNamedNodeMapPrivate::length() const-
2111{-
2112 return
executed 26 times by 1 test: return map.count();
Executed by:
  • tst_qcssparser - unknown status
map.count();
executed 26 times by 1 test: return map.count();
Executed by:
  • tst_qcssparser - unknown status
26
2113}-
2114-
2115bool QDomNamedNodeMapPrivate::contains(const QString& name) const-
2116{-
2117 return
never executed: return map.value(name) != 0;
map.value(name) != 0;
never executed: return map.value(name) != 0;
0
2118}-
2119-
2120bool QDomNamedNodeMapPrivate::containsNS(const QString& nsURI, const QString & localName) const-
2121{-
2122 return
never executed: return namedItemNS(nsURI, localName) != 0;
namedItemNS(nsURI, localName) != 0;
never executed: return namedItemNS(nsURI, localName) != 0;
0
2123}-
2124QDomNamedNodeMap::QDomNamedNodeMap()-
2125{-
2126 impl = 0;-
2127}
never executed: end of block
0
2128-
2129-
2130-
2131-
2132QDomNamedNodeMap::QDomNamedNodeMap(const QDomNamedNodeMap &n)-
2133{-
2134 impl = n.impl;-
2135 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2136 impl->ref.ref();
never executed: impl->ref.ref();
0
2137}
never executed: end of block
0
2138-
2139QDomNamedNodeMap::QDomNamedNodeMap(QDomNamedNodeMapPrivate *n)-
2140{-
2141 impl = n;-
2142 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2143 impl->ref.ref();
never executed: impl->ref.ref();
0
2144}
never executed: end of block
0
2145-
2146-
2147-
2148-
2149QDomNamedNodeMap& QDomNamedNodeMap::operator=(const QDomNamedNodeMap &n)-
2150{-
2151 if (n.impl
n.implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2152 n.impl->ref.ref();
never executed: n.impl->ref.ref();
0
2153 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2154 delete impl;
never executed: delete impl;
0
2155 impl = n.impl;-
2156 return
never executed: return *this;
*this;
never executed: return *this;
0
2157}-
2158-
2159-
2160-
2161-
2162-
2163bool QDomNamedNodeMap::operator== (const QDomNamedNodeMap& n) const-
2164{-
2165 return
never executed: return (impl == n.impl);
(impl == n.impl);
never executed: return (impl == n.impl);
0
2166}-
2167-
2168-
2169-
2170-
2171-
2172bool QDomNamedNodeMap::operator!= (const QDomNamedNodeMap& n) const-
2173{-
2174 return
never executed: return (impl != n.impl);
(impl != n.impl);
never executed: return (impl != n.impl);
0
2175}-
2176-
2177-
2178-
2179-
2180QDomNamedNodeMap::~QDomNamedNodeMap()-
2181{-
2182 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& !impl->ref.deref()
!impl->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2183 delete impl;
never executed: delete impl;
0
2184}
never executed: end of block
0
2185QDomNode QDomNamedNodeMap::namedItem(const QString& name) const-
2186{-
2187 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2188 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2189 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->namedItem(name));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->namedItem(name));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->namedItem(name));
0
2190}-
2191QDomNode QDomNamedNodeMap::setNamedItem(const QDomNode& newNode)-
2192{-
2193 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2194 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2195 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->setNamedItem((QDomNodePrivate*)newNode.impl));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->setNamedItem((QDomNodePrivate*)newNode.impl));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->setNamedItem((QDomNodePrivate*)newNode.impl));
0
2196}-
2197QDomNode QDomNamedNodeMap::removeNamedItem(const QString& name)-
2198{-
2199 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2200 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2201 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->removeNamedItem(name));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->removeNamedItem(name));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->removeNamedItem(name));
0
2202}-
2203QDomNode QDomNamedNodeMap::item(int index) const-
2204{-
2205 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2206 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2207 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->item(index));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->item(index));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->item(index));
0
2208}-
2209QDomNode QDomNamedNodeMap::namedItemNS(const QString& nsURI, const QString& localName) const-
2210{-
2211 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2212 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2213 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->namedItemNS(nsURI, localName));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->namedItemNS(nsURI, localName));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->namedItemNS(nsURI, localName));
0
2214}-
2215QDomNode QDomNamedNodeMap::setNamedItemNS(const QDomNode& newNode)-
2216{-
2217 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2218 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2219 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->setNamedItemNS((QDomNodePrivate*)newNode.impl));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->setNamedItemNS((QDomNodePrivate*)newNode.impl));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->setNamedItemNS((QDomNodePrivate*)newNode.impl));
0
2220}-
2221QDomNode QDomNamedNodeMap::removeNamedItemNS(const QString& nsURI, const QString& localName)-
2222{-
2223 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2224 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2225 QDomNodePrivate *n = ((QDomNamedNodeMapPrivate*)impl)->namedItemNS(nsURI, localName);-
2226 if (!n
!nDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2227 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
2228 return
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->removeNamedItem(n->name));
QDomNode(((QDomNamedNodeMapPrivate*)impl)->removeNamedItem(n->name));
never executed: return QDomNode(((QDomNamedNodeMapPrivate*)impl)->removeNamedItem(n->name));
0
2229}-
2230-
2231-
2232-
2233-
2234-
2235-
2236int QDomNamedNodeMap::length() const-
2237{-
2238 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2239 return
never executed: return 0;
0;
never executed: return 0;
0
2240 return
never executed: return ((QDomNamedNodeMapPrivate*)impl)->length();
((QDomNamedNodeMapPrivate*)impl)->length();
never executed: return ((QDomNamedNodeMapPrivate*)impl)->length();
0
2241}-
2242bool QDomNamedNodeMap::contains(const QString& name) const-
2243{-
2244 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2245 return
never executed: return false;
false;
never executed: return false;
0
2246 return
never executed: return ((QDomNamedNodeMapPrivate*)impl)->contains(name);
((QDomNamedNodeMapPrivate*)impl)->contains(name);
never executed: return ((QDomNamedNodeMapPrivate*)impl)->contains(name);
0
2247}-
2248QDomDocumentTypePrivate::QDomDocumentTypePrivate(QDomDocumentPrivate* doc, QDomNodePrivate* parent)-
2249 : QDomNodePrivate(doc, parent)-
2250{-
2251 init();-
2252}
executed 488 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
488
2253-
2254QDomDocumentTypePrivate::QDomDocumentTypePrivate(QDomDocumentTypePrivate* n, bool deep)-
2255 : QDomNodePrivate(n, deep)-
2256{-
2257 init();-
2258-
2259 QDomNodePrivate* p = first;-
2260 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2261 if (p->isEntity()
p->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2262-
2263 entities->map.insertMulti(p->nodeName(), p);
never executed: entities->map.insertMulti(p->nodeName(), p);
0
2264 if (p->isNotation()
p->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2265-
2266 notations->map.insertMulti(p->nodeName(), p);
never executed: notations->map.insertMulti(p->nodeName(), p);
0
2267 p = p->next;-
2268 }
never executed: end of block
0
2269}
never executed: end of block
0
2270-
2271QDomDocumentTypePrivate::~QDomDocumentTypePrivate()-
2272{-
2273 if (!entities->ref.deref()
!entities->ref.deref()Description
TRUEevaluated 488 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-488
2274 delete entities;
executed 488 times by 5 tests: delete entities;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
488
2275 if (!notations->ref.deref()
!notations->ref.deref()Description
TRUEevaluated 488 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-488
2276 delete notations;
executed 488 times by 5 tests: delete notations;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
488
2277}
executed 488 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
488
2278-
2279void QDomDocumentTypePrivate::init()-
2280{-
2281 entities = new QDomNamedNodeMapPrivate(this);-
2282 if (true) {-
2283 notations = new QDomNamedNodeMapPrivate(this);-
2284 publicId.clear();-
2285 systemId.clear();-
2286 internalSubset.clear();-
2287-
2288 entities->setAppendToParent(true);-
2289 notations->setAppendToParent(true);-
2290 }
executed 488 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
else {
dead code: { delete entities; qt_noop(); }
-
2291 delete entities;
dead code: { delete entities; qt_noop(); }
-
2292 qt_noop();
dead code: { delete entities; qt_noop(); }
-
2293 }
dead code: { delete entities; qt_noop(); }
-
2294}-
2295-
2296QDomNodePrivate* QDomDocumentTypePrivate::cloneNode(bool deep)-
2297{-
2298 QDomNodePrivate* p = new QDomDocumentTypePrivate(this, deep);-
2299-
2300 p->ref.deref();-
2301 return
never executed: return p;
p;
never executed: return p;
0
2302}-
2303-
2304QDomNodePrivate* QDomDocumentTypePrivate::insertBefore(QDomNodePrivate* newChild, QDomNodePrivate* refChild)-
2305{-
2306-
2307 QDomNodePrivate* p = QDomNodePrivate::insertBefore(newChild, refChild);-
2308-
2309 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->isEntity()
p->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2310 entities->map.insertMulti(p->nodeName(), p);
never executed: entities->map.insertMulti(p->nodeName(), p);
0
2311 else if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->isNotation()
p->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2312 notations->map.insertMulti(p->nodeName(), p);
never executed: notations->map.insertMulti(p->nodeName(), p);
0
2313-
2314 return
never executed: return p;
p;
never executed: return p;
0
2315}-
2316-
2317QDomNodePrivate* QDomDocumentTypePrivate::insertAfter(QDomNodePrivate* newChild, QDomNodePrivate* refChild)-
2318{-
2319-
2320 QDomNodePrivate* p = QDomNodePrivate::insertAfter(newChild, refChild);-
2321-
2322 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->isEntity()
p->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2323 entities->map.insertMulti(p->nodeName(), p);
never executed: entities->map.insertMulti(p->nodeName(), p);
0
2324 else if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->isNotation()
p->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2325 notations->map.insertMulti(p->nodeName(), p);
never executed: notations->map.insertMulti(p->nodeName(), p);
0
2326-
2327 return
never executed: return p;
p;
never executed: return p;
0
2328}-
2329-
2330QDomNodePrivate* QDomDocumentTypePrivate::replaceChild(QDomNodePrivate* newChild, QDomNodePrivate* oldChild)-
2331{-
2332-
2333 QDomNodePrivate* p = QDomNodePrivate::replaceChild(newChild, oldChild);-
2334-
2335 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2336 if (oldChild
oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
&& oldChild->isEntity()
oldChild->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2337 entities->map.remove(oldChild->nodeName());
never executed: entities->map.remove(oldChild->nodeName());
0
2338 else if (oldChild
oldChildDescription
TRUEnever evaluated
FALSEnever evaluated
&& oldChild->isNotation()
oldChild->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2339 notations->map.remove(oldChild->nodeName());
never executed: notations->map.remove(oldChild->nodeName());
0
2340-
2341 if (p->isEntity()
p->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2342 entities->map.insertMulti(p->nodeName(), p);
never executed: entities->map.insertMulti(p->nodeName(), p);
0
2343 else if (p->isNotation()
p->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2344 notations->map.insertMulti(p->nodeName(), p);
never executed: notations->map.insertMulti(p->nodeName(), p);
0
2345 }
never executed: end of block
0
2346-
2347 return
never executed: return p;
p;
never executed: return p;
0
2348}-
2349-
2350QDomNodePrivate* QDomDocumentTypePrivate::removeChild(QDomNodePrivate* oldChild)-
2351{-
2352-
2353 QDomNodePrivate* p = QDomNodePrivate::removeChild( oldChild);-
2354-
2355 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->isEntity()
p->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2356 entities->map.remove(p->nodeName());
never executed: entities->map.remove(p->nodeName());
0
2357 else if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->isNotation()
p->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2358 notations->map.remove(p ->nodeName());
never executed: notations->map.remove(p ->nodeName());
0
2359-
2360 return
never executed: return p;
p;
never executed: return p;
0
2361}-
2362-
2363QDomNodePrivate* QDomDocumentTypePrivate::appendChild(QDomNodePrivate* newChild)-
2364{-
2365 return
never executed: return insertAfter(newChild, 0);
insertAfter(newChild, 0);
never executed: return insertAfter(newChild, 0);
0
2366}-
2367-
2368static QString quotedValue(const QString &data)-
2369{-
2370 QChar quote = data.indexOf(QLatin1Char('\'')) == -1
data.indexOf(Q...r('\'')) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
2371 ? QLatin1Char('\'')-
2372 : QLatin1Char('"');-
2373 return
never executed: return quote + data + quote;
quote + data + quote;
never executed: return quote + data + quote;
0
2374}-
2375-
2376void QDomDocumentTypePrivate::save(QTextStream& s, int, int indent) const-
2377{-
2378 if (name.isEmpty()
name.isEmpty()Description
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-86
2379 return;
executed 86 times by 2 tests: return;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
2380-
2381 s << "<!DOCTYPE " << name;-
2382-
2383 if (!publicId.isNull()
!publicId.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2384 s << " PUBLIC " << quotedValue(publicId);-
2385 if (!systemId.isNull()
!systemId.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2386 s << ' ' << quotedValue(systemId);-
2387 }
never executed: end of block
0
2388 }
never executed: end of block
else if (!systemId.isNull()
!systemId.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2389 s << " SYSTEM " << quotedValue(systemId);-
2390 }
never executed: end of block
0
2391-
2392 if (entities->length()>0
entities->length()>0Description
TRUEnever evaluated
FALSEnever evaluated
|| notations->length()>0
notations->length()>0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2393 s << " [" << endl;-
2394-
2395 QHash<QString, QDomNodePrivate *>::const_iterator it2 = notations->map.constBegin();-
2396 for (; it2 != notations->map.constEnd()
it2 != notatio...map.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it2)
0
2397 (*
never executed: (*it2)->save(s, 0, indent);
it2)->save(s, 0, indent);
never executed: (*it2)->save(s, 0, indent);
0
2398-
2399 QHash<QString, QDomNodePrivate *>::const_iterator it = entities->map.constBegin();-
2400 for (; it != entities->map.constEnd()
it != entities->map.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
2401 (*
never executed: (*it)->save(s, 0, indent);
it)->save(s, 0, indent);
never executed: (*it)->save(s, 0, indent);
0
2402-
2403 s << ']';-
2404 }
never executed: end of block
0
2405-
2406 s << '>' << endl;-
2407}
never executed: end of block
0
2408QDomDocumentType::QDomDocumentType() : QDomNode()-
2409{-
2410}
never executed: end of block
0
2411QDomDocumentType::QDomDocumentType(const QDomDocumentType& n)-
2412 : QDomNode(n)-
2413{-
2414}
never executed: end of block
0
2415-
2416QDomDocumentType::QDomDocumentType(QDomDocumentTypePrivate* n)-
2417 : QDomNode(n)-
2418{-
2419}
never executed: end of block
0
2420QDomDocumentType& QDomDocumentType::operator= (const QDomDocumentType& n)-
2421{-
2422 return
never executed: return (QDomDocumentType&) QDomNode::operator=(n);
(QDomDocumentType&) QDomNode::operator=(n);
never executed: return (QDomDocumentType&) QDomNode::operator=(n);
0
2423}-
2424-
2425-
2426-
2427-
2428-
2429-
2430-
2431QString QDomDocumentType::name() const-
2432{-
2433 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2434 return
never executed: return QString();
QString();
never executed: return QString();
0
2435 return
never executed: return ((QDomDocumentTypePrivate*)impl)->nodeName();
((QDomDocumentTypePrivate*)impl)->nodeName();
never executed: return ((QDomDocumentTypePrivate*)impl)->nodeName();
0
2436}-
2437-
2438-
2439-
2440-
2441QDomNamedNodeMap QDomDocumentType::entities() const-
2442{-
2443 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2444 return
never executed: return QDomNamedNodeMap();
QDomNamedNodeMap();
never executed: return QDomNamedNodeMap();
0
2445 return
never executed: return QDomNamedNodeMap(((QDomDocumentTypePrivate*)impl)->entities);
QDomNamedNodeMap(((QDomDocumentTypePrivate*)impl)->entities);
never executed: return QDomNamedNodeMap(((QDomDocumentTypePrivate*)impl)->entities);
0
2446}-
2447-
2448-
2449-
2450-
2451QDomNamedNodeMap QDomDocumentType::notations() const-
2452{-
2453 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2454 return
never executed: return QDomNamedNodeMap();
QDomNamedNodeMap();
never executed: return QDomNamedNodeMap();
0
2455 return
never executed: return QDomNamedNodeMap(((QDomDocumentTypePrivate*)impl)->notations);
QDomNamedNodeMap(((QDomDocumentTypePrivate*)impl)->notations);
never executed: return QDomNamedNodeMap(((QDomDocumentTypePrivate*)impl)->notations);
0
2456}-
2457-
2458-
2459-
2460-
2461-
2462-
2463-
2464QString QDomDocumentType::publicId() const-
2465{-
2466 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2467 return
never executed: return QString();
QString();
never executed: return QString();
0
2468 return
never executed: return ((QDomDocumentTypePrivate*)impl)->publicId;
((QDomDocumentTypePrivate*)impl)->publicId;
never executed: return ((QDomDocumentTypePrivate*)impl)->publicId;
0
2469}-
2470-
2471-
2472-
2473-
2474-
2475-
2476-
2477QString QDomDocumentType::systemId() const-
2478{-
2479 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2480 return
never executed: return QString();
QString();
never executed: return QString();
0
2481 return
never executed: return ((QDomDocumentTypePrivate*)impl)->systemId;
((QDomDocumentTypePrivate*)impl)->systemId;
never executed: return ((QDomDocumentTypePrivate*)impl)->systemId;
0
2482}-
2483-
2484-
2485-
2486-
2487-
2488-
2489-
2490QString QDomDocumentType::internalSubset() const-
2491{-
2492 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2493 return
never executed: return QString();
QString();
never executed: return QString();
0
2494 return
never executed: return ((QDomDocumentTypePrivate*)impl)->internalSubset;
((QDomDocumentTypePrivate*)impl)->internalSubset;
never executed: return ((QDomDocumentTypePrivate*)impl)->internalSubset;
0
2495}-
2496QDomDocumentFragmentPrivate::QDomDocumentFragmentPrivate(QDomDocumentPrivate* doc, QDomNodePrivate* parent)-
2497 : QDomNodePrivate(doc, parent)-
2498{-
2499 name = QLatin1String("#document-fragment");-
2500}
never executed: end of block
0
2501-
2502QDomDocumentFragmentPrivate::QDomDocumentFragmentPrivate(QDomNodePrivate* n, bool deep)-
2503 : QDomNodePrivate(n, deep)-
2504{-
2505}
never executed: end of block
0
2506-
2507QDomNodePrivate* QDomDocumentFragmentPrivate::cloneNode(bool deep)-
2508{-
2509 QDomNodePrivate* p = new QDomDocumentFragmentPrivate(this, deep);-
2510-
2511 p->ref.deref();-
2512 return
never executed: return p;
p;
never executed: return p;
0
2513}-
2514QDomDocumentFragment::QDomDocumentFragment()-
2515{-
2516}-
2517-
2518QDomDocumentFragment::QDomDocumentFragment(QDomDocumentFragmentPrivate* n)-
2519 : QDomNode(n)-
2520{-
2521}
never executed: end of block
0
2522QDomDocumentFragment::QDomDocumentFragment(const QDomDocumentFragment& x)-
2523 : QDomNode(x)-
2524{-
2525}
never executed: end of block
0
2526QDomDocumentFragment& QDomDocumentFragment::operator= (const QDomDocumentFragment& x)-
2527{-
2528 return
never executed: return (QDomDocumentFragment&) QDomNode::operator=(x);
(QDomDocumentFragment&) QDomNode::operator=(x);
never executed: return (QDomDocumentFragment&) QDomNode::operator=(x);
0
2529}-
2530QDomCharacterDataPrivate::QDomCharacterDataPrivate(QDomDocumentPrivate* d, QDomNodePrivate* p,-
2531 const QString& data)-
2532 : QDomNodePrivate(d, p)-
2533{-
2534 value = data;-
2535 name = QLatin1String("#character-data");-
2536}
executed 993 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
993
2537-
2538QDomCharacterDataPrivate::QDomCharacterDataPrivate(QDomCharacterDataPrivate* n, bool deep)-
2539 : QDomNodePrivate(n, deep)-
2540{-
2541}
never executed: end of block
0
2542-
2543QDomNodePrivate* QDomCharacterDataPrivate::cloneNode(bool deep)-
2544{-
2545 QDomNodePrivate* p = new QDomCharacterDataPrivate(this, deep);-
2546-
2547 p->ref.deref();-
2548 return
never executed: return p;
p;
never executed: return p;
0
2549}-
2550-
2551int QDomCharacterDataPrivate::dataLength() const-
2552{-
2553 return
never executed: return value.length();
value.length();
never executed: return value.length();
0
2554}-
2555-
2556QString QDomCharacterDataPrivate::substringData(unsigned long offset, unsigned long n) const-
2557{-
2558 return
never executed: return value.mid(offset, n);
value.mid(offset, n);
never executed: return value.mid(offset, n);
0
2559}-
2560-
2561void QDomCharacterDataPrivate::insertData(unsigned long offset, const QString& arg)-
2562{-
2563 value.insert(offset, arg);-
2564}
never executed: end of block
0
2565-
2566void QDomCharacterDataPrivate::deleteData(unsigned long offset, unsigned long n)-
2567{-
2568 value.remove(offset, n);-
2569}
never executed: end of block
0
2570-
2571void QDomCharacterDataPrivate::replaceData(unsigned long offset, unsigned long n, const QString& arg)-
2572{-
2573 value.replace(offset, n, arg);-
2574}
never executed: end of block
0
2575-
2576void QDomCharacterDataPrivate::appendData(const QString& arg)-
2577{-
2578 value += arg;-
2579}
never executed: end of block
0
2580QDomCharacterData::QDomCharacterData()-
2581{-
2582}-
2583QDomCharacterData::QDomCharacterData(const QDomCharacterData& x)-
2584 : QDomNode(x)-
2585{-
2586}
never executed: end of block
0
2587-
2588QDomCharacterData::QDomCharacterData(QDomCharacterDataPrivate* n)-
2589 : QDomNode(n)-
2590{-
2591}
never executed: end of block
0
2592QDomCharacterData& QDomCharacterData::operator= (const QDomCharacterData& x)-
2593{-
2594 return
never executed: return (QDomCharacterData&) QDomNode::operator=(x);
(QDomCharacterData&) QDomNode::operator=(x);
never executed: return (QDomCharacterData&) QDomNode::operator=(x);
0
2595}-
2596-
2597-
2598-
2599-
2600-
2601-
2602-
2603QString QDomCharacterData::data() const-
2604{-
2605 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2606 return
never executed: return QString();
QString();
never executed: return QString();
0
2607 return
never executed: return impl->nodeValue();
impl->nodeValue();
never executed: return impl->nodeValue();
0
2608}-
2609-
2610-
2611-
2612-
2613void QDomCharacterData::setData(const QString& v)-
2614{-
2615 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2616 impl->setNodeValue(v);
never executed: impl->setNodeValue(v);
0
2617}
never executed: end of block
0
2618-
2619-
2620-
2621-
2622int QDomCharacterData::length() const-
2623{-
2624 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2625 return
never executed: return ((QDomCharacterDataPrivate*)impl)->dataLength();
((QDomCharacterDataPrivate*)impl)->dataLength();
never executed: return ((QDomCharacterDataPrivate*)impl)->dataLength();
0
2626 return
never executed: return 0;
0;
never executed: return 0;
0
2627}-
2628-
2629-
2630-
2631-
2632QString QDomCharacterData::substringData(unsigned long offset, unsigned long count)-
2633{-
2634 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2635 return
never executed: return QString();
QString();
never executed: return QString();
0
2636 return
never executed: return ((QDomCharacterDataPrivate*)impl)->substringData(offset, count);
((QDomCharacterDataPrivate*)impl)->substringData(offset, count);
never executed: return ((QDomCharacterDataPrivate*)impl)->substringData(offset, count);
0
2637}-
2638-
2639-
2640-
2641-
2642void QDomCharacterData::appendData(const QString& arg)-
2643{-
2644 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2645 ((
never executed: ((QDomCharacterDataPrivate*)impl)->appendData(arg);
QDomCharacterDataPrivate*)impl)->appendData(arg);
never executed: ((QDomCharacterDataPrivate*)impl)->appendData(arg);
0
2646}
never executed: end of block
0
2647-
2648-
2649-
2650-
2651void QDomCharacterData::insertData(unsigned long offset, const QString& arg)-
2652{-
2653 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2654 ((
never executed: ((QDomCharacterDataPrivate*)impl)->insertData(offset, arg);
QDomCharacterDataPrivate*)impl)->insertData(offset, arg);
never executed: ((QDomCharacterDataPrivate*)impl)->insertData(offset, arg);
0
2655}
never executed: end of block
0
2656-
2657-
2658-
2659-
2660void QDomCharacterData::deleteData(unsigned long offset, unsigned long count)-
2661{-
2662 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2663 ((
never executed: ((QDomCharacterDataPrivate*)impl)->deleteData(offset, count);
QDomCharacterDataPrivate*)impl)->deleteData(offset, count);
never executed: ((QDomCharacterDataPrivate*)impl)->deleteData(offset, count);
0
2664}
never executed: end of block
0
2665-
2666-
2667-
2668-
2669-
2670void QDomCharacterData::replaceData(unsigned long offset, unsigned long count, const QString& arg)-
2671{-
2672 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2673 ((
never executed: ((QDomCharacterDataPrivate*)impl)->replaceData(offset, count, arg);
QDomCharacterDataPrivate*)impl)->replaceData(offset, count, arg);
never executed: ((QDomCharacterDataPrivate*)impl)->replaceData(offset, count, arg);
0
2674}
never executed: end of block
0
2675-
2676-
2677-
2678-
2679-
2680-
2681QDomNode::NodeType QDomCharacterData::nodeType() const-
2682{-
2683 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2684 return
never executed: return CharacterDataNode;
CharacterDataNode;
never executed: return CharacterDataNode;
0
2685 return
never executed: return QDomNode::nodeType();
QDomNode::nodeType();
never executed: return QDomNode::nodeType();
0
2686}-
2687QDomAttrPrivate::QDomAttrPrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent, const QString& name_)-
2688 : QDomNodePrivate(d, parent)-
2689{-
2690 name = name_;-
2691 m_specified = false;-
2692}
executed 865 times by 3 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
865
2693-
2694QDomAttrPrivate::QDomAttrPrivate(QDomDocumentPrivate* d, QDomNodePrivate* p, const QString& nsURI, const QString& qName)-
2695 : QDomNodePrivate(d, p)-
2696{-
2697 qt_split_namespace(prefix, name, qName, !nsURI.isNull());-
2698 namespaceURI = nsURI;-
2699 createdWithDom1Interface = false;-
2700 m_specified = false;-
2701}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2
2702-
2703QDomAttrPrivate::QDomAttrPrivate(QDomAttrPrivate* n, bool deep)-
2704 : QDomNodePrivate(n, deep)-
2705{-
2706 m_specified = n->specified();-
2707}
never executed: end of block
0
2708-
2709void QDomAttrPrivate::setNodeValue(const QString& v)-
2710{-
2711 value = v;-
2712 QDomTextPrivate *t = new QDomTextPrivate(0, this, v);-
2713-
2714 t->ref.deref();-
2715 if (first
firstDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
FALSEevaluated 867 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
) {
1-867
2716 delete removeChild(first);-
2717 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qtextdocument - unknown status
1
2718 appendChild(t);-
2719}
executed 868 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
868
2720-
2721QDomNodePrivate* QDomAttrPrivate::cloneNode(bool deep)-
2722{-
2723 QDomNodePrivate* p = new QDomAttrPrivate(this, deep);-
2724-
2725 p->ref.deref();-
2726 return
never executed: return p;
p;
never executed: return p;
0
2727}-
2728-
2729bool QDomAttrPrivate::specified() const-
2730{-
2731 return
never executed: return m_specified;
m_specified;
never executed: return m_specified;
0
2732}-
2733static QString encodeText(const QString &str,-
2734 QTextStream &s,-
2735 const bool encodeQuotes = true,-
2736 const bool performAVN = false,-
2737 const bool encodeEOLs = false)-
2738{-
2739-
2740-
2741-
2742 const QTextCodec *const codec = s.codec();-
2743 ((!(codec)) ? qt_assert("codec",__FILE__,4156) : qt_noop());-
2744-
2745 QString retval(str);-
2746 int len = retval.length();-
2747 int i = 0;-
2748-
2749 while (i < len
i < lenDescription
TRUEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 396 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
396-2468
2750 const QChar ati(retval.at(i));-
2751-
2752 if (ati == QLatin1Char('<')
ati == QLatin1Char('<')Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-2468
2753 retval.replace(i, 1, QLatin1String("&lt;"));-
2754 len += 3;-
2755 i += 4;-
2756 }
never executed: end of block
else if (encodeQuotes
encodeQuotesDescription
TRUEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& (
(ati == QLatin1Char('"'))Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
ati == QLatin1Char('"'))
(ati == QLatin1Char('"'))Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-2468
2757 retval.replace(i, 1, QLatin1String("&quot;"));-
2758 len += 5;-
2759 i += 6;-
2760 }
never executed: end of block
else if (ati == QLatin1Char('&')
ati == QLatin1Char('&')Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-2468
2761 retval.replace(i, 1, QLatin1String("&amp;"));-
2762 len += 4;-
2763 i += 5;-
2764 }
never executed: end of block
else if (ati == QLatin1Char('>')
ati == QLatin1Char('>')Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
&& i >= 2
i >= 2Description
TRUEnever evaluated
FALSEnever evaluated
&& retval[i - 1] == QLatin1Char(']')
retval[i - 1] ...atin1Char(']')Description
TRUEnever evaluated
FALSEnever evaluated
&& retval[i - 2] == QLatin1Char(']')
retval[i - 2] ...atin1Char(']')Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-2468
2765 retval.replace(i, 1, QLatin1String("&gt;"));-
2766 len += 3;-
2767 i += 4;-
2768 }
never executed: end of block
else if (performAVN
performAVNDescription
TRUEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&&
0-2468
2769 (ati == QChar(0xA)
ati == QChar(0xA)Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
||
0-2468
2770 ati == QChar(0xD)
ati == QChar(0xD)Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
||
0-2468
2771 ati == QChar(0x9)
ati == QChar(0x9)Description
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
)) {
0-2468
2772 const QString replacement(QLatin1String("&#x") + QString::number(ati.unicode(), 16) + QLatin1Char(';'));-
2773 retval.replace(i, 1, replacement);-
2774 i += replacement.length();-
2775 len += replacement.length() - 1;-
2776 }
never executed: end of block
else if (encodeEOLs
encodeEOLsDescription
TRUEnever evaluated
FALSEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
&& ati == QChar(0xD)
ati == QChar(0xD)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-2468
2777 retval.replace(i, 1, QLatin1String("&#xd;"));-
2778 len += 4;-
2779 i += 5;-
2780 }
never executed: end of block
else {
0
2781-
2782 if(codec->canEncode(ati)
codec->canEncode(ati)Description
TRUEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-2468
2783 ++
executed 2468 times by 2 tests: ++i;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
i;
executed 2468 times by 2 tests: ++i;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
2468
2784 else-
2785-
2786 {-
2787-
2788 const ushort codepoint(ati.unicode());-
2789 const QString replacement(QLatin1String("&#x") + QString::number(codepoint, 16) + QLatin1Char(';'));-
2790 retval.replace(i, 1, replacement);-
2791 i += replacement.length();-
2792 len += replacement.length() - 1;-
2793 }
never executed: end of block
0
2794 }-
2795 }-
2796-
2797 return
executed 396 times by 2 tests: return retval;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
retval;
executed 396 times by 2 tests: return retval;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
396
2798}-
2799-
2800void QDomAttrPrivate::save(QTextStream& s, int, int) const-
2801{-
2802 if (namespaceURI.isNull()
namespaceURI.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2803 s << name << "=\"" << encodeText(value, s, true, true) << '\"';-
2804 }
never executed: end of block
else {
0
2805 s << prefix << ':' << name << "=\"" << encodeText(value, s, true, true) << '\"';-
2806 if(!ownerNode
!ownerNodeDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
2807 ownerNode->prefix != prefix
ownerNode->prefix != prefixDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2808 s << " xmlns:" << prefix << "=\"" << encodeText(namespaceURI, s, true, true) << '\"';-
2809 }
never executed: end of block
0
2810 }
never executed: end of block
0
2811}-
2812QDomAttr::QDomAttr()-
2813{-
2814}-
2815QDomAttr::QDomAttr(const QDomAttr& x)-
2816 : QDomNode(x)-
2817{-
2818}
never executed: end of block
0
2819-
2820QDomAttr::QDomAttr(QDomAttrPrivate* n)-
2821 : QDomNode(n)-
2822{-
2823}
never executed: end of block
0
2824QDomAttr& QDomAttr::operator= (const QDomAttr& x)-
2825{-
2826 return
never executed: return (QDomAttr&) QDomNode::operator=(x);
(QDomAttr&) QDomNode::operator=(x);
never executed: return (QDomAttr&) QDomNode::operator=(x);
0
2827}-
2828-
2829-
2830-
2831-
2832QString QDomAttr::name() const-
2833{-
2834 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2835 return
never executed: return QString();
QString();
never executed: return QString();
0
2836 return
never executed: return impl->nodeName();
impl->nodeName();
never executed: return impl->nodeName();
0
2837}-
2838-
2839-
2840-
2841-
2842-
2843-
2844-
2845bool QDomAttr::specified() const-
2846{-
2847 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2848 return
never executed: return false;
false;
never executed: return false;
0
2849 return
never executed: return ((QDomAttrPrivate*)impl)->specified();
((QDomAttrPrivate*)impl)->specified();
never executed: return ((QDomAttrPrivate*)impl)->specified();
0
2850}-
2851-
2852-
2853-
2854-
2855-
2856-
2857QDomElement QDomAttr::ownerElement() const-
2858{-
2859 ((!(impl->parent())) ? qt_assert("impl->parent()",__FILE__,4346) : qt_noop());-
2860 if (!impl->parent()->isElement()
!impl->parent()->isElement()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2861 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
2862 return
never executed: return QDomElement((QDomElementPrivate*)(impl->parent()));
QDomElement((QDomElementPrivate*)(impl->parent()));
never executed: return QDomElement((QDomElementPrivate*)(impl->parent()));
0
2863}-
2864-
2865-
2866-
2867-
2868-
2869-
2870-
2871QString QDomAttr::value() const-
2872{-
2873 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2874 return
never executed: return QString();
QString();
never executed: return QString();
0
2875 return
never executed: return impl->nodeValue();
impl->nodeValue();
never executed: return impl->nodeValue();
0
2876}-
2877-
2878-
2879-
2880-
2881-
2882-
2883void QDomAttr::setValue(const QString& v)-
2884{-
2885 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2886 return;
never executed: return;
0
2887 impl->setNodeValue(v);-
2888 ((QDomAttrPrivate*)impl)->m_specified = true;-
2889}
never executed: end of block
0
2890QDomElementPrivate::QDomElementPrivate(QDomDocumentPrivate* d, QDomNodePrivate* p,-
2891 const QString& tagname)-
2892 : QDomNodePrivate(d, p)-
2893{-
2894 name = tagname;-
2895 m_attr = new QDomNamedNodeMapPrivate(this);-
2896}
executed 1021 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
1021
2897-
2898QDomElementPrivate::QDomElementPrivate(QDomDocumentPrivate* d, QDomNodePrivate* p,-
2899 const QString& nsURI, const QString& qName)-
2900 : QDomNodePrivate(d, p)-
2901{-
2902 qt_split_namespace(prefix, name, qName, !nsURI.isNull());-
2903 namespaceURI = nsURI;-
2904 createdWithDom1Interface = false;-
2905 m_attr = new QDomNamedNodeMapPrivate(this);-
2906}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2
2907-
2908QDomElementPrivate::QDomElementPrivate(QDomElementPrivate* n, bool deep) :-
2909 QDomNodePrivate(n, deep)-
2910{-
2911 m_attr = n->m_attr->clone(this);-
2912-
2913 m_attr->ref.ref();-
2914}
never executed: end of block
0
2915-
2916QDomElementPrivate::~QDomElementPrivate()-
2917{-
2918 if (!m_attr->ref.deref()
!m_attr->ref.deref()Description
TRUEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-1023
2919 delete m_attr;
executed 1023 times by 5 tests: delete m_attr;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1023
2920}
executed 1023 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1023
2921-
2922QDomNodePrivate* QDomElementPrivate::cloneNode(bool deep)-
2923{-
2924 QDomNodePrivate* p = new QDomElementPrivate(this, deep);-
2925-
2926 p->ref.deref();-
2927 return
never executed: return p;
p;
never executed: return p;
0
2928}-
2929-
2930QString QDomElementPrivate::attribute(const QString& name_, const QString& defValue) const-
2931{-
2932 QDomNodePrivate* n = m_attr->namedItem(name_);-
2933 if (!n
!nDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEevaluated 33 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
1-33
2934 return
executed 1 time by 1 test: return defValue;
Executed by:
  • tst_qcssparser - unknown status
defValue;
executed 1 time by 1 test: return defValue;
Executed by:
  • tst_qcssparser - unknown status
1
2935-
2936 return
executed 33 times by 1 test: return n->nodeValue();
Executed by:
  • tst_qcssparser - unknown status
n->nodeValue();
executed 33 times by 1 test: return n->nodeValue();
Executed by:
  • tst_qcssparser - unknown status
33
2937}-
2938-
2939QString QDomElementPrivate::attributeNS(const QString& nsURI, const QString& localName, const QString& defValue) const-
2940{-
2941 QDomNodePrivate* n = m_attr->namedItemNS(nsURI, localName);-
2942 if (!n
!nDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2943 return
never executed: return defValue;
defValue;
never executed: return defValue;
0
2944-
2945 return
never executed: return n->nodeValue();
n->nodeValue();
never executed: return n->nodeValue();
0
2946}-
2947-
2948void QDomElementPrivate::setAttribute(const QString& aname, const QString& newValue)-
2949{-
2950 QDomNodePrivate* n = m_attr->namedItem(aname);-
2951 if (!n
!nDescription
TRUEevaluated 865 times by 3 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextdocument - unknown status
) {
1-865
2952 n = new QDomAttrPrivate(ownerDocument(), this, aname);-
2953 n->setNodeValue(newValue);-
2954-
2955-
2956-
2957 n->ref.deref();-
2958 m_attr->setNamedItem(n);-
2959 }
executed 865 times by 3 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
else {
865
2960 n->setNodeValue(newValue);-
2961 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qtextdocument - unknown status
1
2962}-
2963-
2964void QDomElementPrivate::setAttributeNS(const QString& nsURI, const QString& qName, const QString& newValue)-
2965{-
2966 QString prefix, localName;-
2967 qt_split_namespace(prefix, localName, qName, true);-
2968 QDomNodePrivate* n = m_attr->namedItemNS(nsURI, localName);-
2969 if (!n
!nDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-2
2970 n = new QDomAttrPrivate(ownerDocument(), this, nsURI, qName);-
2971 n->setNodeValue(newValue);-
2972-
2973-
2974-
2975 n->ref.deref();-
2976 m_attr->setNamedItem(n);-
2977 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else {
2
2978 n->setNodeValue(newValue);-
2979 n->prefix = prefix;-
2980 }
never executed: end of block
0
2981}-
2982-
2983void QDomElementPrivate::removeAttribute(const QString& aname)-
2984{-
2985 QDomNodePrivate* p = m_attr->removeNamedItem(aname);-
2986 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->ref.load() == 0
p->ref.load() == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2987 delete p;
never executed: delete p;
0
2988}
never executed: end of block
0
2989-
2990QDomAttrPrivate* QDomElementPrivate::attributeNode(const QString& aname)-
2991{-
2992 return
never executed: return (QDomAttrPrivate*)m_attr->namedItem(aname);
(QDomAttrPrivate*)m_attr->namedItem(aname);
never executed: return (QDomAttrPrivate*)m_attr->namedItem(aname);
0
2993}-
2994-
2995QDomAttrPrivate* QDomElementPrivate::attributeNodeNS(const QString& nsURI, const QString& localName)-
2996{-
2997 return
never executed: return (QDomAttrPrivate*)m_attr->namedItemNS(nsURI, localName);
(QDomAttrPrivate*)m_attr->namedItemNS(nsURI, localName);
never executed: return (QDomAttrPrivate*)m_attr->namedItemNS(nsURI, localName);
0
2998}-
2999-
3000QDomAttrPrivate* QDomElementPrivate::setAttributeNode(QDomAttrPrivate* newAttr)-
3001{-
3002 QDomNodePrivate* n = m_attr->namedItem(newAttr->nodeName());-
3003-
3004-
3005 m_attr->setNamedItem(newAttr);-
3006-
3007 newAttr->setParent(this);-
3008-
3009 return
never executed: return (QDomAttrPrivate*)n;
(QDomAttrPrivate*)n;
never executed: return (QDomAttrPrivate*)n;
0
3010}-
3011-
3012QDomAttrPrivate* QDomElementPrivate::setAttributeNodeNS(QDomAttrPrivate* newAttr)-
3013{-
3014 QDomNodePrivate* n = 0;-
3015 if (!newAttr->prefix.isNull()
!newAttr->prefix.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3016 n = m_attr->namedItemNS(newAttr->namespaceURI, newAttr->name);
never executed: n = m_attr->namedItemNS(newAttr->namespaceURI, newAttr->name);
0
3017-
3018-
3019 m_attr->setNamedItem(newAttr);-
3020-
3021 return
never executed: return (QDomAttrPrivate*)n;
(QDomAttrPrivate*)n;
never executed: return (QDomAttrPrivate*)n;
0
3022}-
3023-
3024QDomAttrPrivate* QDomElementPrivate::removeAttributeNode(QDomAttrPrivate* oldAttr)-
3025{-
3026 return
never executed: return (QDomAttrPrivate*)m_attr->removeNamedItem(oldAttr->nodeName());
(QDomAttrPrivate*)m_attr->removeNamedItem(oldAttr->nodeName());
never executed: return (QDomAttrPrivate*)m_attr->removeNamedItem(oldAttr->nodeName());
0
3027}-
3028-
3029bool QDomElementPrivate::hasAttribute(const QString& aname)-
3030{-
3031 return
never executed: return m_attr->contains(aname);
m_attr->contains(aname);
never executed: return m_attr->contains(aname);
0
3032}-
3033-
3034bool QDomElementPrivate::hasAttributeNS(const QString& nsURI, const QString& localName)-
3035{-
3036 return
never executed: return m_attr->containsNS(nsURI, localName);
m_attr->containsNS(nsURI, localName);
never executed: return m_attr->containsNS(nsURI, localName);
0
3037}-
3038-
3039QString QDomElementPrivate::text()-
3040{-
3041 QString t(QLatin1String(""));-
3042-
3043 QDomNodePrivate* p = first;-
3044 while (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3045 if (p->isText()
p->isText()Description
TRUEnever evaluated
FALSEnever evaluated
|| p->isCDATASection()
p->isCDATASection()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3046 t += p->nodeValue();
never executed: t += p->nodeValue();
0
3047 else if (p->isElement()
p->isElement()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3048 t += ((QDomElementPrivate*)p)->text();
never executed: t += ((QDomElementPrivate*)p)->text();
0
3049 p = p->next;-
3050 }
never executed: end of block
0
3051-
3052 return
never executed: return t;
t;
never executed: return t;
0
3053}-
3054-
3055void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const-
3056{-
3057 if (!(prev
prevDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEevaluated 180 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
&& prev->isText()
prev->isText()Description
TRUEnever evaluated
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
))
0-180
3058 s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
executed 246 times by 2 tests: s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
246
3059-
3060 QString qName(name);-
3061 QString nsDecl(QLatin1String(""));-
3062 if (!namespaceURI.isNull()
!namespaceURI.isNull()Description
TRUEnever evaluated
FALSEevaluated 246 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-246
3063 if (prefix.isEmpty()
prefix.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3064 nsDecl = QLatin1String(" xmlns");-
3065 }
never executed: end of block
else {
0
3066 qName = prefix + QLatin1Char(':') + name;-
3067 nsDecl = QLatin1String(" xmlns:") + prefix;-
3068 }
never executed: end of block
0
3069 nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1Char('\"');-
3070 }
never executed: end of block
0
3071 s << '<' << qName << nsDecl;-
3072-
3073 QSet<QString> outputtedPrefixes;-
3074-
3075-
3076 if (!m_attr->map.isEmpty()
!m_attr->map.isEmpty()Description
TRUEevaluated 246 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-246
3077 QHash<QString, QDomNodePrivate *>::const_iterator it = m_attr->map.constBegin();-
3078 for (; it != m_attr->map.constEnd()
it != m_attr->map.constEnd()Description
TRUEevaluated 394 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 246 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
; ++it) {
246-394
3079 s << ' ';-
3080 if (it.value()->namespaceURI.isNull()
it.value()->na...ceURI.isNull()Description
TRUEevaluated 392 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
2-392
3081 s << it.value()->name << "=\"" << encodeText(it.value()->value, s, true, true) << '\"';-
3082 }
executed 392 times by 1 test: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
else {
392
3083 s << it.value()->prefix << ':' << it.value()->name << "=\"" << encodeText(it.value()->value, s, true, true) << '\"';-
3084 if((!it.value()->ownerNode
!it.value()->ownerNodeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
||
0-2
3085 it.value()->ownerNode->prefix != it.value()->prefix
it.value()->ow...alue()->prefixDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) &&
0-2
3086 !outputtedPrefixes.contains(it.value()->prefix)
!outputtedPref...lue()->prefix)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-2
3087 s << " xmlns:" << it.value()->prefix << "=\"" << encodeText(it.value()->namespaceURI, s, true, true) << '\"';-
3088 outputtedPrefixes.insert(it.value()->prefix);-
3089 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2
3090 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2
3091 }-
3092 }
executed 246 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
246
3093-
3094 if (last
lastDescription
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEevaluated 152 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
94-152
3095-
3096 if (first->isText()
first->isText()Description
TRUEnever evaluated
FALSEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
)
0-94
3097 s << '>';
never executed: s << '>';
0
3098 else {-
3099 s << '>';-
3100-
3101-
3102 if (indent != -1
indent != -1Description
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEnever evaluated
)
0-94
3103 s << endl;
executed 94 times by 1 test: s << endl;
Executed by:
  • tst_qdbusxmlparser - unknown status
94
3104 }
executed 94 times by 1 test: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
94
3105 QDomNodePrivate::save(s, depth + 1, indent); if (!last->isText()
!last->isText()Description
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEnever evaluated
)
0-94
3106 s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
executed 94 times by 1 test: s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
Executed by:
  • tst_qdbusxmlparser - unknown status
94
3107-
3108 s << "</" << qName << '>';-
3109 }
executed 94 times by 1 test: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
else {
94
3110 s << "/>";-
3111 }
executed 152 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
152
3112 if (!(next
nextDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
FALSEevaluated 180 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
&& next->isText()
next->isText()Description
TRUEnever evaluated
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qdbusxmlparser - unknown status
)) {
0-180
3113-
3114 if (indent != -1
indent != -1Description
TRUEevaluated 246 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-246
3115 s << endl;
executed 246 times by 2 tests: s << endl;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
246
3116 }
executed 246 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
246
3117}
executed 246 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
246
3118QDomElement::QDomElement()-
3119 : QDomNode()-
3120{-
3121}
executed 3 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
3
3122QDomElement::QDomElement(const QDomElement& x)-
3123 : QDomNode(x)-
3124{-
3125}
executed 96 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
96
3126-
3127QDomElement::QDomElement(QDomElementPrivate* n)-
3128 : QDomNode(n)-
3129{-
3130}
executed 256 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
256
3131QDomElement& QDomElement::operator= (const QDomElement& x)-
3132{-
3133 return
executed 71 times by 1 test: return (QDomElement&) QDomNode::operator=(x);
Executed by:
  • tst_qcssparser - unknown status
(QDomElement&) QDomNode::operator=(x);
executed 71 times by 1 test: return (QDomElement&) QDomNode::operator=(x);
Executed by:
  • tst_qcssparser - unknown status
71
3134}-
3135void QDomElement::setTagName(const QString& name)-
3136{-
3137 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3138 impl->name = name;
never executed: impl->name = name;
0
3139}
never executed: end of block
0
3140QString QDomElement::tagName() const-
3141{-
3142 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 197 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-197
3143 return
never executed: return QString();
QString();
never executed: return QString();
0
3144 return
executed 197 times by 1 test: return impl->nodeName();
Executed by:
  • tst_qcssparser - unknown status
impl->nodeName();
executed 197 times by 1 test: return impl->nodeName();
Executed by:
  • tst_qcssparser - unknown status
197
3145}-
3146-
3147-
3148-
3149-
3150-
3151-
3152-
3153QDomNamedNodeMap QDomElement::attributes() const-
3154{-
3155 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3156 return
never executed: return QDomNamedNodeMap();
QDomNamedNodeMap();
never executed: return QDomNamedNodeMap();
0
3157 return
never executed: return QDomNamedNodeMap(((QDomElementPrivate*)impl)->attributes());
QDomNamedNodeMap(((QDomElementPrivate*)impl)->attributes());
never executed: return QDomNamedNodeMap(((QDomElementPrivate*)impl)->attributes());
0
3158}-
3159-
3160-
3161-
3162-
3163-
3164-
3165-
3166QString QDomElement::attribute(const QString& name, const QString& defValue) const-
3167{-
3168 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-34
3169 return
never executed: return defValue;
defValue;
never executed: return defValue;
0
3170 return
executed 34 times by 1 test: return ((QDomElementPrivate*)impl)->attribute(name, defValue);
Executed by:
  • tst_qcssparser - unknown status
((QDomElementPrivate*)impl)->attribute(name, defValue);
executed 34 times by 1 test: return ((QDomElementPrivate*)impl)->attribute(name, defValue);
Executed by:
  • tst_qcssparser - unknown status
34
3171}-
3172void QDomElement::setAttribute(const QString& name, const QString& value)-
3173{-
3174 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3175 return;
never executed: return;
0
3176 ((QDomElementPrivate*)impl)->setAttribute(name, value);-
3177}
never executed: end of block
0
3178void QDomElement::setAttribute(const QString& name, qlonglong value)-
3179{-
3180 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3181 return;
never executed: return;
0
3182 QString x;-
3183 x.setNum(value);-
3184 ((QDomElementPrivate*)impl)->setAttribute(name, x);-
3185}
never executed: end of block
0
3186-
3187-
3188-
3189-
3190-
3191-
3192void QDomElement::setAttribute(const QString& name, qulonglong value)-
3193{-
3194 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3195 return;
never executed: return;
0
3196 QString x;-
3197 x.setNum(value);-
3198 ((QDomElementPrivate*)impl)->setAttribute(name, x);-
3199}
never executed: end of block
0
3200-
3201-
3202-
3203-
3204-
3205-
3206void QDomElement::setAttribute(const QString& name, float value)-
3207{-
3208 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3209 return;
never executed: return;
0
3210 QString x;-
3211 x.setNum(value);-
3212 ((QDomElementPrivate*)impl)->setAttribute(name, x);-
3213}
never executed: end of block
0
3214-
3215-
3216-
3217-
3218-
3219-
3220void QDomElement::setAttribute(const QString& name, double value)-
3221{-
3222 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3223 return;
never executed: return;
0
3224 QString x;-
3225 char buf[256];-
3226 int count = qsnprintf(buf, sizeof(buf), "%.16g", value);-
3227 if (count > 0
count > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3228 x = QString::fromLatin1(buf, count);
never executed: x = QString::fromLatin1(buf, count);
0
3229 else-
3230 x.setNum(value);
never executed: x.setNum(value);
0
3231 ((QDomElementPrivate*)impl)->setAttribute(name, x);-
3232}
never executed: end of block
0
3233-
3234-
3235-
3236-
3237-
3238-
3239void QDomElement::removeAttribute(const QString& name)-
3240{-
3241 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3242 return;
never executed: return;
0
3243 ((QDomElementPrivate*)impl)->removeAttribute(name);-
3244}
never executed: end of block
0
3245QDomAttr QDomElement::attributeNode(const QString& name)-
3246{-
3247 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3248 return
never executed: return QDomAttr();
QDomAttr();
never executed: return QDomAttr();
0
3249 return
never executed: return QDomAttr(((QDomElementPrivate*)impl)->attributeNode(name));
QDomAttr(((QDomElementPrivate*)impl)->attributeNode(name));
never executed: return QDomAttr(((QDomElementPrivate*)impl)->attributeNode(name));
0
3250}-
3251QDomAttr QDomElement::setAttributeNode(const QDomAttr& newAttr)-
3252{-
3253 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3254 return
never executed: return QDomAttr();
QDomAttr();
never executed: return QDomAttr();
0
3255 return
never executed: return QDomAttr(((QDomElementPrivate*)impl)->setAttributeNode(((QDomAttrPrivate*)newAttr.impl)));
QDomAttr(((QDomElementPrivate*)impl)->setAttributeNode(((QDomAttrPrivate*)newAttr.impl)));
never executed: return QDomAttr(((QDomElementPrivate*)impl)->setAttributeNode(((QDomAttrPrivate*)newAttr.impl)));
0
3256}-
3257-
3258-
3259-
3260-
3261-
3262-
3263QDomAttr QDomElement::removeAttributeNode(const QDomAttr& oldAttr)-
3264{-
3265 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3266 return
never executed: return QDomAttr();
QDomAttr();
never executed: return QDomAttr();
0
3267 return
never executed: return QDomAttr(((QDomElementPrivate*)impl)->removeAttributeNode(((QDomAttrPrivate*)oldAttr.impl)));
QDomAttr(((QDomElementPrivate*)impl)->removeAttributeNode(((QDomAttrPrivate*)oldAttr.impl)));
never executed: return QDomAttr(((QDomElementPrivate*)impl)->removeAttributeNode(((QDomAttrPrivate*)oldAttr.impl)));
0
3268}-
3269QDomNodeList QDomElement::elementsByTagName(const QString& tagname) const-
3270{-
3271 return
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, tagname));
QDomNodeList(new QDomNodeListPrivate(impl, tagname));
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, tagname));
0
3272}-
3273bool QDomElement::hasAttribute(const QString& name) const-
3274{-
3275 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3276 return
never executed: return false;
false;
never executed: return false;
0
3277 return
never executed: return ((QDomElementPrivate*)impl)->hasAttribute(name);
((QDomElementPrivate*)impl)->hasAttribute(name);
never executed: return ((QDomElementPrivate*)impl)->hasAttribute(name);
0
3278}-
3279QString QDomElement::attributeNS(const QString nsURI, const QString& localName, const QString& defValue) const-
3280{-
3281 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3282 return
never executed: return defValue;
defValue;
never executed: return defValue;
0
3283 return
never executed: return ((QDomElementPrivate*)impl)->attributeNS(nsURI, localName, defValue);
((QDomElementPrivate*)impl)->attributeNS(nsURI, localName, defValue);
never executed: return ((QDomElementPrivate*)impl)->attributeNS(nsURI, localName, defValue);
0
3284}-
3285void QDomElement::setAttributeNS(const QString nsURI, const QString& qName, const QString& value)-
3286{-
3287 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3288 return;
never executed: return;
0
3289 ((QDomElementPrivate*)impl)->setAttributeNS(nsURI, qName, value);-
3290}
never executed: end of block
0
3291void QDomElement::setAttributeNS(const QString nsURI, const QString& qName, qlonglong value)-
3292{-
3293 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3294 return;
never executed: return;
0
3295 QString x;-
3296 x.setNum(value);-
3297 ((QDomElementPrivate*)impl)->setAttributeNS(nsURI, qName, x);-
3298}
never executed: end of block
0
3299-
3300-
3301-
3302-
3303void QDomElement::setAttributeNS(const QString nsURI, const QString& qName, qulonglong value)-
3304{-
3305 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3306 return;
never executed: return;
0
3307 QString x;-
3308 x.setNum(value);-
3309 ((QDomElementPrivate*)impl)->setAttributeNS(nsURI, qName, x);-
3310}
never executed: end of block
0
3311-
3312-
3313-
3314-
3315void QDomElement::setAttributeNS(const QString nsURI, const QString& qName, double value)-
3316{-
3317 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3318 return;
never executed: return;
0
3319 QString x;-
3320 x.setNum(value);-
3321 ((QDomElementPrivate*)impl)->setAttributeNS(nsURI, qName, x);-
3322}
never executed: end of block
0
3323-
3324-
3325-
3326-
3327-
3328-
3329-
3330void QDomElement::removeAttributeNS(const QString& nsURI, const QString& localName)-
3331{-
3332 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3333 return;
never executed: return;
0
3334 QDomNodePrivate *n = ((QDomElementPrivate*)impl)->attributeNodeNS(nsURI, localName);-
3335 if (!n
!nDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3336 return;
never executed: return;
0
3337 ((QDomElementPrivate*)impl)->removeAttribute(n->nodeName());-
3338}
never executed: end of block
0
3339QDomAttr QDomElement::attributeNodeNS(const QString& nsURI, const QString& localName)-
3340{-
3341 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3342 return
never executed: return QDomAttr();
QDomAttr();
never executed: return QDomAttr();
0
3343 return
never executed: return QDomAttr(((QDomElementPrivate*)impl)->attributeNodeNS(nsURI, localName));
QDomAttr(((QDomElementPrivate*)impl)->attributeNodeNS(nsURI, localName));
never executed: return QDomAttr(((QDomElementPrivate*)impl)->attributeNodeNS(nsURI, localName));
0
3344}-
3345QDomAttr QDomElement::setAttributeNodeNS(const QDomAttr& newAttr)-
3346{-
3347 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3348 return
never executed: return QDomAttr();
QDomAttr();
never executed: return QDomAttr();
0
3349 return
never executed: return QDomAttr(((QDomElementPrivate*)impl)->setAttributeNodeNS(((QDomAttrPrivate*)newAttr.impl)));
QDomAttr(((QDomElementPrivate*)impl)->setAttributeNodeNS(((QDomAttrPrivate*)newAttr.impl)));
never executed: return QDomAttr(((QDomElementPrivate*)impl)->setAttributeNodeNS(((QDomAttrPrivate*)newAttr.impl)));
0
3350}-
3351QDomNodeList QDomElement::elementsByTagNameNS(const QString& nsURI, const QString& localName) const-
3352{-
3353 return
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, nsURI, localName));
QDomNodeList(new QDomNodeListPrivate(impl, nsURI, localName));
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, nsURI, localName));
0
3354}-
3355-
3356-
3357-
3358-
3359-
3360-
3361bool QDomElement::hasAttributeNS(const QString& nsURI, const QString& localName) const-
3362{-
3363 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3364 return
never executed: return false;
false;
never executed: return false;
0
3365 return
never executed: return ((QDomElementPrivate*)impl)->hasAttributeNS(nsURI, localName);
((QDomElementPrivate*)impl)->hasAttributeNS(nsURI, localName);
never executed: return ((QDomElementPrivate*)impl)->hasAttributeNS(nsURI, localName);
0
3366}-
3367QString QDomElement::text() const-
3368{-
3369 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3370 return
never executed: return QString();
QString();
never executed: return QString();
0
3371 return
never executed: return ((QDomElementPrivate*)impl)->text();
((QDomElementPrivate*)impl)->text();
never executed: return ((QDomElementPrivate*)impl)->text();
0
3372}-
3373QDomTextPrivate::QDomTextPrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent, const QString& val)-
3374 : QDomCharacterDataPrivate(d, parent, val)-
3375{-
3376 name = QLatin1String("#text");-
3377}
executed 993 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
993
3378-
3379QDomTextPrivate::QDomTextPrivate(QDomTextPrivate* n, bool deep)-
3380 : QDomCharacterDataPrivate(n, deep)-
3381{-
3382}
never executed: end of block
0
3383-
3384QDomNodePrivate* QDomTextPrivate::cloneNode(bool deep)-
3385{-
3386 QDomNodePrivate* p = new QDomTextPrivate(this, deep);-
3387-
3388 p->ref.deref();-
3389 return
never executed: return p;
p;
never executed: return p;
0
3390}-
3391-
3392QDomTextPrivate* QDomTextPrivate::splitText(int offset)-
3393{-
3394 if (!parent()
!parent()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3395 QMessageLogger(__FILE__, 5182, __PRETTY_FUNCTION__).warning("QDomText::splitText The node has no parent. So I can not split");-
3396 return
never executed: return 0;
0;
never executed: return 0;
0
3397 }-
3398-
3399 QDomTextPrivate* t = new QDomTextPrivate(ownerDocument(), 0, value.mid(offset));-
3400 value.truncate(offset);-
3401-
3402 parent()->insertAfter(t, this);-
3403-
3404 return
never executed: return t;
t;
never executed: return t;
0
3405}-
3406-
3407void QDomTextPrivate::save(QTextStream& s, int, int) const-
3408{-
3409 QDomTextPrivate *that = const_cast<QDomTextPrivate*>(this);-
3410 s << encodeText(value, s, !(that->parent() && that->parent()->isElement()), false, true);-
3411}
never executed: end of block
0
3412QDomText::QDomText()-
3413 : QDomCharacterData()-
3414{-
3415}
never executed: end of block
0
3416QDomText::QDomText(const QDomText& x)-
3417 : QDomCharacterData(x)-
3418{-
3419}
never executed: end of block
0
3420-
3421QDomText::QDomText(QDomTextPrivate* n)-
3422 : QDomCharacterData(n)-
3423{-
3424}
never executed: end of block
0
3425QDomText& QDomText::operator= (const QDomText& x)-
3426{-
3427 return
never executed: return (QDomText&) QDomNode::operator=(x);
(QDomText&) QDomNode::operator=(x);
never executed: return (QDomText&) QDomNode::operator=(x);
0
3428}-
3429QDomText QDomText::splitText(int offset)-
3430{-
3431 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3432 return
never executed: return QDomText();
QDomText();
never executed: return QDomText();
0
3433 return
never executed: return QDomText(((QDomTextPrivate*)impl)->splitText(offset));
QDomText(((QDomTextPrivate*)impl)->splitText(offset));
never executed: return QDomText(((QDomTextPrivate*)impl)->splitText(offset));
0
3434}-
3435QDomCommentPrivate::QDomCommentPrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent, const QString& val)-
3436 : QDomCharacterDataPrivate(d, parent, val)-
3437{-
3438 name = QLatin1String("#comment");-
3439}
never executed: end of block
0
3440-
3441QDomCommentPrivate::QDomCommentPrivate(QDomCommentPrivate* n, bool deep)-
3442 : QDomCharacterDataPrivate(n, deep)-
3443{-
3444}
never executed: end of block
0
3445-
3446-
3447QDomNodePrivate* QDomCommentPrivate::cloneNode(bool deep)-
3448{-
3449 QDomNodePrivate* p = new QDomCommentPrivate(this, deep);-
3450-
3451 p->ref.deref();-
3452 return
never executed: return p;
p;
never executed: return p;
0
3453}-
3454-
3455void QDomCommentPrivate::save(QTextStream& s, int depth, int indent) const-
3456{-
3457-
3458 if (!(prev
prevDescription
TRUEnever evaluated
FALSEnever evaluated
&& prev->isText()
prev->isText()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
3459 s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
never executed: s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
0
3460-
3461 s << "<!--" << value;-
3462 if (value.endsWith(QLatin1Char('-'))
value.endsWith...tin1Char('-'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3463 s << ' ';
never executed: s << ' ';
0
3464 s << "-->";-
3465-
3466 if (!(next
nextDescription
TRUEnever evaluated
FALSEnever evaluated
&& next->isText()
next->isText()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
3467 s << endl;
never executed: s << endl;
0
3468}
never executed: end of block
0
3469QDomComment::QDomComment()-
3470 : QDomCharacterData()-
3471{-
3472}
never executed: end of block
0
3473QDomComment::QDomComment(const QDomComment& x)-
3474 : QDomCharacterData(x)-
3475{-
3476}
never executed: end of block
0
3477-
3478QDomComment::QDomComment(QDomCommentPrivate* n)-
3479 : QDomCharacterData(n)-
3480{-
3481}
never executed: end of block
0
3482QDomComment& QDomComment::operator= (const QDomComment& x)-
3483{-
3484 return
never executed: return (QDomComment&) QDomNode::operator=(x);
(QDomComment&) QDomNode::operator=(x);
never executed: return (QDomComment&) QDomNode::operator=(x);
0
3485}-
3486QDomCDATASectionPrivate::QDomCDATASectionPrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent,-
3487 const QString& val)-
3488 : QDomTextPrivate(d, parent, val)-
3489{-
3490 name = QLatin1String("#cdata-section");-
3491}
never executed: end of block
0
3492-
3493QDomCDATASectionPrivate::QDomCDATASectionPrivate(QDomCDATASectionPrivate* n, bool deep)-
3494 : QDomTextPrivate(n, deep)-
3495{-
3496}
never executed: end of block
0
3497-
3498QDomNodePrivate* QDomCDATASectionPrivate::cloneNode(bool deep)-
3499{-
3500 QDomNodePrivate* p = new QDomCDATASectionPrivate(this, deep);-
3501-
3502 p->ref.deref();-
3503 return
never executed: return p;
p;
never executed: return p;
0
3504}-
3505-
3506void QDomCDATASectionPrivate::save(QTextStream& s, int, int) const-
3507{-
3508-
3509-
3510 s << "<![CDATA[" << value << "]]>";-
3511}
never executed: end of block
0
3512QDomCDATASection::QDomCDATASection()-
3513 : QDomText()-
3514{-
3515}
never executed: end of block
0
3516QDomCDATASection::QDomCDATASection(const QDomCDATASection& x)-
3517 : QDomText(x)-
3518{-
3519}
never executed: end of block
0
3520-
3521QDomCDATASection::QDomCDATASection(QDomCDATASectionPrivate* n)-
3522 : QDomText(n)-
3523{-
3524}
never executed: end of block
0
3525QDomCDATASection& QDomCDATASection::operator= (const QDomCDATASection& x)-
3526{-
3527 return
never executed: return (QDomCDATASection&) QDomNode::operator=(x);
(QDomCDATASection&) QDomNode::operator=(x);
never executed: return (QDomCDATASection&) QDomNode::operator=(x);
0
3528}-
3529QDomNotationPrivate::QDomNotationPrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent,-
3530 const QString& aname,-
3531 const QString& pub, const QString& sys)-
3532 : QDomNodePrivate(d, parent)-
3533{-
3534 name = aname;-
3535 m_pub = pub;-
3536 m_sys = sys;-
3537}
never executed: end of block
0
3538-
3539QDomNotationPrivate::QDomNotationPrivate(QDomNotationPrivate* n, bool deep)-
3540 : QDomNodePrivate(n, deep)-
3541{-
3542 m_sys = n->m_sys;-
3543 m_pub = n->m_pub;-
3544}
never executed: end of block
0
3545-
3546QDomNodePrivate* QDomNotationPrivate::cloneNode(bool deep)-
3547{-
3548 QDomNodePrivate* p = new QDomNotationPrivate(this, deep);-
3549-
3550 p->ref.deref();-
3551 return
never executed: return p;
p;
never executed: return p;
0
3552}-
3553-
3554void QDomNotationPrivate::save(QTextStream& s, int, int) const-
3555{-
3556 s << "<!NOTATION " << name << ' ';-
3557 if (!m_pub.isNull()
!m_pub.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3558 s << "PUBLIC " << quotedValue(m_pub);-
3559 if (!m_sys.isNull()
!m_sys.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3560 s << ' ' << quotedValue(m_sys);
never executed: s << ' ' << quotedValue(m_sys);
0
3561 }
never executed: end of block
else {
0
3562 s << "SYSTEM " << quotedValue(m_sys);-
3563 }
never executed: end of block
0
3564 s << '>' << endl;-
3565}
never executed: end of block
0
3566QDomNotation::QDomNotation()-
3567 : QDomNode()-
3568{-
3569}
never executed: end of block
0
3570QDomNotation::QDomNotation(const QDomNotation& x)-
3571 : QDomNode(x)-
3572{-
3573}
never executed: end of block
0
3574-
3575QDomNotation::QDomNotation(QDomNotationPrivate* n)-
3576 : QDomNode(n)-
3577{-
3578}
never executed: end of block
0
3579QDomNotation& QDomNotation::operator= (const QDomNotation& x)-
3580{-
3581 return
never executed: return (QDomNotation&) QDomNode::operator=(x);
(QDomNotation&) QDomNode::operator=(x);
never executed: return (QDomNotation&) QDomNode::operator=(x);
0
3582}-
3583QString QDomNotation::publicId() const-
3584{-
3585 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3586 return
never executed: return QString();
QString();
never executed: return QString();
0
3587 return
never executed: return ((QDomNotationPrivate*)impl)->m_pub;
((QDomNotationPrivate*)impl)->m_pub;
never executed: return ((QDomNotationPrivate*)impl)->m_pub;
0
3588}-
3589-
3590-
3591-
3592-
3593QString QDomNotation::systemId() const-
3594{-
3595 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3596 return
never executed: return QString();
QString();
never executed: return QString();
0
3597 return
never executed: return ((QDomNotationPrivate*)impl)->m_sys;
((QDomNotationPrivate*)impl)->m_sys;
never executed: return ((QDomNotationPrivate*)impl)->m_sys;
0
3598}-
3599QDomEntityPrivate::QDomEntityPrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent,-
3600 const QString& aname,-
3601 const QString& pub, const QString& sys, const QString& notation)-
3602 : QDomNodePrivate(d, parent)-
3603{-
3604 name = aname;-
3605 m_pub = pub;-
3606 m_sys = sys;-
3607 m_notationName = notation;-
3608}
never executed: end of block
0
3609-
3610QDomEntityPrivate::QDomEntityPrivate(QDomEntityPrivate* n, bool deep)-
3611 : QDomNodePrivate(n, deep)-
3612{-
3613 m_sys = n->m_sys;-
3614 m_pub = n->m_pub;-
3615 m_notationName = n->m_notationName;-
3616}
never executed: end of block
0
3617-
3618QDomNodePrivate* QDomEntityPrivate::cloneNode(bool deep)-
3619{-
3620 QDomNodePrivate* p = new QDomEntityPrivate(this, deep);-
3621-
3622 p->ref.deref();-
3623 return
never executed: return p;
p;
never executed: return p;
0
3624}-
3625-
3626-
3627-
3628-
3629static QByteArray encodeEntity(const QByteArray& str)-
3630{-
3631 QByteArray tmp(str);-
3632 int len = tmp.size();-
3633 int i = 0;-
3634 const char* d = tmp.constData();-
3635 while (i < len
i < lenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3636 if (d[i] == '%'
d[i] == '%'Description
TRUEnever evaluated
FALSEnever evaluated
){
0
3637 tmp.replace(i, 1, "&#60;");-
3638 d = tmp.constData();-
3639 len += 4;-
3640 i += 5;-
3641 }
never executed: end of block
0
3642 else if (d[i] == '"'
d[i] == '"'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3643 tmp.replace(i, 1, "&#34;");-
3644 d = tmp.constData();-
3645 len += 4;-
3646 i += 5;-
3647 }
never executed: end of block
else if (d[i] == '&'
d[i] == '&'Description
TRUEnever evaluated
FALSEnever evaluated
&& i + 1 < len
i + 1 < lenDescription
TRUEnever evaluated
FALSEnever evaluated
&& d[i+1] == '#'
d[i+1] == '#'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3648-
3649-
3650 tmp.replace(i, 1, "&#38;");-
3651 d = tmp.constData();-
3652 len += 4;-
3653 i += 5;-
3654 }
never executed: end of block
else {
0
3655 ++i;-
3656 }
never executed: end of block
0
3657 }-
3658-
3659 return
never executed: return tmp;
tmp;
never executed: return tmp;
0
3660}-
3661-
3662void QDomEntityPrivate::save(QTextStream& s, int, int) const-
3663{-
3664 QString _name = name;-
3665 if (_name.startsWith(QLatin1Char('%'))
_name.startsWi...tin1Char('%'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3666 _name = QLatin1String("% ") + _name.mid(1);
never executed: _name = QLatin1String("% ") + _name.mid(1);
0
3667-
3668 if (m_sys.isNull()
m_sys.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& m_pub.isNull()
m_pub.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3669 s << "<!ENTITY " << _name << " \"" << encodeEntity(value.toUtf8()) << "\">" << endl;-
3670 }
never executed: end of block
else {
0
3671 s << "<!ENTITY " << _name << ' ';-
3672 if (m_pub.isNull()
m_pub.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3673 s << "SYSTEM " << quotedValue(m_sys);-
3674 }
never executed: end of block
else {
0
3675 s << "PUBLIC " << quotedValue(m_pub) << ' ' << quotedValue(m_sys);-
3676 }
never executed: end of block
0
3677 if (! m_notationName.isNull()
! m_notationName.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3678 s << " NDATA " << m_notationName;-
3679 }
never executed: end of block
0
3680 s << '>' << endl;-
3681 }
never executed: end of block
0
3682}-
3683QDomEntity::QDomEntity()-
3684 : QDomNode()-
3685{-
3686}
never executed: end of block
0
3687QDomEntity::QDomEntity(const QDomEntity& x)-
3688 : QDomNode(x)-
3689{-
3690}
never executed: end of block
0
3691-
3692QDomEntity::QDomEntity(QDomEntityPrivate* n)-
3693 : QDomNode(n)-
3694{-
3695}
never executed: end of block
0
3696QDomEntity& QDomEntity::operator= (const QDomEntity& x)-
3697{-
3698 return
never executed: return (QDomEntity&) QDomNode::operator=(x);
(QDomEntity&) QDomNode::operator=(x);
never executed: return (QDomEntity&) QDomNode::operator=(x);
0
3699}-
3700QString QDomEntity::publicId() const-
3701{-
3702 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3703 return
never executed: return QString();
QString();
never executed: return QString();
0
3704 return
never executed: return ((QDomEntityPrivate*)impl)->m_pub;
((QDomEntityPrivate*)impl)->m_pub;
never executed: return ((QDomEntityPrivate*)impl)->m_pub;
0
3705}-
3706-
3707-
3708-
3709-
3710-
3711QString QDomEntity::systemId() const-
3712{-
3713 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3714 return
never executed: return QString();
QString();
never executed: return QString();
0
3715 return
never executed: return ((QDomEntityPrivate*)impl)->m_sys;
((QDomEntityPrivate*)impl)->m_sys;
never executed: return ((QDomEntityPrivate*)impl)->m_sys;
0
3716}-
3717-
3718-
3719-
3720-
3721-
3722-
3723QString QDomEntity::notationName() const-
3724{-
3725 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3726 return
never executed: return QString();
QString();
never executed: return QString();
0
3727 return
never executed: return ((QDomEntityPrivate*)impl)->m_notationName;
((QDomEntityPrivate*)impl)->m_notationName;
never executed: return ((QDomEntityPrivate*)impl)->m_notationName;
0
3728}-
3729QDomEntityReferencePrivate::QDomEntityReferencePrivate(QDomDocumentPrivate* d, QDomNodePrivate* parent, const QString& aname)-
3730 : QDomNodePrivate(d, parent)-
3731{-
3732 name = aname;-
3733}
never executed: end of block
0
3734-
3735QDomEntityReferencePrivate::QDomEntityReferencePrivate(QDomNodePrivate* n, bool deep)-
3736 : QDomNodePrivate(n, deep)-
3737{-
3738}
never executed: end of block
0
3739-
3740QDomNodePrivate* QDomEntityReferencePrivate::cloneNode(bool deep)-
3741{-
3742 QDomNodePrivate* p = new QDomEntityReferencePrivate(this, deep);-
3743-
3744 p->ref.deref();-
3745 return
never executed: return p;
p;
never executed: return p;
0
3746}-
3747-
3748void QDomEntityReferencePrivate::save(QTextStream& s, int, int) const-
3749{-
3750 s << '&' << name << ';';-
3751}
never executed: end of block
0
3752QDomEntityReference::QDomEntityReference()-
3753 : QDomNode()-
3754{-
3755}
never executed: end of block
0
3756QDomEntityReference::QDomEntityReference(const QDomEntityReference& x)-
3757 : QDomNode(x)-
3758{-
3759}
never executed: end of block
0
3760-
3761QDomEntityReference::QDomEntityReference(QDomEntityReferencePrivate* n)-
3762 : QDomNode(n)-
3763{-
3764}
never executed: end of block
0
3765QDomEntityReference& QDomEntityReference::operator= (const QDomEntityReference& x)-
3766{-
3767 return
never executed: return (QDomEntityReference&) QDomNode::operator=(x);
(QDomEntityReference&) QDomNode::operator=(x);
never executed: return (QDomEntityReference&) QDomNode::operator=(x);
0
3768}-
3769QDomProcessingInstructionPrivate::QDomProcessingInstructionPrivate(QDomDocumentPrivate* d,-
3770 QDomNodePrivate* parent, const QString& target, const QString& data)-
3771 : QDomNodePrivate(d, parent)-
3772{-
3773 name = target;-
3774 value = data;-
3775}
never executed: end of block
0
3776-
3777QDomProcessingInstructionPrivate::QDomProcessingInstructionPrivate(QDomProcessingInstructionPrivate* n, bool deep)-
3778 : QDomNodePrivate(n, deep)-
3779{-
3780}
never executed: end of block
0
3781-
3782-
3783QDomNodePrivate* QDomProcessingInstructionPrivate::cloneNode(bool deep)-
3784{-
3785 QDomNodePrivate* p = new QDomProcessingInstructionPrivate(this, deep);-
3786-
3787 p->ref.deref();-
3788 return
never executed: return p;
p;
never executed: return p;
0
3789}-
3790-
3791void QDomProcessingInstructionPrivate::save(QTextStream& s, int, int) const-
3792{-
3793 s << "<?" << name << ' ' << value << "?>" << endl;-
3794}
never executed: end of block
0
3795QDomProcessingInstruction::QDomProcessingInstruction()-
3796 : QDomNode()-
3797{-
3798}
never executed: end of block
0
3799QDomProcessingInstruction::QDomProcessingInstruction(const QDomProcessingInstruction& x)-
3800 : QDomNode(x)-
3801{-
3802}
never executed: end of block
0
3803-
3804QDomProcessingInstruction::QDomProcessingInstruction(QDomProcessingInstructionPrivate* n)-
3805 : QDomNode(n)-
3806{-
3807}
never executed: end of block
0
3808QDomProcessingInstruction& QDomProcessingInstruction::operator= (const QDomProcessingInstruction& x)-
3809{-
3810 return
never executed: return (QDomProcessingInstruction&) QDomNode::operator=(x);
(QDomProcessingInstruction&) QDomNode::operator=(x);
never executed: return (QDomProcessingInstruction&) QDomNode::operator=(x);
0
3811}-
3812QString QDomProcessingInstruction::target() const-
3813{-
3814 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3815 return
never executed: return QString();
QString();
never executed: return QString();
0
3816 return
never executed: return impl->nodeName();
impl->nodeName();
never executed: return impl->nodeName();
0
3817}-
3818-
3819-
3820-
3821-
3822-
3823-
3824QString QDomProcessingInstruction::data() const-
3825{-
3826 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3827 return
never executed: return QString();
QString();
never executed: return QString();
0
3828 return
never executed: return impl->nodeValue();
impl->nodeValue();
never executed: return impl->nodeValue();
0
3829}-
3830-
3831-
3832-
3833-
3834-
3835-
3836void QDomProcessingInstruction::setData(const QString& d)-
3837{-
3838 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3839 return;
never executed: return;
0
3840 impl->setNodeValue(d);-
3841}
never executed: end of block
0
3842-
3843-
3844-
3845-
3846-
3847-
3848-
3849QDomDocumentPrivate::QDomDocumentPrivate()-
3850 : QDomNodePrivate(0),-
3851 impl(new QDomImplementationPrivate),-
3852 nodeListTime(1)-
3853{-
3854 type = new QDomDocumentTypePrivate(this, this);-
3855 type->ref.deref();-
3856-
3857 name = QLatin1String("#document");-
3858}
executed 242 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
242
3859-
3860QDomDocumentPrivate::QDomDocumentPrivate(const QString& aname)-
3861 : QDomNodePrivate(0),-
3862 impl(new QDomImplementationPrivate),-
3863 nodeListTime(1)-
3864{-
3865 type = new QDomDocumentTypePrivate(this, this);-
3866 type->ref.deref();-
3867 type->name = aname;-
3868-
3869 name = QLatin1String("#document");-
3870}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2
3871-
3872QDomDocumentPrivate::QDomDocumentPrivate(QDomDocumentTypePrivate* dt)-
3873 : QDomNodePrivate(0),-
3874 impl(new QDomImplementationPrivate),-
3875 nodeListTime(1)-
3876{-
3877 if (dt != 0
dt != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3878 type = dt;-
3879 }
never executed: end of block
else {
0
3880 type = new QDomDocumentTypePrivate(this, this);-
3881 type->ref.deref();-
3882 }
never executed: end of block
0
3883-
3884 name = QLatin1String("#document");-
3885}
never executed: end of block
0
3886-
3887QDomDocumentPrivate::QDomDocumentPrivate(QDomDocumentPrivate* n, bool deep)-
3888 : QDomNodePrivate(n, deep),-
3889 impl(n->impl->clone()),-
3890 nodeListTime(1)-
3891{-
3892 type = static_cast<QDomDocumentTypePrivate*>(n->type->cloneNode());-
3893 type->setParent(this);-
3894}
never executed: end of block
0
3895-
3896QDomDocumentPrivate::~QDomDocumentPrivate()-
3897{-
3898}-
3899-
3900void QDomDocumentPrivate::clear()-
3901{-
3902 impl.reset();-
3903 type.reset();-
3904 QDomNodePrivate::clear();-
3905}
executed 244 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
3906-
3907static void initializeReader(QXmlSimpleReader &reader, bool namespaceProcessing)-
3908{-
3909 reader.setFeature(QLatin1String("http://xml.org/sax/features/namespaces"), namespaceProcessing);-
3910 reader.setFeature(QLatin1String("http://xml.org/sax/features/namespace-prefixes"), !namespaceProcessing);-
3911 reader.setFeature(QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData"), false);-
3912}
executed 244 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
3913-
3914bool QDomDocumentPrivate::setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)-
3915{-
3916 QXmlSimpleReader reader;-
3917 initializeReader(reader, namespaceProcessing);-
3918 return
executed 244 times by 5 tests: return setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
executed 244 times by 5 tests: return setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
3919}-
3920-
3921bool QDomDocumentPrivate::setContent(QXmlInputSource *source, QXmlReader *reader, QXmlSimpleReader *simpleReader, QString *errorMsg, int *errorLine, int *errorColumn)-
3922{-
3923 clear();-
3924 impl = new QDomImplementationPrivate;-
3925 type = new QDomDocumentTypePrivate(this, this);-
3926 type->ref.deref();-
3927-
3928 bool namespaceProcessing = reader->feature(QLatin1String("http://xml.org/sax/features/namespaces"))
reader->featur.../namespaces"))Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 242 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
2-242
3929 && !reader->feature(QLatin1String("http://xml.org/sax/features/namespace-prefixes"))
!reader->featu...ce-prefixes"))Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
;
0-2
3930-
3931 QDomHandler hnd(this, simpleReader, namespaceProcessing);-
3932 reader->setContentHandler(&hnd);-
3933 reader->setErrorHandler(&hnd);-
3934 reader->setLexicalHandler(&hnd);-
3935 reader->setDeclHandler(&hnd);-
3936 reader->setDTDHandler(&hnd);-
3937-
3938 if (!reader->parse(source)
!reader->parse(source)Description
TRUEnever evaluated
FALSEevaluated 244 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-244
3939 if (errorMsg
errorMsgDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3940 *
never executed: *errorMsg = hnd.errorMsg;
errorMsg = hnd.errorMsg;
never executed: *errorMsg = hnd.errorMsg;
0
3941 if (errorLine
errorLineDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3942 *
never executed: *errorLine = hnd.errorLine;
errorLine = hnd.errorLine;
never executed: *errorLine = hnd.errorLine;
0
3943 if (errorColumn
errorColumnDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3944 *
never executed: *errorColumn = hnd.errorColumn;
errorColumn = hnd.errorColumn;
never executed: *errorColumn = hnd.errorColumn;
0
3945 return
never executed: return false;
false;
never executed: return false;
0
3946 }-
3947-
3948 return
executed 244 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 244 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
3949}-
3950-
3951QDomNodePrivate* QDomDocumentPrivate::cloneNode(bool deep)-
3952{-
3953 QDomNodePrivate *p = new QDomDocumentPrivate(this, deep);-
3954-
3955 p->ref.deref();-
3956 return
never executed: return p;
p;
never executed: return p;
0
3957}-
3958-
3959QDomElementPrivate* QDomDocumentPrivate::documentElement()-
3960{-
3961 QDomNodePrivate *p = first;-
3962 while (p
pDescription
TRUEevaluated 97 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
&& !p->isElement()
!p->isElement()Description
TRUEnever evaluated
FALSEevaluated 97 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-97
3963 p = p->next;
never executed: p = p->next;
0
3964-
3965 return
executed 97 times by 1 test: return static_cast<QDomElementPrivate *>(p);
Executed by:
  • tst_qcssparser - unknown status
static_cast<QDomElementPrivate *>(p);
executed 97 times by 1 test: return static_cast<QDomElementPrivate *>(p);
Executed by:
  • tst_qcssparser - unknown status
97
3966}-
3967-
3968QDomElementPrivate* QDomDocumentPrivate::createElement(const QString &tagName)-
3969{-
3970 bool ok;-
3971 QString fixedName = fixedXmlName(tagName, &ok);-
3972 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 1021 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
)
0-1021
3973 return
never executed: return 0;
0;
never executed: return 0;
0
3974-
3975 QDomElementPrivate *e = new QDomElementPrivate(this, 0, fixedName);-
3976 e->ref.deref();-
3977 return
executed 1021 times by 4 tests: return e;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
e;
executed 1021 times by 4 tests: return e;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
1021
3978}-
3979-
3980QDomElementPrivate* QDomDocumentPrivate::createElementNS(const QString &nsURI, const QString &qName)-
3981{-
3982 bool ok;-
3983 QString fixedName = fixedXmlName(qName, &ok, true);-
3984 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
0-2
3985 return
never executed: return 0;
0;
never executed: return 0;
0
3986-
3987 QDomElementPrivate *e = new QDomElementPrivate(this, 0, nsURI, fixedName);-
3988 e->ref.deref();-
3989 return
executed 2 times by 1 test: return e;
Executed by:
  • tst_qxmlsimplereader - unknown status
e;
executed 2 times by 1 test: return e;
Executed by:
  • tst_qxmlsimplereader - unknown status
2
3990}-
3991-
3992QDomDocumentFragmentPrivate* QDomDocumentPrivate::createDocumentFragment()-
3993{-
3994 QDomDocumentFragmentPrivate *f = new QDomDocumentFragmentPrivate(this, (QDomNodePrivate*)0);-
3995 f->ref.deref();-
3996 return
never executed: return f;
f;
never executed: return f;
0
3997}-
3998-
3999QDomTextPrivate* QDomDocumentPrivate::createTextNode(const QString &data)-
4000{-
4001 bool ok;-
4002 QString fixedData = fixedCharData(data, &ok);-
4003 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 125 times by 2 tests
Evaluated by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
)
0-125
4004 return
never executed: return 0;
0;
never executed: return 0;
0
4005-
4006 QDomTextPrivate *t = new QDomTextPrivate(this, 0, fixedData);-
4007 t->ref.deref();-
4008 return
executed 125 times by 2 tests: return t;
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
t;
executed 125 times by 2 tests: return t;
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
125
4009}-
4010-
4011QDomCommentPrivate* QDomDocumentPrivate::createComment(const QString &data)-
4012{-
4013 bool ok;-
4014 QString fixedData = fixedComment(data, &ok);-
4015 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4016 return
never executed: return 0;
0;
never executed: return 0;
0
4017-
4018 QDomCommentPrivate *c = new QDomCommentPrivate(this, 0, fixedData);-
4019 c->ref.deref();-
4020 return
never executed: return c;
c;
never executed: return c;
0
4021}-
4022-
4023QDomCDATASectionPrivate* QDomDocumentPrivate::createCDATASection(const QString &data)-
4024{-
4025 bool ok;-
4026 QString fixedData = fixedCDataSection(data, &ok);-
4027 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4028 return
never executed: return 0;
0;
never executed: return 0;
0
4029-
4030 QDomCDATASectionPrivate *c = new QDomCDATASectionPrivate(this, 0, fixedData);-
4031 c->ref.deref();-
4032 return
never executed: return c;
c;
never executed: return c;
0
4033}-
4034-
4035QDomProcessingInstructionPrivate* QDomDocumentPrivate::createProcessingInstruction(const QString &target,-
4036 const QString &data)-
4037{-
4038 bool ok;-
4039 QString fixedData = fixedPIData(data, &ok);-
4040 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4041 return
never executed: return 0;
0;
never executed: return 0;
0
4042-
4043 QString fixedTarget = fixedXmlName(target, &ok);-
4044 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4045 return
never executed: return 0;
0;
never executed: return 0;
0
4046-
4047 QDomProcessingInstructionPrivate *p = new QDomProcessingInstructionPrivate(this, 0, fixedTarget, fixedData);-
4048 p->ref.deref();-
4049 return
never executed: return p;
p;
never executed: return p;
0
4050}-
4051QDomAttrPrivate* QDomDocumentPrivate::createAttribute(const QString &aname)-
4052{-
4053 bool ok;-
4054 QString fixedName = fixedXmlName(aname, &ok);-
4055 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4056 return
never executed: return 0;
0;
never executed: return 0;
0
4057-
4058 QDomAttrPrivate *a = new QDomAttrPrivate(this, 0, fixedName);-
4059 a->ref.deref();-
4060 return
never executed: return a;
a;
never executed: return a;
0
4061}-
4062-
4063QDomAttrPrivate* QDomDocumentPrivate::createAttributeNS(const QString &nsURI, const QString &qName)-
4064{-
4065 bool ok;-
4066 QString fixedName = fixedXmlName(qName, &ok, true);-
4067 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4068 return
never executed: return 0;
0;
never executed: return 0;
0
4069-
4070 QDomAttrPrivate *a = new QDomAttrPrivate(this, 0, nsURI, fixedName);-
4071 a->ref.deref();-
4072 return
never executed: return a;
a;
never executed: return a;
0
4073}-
4074-
4075QDomEntityReferencePrivate* QDomDocumentPrivate::createEntityReference(const QString &aname)-
4076{-
4077 bool ok;-
4078 QString fixedName = fixedXmlName(aname, &ok);-
4079 if (!ok
!okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4080 return
never executed: return 0;
0;
never executed: return 0;
0
4081-
4082 QDomEntityReferencePrivate *e = new QDomEntityReferencePrivate(this, 0, fixedName);-
4083 e->ref.deref();-
4084 return
never executed: return e;
e;
never executed: return e;
0
4085}-
4086-
4087QDomNodePrivate* QDomDocumentPrivate::importNode(QDomNodePrivate *importedNode, bool deep)-
4088{-
4089 QDomNodePrivate *node = 0;-
4090 switch (importedNode->nodeType()) {-
4091 case
never executed: case QDomNode::AttributeNode:
QDomNode::AttributeNode:
never executed: case QDomNode::AttributeNode:
0
4092 node = new QDomAttrPrivate((QDomAttrPrivate*)importedNode, true);-
4093 break;
never executed: break;
0
4094 case
never executed: case QDomNode::DocumentFragmentNode:
QDomNode::DocumentFragmentNode:
never executed: case QDomNode::DocumentFragmentNode:
0
4095 node = new QDomDocumentFragmentPrivate((QDomDocumentFragmentPrivate*)importedNode, deep);-
4096 break;
never executed: break;
0
4097 case
never executed: case QDomNode::ElementNode:
QDomNode::ElementNode:
never executed: case QDomNode::ElementNode:
0
4098 node = new QDomElementPrivate((QDomElementPrivate*)importedNode, deep);-
4099 break;
never executed: break;
0
4100 case
never executed: case QDomNode::EntityNode:
QDomNode::EntityNode:
never executed: case QDomNode::EntityNode:
0
4101 node = new QDomEntityPrivate((QDomEntityPrivate*)importedNode, deep);-
4102 break;
never executed: break;
0
4103 case
never executed: case QDomNode::EntityReferenceNode:
QDomNode::EntityReferenceNode:
never executed: case QDomNode::EntityReferenceNode:
0
4104 node = new QDomEntityReferencePrivate((QDomEntityReferencePrivate*)importedNode, false);-
4105 break;
never executed: break;
0
4106 case
never executed: case QDomNode::NotationNode:
QDomNode::NotationNode:
never executed: case QDomNode::NotationNode:
0
4107 node = new QDomNotationPrivate((QDomNotationPrivate*)importedNode, deep);-
4108 break;
never executed: break;
0
4109 case
never executed: case QDomNode::ProcessingInstructionNode:
QDomNode::ProcessingInstructionNode:
never executed: case QDomNode::ProcessingInstructionNode:
0
4110 node = new QDomProcessingInstructionPrivate((QDomProcessingInstructionPrivate*)importedNode, deep);-
4111 break;
never executed: break;
0
4112 case
never executed: case QDomNode::TextNode:
QDomNode::TextNode:
never executed: case QDomNode::TextNode:
0
4113 node = new QDomTextPrivate((QDomTextPrivate*)importedNode, deep);-
4114 break;
never executed: break;
0
4115 case
never executed: case QDomNode::CDATASectionNode:
QDomNode::CDATASectionNode:
never executed: case QDomNode::CDATASectionNode:
0
4116 node = new QDomCDATASectionPrivate((QDomCDATASectionPrivate*)importedNode, deep);-
4117 break;
never executed: break;
0
4118 case
never executed: case QDomNode::CommentNode:
QDomNode::CommentNode:
never executed: case QDomNode::CommentNode:
0
4119 node = new QDomCommentPrivate((QDomCommentPrivate*)importedNode, deep);-
4120 break;
never executed: break;
0
4121 default
never executed: default:
:
never executed: default:
0
4122 break;
never executed: break;
0
4123 }-
4124 if (node
nodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4125 node->setOwnerDocument(this);-
4126-
4127-
4128 node->ref.deref();-
4129 }
never executed: end of block
0
4130 return
never executed: return node;
node;
never executed: return node;
0
4131}-
4132-
4133void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNode::EncodingPolicy encUsed) const-
4134{-
4135 const QDomNodePrivate* n = first;-
4136-
4137 if(encUsed == QDomNode::EncodingFromDocument
encUsed == QDo...ngFromDocumentDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-86
4138-
4139 const QDomNodePrivate* n = first;-
4140-
4141 QTextCodec *codec = 0;-
4142-
4143 if (n
nDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& n->isProcessingInstruction()
n->isProcessingInstruction()Description
TRUEnever evaluated
FALSEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
&& n->nodeName() == QLatin1String("xml")
n->nodeName() ...1String("xml")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-86
4144-
4145 QString data = n->nodeValue();-
4146 QRegExp encoding(QString::fromLatin1("encoding\\s*=\\s*((\"([^\"]*)\")|('([^']*)'))"));-
4147 encoding.indexIn(data);-
4148 QString enc = encoding.cap(3);-
4149 if (enc.isEmpty()
enc.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4150 enc = encoding.cap(5);
never executed: enc = encoding.cap(5);
0
4151 if (!enc.isEmpty()
!enc.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4152 codec = QTextCodec::codecForName(enc.toLatin1().data());
never executed: codec = QTextCodec::codecForName(enc.toLatin1().data());
0
4153 }
never executed: end of block
0
4154 if (!codec
!codecDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-86
4155 codec = QTextCodec::codecForName("UTF-8");
executed 86 times by 2 tests: codec = QTextCodec::codecForName("UTF-8");
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
4156 if (codec
codecDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
)
0-86
4157 s.setCodec(codec);
executed 86 times by 2 tests: s.setCodec(codec);
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
4158-
4159 bool doc = false;-
4160-
4161 while (n
nDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
) {
86
4162 if (!doc
!docDescription
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& !(n->isProcessingInstruction()
n->isProcessingInstruction()Description
TRUEnever evaluated
FALSEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
&& n->nodeName() == QLatin1String("xml")
n->nodeName() ...1String("xml")Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0-86
4163-
4164 type->save(s, 0, indent);-
4165 doc = true;-
4166 }
executed 86 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
4167 n->save(s, 0, indent);-
4168 n = n->next;-
4169 }
executed 86 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
4170 }
executed 86 times by 2 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
4171 else {-
4172-
4173-
4174-
4175-
4176-
4177 const QTextCodec *const codec = s.codec();-
4178 ((!(codec)) ? qt_assert_x("QDomNode::save()", "A codec must be specified in the text stream.",__FILE__,6471) : qt_noop());-
4179 const QByteArray codecName = codec->name();-
4180-
4181-
4182 s << "<?xml version=\"1.0\" encoding=\""-
4183 << codecName-
4184 << "\"?>\n";-
4185-
4186-
4187 const QDomNodePrivate* startNode = n;-
4188-
4189-
4190 while (n
nDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4191 if(n->isProcessingInstruction()
n->isProcessingInstruction()Description
TRUEnever evaluated
FALSEnever evaluated
&& n->nodeName() == QLatin1String("xml")
n->nodeName() ...1String("xml")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4192 startNode = n->next;-
4193 break;
never executed: break;
0
4194 }-
4195 else-
4196 n = n->next;
never executed: n = n->next;
0
4197 }-
4198-
4199-
4200 while(startNode
startNodeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4201 startNode->save(s, 0, indent);-
4202 startNode = startNode->next;-
4203 }
never executed: end of block
0
4204 }
never executed: end of block
0
4205}-
4206QDomDocument::QDomDocument()-
4207{-
4208 impl = 0;-
4209}
executed 242 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
242
4210-
4211-
4212-
4213-
4214-
4215QDomDocument::QDomDocument(const QString& name)-
4216{-
4217-
4218 impl = new QDomDocumentPrivate(name);-
4219}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2
4220-
4221-
4222-
4223-
4224-
4225-
4226QDomDocument::QDomDocument(const QDomDocumentType& doctype)-
4227{-
4228 impl = new QDomDocumentPrivate((QDomDocumentTypePrivate*)(doctype.impl));-
4229}
never executed: end of block
0
4230QDomDocument::QDomDocument(const QDomDocument& x)-
4231 : QDomNode(x)-
4232{-
4233}
executed 97 times by 1 test: end of block
Executed by:
  • tst_qcssparser - unknown status
97
4234-
4235QDomDocument::QDomDocument(QDomDocumentPrivate* x)-
4236 : QDomNode(x)-
4237{-
4238}
never executed: end of block
0
4239QDomDocument& QDomDocument::operator= (const QDomDocument& x)-
4240{-
4241 return
never executed: return (QDomDocument&) QDomNode::operator=(x);
(QDomDocument&) QDomNode::operator=(x);
never executed: return (QDomDocument&) QDomNode::operator=(x);
0
4242}-
4243-
4244-
4245-
4246-
4247QDomDocument::~QDomDocument()-
4248{-
4249}-
4250bool QDomDocument::setContent(const QString& text, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)-
4251{-
4252 if (!impl
!implDescription
TRUEevaluated 241 times by 3 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
FALSEnever evaluated
)
0-241
4253 impl = new QDomDocumentPrivate();
executed 241 times by 3 tests: impl = new QDomDocumentPrivate();
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
241
4254 QXmlInputSource source;-
4255 source.setData(text);-
4256 return
executed 241 times by 3 tests: return ((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
executed 241 times by 3 tests: return ((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
241
4257}-
4258bool QDomDocument::setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)-
4259{-
4260 if (!impl
!implDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlinputsource - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
1-2
4261 impl = new QDomDocumentPrivate();
executed 1 time by 1 test: impl = new QDomDocumentPrivate();
Executed by:
  • tst_qxmlinputsource - unknown status
1
4262 QBuffer buf;-
4263 buf.setData(data);-
4264 QXmlInputSource source(&buf);-
4265 return
executed 3 times by 2 tests: return ((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
executed 3 times by 2 tests: return ((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
3
4266}-
4267-
4268-
4269-
4270-
4271-
4272-
4273-
4274bool QDomDocument::setContent(QIODevice* dev, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)-
4275{-
4276 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4277 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4278 QXmlInputSource source(dev);-
4279 return
never executed: return ((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
never executed: return ((QDomDocumentPrivate*)impl)->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
0
4280}-
4281bool QDomDocument::setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn )-
4282{-
4283 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4284 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4285 QXmlSimpleReader reader;-
4286 initializeReader(reader, namespaceProcessing);-
4287 return
never executed: return ((QDomDocumentPrivate*)impl)->setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
((QDomDocumentPrivate*)impl)->setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
never executed: return ((QDomDocumentPrivate*)impl)->setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
0
4288}-
4289bool QDomDocument::setContent(const QString& text, QString *errorMsg, int *errorLine, int *errorColumn)-
4290{-
4291 return
executed 241 times by 3 tests: return setContent(text, false, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
setContent(text, false, errorMsg, errorLine, errorColumn);
executed 241 times by 3 tests: return setContent(text, false, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
241
4292}-
4293bool QDomDocument::setContent(const QByteArray& buffer, QString *errorMsg, int *errorLine, int *errorColumn )-
4294{-
4295 return
executed 1 time by 1 test: return setContent(buffer, false, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qxmlinputsource - unknown status
setContent(buffer, false, errorMsg, errorLine, errorColumn);
executed 1 time by 1 test: return setContent(buffer, false, errorMsg, errorLine, errorColumn);
Executed by:
  • tst_qxmlinputsource - unknown status
1
4296}-
4297bool QDomDocument::setContent(QIODevice* dev, QString *errorMsg, int *errorLine, int *errorColumn )-
4298{-
4299 return
never executed: return setContent(dev, false, errorMsg, errorLine, errorColumn);
setContent(dev, false, errorMsg, errorLine, errorColumn);
never executed: return setContent(dev, false, errorMsg, errorLine, errorColumn);
0
4300}-
4301bool QDomDocument::setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg, int *errorLine, int *errorColumn )-
4302{-
4303 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4304 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4305 return
never executed: return ((QDomDocumentPrivate*)impl)->setContent(source, reader, 0, errorMsg, errorLine, errorColumn);
((QDomDocumentPrivate*)impl)->setContent(source, reader, 0, errorMsg, errorLine, errorColumn);
never executed: return ((QDomDocumentPrivate*)impl)->setContent(source, reader, 0, errorMsg, errorLine, errorColumn);
0
4306}-
4307QString QDomDocument::toString(int indent) const-
4308{-
4309 QString str;-
4310 QTextStream s(&str, QIODevice::WriteOnly);-
4311 save(s, indent);-
4312 return
executed 86 times by 2 tests: return str;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
str;
executed 86 times by 2 tests: return str;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qxmlsimplereader - unknown status
86
4313}-
4314QByteArray QDomDocument::toByteArray(int indent) const-
4315{-
4316-
4317-
4318 return
executed 2 times by 1 test: return toString(indent).toUtf8();
Executed by:
  • tst_qxmlsimplereader - unknown status
toString(indent).toUtf8();
executed 2 times by 1 test: return toString(indent).toUtf8();
Executed by:
  • tst_qxmlsimplereader - unknown status
2
4319}-
4320-
4321-
4322-
4323-
4324-
4325QDomDocumentType QDomDocument::doctype() const-
4326{-
4327 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4328 return
never executed: return QDomDocumentType();
QDomDocumentType();
never executed: return QDomDocumentType();
0
4329 return
never executed: return QDomDocumentType(((QDomDocumentPrivate*)impl)->doctype());
QDomDocumentType(((QDomDocumentPrivate*)impl)->doctype());
never executed: return QDomDocumentType(((QDomDocumentPrivate*)impl)->doctype());
0
4330}-
4331-
4332-
4333-
4334-
4335QDomImplementation QDomDocument::implementation() const-
4336{-
4337 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4338 return
never executed: return QDomImplementation();
QDomImplementation();
never executed: return QDomImplementation();
0
4339 return
never executed: return QDomImplementation(((QDomDocumentPrivate*)impl)->implementation());
QDomImplementation(((QDomDocumentPrivate*)impl)->implementation());
never executed: return QDomImplementation(((QDomDocumentPrivate*)impl)->implementation());
0
4340}-
4341-
4342-
4343-
4344-
4345QDomElement QDomDocument::documentElement() const-
4346{-
4347 if (!impl
!implDescription
TRUEnever evaluated
FALSEevaluated 97 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-97
4348 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
4349 return
executed 97 times by 1 test: return QDomElement(((QDomDocumentPrivate*)impl)->documentElement());
Executed by:
  • tst_qcssparser - unknown status
QDomElement(((QDomDocumentPrivate*)impl)->documentElement());
executed 97 times by 1 test: return QDomElement(((QDomDocumentPrivate*)impl)->documentElement());
Executed by:
  • tst_qcssparser - unknown status
97
4350}-
4351QDomElement QDomDocument::createElement(const QString& tagName)-
4352{-
4353 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4354 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4355 return
never executed: return QDomElement(((QDomDocumentPrivate*)impl)->createElement(tagName));
QDomElement(((QDomDocumentPrivate*)impl)->createElement(tagName));
never executed: return QDomElement(((QDomDocumentPrivate*)impl)->createElement(tagName));
0
4356}-
4357-
4358-
4359-
4360-
4361-
4362-
4363QDomDocumentFragment QDomDocument::createDocumentFragment()-
4364{-
4365 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4366 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4367 return
never executed: return QDomDocumentFragment(((QDomDocumentPrivate*)impl)->createDocumentFragment());
QDomDocumentFragment(((QDomDocumentPrivate*)impl)->createDocumentFragment());
never executed: return QDomDocumentFragment(((QDomDocumentPrivate*)impl)->createDocumentFragment());
0
4368}-
4369QDomText QDomDocument::createTextNode(const QString& value)-
4370{-
4371 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4372 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4373 return
never executed: return QDomText(((QDomDocumentPrivate*)impl)->createTextNode(value));
QDomText(((QDomDocumentPrivate*)impl)->createTextNode(value));
never executed: return QDomText(((QDomDocumentPrivate*)impl)->createTextNode(value));
0
4374}-
4375QDomComment QDomDocument::createComment(const QString& value)-
4376{-
4377 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4378 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4379 return
never executed: return QDomComment(((QDomDocumentPrivate*)impl)->createComment(value));
QDomComment(((QDomDocumentPrivate*)impl)->createComment(value));
never executed: return QDomComment(((QDomDocumentPrivate*)impl)->createComment(value));
0
4380}-
4381QDomCDATASection QDomDocument::createCDATASection(const QString& value)-
4382{-
4383 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4384 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4385 return
never executed: return QDomCDATASection(((QDomDocumentPrivate*)impl)->createCDATASection(value));
QDomCDATASection(((QDomDocumentPrivate*)impl)->createCDATASection(value));
never executed: return QDomCDATASection(((QDomDocumentPrivate*)impl)->createCDATASection(value));
0
4386}-
4387QDomProcessingInstruction QDomDocument::createProcessingInstruction(const QString& target,-
4388 const QString& data)-
4389{-
4390 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4391 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4392 return
never executed: return QDomProcessingInstruction(((QDomDocumentPrivate*)impl)->createProcessingInstruction(target, data));
QDomProcessingInstruction(((QDomDocumentPrivate*)impl)->createProcessingInstruction(target, data));
never executed: return QDomProcessingInstruction(((QDomDocumentPrivate*)impl)->createProcessingInstruction(target, data));
0
4393}-
4394QDomAttr QDomDocument::createAttribute(const QString& name)-
4395{-
4396 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4397 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4398 return
never executed: return QDomAttr(((QDomDocumentPrivate*)impl)->createAttribute(name));
QDomAttr(((QDomDocumentPrivate*)impl)->createAttribute(name));
never executed: return QDomAttr(((QDomDocumentPrivate*)impl)->createAttribute(name));
0
4399}-
4400QDomEntityReference QDomDocument::createEntityReference(const QString& name)-
4401{-
4402 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4403 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4404 return
never executed: return QDomEntityReference(((QDomDocumentPrivate*)impl)->createEntityReference(name));
QDomEntityReference(((QDomDocumentPrivate*)impl)->createEntityReference(name));
never executed: return QDomEntityReference(((QDomDocumentPrivate*)impl)->createEntityReference(name));
0
4405}-
4406QDomNodeList QDomDocument::elementsByTagName(const QString& tagname) const-
4407{-
4408 return
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, tagname));
QDomNodeList(new QDomNodeListPrivate(impl, tagname));
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, tagname));
0
4409}-
4410QDomNode QDomDocument::importNode(const QDomNode& importedNode, bool deep)-
4411{-
4412 if (importedNode.isNull()
importedNode.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4413 return
never executed: return QDomNode();
QDomNode();
never executed: return QDomNode();
0
4414 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4415 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4416 return
never executed: return QDomNode(((QDomDocumentPrivate*)impl)->importNode(importedNode.impl, deep));
QDomNode(((QDomDocumentPrivate*)impl)->importNode(importedNode.impl, deep));
never executed: return QDomNode(((QDomDocumentPrivate*)impl)->importNode(importedNode.impl, deep));
0
4417}-
4418QDomElement QDomDocument::createElementNS(const QString& nsURI, const QString& qName)-
4419{-
4420 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4421 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4422 return
never executed: return QDomElement(((QDomDocumentPrivate*)impl)->createElementNS(nsURI, qName));
QDomElement(((QDomDocumentPrivate*)impl)->createElementNS(nsURI, qName));
never executed: return QDomElement(((QDomDocumentPrivate*)impl)->createElementNS(nsURI, qName));
0
4423}-
4424QDomAttr QDomDocument::createAttributeNS(const QString& nsURI, const QString& qName)-
4425{-
4426 if (!impl
!implDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4427 impl = new QDomDocumentPrivate();
never executed: impl = new QDomDocumentPrivate();
0
4428 return
never executed: return QDomAttr(((QDomDocumentPrivate*)impl)->createAttributeNS(nsURI, qName));
QDomAttr(((QDomDocumentPrivate*)impl)->createAttributeNS(nsURI, qName));
never executed: return QDomAttr(((QDomDocumentPrivate*)impl)->createAttributeNS(nsURI, qName));
0
4429}-
4430QDomNodeList QDomDocument::elementsByTagNameNS(const QString& nsURI, const QString& localName)-
4431{-
4432 return
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, nsURI, localName));
QDomNodeList(new QDomNodeListPrivate(impl, nsURI, localName));
never executed: return QDomNodeList(new QDomNodeListPrivate(impl, nsURI, localName));
0
4433}-
4434QDomElement QDomDocument::elementById(const QString& )-
4435{-
4436 QMessageLogger(__FILE__, 7175, __PRETTY_FUNCTION__).warning("elementById() is not implemented and will always return a null node.");-
4437 return
never executed: return QDomElement();
QDomElement();
never executed: return QDomElement();
0
4438}-
4439QDomAttr QDomNode::toAttr() const-
4440{-
4441 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isAttr()
impl->isAttr()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4442 return
never executed: return QDomAttr(((QDomAttrPrivate*)impl));
QDomAttr(((QDomAttrPrivate*)impl));
never executed: return QDomAttr(((QDomAttrPrivate*)impl));
0
4443 return
never executed: return QDomAttr();
QDomAttr();
never executed: return QDomAttr();
0
4444}-
4445-
4446-
4447-
4448-
4449-
4450-
4451-
4452QDomCDATASection QDomNode::toCDATASection() const-
4453{-
4454 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isCDATASection()
impl->isCDATASection()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4455 return
never executed: return QDomCDATASection(((QDomCDATASectionPrivate*)impl));
QDomCDATASection(((QDomCDATASectionPrivate*)impl));
never executed: return QDomCDATASection(((QDomCDATASectionPrivate*)impl));
0
4456 return
never executed: return QDomCDATASection();
QDomCDATASection();
never executed: return QDomCDATASection();
0
4457}-
4458-
4459-
4460-
4461-
4462-
4463-
4464-
4465QDomDocumentFragment QDomNode::toDocumentFragment() const-
4466{-
4467 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isDocumentFragment()
impl->isDocumentFragment()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4468 return
never executed: return QDomDocumentFragment(((QDomDocumentFragmentPrivate*)impl));
QDomDocumentFragment(((QDomDocumentFragmentPrivate*)impl));
never executed: return QDomDocumentFragment(((QDomDocumentFragmentPrivate*)impl));
0
4469 return
never executed: return QDomDocumentFragment();
QDomDocumentFragment();
never executed: return QDomDocumentFragment();
0
4470}-
4471-
4472-
4473-
4474-
4475-
4476-
4477-
4478QDomDocument QDomNode::toDocument() const-
4479{-
4480 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isDocument()
impl->isDocument()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4481 return
never executed: return QDomDocument(((QDomDocumentPrivate*)impl));
QDomDocument(((QDomDocumentPrivate*)impl));
never executed: return QDomDocument(((QDomDocumentPrivate*)impl));
0
4482 return
never executed: return QDomDocument();
QDomDocument();
never executed: return QDomDocument();
0
4483}-
4484-
4485-
4486-
4487-
4488-
4489-
4490-
4491QDomDocumentType QDomNode::toDocumentType() const-
4492{-
4493 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isDocumentType()
impl->isDocumentType()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4494 return
never executed: return QDomDocumentType(((QDomDocumentTypePrivate*)impl));
QDomDocumentType(((QDomDocumentTypePrivate*)impl));
never executed: return QDomDocumentType(((QDomDocumentTypePrivate*)impl));
0
4495 return
never executed: return QDomDocumentType();
QDomDocumentType();
never executed: return QDomDocumentType();
0
4496}-
4497-
4498-
4499-
4500-
4501-
4502-
4503-
4504QDomElement QDomNode::toElement() const-
4505{-
4506 if (impl
implDescription
TRUEevaluated 162 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEnever evaluated
&& impl->isElement()
impl->isElement()Description
TRUEevaluated 159 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qcssparser - unknown status
)
0-162
4507 return
executed 159 times by 1 test: return QDomElement(((QDomElementPrivate*)impl));
Executed by:
  • tst_qcssparser - unknown status
QDomElement(((QDomElementPrivate*)impl));
executed 159 times by 1 test: return QDomElement(((QDomElementPrivate*)impl));
Executed by:
  • tst_qcssparser - unknown status
159
4508 return
executed 3 times by 1 test: return QDomElement();
Executed by:
  • tst_qcssparser - unknown status
QDomElement();
executed 3 times by 1 test: return QDomElement();
Executed by:
  • tst_qcssparser - unknown status
3
4509}-
4510-
4511-
4512-
4513-
4514-
4515-
4516-
4517QDomEntityReference QDomNode::toEntityReference() const-
4518{-
4519 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isEntityReference()
impl->isEntityReference()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4520 return
never executed: return QDomEntityReference(((QDomEntityReferencePrivate*)impl));
QDomEntityReference(((QDomEntityReferencePrivate*)impl));
never executed: return QDomEntityReference(((QDomEntityReferencePrivate*)impl));
0
4521 return
never executed: return QDomEntityReference();
QDomEntityReference();
never executed: return QDomEntityReference();
0
4522}-
4523-
4524-
4525-
4526-
4527-
4528-
4529-
4530QDomText QDomNode::toText() const-
4531{-
4532 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isText()
impl->isText()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4533 return
never executed: return QDomText(((QDomTextPrivate*)impl));
QDomText(((QDomTextPrivate*)impl));
never executed: return QDomText(((QDomTextPrivate*)impl));
0
4534 return
never executed: return QDomText();
QDomText();
never executed: return QDomText();
0
4535}-
4536-
4537-
4538-
4539-
4540-
4541-
4542-
4543QDomEntity QDomNode::toEntity() const-
4544{-
4545 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isEntity()
impl->isEntity()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4546 return
never executed: return QDomEntity(((QDomEntityPrivate*)impl));
QDomEntity(((QDomEntityPrivate*)impl));
never executed: return QDomEntity(((QDomEntityPrivate*)impl));
0
4547 return
never executed: return QDomEntity();
QDomEntity();
never executed: return QDomEntity();
0
4548}-
4549-
4550-
4551-
4552-
4553-
4554-
4555-
4556QDomNotation QDomNode::toNotation() const-
4557{-
4558 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isNotation()
impl->isNotation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4559 return
never executed: return QDomNotation(((QDomNotationPrivate*)impl));
QDomNotation(((QDomNotationPrivate*)impl));
never executed: return QDomNotation(((QDomNotationPrivate*)impl));
0
4560 return
never executed: return QDomNotation();
QDomNotation();
never executed: return QDomNotation();
0
4561}-
4562-
4563-
4564-
4565-
4566-
4567-
4568-
4569QDomProcessingInstruction QDomNode::toProcessingInstruction() const-
4570{-
4571 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isProcessingInstruction()
impl->isProces...gInstruction()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4572 return
never executed: return QDomProcessingInstruction(((QDomProcessingInstructionPrivate*)impl));
QDomProcessingInstruction(((QDomProcessingInstructionPrivate*)impl));
never executed: return QDomProcessingInstruction(((QDomProcessingInstructionPrivate*)impl));
0
4573 return
never executed: return QDomProcessingInstruction();
QDomProcessingInstruction();
never executed: return QDomProcessingInstruction();
0
4574}-
4575-
4576-
4577-
4578-
4579-
4580-
4581-
4582QDomCharacterData QDomNode::toCharacterData() const-
4583{-
4584 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isCharacterData()
impl->isCharacterData()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4585 return
never executed: return QDomCharacterData(((QDomCharacterDataPrivate*)impl));
QDomCharacterData(((QDomCharacterDataPrivate*)impl));
never executed: return QDomCharacterData(((QDomCharacterDataPrivate*)impl));
0
4586 return
never executed: return QDomCharacterData();
QDomCharacterData();
never executed: return QDomCharacterData();
0
4587}-
4588-
4589-
4590-
4591-
4592-
4593-
4594-
4595QDomComment QDomNode::toComment() const-
4596{-
4597 if (impl
implDescription
TRUEnever evaluated
FALSEnever evaluated
&& impl->isComment()
impl->isComment()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4598 return
never executed: return QDomComment(((QDomCommentPrivate*)impl));
QDomComment(((QDomCommentPrivate*)impl));
never executed: return QDomComment(((QDomCommentPrivate*)impl));
0
4599 return
never executed: return QDomComment();
QDomComment();
never executed: return QDomComment();
0
4600}-
4601-
4602-
4603-
4604-
4605-
4606-
4607-
4608QDomHandler::QDomHandler(QDomDocumentPrivate* adoc, QXmlSimpleReader* areader, bool namespaceProcessing)-
4609 : errorLine(0), errorColumn(0), doc(adoc), node(adoc), cdata(false),-
4610 nsProcessing(namespaceProcessing), locator(0), reader(areader)-
4611{-
4612}
executed 244 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
4613-
4614QDomHandler::~QDomHandler()-
4615{-
4616}-
4617-
4618bool QDomHandler::endDocument()-
4619{-
4620-
4621 if (node != doc
node != docDescription
TRUEnever evaluated
FALSEevaluated 244 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-244
4622 return
never executed: return false;
false;
never executed: return false;
0
4623 return
executed 244 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 244 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
4624}-
4625-
4626bool QDomHandler::startDTD(const QString& name, const QString& publicId, const QString& systemId)-
4627{-
4628 doc->doctype()->name = name;-
4629 doc->doctype()->publicId = publicId;-
4630 doc->doctype()->systemId = systemId;-
4631 return
executed 157 times by 2 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
true;
executed 157 times by 2 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
157
4632}-
4633-
4634bool QDomHandler::startElement(const QString& nsURI, const QString&, const QString& qName, const QXmlAttributes& atts)-
4635{-
4636-
4637 QDomNodePrivate* n;-
4638 if (nsProcessing
nsProcessingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1021 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
) {
2-1021
4639 n = doc->createElementNS(nsURI, qName);-
4640 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else {
2
4641 n = doc->createElement(qName);-
4642 }
executed 1021 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
1021
4643-
4644 if (!n
!nDescription
TRUEnever evaluated
FALSEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-1023
4645 return
never executed: return false;
false;
never executed: return false;
0
4646-
4647 n->setLocation(locator->lineNumber(), locator->columnNumber());-
4648-
4649 node->appendChild(n);-
4650 node = n;-
4651-
4652-
4653 for (int i=0; i<atts.length()
i<atts.length()Description
TRUEevaluated 868 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
; i++)
868-1023
4654 {-
4655 if (nsProcessing
nsProcessingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 866 times by 3 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
) {
2-866
4656 ((QDomElementPrivate*)node)->setAttributeNS(atts.uri(i), atts.qName(i), atts.value(i));-
4657 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else {
2
4658 ((QDomElementPrivate*)node)->setAttribute(atts.qName(i), atts.value(i));-
4659 }
executed 866 times by 3 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
866
4660 }-
4661-
4662 return
executed 1023 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 1023 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1023
4663}-
4664-
4665bool QDomHandler::endElement(const QString&, const QString&, const QString&)-
4666{-
4667 if (!node
!nodeDescription
TRUEnever evaluated
FALSEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
|| node == doc
node == docDescription
TRUEnever evaluated
FALSEevaluated 1023 times by 5 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-1023
4668 return
never executed: return false;
false;
never executed: return false;
0
4669 node = node->parent();-
4670-
4671 return
executed 1023 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 1023 times by 5 tests: return true;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1023
4672}-
4673-
4674bool QDomHandler::characters(const QString& ch)-
4675{-
4676-
4677 if (node == doc
node == docDescription
TRUEnever evaluated
FALSEevaluated 125 times by 2 tests
Evaluated by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
)
0-125
4678 return
never executed: return false;
false;
never executed: return false;
0
4679-
4680 QScopedPointer<QDomNodePrivate> n;-
4681 if (cdata
cdataDescription
TRUEnever evaluated
FALSEevaluated 125 times by 2 tests
Evaluated by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
) {
0-125
4682 n.reset(doc->createCDATASection(ch));-
4683 }
never executed: end of block
else if (!entityName.isEmpty()
!entityName.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 125 times by 2 tests
Evaluated by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
) {
0-125
4684 QScopedPointer<QDomEntityPrivate> e(new QDomEntityPrivate(doc, 0, entityName,-
4685 QString(), QString(), QString()));-
4686 e->value = ch;-
4687 e->ref.deref();-
4688 doc->doctype()->appendChild(e.data());-
4689 e.take();-
4690 n.reset(doc->createEntityReference(entityName));-
4691 }
never executed: end of block
else {
0
4692 n.reset(doc->createTextNode(ch));-
4693 }
executed 125 times by 2 tests: end of block
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
125
4694 n->setLocation(locator->lineNumber(), locator->columnNumber());-
4695 node->appendChild(n.data());-
4696 n.take();-
4697-
4698 return
executed 125 times by 2 tests: return true;
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
true;
executed 125 times by 2 tests: return true;
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
125
4699}-
4700-
4701bool QDomHandler::processingInstruction(const QString& target, const QString& data)-
4702{-
4703 QDomNodePrivate *n;-
4704 n = doc->createProcessingInstruction(target, data);-
4705 if (n
nDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4706 n->setLocation(locator->lineNumber(), locator->columnNumber());-
4707 node->appendChild(n);-
4708 return
never executed: return true;
true;
never executed: return true;
0
4709 }-
4710 else-
4711 return
never executed: return false;
false;
never executed: return false;
0
4712}-
4713-
4714bool QDomHandler::skippedEntity(const QString& name)-
4715{-
4716-
4717 if (reader
readerDescription
TRUEnever evaluated
FALSEnever evaluated
&& !reader->d_ptr->skipped_entity_in_content
!reader->d_ptr...ity_in_contentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4718 return
never executed: return true;
true;
never executed: return true;
0
4719-
4720 QDomNodePrivate *n = doc->createEntityReference(name);-
4721 n->setLocation(locator->lineNumber(), locator->columnNumber());-
4722 node->appendChild(n);-
4723 return
never executed: return true;
true;
never executed: return true;
0
4724}-
4725-
4726bool QDomHandler::fatalError(const QXmlParseException& exception)-
4727{-
4728 errorMsg = exception.message();-
4729 errorLine = exception.lineNumber();-
4730 errorColumn = exception.columnNumber();-
4731 return
never executed: return QXmlDefaultHandler::fatalError(exception);
QXmlDefaultHandler::fatalError(exception);
never executed: return QXmlDefaultHandler::fatalError(exception);
0
4732}-
4733-
4734bool QDomHandler::startCDATA()-
4735{-
4736 cdata = true;-
4737 return
never executed: return true;
true;
never executed: return true;
0
4738}-
4739-
4740bool QDomHandler::endCDATA()-
4741{-
4742 cdata = false;-
4743 return
never executed: return true;
true;
never executed: return true;
0
4744}-
4745-
4746bool QDomHandler::startEntity(const QString &name)-
4747{-
4748 entityName = name;-
4749 return
never executed: return true;
true;
never executed: return true;
0
4750}-
4751-
4752bool QDomHandler::endEntity(const QString &)-
4753{-
4754 entityName.clear();-
4755 return
never executed: return true;
true;
never executed: return true;
0
4756}-
4757-
4758bool QDomHandler::comment(const QString& ch)-
4759{-
4760 QDomNodePrivate *n;-
4761 n = doc->createComment(ch);-
4762 n->setLocation(locator->lineNumber(), locator->columnNumber());-
4763 node->appendChild(n);-
4764 return
never executed: return true;
true;
never executed: return true;
0
4765}-
4766-
4767bool QDomHandler::unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)-
4768{-
4769 QDomEntityPrivate* e = new QDomEntityPrivate(doc, 0, name,-
4770 publicId, systemId, notationName);-
4771-
4772 e->ref.deref();-
4773 doc->doctype()->appendChild(e);-
4774 return
never executed: return true;
true;
never executed: return true;
0
4775}-
4776-
4777bool QDomHandler::externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId)-
4778{-
4779 return
never executed: return unparsedEntityDecl(name, publicId, systemId, QString());
unparsedEntityDecl(name, publicId, systemId, QString());
never executed: return unparsedEntityDecl(name, publicId, systemId, QString());
0
4780}-
4781-
4782bool QDomHandler::notationDecl(const QString & name, const QString & publicId, const QString & systemId)-
4783{-
4784 QDomNotationPrivate* n = new QDomNotationPrivate(doc, 0, name, publicId, systemId);-
4785-
4786 n->ref.deref();-
4787 doc->doctype()->appendChild(n);-
4788 return
never executed: return true;
true;
never executed: return true;
0
4789}-
4790-
4791void QDomHandler::setDocumentLocator(QXmlLocator *locator)-
4792{-
4793 this->locator = locator;-
4794}
executed 244 times by 5 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
4795-
4796-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9