OpenCoverage

qxml.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/xml/sax/qxml.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3namespace {-
4-
5-
6template <typename Container>-
7void clear(Container &c) { c = Container(); }
executed 2261 times by 6 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
  • tst_qxmlstream - unknown status
2261
8-
9}-
10-
11-
12static const signed char cltWS = 0;-
13static const signed char cltPer = 1;-
14static const signed char cltAmp = 2;-
15static const signed char cltGt = 3;-
16static const signed char cltLt = 4;-
17static const signed char cltSlash = 5;-
18static const signed char cltQm = 6;-
19static const signed char cltEm = 7;-
20static const signed char cltDash = 8;-
21static const signed char cltCB = 9;-
22static const signed char cltOB = 10;-
23static const signed char cltEq = 11;-
24static const signed char cltDq = 12;-
25static const signed char cltSq = 13;-
26static const signed char cltUnknown = 14;-
27-
28-
29static const signed char charLookupTable[256]={-
30 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
31 cltUnknown,-
32 cltWS,-
33 cltWS,-
34 cltUnknown,-
35 cltUnknown,-
36 cltWS,-
37 cltUnknown,-
38 cltUnknown,-
39 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
40 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
41 cltWS,-
42 cltEm,-
43 cltDq,-
44 cltUnknown,-
45 cltUnknown,-
46 cltPer,-
47 cltAmp,-
48 cltSq,-
49 cltUnknown,-
50 cltUnknown,-
51 cltUnknown,-
52 cltUnknown,-
53 cltUnknown,-
54 cltDash,-
55 cltUnknown,-
56 cltSlash,-
57 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
58 cltUnknown,-
59 cltUnknown,-
60 cltUnknown,-
61 cltUnknown,-
62 cltLt,-
63 cltEq,-
64 cltGt,-
65 cltQm,-
66 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
67 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
68 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
69 cltUnknown,-
70 cltUnknown,-
71 cltUnknown,-
72 cltOB,-
73 cltUnknown,-
74 cltCB,-
75 cltUnknown,-
76 cltUnknown,-
77 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
78 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
79 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
80 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
81 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
82 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
83 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
84 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
85 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
86 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
87 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
88 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
89 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
90 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
91 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
92 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
93 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
94 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
95 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown,-
96 cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown-
97};-
98static bool stripTextDecl(QString& str)-
99{-
100 QString textDeclStart(QLatin1String("<?xml"));-
101 if (str.startsWith(textDeclStart)
str.startsWith(textDeclStart)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
102 QRegExp textDecl(QString::fromLatin1(-
103 "^<\\?xml\\s+"-
104 "(version\\s*=\\s*((['\"])[-a-zA-Z0-9_.:]+\\3))?"-
105 "\\s*"-
106 "(encoding\\s*=\\s*((['\"])[A-Za-z][-a-zA-Z0-9_.]*\\6))?"-
107 "\\s*\\?>"-
108 ));-
109 QString strTmp = str.replace(textDecl, QLatin1String(""));-
110 if (strTmp.length() != str.length()
strTmp.length(...= str.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
111 return
never executed: return false;
false;
never executed: return false;
0
112 str = strTmp;-
113 }
never executed: end of block
0
114 return
never executed: return true;
true;
never executed: return true;
0
115}-
116-
117-
118class QXmlAttributesPrivate-
119{-
120};-
121class QXmlInputSourcePrivate-
122{-
123public:-
124 QIODevice *inputDevice;-
125 QTextStream *inputStream;-
126-
127 QString str;-
128 const QChar *unicode;-
129 int pos;-
130 int length;-
131 bool nextReturnedEndOfData;-
132-
133 QTextDecoder *encMapper;-
134-
135-
136 QByteArray encodingDeclBytes;-
137 QString encodingDeclChars;-
138 bool lookingForEncodingDecl;-
139};-
140class QXmlParseExceptionPrivate-
141{-
142public:-
143 QXmlParseExceptionPrivate()-
144 : column(-1), line(-1)-
145 {-
146 }
executed 155 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
155
147 QXmlParseExceptionPrivate(const QXmlParseExceptionPrivate &other)-
148 : msg(other.msg), column(other.column), line(other.line),-
149 pub(other.pub), sys(other.sys)-
150 {-
151 }
never executed: end of block
0
152-
153 QString msg;-
154 int column;-
155 int line;-
156 QString pub;-
157 QString sys;-
158-
159};-
160-
161class QXmlLocatorPrivate-
162{-
163};-
164-
165class QXmlDefaultHandlerPrivate-
166{-
167};-
168QXmlParseException::QXmlParseException(const QString& name, int c, int l,-
169 const QString& p, const QString& s)-
170 : d(new QXmlParseExceptionPrivate)-
171{-
172 d->msg = name;-
173 d->column = c;-
174 d->line = l;-
175 d->pub = p;-
176 d->sys = s;-
177}
executed 155 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
155
178-
179-
180-
181-
182QXmlParseException::QXmlParseException(const QXmlParseException& other) :-
183 d(new QXmlParseExceptionPrivate(*other.d))-
184{-
185-
186}
never executed: end of block
0
187-
188-
189-
190-
191QXmlParseException::~QXmlParseException()-
192{-
193}-
194-
195-
196-
197-
198QString QXmlParseException::message() const-
199{-
200 return
executed 300 times by 1 test: return d->msg;
Executed by:
  • tst_qxmlsimplereader - unknown status
d->msg;
executed 300 times by 1 test: return d->msg;
Executed by:
  • tst_qxmlsimplereader - unknown status
300
201}-
202-
203-
204-
205int QXmlParseException::columnNumber() const-
206{-
207 return
executed 300 times by 1 test: return d->column;
Executed by:
  • tst_qxmlsimplereader - unknown status
d->column;
executed 300 times by 1 test: return d->column;
Executed by:
  • tst_qxmlsimplereader - unknown status
300
208}-
209-
210-
211-
212int QXmlParseException::lineNumber() const-
213{-
214 return
executed 300 times by 1 test: return d->line;
Executed by:
  • tst_qxmlsimplereader - unknown status
d->line;
executed 300 times by 1 test: return d->line;
Executed by:
  • tst_qxmlsimplereader - unknown status
300
215}-
216-
217-
218-
219QString QXmlParseException::publicId() const-
220{-
221 return
executed 152 times by 1 test: return d->pub;
Executed by:
  • tst_qxmlsimplereader - unknown status
d->pub;
executed 152 times by 1 test: return d->pub;
Executed by:
  • tst_qxmlsimplereader - unknown status
152
222}-
223-
224-
225-
226QString QXmlParseException::systemId() const-
227{-
228 return
executed 152 times by 1 test: return d->sys;
Executed by:
  • tst_qxmlsimplereader - unknown status
d->sys;
executed 152 times by 1 test: return d->sys;
Executed by:
  • tst_qxmlsimplereader - unknown status
152
229}-
230QXmlLocator::QXmlLocator()-
231{-
232}-
233-
234-
235-
236-
237QXmlLocator::~QXmlLocator()-
238{-
239}-
240class QXmlSimpleReaderLocator : public QXmlLocator-
241{-
242public:-
243 QXmlSimpleReaderLocator(QXmlSimpleReader* parent)-
244 {-
245 reader = parent;-
246 }
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
247 ~QXmlSimpleReaderLocator()-
248 {-
249 }-
250-
251 int columnNumber() const override-
252 {-
253 return
executed 2993 times by 5 tests: return (reader->d_ptr->columnNr == -1 ? -1 : reader->d_ptr->columnNr + 1);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
(reader->d_ptr->columnNr == -1 ? -1 : reader->d_ptr->columnNr + 1);
executed 2993 times by 5 tests: return (reader->d_ptr->columnNr == -1 ? -1 : reader->d_ptr->columnNr + 1);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2993
254 }-
255 int lineNumber() const override-
256 {-
257 return
executed 2993 times by 5 tests: return (reader->d_ptr->lineNr == -1 ? -1 : reader->d_ptr->lineNr + 1);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
(reader->d_ptr->lineNr == -1 ? -1 : reader->d_ptr->lineNr + 1);
executed 2993 times by 5 tests: return (reader->d_ptr->lineNr == -1 ? -1 : reader->d_ptr->lineNr + 1);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
2993
258 }-
259-
260-
261-
262private:-
263 QXmlSimpleReader *reader;-
264};-
265-
266-
267-
268-
269-
270-
271-
272typedef QMap<QString, QString> NamespaceMap;-
273-
274class QXmlNamespaceSupportPrivate-
275{-
276public:-
277 QXmlNamespaceSupportPrivate()-
278 {-
279 ns.insert(QLatin1String("xml"), QLatin1String("http://www.w3.org/XML/1998/namespace"));-
280 }
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
281-
282 ~QXmlNamespaceSupportPrivate()-
283 {-
284 }-
285-
286 QStack<NamespaceMap> nsStack;-
287 NamespaceMap ns;-
288};-
289QXmlNamespaceSupport::QXmlNamespaceSupport()-
290{-
291 d = new QXmlNamespaceSupportPrivate;-
292}
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
293-
294-
295-
296-
297QXmlNamespaceSupport::~QXmlNamespaceSupport()-
298{-
299 delete d;-
300}
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
301void QXmlNamespaceSupport::setPrefix(const QString& pre, const QString& uri)-
302{-
303 if(pre.isNull()
pre.isNull()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
3-4
304 d->ns.insert(QLatin1String(""), uri);-
305 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else {
3
306 d->ns.insert(pre, uri);-
307 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
4
308}-
309QString QXmlNamespaceSupport::prefix(const QString& uri) const-
310{-
311 NamespaceMap::const_iterator itc, it = d->ns.constBegin();-
312 while ((
(itc=it) != d->ns.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
itc=it) != d->ns.constEnd()
(itc=it) != d->ns.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
313 ++it;-
314 if (*
*itc == uriDescription
TRUEnever evaluated
FALSEnever evaluated
itc == uri
*itc == uriDescription
TRUEnever evaluated
FALSEnever evaluated
&& !itc.key().isEmpty()
!itc.key().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
315 return
never executed: return itc.key();
itc.key();
never executed: return itc.key();
0
316 }
never executed: end of block
0
317 return
never executed: return QLatin1String("");
QLatin1String("");
never executed: return QLatin1String("");
0
318}-
319-
320-
321-
322-
323-
324-
325QString QXmlNamespaceSupport::uri(const QString& prefix) const-
326{-
327 return
executed 27 times by 2 tests: return d->ns[prefix];
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
d->ns[prefix];
executed 27 times by 2 tests: return d->ns[prefix];
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
27
328}-
329-
330-
331-
332-
333-
334-
335-
336void QXmlNamespaceSupport::splitName(const QString& qname, QString& prefix,-
337 QString& localname) const-
338{-
339 int pos = qname.indexOf(QLatin1Char(':'));-
340 if (pos == -1
pos == -1Description
TRUEevaluated 11998 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
30-11998
341 pos = qname.size();
executed 11998 times by 3 tests: pos = qname.size();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
11998
342-
343 prefix = qname.left(pos);-
344 localname = qname.mid(pos+1);-
345}
executed 12028 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
12028
346void QXmlNamespaceSupport::processName(const QString& qname,-
347 bool isAttribute,-
348 QString& nsuri, QString& localname) const-
349{-
350 int len = qname.size();-
351 const QChar *data = qname.constData();-
352 for (int pos = 0; pos < len
pos < lenDescription
TRUEevaluated 96470 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 21219 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
; ++pos) {
21219-96470
353 if (data[pos] == QLatin1Char(':')
data[pos] == QLatin1Char(':')Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 96443 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
27-96443
354 nsuri = uri(qname.left(pos));-
355 localname = qname.mid(pos + 1);-
356 return;
executed 27 times by 2 tests: return;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
27
357 }-
358 }
executed 96443 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
96443
359-
360-
361 nsuri.clear();-
362-
363 if (!isAttribute
!isAttributeDescription
TRUEevaluated 9224 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 11995 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& !d->ns.isEmpty()
!d->ns.isEmpty()Description
TRUEevaluated 9224 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
) {
0-11995
364-
365-
366-
367-
368-
369 NamespaceMap::const_iterator first = d->ns.constBegin();-
370 if (first.key().isEmpty()
first.key().isEmpty()Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 9203 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
21-9203
371 nsuri = first.value();
executed 21 times by 1 test: nsuri = first.value();
Executed by:
  • tst_qxmlsimplereader - unknown status
21
372 }
executed 9224 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
9224
373 localname = qname;-
374}
executed 21219 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
21219
375QStringList QXmlNamespaceSupport::prefixes() const-
376{-
377 QStringList list;-
378-
379 NamespaceMap::const_iterator itc, it = d->ns.constBegin();-
380 while ((
(itc=it) != d->ns.constEnd()Description
TRUEevaluated 439 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 434 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
itc=it) != d->ns.constEnd()
(itc=it) != d->ns.constEnd()Description
TRUEevaluated 439 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 434 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
434-439
381 ++it;-
382 if (!itc.key().isEmpty()
!itc.key().isEmpty()Description
TRUEevaluated 438 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
1-438
383 list.append(itc.key());
executed 438 times by 2 tests: list.append(itc.key());
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
438
384 }
executed 439 times by 2 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
439
385 return
executed 434 times by 2 tests: return list;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
list;
executed 434 times by 2 tests: return list;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
434
386}-
387QStringList QXmlNamespaceSupport::prefixes(const QString& uri) const-
388{-
389 QStringList list;-
390-
391 NamespaceMap::const_iterator itc, it = d->ns.constBegin();-
392 while ((
(itc=it) != d->ns.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
itc=it) != d->ns.constEnd()
(itc=it) != d->ns.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
393 ++it;-
394 if (*
*itc == uriDescription
TRUEnever evaluated
FALSEnever evaluated
itc == uri
*itc == uriDescription
TRUEnever evaluated
FALSEnever evaluated
&& !itc.key().isEmpty()
!itc.key().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
395 list.append(itc.key());
never executed: list.append(itc.key());
0
396 }
never executed: end of block
0
397 return
never executed: return list;
list;
never executed: return list;
0
398}-
399void QXmlNamespaceSupport::pushContext()-
400{-
401 d->nsStack.push(d->ns);-
402}
executed 4781 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
4781
403void QXmlNamespaceSupport::popContext()-
404{-
405 d->ns.clear();-
406 if(!d->nsStack.isEmpty()
!d->nsStack.isEmpty()Description
TRUEevaluated 4705 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
)
0-4705
407 d->ns = d->nsStack.pop();
executed 4705 times by 3 tests: d->ns = d->nsStack.pop();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
4705
408}
executed 4705 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
4705
409-
410-
411-
412-
413void QXmlNamespaceSupport::reset()-
414{-
415 QXmlNamespaceSupportPrivate *newD = new QXmlNamespaceSupportPrivate;-
416 delete d;-
417 d = newD;-
418}
never executed: end of block
0
419QXmlAttributes::QXmlAttributes()-
420{-
421-
422-
423 (void)d;;-
424}
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
425-
426-
427-
428-
429-
430-
431QXmlAttributes::~QXmlAttributes()-
432{-
433}-
434int QXmlAttributes::index(const QString& qName) const-
435{-
436 for (int i = 0; i < attList.size()
i < attList.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
437 if (attList.at(i).qname == qName
attList.at(i).qname == qNameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
438 return
never executed: return i;
i;
never executed: return i;
0
439 }
never executed: end of block
0
440 return
never executed: return -1;
-1;
never executed: return -1;
0
441}-
442-
443-
444-
445int QXmlAttributes::index(QLatin1String qName) const-
446{-
447 for (int i = 0; i < attList.size()
i < attList.size()Description
TRUEevaluated 11810 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
FALSEevaluated 2589 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
; ++i) {
2589-11810
448 if (attList.at(i).qname == qName
attList.at(i).qname == qNameDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
FALSEevaluated 11786 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
)
24-11786
449 return
executed 24 times by 1 test: return i;
Executed by:
  • tst_qxmlstream - unknown status
i;
executed 24 times by 1 test: return i;
Executed by:
  • tst_qxmlstream - unknown status
24
450 }
executed 11786 times by 1 test: end of block
Executed by:
  • tst_qxmlstream - unknown status
11786
451 return
executed 2589 times by 1 test: return -1;
Executed by:
  • tst_qxmlstream - unknown status
-1;
executed 2589 times by 1 test: return -1;
Executed by:
  • tst_qxmlstream - unknown status
2589
452}-
453int QXmlAttributes::index(const QString& uri, const QString& localPart) const-
454{-
455 for (int i = 0; i < attList.size()
i < attList.size()Description
TRUEevaluated 51512 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
FALSEevaluated 5843 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
; ++i) {
5843-51512
456 const Attribute &att = attList.at(i);-
457 if (att.uri == uri
att.uri == uriDescription
TRUEevaluated 51512 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
FALSEnever evaluated
&& att.localname == localPart
att.localname == localPartDescription
TRUEevaluated 8130 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
FALSEevaluated 43382 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
)
0-51512
458 return
executed 8130 times by 1 test: return i;
Executed by:
  • tst_qxmlstream - unknown status
i;
executed 8130 times by 1 test: return i;
Executed by:
  • tst_qxmlstream - unknown status
8130
459 }
executed 43382 times by 1 test: end of block
Executed by:
  • tst_qxmlstream - unknown status
43382
460 return
executed 5843 times by 1 test: return -1;
Executed by:
  • tst_qxmlstream - unknown status
-1;
executed 5843 times by 1 test: return -1;
Executed by:
  • tst_qxmlstream - unknown status
5843
461}-
462-
463-
464-
465-
466-
467-
468int QXmlAttributes::length() const-
469{-
470 return
executed 4017 times by 5 tests: return attList.count();
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
attList.count();
executed 4017 times by 5 tests: return attList.count();
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
4017
471}-
472QString QXmlAttributes::localName(int index) const-
473{-
474 return
executed 407 times by 1 test: return attList.at(index).localname;
Executed by:
  • tst_qxmlsimplereader - unknown status
attList.at(index).localname;
executed 407 times by 1 test: return attList.at(index).localname;
Executed by:
  • tst_qxmlsimplereader - unknown status
407
475}-
476-
477-
478-
479-
480-
481-
482-
483QString QXmlAttributes::qName(int index) const-
484{-
485 return
executed 1275 times by 4 tests: return attList.at(index).qname;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
attList.at(index).qname;
executed 1275 times by 4 tests: return attList.at(index).qname;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
1275
486}-
487QString QXmlAttributes::uri(int index) const-
488{-
489 return
executed 409 times by 1 test: return attList.at(index).uri;
Executed by:
  • tst_qxmlsimplereader - unknown status
attList.at(index).uri;
executed 409 times by 1 test: return attList.at(index).uri;
Executed by:
  • tst_qxmlsimplereader - unknown status
409
490}-
491-
492-
493-
494-
495-
496-
497-
498QString QXmlAttributes::type(int) const-
499{-
500 return
executed 407 times by 1 test: return QLatin1String("CDATA");
Executed by:
  • tst_qxmlsimplereader - unknown status
QLatin1String("CDATA");
executed 407 times by 1 test: return QLatin1String("CDATA");
Executed by:
  • tst_qxmlsimplereader - unknown status
407
501}-
502QString QXmlAttributes::type(const QString&) const-
503{-
504 return
never executed: return QLatin1String("CDATA");
QLatin1String("CDATA");
never executed: return QLatin1String("CDATA");
0
505}-
506QString QXmlAttributes::type(const QString&, const QString&) const-
507{-
508 return
never executed: return QLatin1String("CDATA");
QLatin1String("CDATA");
never executed: return QLatin1String("CDATA");
0
509}-
510-
511-
512-
513-
514-
515-
516QString QXmlAttributes::value(int index) const-
517{-
518 return
executed 1287 times by 5 tests: return attList.at(index).value;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
attList.at(index).value;
executed 1287 times by 5 tests: return attList.at(index).value;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1287
519}-
520QString QXmlAttributes::value(const QString& qName) const-
521{-
522 int i = index(qName);-
523 if (i == -1
i == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
524 return
never executed: return QString();
QString();
never executed: return QString();
0
525 return
never executed: return attList.at(i).value;
attList.at(i).value;
never executed: return attList.at(i).value;
0
526}-
527QString QXmlAttributes::value(QLatin1String qName) const-
528{-
529 int i = index(qName);-
530 if (i == -1
i == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
531 return
never executed: return QString();
QString();
never executed: return QString();
0
532 return
never executed: return attList.at(i).value;
attList.at(i).value;
never executed: return attList.at(i).value;
0
533}-
534QString QXmlAttributes::value(const QString& uri, const QString& localName) const-
535{-
536 int i = index(uri, localName);-
537 if (i == -1
i == -1Description
TRUEevaluated 4320 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
FALSEevaluated 7751 times by 1 test
Evaluated by:
  • tst_qxmlstream - unknown status
)
4320-7751
538 return
executed 4320 times by 1 test: return QString();
Executed by:
  • tst_qxmlstream - unknown status
QString();
executed 4320 times by 1 test: return QString();
Executed by:
  • tst_qxmlstream - unknown status
4320
539 return
executed 7751 times by 1 test: return attList.at(i).value;
Executed by:
  • tst_qxmlstream - unknown status
attList.at(i).value;
executed 7751 times by 1 test: return attList.at(i).value;
Executed by:
  • tst_qxmlstream - unknown status
7751
540}-
541-
542-
543-
544-
545-
546-
547void QXmlAttributes::clear()-
548{-
549 attList.clear();-
550}
executed 5802 times by 6 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
  • tst_qxmlstream - unknown status
5802
551void QXmlAttributes::append(const QString &qName, const QString &uri, const QString &localPart, const QString &value)-
552{-
553 Attribute att;-
554 att.qname = qName;-
555 att.uri = uri;-
556 att.localname = localPart;-
557 att.value = value;-
558-
559 attList.append(att);-
560}
executed 12887 times by 6 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
  • tst_qxmlstream - unknown status
12887
561const ushort QXmlInputSource::EndOfData = 0xfffe;-
562const ushort QXmlInputSource::EndOfDocument = 0xffff;-
563-
564-
565-
566-
567void QXmlInputSource::init()-
568{-
569 d = new QXmlInputSourcePrivate;-
570-
571 if (true) {-
572 d->inputDevice = 0;-
573 d->inputStream = 0;-
574-
575 setData(QString());-
576-
577 d->encMapper = 0;-
578-
579 d->nextReturnedEndOfData = true;-
580-
581 d->encodingDeclBytes.clear();-
582 d->encodingDeclChars.clear();-
583 d->lookingForEncodingDecl = true;-
584 }
executed 2106 times by 6 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
  • tst_qxmlstream - unknown status
else {
dead code: { delete(d); qt_noop(); }
-
585 delete(d);
dead code: { delete(d); qt_noop(); }
-
586 qt_noop();
dead code: { delete(d); qt_noop(); }
-
587 }
dead code: { delete(d); qt_noop(); }
-
588}-
589-
590-
591-
592-
593-
594-
595QXmlInputSource::QXmlInputSource()-
596{-
597 init();-
598}
executed 1734 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
1734
599QXmlInputSource::QXmlInputSource(QIODevice *dev)-
600{-
601 init();-
602 d->inputDevice = dev;-
603 if (dev->isOpen()
dev->isOpen()Description
TRUEevaluated 363 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
)
9-363
604 d->inputDevice->setTextModeEnabled(false);
executed 363 times by 2 tests: d->inputDevice->setTextModeEnabled(false);
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
363
605}
executed 372 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
372
606-
607-
608-
609-
610QXmlInputSource::~QXmlInputSource()-
611{-
612-
613-
614 delete d->encMapper;-
615-
616 delete d;-
617}
executed 2106 times by 6 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
  • tst_qxmlstream - unknown status
2106
618QChar QXmlInputSource::next()-
619{-
620 if (d->pos >= d->length
d->pos >= d->lengthDescription
TRUEevaluated 48748 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 744723 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
48748-744723
621 if (d->nextReturnedEndOfData
d->nextReturnedEndOfDataDescription
TRUEevaluated 2851 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 45897 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
2851-45897
622 d->nextReturnedEndOfData = false;-
623 fetchData();-
624 if (d->pos >= d->length
d->pos >= d->lengthDescription
TRUEevaluated 1961 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 890 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
890-1961
625 return
executed 1961 times by 6 tests: return EndOfDocument;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
EndOfDocument;
executed 1961 times by 6 tests: return EndOfDocument;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1961
626 }-
627 return
executed 890 times by 3 tests: return next();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
next();
executed 890 times by 3 tests: return next();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
890
628 }-
629 d->nextReturnedEndOfData = true;-
630 return
executed 45897 times by 6 tests: return EndOfData;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
EndOfData;
executed 45897 times by 6 tests: return EndOfData;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
45897
631 }-
632-
633-
634-
635-
636 QChar c = d->unicode[d->pos++];-
637 if (c.unicode() == EndOfData
c.unicode() == EndOfDataDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 744722 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
1-744722
638 c = EndOfDocument;
executed 1 time by 1 test: c = EndOfDocument;
Executed by:
  • tst_qxmlsimplereader - unknown status
1
639 return
executed 744723 times by 6 tests: return c;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
c;
executed 744723 times by 6 tests: return c;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
744723
640}-
641void QXmlInputSource::reset()-
642{-
643 d->nextReturnedEndOfData = false;-
644 d->pos = 0;-
645}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
4
646-
647-
648-
649-
650-
651-
652-
653QString QXmlInputSource::data() const-
654{-
655 if (d->nextReturnedEndOfData
d->nextReturnedEndOfDataDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qxmlinputsource - unknown status
) {
0-4
656 QXmlInputSource *that = const_cast<QXmlInputSource*>(this);-
657 that->d->nextReturnedEndOfData = false;-
658 that->fetchData();-
659 }
never executed: end of block
0
660 return
executed 4 times by 1 test: return d->str;
Executed by:
  • tst_qxmlinputsource - unknown status
d->str;
executed 4 times by 1 test: return d->str;
Executed by:
  • tst_qxmlinputsource - unknown status
4
661}-
662void QXmlInputSource::setData(const QString& dat)-
663{-
664 d->str = dat;-
665 d->unicode = dat.unicode();-
666 d->pos = 0;-
667 d->length = d->str.length();-
668 d->nextReturnedEndOfData = false;-
669}
executed 48375 times by 6 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
  • tst_qxmlstream - unknown status
48375
670-
671-
672-
673-
674-
675-
676-
677void QXmlInputSource::setData(const QByteArray& dat)-
678{-
679 setData(fromRawData(dat));-
680}
executed 44908 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
44908
681void QXmlInputSource::fetchData()-
682{-
683 enum-
684 {-
685 BufferSize = 1024-
686 };-
687-
688 QByteArray rawData;-
689-
690 if (d->inputDevice
d->inputDeviceDescription
TRUEevaluated 1117 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 1734 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
|| d->inputStream
d->inputStreamDescription
TRUEnever evaluated
FALSEevaluated 1734 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-1734
691 QIODevice *device = d->inputDevice
d->inputDeviceDescription
TRUEevaluated 1117 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
? d->inputDevice : d->inputStream->device();
0-1117
692-
693 if (!device
!deviceDescription
TRUEnever evaluated
FALSEevaluated 1117 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-1117
694 if (d->inputStream
d->inputStreamDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->inputStream->string()
d->inputStream->string()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
695 QString *s = d->inputStream->string();-
696 rawData = QByteArray((const char *) s->constData(), s->size() * sizeof(QChar));-
697 }
never executed: end of block
0
698 }
never executed: end of block
else if (device->isOpen()
device->isOpen()Description
TRUEevaluated 1108 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
|| device->open(QIODevice::ReadOnly)
device->open(Q...ice::ReadOnly)Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-1108
699 rawData.resize(BufferSize);-
700 qint64 size = device->read(rawData.data(), BufferSize);-
701-
702 if (size != -1
size != -1Description
TRUEevaluated 1117 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
) {
0-1117
703-
704 while (size < 4
size < 4Description
TRUEevaluated 235 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 890 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
235-890
705 if (!device->waitForReadyRead(-1)
!device->waitForReadyRead(-1)Description
TRUEevaluated 227 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
8-227
706 break;
executed 227 times by 3 tests: break;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
227
707 int ret = device->read(rawData.data() + size, BufferSize - size);-
708 if (ret <= 0
ret <= 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
0-8
709 break;
never executed: break;
0
710 size += ret;-
711 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
8
712 }
executed 1117 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1117
713-
714 rawData.resize(qMax(qint64(0), size));-
715 }
executed 1117 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1117
716-
717-
718-
719-
720-
721 setData(fromRawData(rawData));-
722 }
executed 1117 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1117
723}
executed 2851 times by 6 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
  • tst_qxmlstream - unknown status
2851
724-
725-
726static QString extractEncodingDecl(const QString &text, bool *needMoreText)-
727{-
728 *needMoreText = false;-
729-
730 int l = text.length();-
731 const QLatin1String snip("<?xml", std::min(l, 5));-
732 if (l > 0
l > 0Description
TRUEevaluated 3097 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& !text.startsWith(snip)
!text.startsWith(snip)Description
TRUEevaluated 1742 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1355 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
6-3097
733 return
executed 1742 times by 2 tests: return QString();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
QString();
executed 1742 times by 2 tests: return QString();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
1742
734-
735 int endPos = text.indexOf(QLatin1Char('>'));-
736 if (endPos == -1
endPos == -1Description
TRUEevaluated 1242 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 119 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
119-1242
737 *needMoreText = l < 255;-
738 return
executed 1242 times by 1 test: return QString();
Executed by:
  • tst_qxmlsimplereader - unknown status
QString();
executed 1242 times by 1 test: return QString();
Executed by:
  • tst_qxmlsimplereader - unknown status
1242
739 }-
740-
741 int pos = text.indexOf(QLatin1String("encoding"));-
742 if (pos == -1
pos == -1Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
|| pos >= endPos
pos >= endPosDescription
TRUEnever evaluated
FALSEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
0-67
743 return
executed 52 times by 1 test: return QString();
Executed by:
  • tst_qxmlsimplereader - unknown status
QString();
executed 52 times by 1 test: return QString();
Executed by:
  • tst_qxmlsimplereader - unknown status
52
744-
745 while (pos < endPos
pos < endPosDescription
TRUEevaluated 670 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
) {
0-670
746 ushort uc = text.at(pos).unicode();-
747 if (uc == '\''
uc == '\''Description
TRUEnever evaluated
FALSEevaluated 670 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
|| uc == '"'
uc == '"'Description
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 603 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
0-670
748 break;
executed 67 times by 2 tests: break;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
67
749 ++pos;-
750 }
executed 603 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
603
751-
752 if (pos == endPos
pos == endPosDescription
TRUEnever evaluated
FALSEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
0-67
753 return
never executed: return QString();
QString();
never executed: return QString();
0
754-
755 QString encoding;-
756 ++pos;-
757 while (pos < endPos
pos < endPosDescription
TRUEevaluated 404 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
) {
0-404
758 ushort uc = text.at(pos).unicode();-
759 if (uc == '\''
uc == '\''Description
TRUEnever evaluated
FALSEevaluated 404 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
|| uc == '"'
uc == '"'Description
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 337 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
0-404
760 break;
executed 67 times by 2 tests: break;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
67
761 encoding.append(uc);-
762 ++pos;-
763 }
executed 337 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
337
764-
765 return
executed 67 times by 2 tests: return encoding;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
encoding;
executed 67 times by 2 tests: return encoding;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
67
766}-
767QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning)-
768{-
769-
770-
771-
772-
773 if (data.size() == 0
data.size() == 0Description
TRUEevaluated 227 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 45798 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
227-45798
774 return
executed 227 times by 3 tests: return QString();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
QString();
executed 227 times by 3 tests: return QString();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
227
775 if (beginning
beginningDescription
TRUEnever evaluated
FALSEevaluated 45798 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-45798
776 delete d->encMapper;-
777 d->encMapper = 0;-
778 }
never executed: end of block
0
779-
780 int mib = 106;-
781-
782-
783 if (d->encMapper == 0
d->encMapper == 0Description
TRUEevaluated 1861 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 43937 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1861-43937
784 d->encodingDeclBytes.clear();-
785 d->encodingDeclChars.clear();-
786 d->lookingForEncodingDecl = true;-
787-
788-
789 if (data.size() >= 4
data.size() >= 4Description
TRUEevaluated 1367 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 494 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
494-1367
790 uchar ch1 = data.at(0);-
791 uchar ch2 = data.at(1);-
792 uchar ch3 = data.at(2);-
793 uchar ch4 = data.at(3);-
794-
795 if ((ch1 == 0
ch1 == 0Description
TRUEnever evaluated
FALSEevaluated 1367 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch2 == 0
ch2 == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& ch3 == 0xfe
ch3 == 0xfeDescription
TRUEnever evaluated
FALSEnever evaluated
&& ch4 == 0xff
ch4 == 0xffDescription
TRUEnever evaluated
FALSEnever evaluated
) ||
0-1367
796 (ch1 == 0xff
ch1 == 0xffDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1345 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch2 == 0xfe
ch2 == 0xfeDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& ch3 == 0
ch3 == 0Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& ch4 == 0
ch4 == 0Description
TRUEnever evaluated
FALSEnever evaluated
))
0-1345
797 mib = 1017;
never executed: mib = 1017;
0
798 else if (ch1 == 0x3c
ch1 == 0x3cDescription
TRUEevaluated 1343 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& ch2 == 0x00
ch2 == 0x00Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1342 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch3 == 0x00
ch3 == 0x00Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& ch4 == 0x00
ch4 == 0x00Description
TRUEnever evaluated
FALSEnever evaluated
)
0-1343
799 mib = 1019;
never executed: mib = 1019;
0
800 else if (ch1 == 0x00
ch1 == 0x00Description
TRUEnever evaluated
FALSEevaluated 1367 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch2 == 0x00
ch2 == 0x00Description
TRUEnever evaluated
FALSEnever evaluated
&& ch3 == 0x00
ch3 == 0x00Description
TRUEnever evaluated
FALSEnever evaluated
&& ch4 == 0x3c
ch4 == 0x3cDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1367
801 mib = 1018;
never executed: mib = 1018;
0
802 }
executed 1367 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1367
803 if (mib == 106
mib == 106Description
TRUEevaluated 1861 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
&& data.size() >= 2
data.size() >= 2Description
TRUEevaluated 1699 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 162 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
0-1861
804 uchar ch1 = data.at(0);-
805 uchar ch2 = data.at(1);-
806-
807 if ((ch1 == 0xfe
ch1 == 0xfeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1698 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch2 == 0xff
ch2 == 0xffDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) || (ch1 == 0xff
ch1 == 0xffDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1670 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch2 == 0xfe
ch2 == 0xfeDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
))
0-1698
808 mib = 1015;
executed 29 times by 1 test: mib = 1015;
Executed by:
  • tst_qxmlsimplereader - unknown status
29
809 else if (ch1 == 0x3c
ch1 == 0x3cDescription
TRUEevaluated 1669 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& ch2 == 0x00
ch2 == 0x00Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1668 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
1-1669
810 mib = 1014;
executed 1 time by 1 test: mib = 1014;
Executed by:
  • tst_qxmlsimplereader - unknown status
1
811 else if (ch1 == 0x00
ch1 == 0x00Description
TRUEnever evaluated
FALSEevaluated 1669 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& ch2 == 0x3c
ch2 == 0x3cDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1669
812 mib = 1013;
never executed: mib = 1013;
0
813 }
executed 1699 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1699
814-
815 QTextCodec *codec = QTextCodec::codecForMib(mib);-
816 ((!(codec)) ? qt_assert("codec",__FILE__,1396) : qt_noop());-
817-
818 d->encMapper = codec->makeDecoder();-
819 }
executed 1861 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1861
820-
821 QString input = d->encMapper->toUnicode(data.constData(), data.size());-
822-
823 if (d->lookingForEncodingDecl
d->lookingForEncodingDeclDescription
TRUEevaluated 3103 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 42695 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
3103-42695
824 d->encodingDeclChars += input;-
825-
826 bool needMoreText;-
827 QString encoding = extractEncodingDecl(d->encodingDeclChars, &needMoreText);-
828-
829 if (!encoding.isEmpty()
!encoding.isEmpty()Description
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 3036 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
67-3036
830 if (QTextCodec *codec = QTextCodec::codecForName(encoding.toLatin1())
QTextCodec *co...ng.toLatin1())Description
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEnever evaluated
) {
0-67
831-
832 if(codec->mibEnum() != mib
codec->mibEnum() != mibDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1-66
833 delete d->encMapper;-
834 d->encMapper = codec->makeDecoder();-
835-
836-
837-
838-
839 input.clear();-
840-
841-
842 d->encMapper->toUnicode(d->encodingDeclBytes.constData(), d->encodingDeclBytes.size());-
843-
844 input = d->encMapper->toUnicode(data.constData(), data.size());-
845 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
1
846 }
executed 67 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
67
847 }
executed 67 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
67
848-
849 d->encodingDeclBytes += data;-
850 d->lookingForEncodingDecl = needMoreText;-
851 }
executed 3103 times by 3 tests: end of block
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
3103
852-
853 return
executed 45798 times by 3 tests: return input;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
input;
executed 45798 times by 3 tests: return input;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
45798
854-
855}-
856QXmlDefaultHandler::QXmlDefaultHandler()-
857{-
858-
859-
860 (void)d;;-
861}
executed 2103 times by 6 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
  • tst_qxmlstream - unknown status
2103
862-
863-
864-
865-
866-
867-
868QXmlDefaultHandler::~QXmlDefaultHandler()-
869{-
870}-
871-
872-
873-
874-
875-
876-
877void QXmlDefaultHandler::setDocumentLocator(QXmlLocator*)-
878{-
879}-
880-
881-
882-
883-
884-
885-
886bool QXmlDefaultHandler::startDocument()-
887{-
888 return
executed 255 times by 6 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
  • tst_qxmlstream - unknown status
true;
executed 255 times by 6 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
  • tst_qxmlstream - unknown status
255
889}-
890-
891-
892-
893-
894-
895-
896bool QXmlDefaultHandler::endDocument()-
897{-
898 return
executed 11 times by 3 tests: return true;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
true;
executed 11 times by 3 tests: return true;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
11
899}-
900-
901-
902-
903-
904-
905-
906bool QXmlDefaultHandler::startPrefixMapping(const QString&, const QString&)-
907{-
908 return
executed 5 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 5 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
5
909}-
910-
911-
912-
913-
914-
915-
916bool QXmlDefaultHandler::endPrefixMapping(const QString&)-
917{-
918 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
4
919}-
920-
921-
922-
923-
924-
925-
926bool QXmlDefaultHandler::startElement(const QString&, const QString&,-
927 const QString&, const QXmlAttributes&)-
928{-
929 return
executed 206 times by 2 tests: return true;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 206 times by 2 tests: return true;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
206
930}-
931-
932-
933-
934-
935-
936-
937bool QXmlDefaultHandler::endElement(const QString&, const QString&,-
938 const QString&)-
939{-
940 return
executed 206 times by 2 tests: return true;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 206 times by 2 tests: return true;
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
206
941}-
942-
943-
944-
945-
946-
947-
948bool QXmlDefaultHandler::characters(const QString&)-
949{-
950 return
executed 394 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 394 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
394
951}-
952-
953-
954-
955-
956-
957-
958bool QXmlDefaultHandler::ignorableWhitespace(const QString&)-
959{-
960 return
never executed: return true;
true;
never executed: return true;
0
961}-
962-
963-
964-
965-
966-
967-
968bool QXmlDefaultHandler::processingInstruction(const QString&,-
969 const QString&)-
970{-
971 return
executed 6 times by 2 tests: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
true;
executed 6 times by 2 tests: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
6
972}-
973-
974-
975-
976-
977-
978-
979bool QXmlDefaultHandler::skippedEntity(const QString&)-
980{-
981 return
never executed: return true;
true;
never executed: return true;
0
982}-
983-
984-
985-
986-
987-
988-
989bool QXmlDefaultHandler::warning(const QXmlParseException&)-
990{-
991 return
never executed: return true;
true;
never executed: return true;
0
992}-
993-
994-
995-
996-
997-
998-
999bool QXmlDefaultHandler::error(const QXmlParseException&)-
1000{-
1001 return
never executed: return true;
true;
never executed: return true;
0
1002}-
1003-
1004-
1005-
1006-
1007-
1008-
1009bool QXmlDefaultHandler::fatalError(const QXmlParseException&)-
1010{-
1011 return
executed 3 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 3 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
3
1012}-
1013-
1014-
1015-
1016-
1017-
1018-
1019bool QXmlDefaultHandler::notationDecl(const QString&, const QString&,-
1020 const QString&)-
1021{-
1022 return
never executed: return true;
true;
never executed: return true;
0
1023}-
1024-
1025-
1026-
1027-
1028-
1029-
1030bool QXmlDefaultHandler::unparsedEntityDecl(const QString&, const QString&,-
1031 const QString&, const QString&)-
1032{-
1033 return
never executed: return true;
true;
never executed: return true;
0
1034}-
1035-
1036-
1037-
1038-
1039-
1040-
1041-
1042bool QXmlDefaultHandler::resolveEntity(const QString&, const QString&,-
1043 QXmlInputSource*& ret)-
1044{-
1045 ret = 0;-
1046 return
never executed: return true;
true;
never executed: return true;
0
1047}-
1048-
1049-
1050-
1051-
1052-
1053-
1054QString QXmlDefaultHandler::errorString() const-
1055{-
1056 return
never executed: return QString::fromLatin1("error triggered by consumer");
QString::fromLatin1("error triggered by consumer");
never executed: return QString::fromLatin1("error triggered by consumer");
0
1057}-
1058-
1059-
1060-
1061-
1062-
1063-
1064bool QXmlDefaultHandler::startDTD(const QString&, const QString&, const QString&)-
1065{-
1066 return
never executed: return true;
true;
never executed: return true;
0
1067}-
1068-
1069-
1070-
1071-
1072-
1073-
1074bool QXmlDefaultHandler::endDTD()-
1075{-
1076 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
1077}-
1078-
1079-
1080-
1081-
1082-
1083-
1084bool QXmlDefaultHandler::startEntity(const QString&)-
1085{-
1086 return
never executed: return true;
true;
never executed: return true;
0
1087}-
1088-
1089-
1090-
1091-
1092-
1093-
1094bool QXmlDefaultHandler::endEntity(const QString&)-
1095{-
1096 return
never executed: return true;
true;
never executed: return true;
0
1097}-
1098-
1099-
1100-
1101-
1102-
1103-
1104bool QXmlDefaultHandler::startCDATA()-
1105{-
1106 return
never executed: return true;
true;
never executed: return true;
0
1107}-
1108-
1109-
1110-
1111-
1112-
1113-
1114bool QXmlDefaultHandler::endCDATA()-
1115{-
1116 return
never executed: return true;
true;
never executed: return true;
0
1117}-
1118-
1119-
1120-
1121-
1122-
1123-
1124bool QXmlDefaultHandler::comment(const QString&)-
1125{-
1126 return
never executed: return true;
true;
never executed: return true;
0
1127}-
1128-
1129-
1130-
1131-
1132-
1133-
1134bool QXmlDefaultHandler::attributeDecl(const QString&, const QString&, const QString&, const QString&, const QString&)-
1135{-
1136 return
executed 1 time by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 1 time by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
1
1137}-
1138-
1139-
1140-
1141-
1142-
1143-
1144bool QXmlDefaultHandler::internalEntityDecl(const QString&, const QString&)-
1145{-
1146 return
executed 5 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 5 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
5
1147}-
1148-
1149-
1150-
1151-
1152-
1153-
1154bool QXmlDefaultHandler::externalEntityDecl(const QString&, const QString&, const QString&)-
1155{-
1156 return
never executed: return true;
true;
never executed: return true;
0
1157}-
1158inline bool QXmlSimpleReaderPrivate::atEnd()-
1159{-
1160 return
executed 1050513 times by 6 tests: return (c.unicode()|0x0001) == 0xffff;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
(c.unicode()|0x0001) == 0xffff;
executed 1050513 times by 6 tests: return (c.unicode()|0x0001) == 0xffff;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1050513
1161}-
1162-
1163inline void QXmlSimpleReaderPrivate::stringClear()-
1164{-
1165 stringValueLen = 0; stringArrayPos = 0;-
1166}
executed 21975 times by 6 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
  • tst_qxmlstream - unknown status
21975
1167inline void QXmlSimpleReaderPrivate::nameClear()-
1168{-
1169 nameValueLen = 0; nameArrayPos = 0;-
1170}
executed 30021 times by 6 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
  • tst_qxmlstream - unknown status
30021
1171-
1172inline void QXmlSimpleReaderPrivate::refClear()-
1173{-
1174 refValueLen = 0; refArrayPos = 0;-
1175}
executed 2957 times by 3 tests: end of block
Executed by:
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
2957
1176-
1177QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader)-
1178{-
1179 q_ptr = reader;-
1180 parseStack = 0;-
1181-
1182 locator.reset(new QXmlSimpleReaderLocator(reader));-
1183 entityRes = 0;-
1184 dtdHnd = 0;-
1185 contentHnd = 0;-
1186 errorHnd = 0;-
1187 lexicalHnd = 0;-
1188 declHnd = 0;-
1189-
1190-
1191 useNamespaces = true;-
1192 useNamespacePrefixes = false;-
1193 reportWhitespaceCharData = true;-
1194 reportEntities = false;-
1195}
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
1196-
1197QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate()-
1198{-
1199 delete parseStack;-
1200}
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
1201-
1202void QXmlSimpleReaderPrivate::initIncrementalParsing()-
1203{-
1204 if(parseStack
parseStackDescription
TRUEnever evaluated
FALSEevaluated 1490 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
0-1490
1205 parseStack->clear();
never executed: parseStack->clear();
0
1206 else-
1207 parseStack = new QStack<ParseState>;
executed 1490 times by 1 test: parseStack = new QStack<ParseState>;
Executed by:
  • tst_qxmlsimplereader - unknown status
1490
1208}-
1209static inline bool is_S(QChar ch)-
1210{-
1211 ushort uc = ch.unicode();-
1212 return
executed 187992 times by 6 tests: return (uc == ' ' || uc == '\t' || uc == '\n' || uc == '\r');
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
(uc == ' ' || uc == '\t' || uc == '\n' || uc == '\r');
executed 187992 times by 6 tests: return (uc == ' ' || uc == '\t' || uc == '\n' || uc == '\r');
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
187992
1213}-
1214-
1215enum NameChar { NameBeginning, NameNotBeginning, NotName };-
1216-
1217static const char Begi = (char)NameBeginning;-
1218static const char NtBg = (char)NameNotBeginning;-
1219static const char NotN = (char)NotName;-
1220-
1221static const char nameCharTable[128] =-
1222{-
1223-
1224 NotN, NotN, NotN, NotN, NotN, NotN, NotN, NotN,-
1225 NotN, NotN, NotN, NotN, NotN, NotN, NotN, NotN,-
1226-
1227 NotN, NotN, NotN, NotN, NotN, NotN, NotN, NotN,-
1228 NotN, NotN, NotN, NotN, NotN, NotN, NotN, NotN,-
1229-
1230 NotN, NotN, NotN, NotN, NotN, NotN, NotN, NotN,-
1231 NotN, NotN, NotN, NotN, NotN, NtBg, NtBg, NotN,-
1232-
1233 NtBg, NtBg, NtBg, NtBg, NtBg, NtBg, NtBg, NtBg,-
1234 NtBg, NtBg, Begi, NotN, NotN, NotN, NotN, NotN,-
1235-
1236 NotN, Begi, Begi, Begi, Begi, Begi, Begi, Begi,-
1237 Begi, Begi, Begi, Begi, Begi, Begi, Begi, Begi,-
1238-
1239 Begi, Begi, Begi, Begi, Begi, Begi, Begi, Begi,-
1240 Begi, Begi, Begi, NotN, NotN, NotN, NotN, Begi,-
1241-
1242 NotN, Begi, Begi, Begi, Begi, Begi, Begi, Begi,-
1243 Begi, Begi, Begi, Begi, Begi, Begi, Begi, Begi,-
1244-
1245 Begi, Begi, Begi, Begi, Begi, Begi, Begi, Begi,-
1246 Begi, Begi, Begi, NotN, NotN, NotN, NotN, NotN-
1247};-
1248-
1249static inline NameChar fastDetermineNameChar(QChar ch)-
1250{-
1251 ushort uc = ch.unicode();-
1252 if (!(uc & ~0x7f)
!(uc & ~0x7f)Description
TRUEevaluated 258018 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 2385 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
2385-258018
1253 return
executed 258018 times by 6 tests: return (NameChar)nameCharTable[uc];
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
(NameChar)nameCharTable[uc];
executed 258018 times by 6 tests: return (NameChar)nameCharTable[uc];
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
258018
1254-
1255 QChar::Category cat = ch.category();-
1256-
1257 if ((cat >= QChar::Letter_Uppercase
cat >= QChar::Letter_UppercaseDescription
TRUEevaluated 2297 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& cat <= QChar::Letter_Other
cat <= QChar::Letter_OtherDescription
TRUEevaluated 2285 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
12-2297
1258 || cat == QChar::Number_Letter
cat == QChar::Number_LetterDescription
TRUEnever evaluated
FALSEevaluated 100 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
0-100
1259 return
executed 2285 times by 1 test: return NameBeginning;
Executed by:
  • tst_qxmlsimplereader - unknown status
NameBeginning;
executed 2285 times by 1 test: return NameBeginning;
Executed by:
  • tst_qxmlsimplereader - unknown status
2285
1260 if ((cat >= QChar::Number_DecimalDigit
cat >= QChar::...r_DecimalDigitDescription
TRUEevaluated 23 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 77 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& cat <= QChar::Number_Other
cat <= QChar::Number_OtherDescription
TRUEnever evaluated
FALSEevaluated 23 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
0-77
1261 || (cat >= QChar::Mark_NonSpacing
cat >= QChar::Mark_NonSpacingDescription
TRUEevaluated 100 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& cat <= QChar::Mark_Enclosing
cat <= QChar::Mark_EnclosingDescription
TRUEevaluated 77 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 23 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
))
0-100
1262 return
executed 77 times by 1 test: return NameNotBeginning;
Executed by:
  • tst_qxmlsimplereader - unknown status
NameNotBeginning;
executed 77 times by 1 test: return NameNotBeginning;
Executed by:
  • tst_qxmlsimplereader - unknown status
77
1263 return
executed 23 times by 1 test: return NotName;
Executed by:
  • tst_qxmlsimplereader - unknown status
NotName;
executed 23 times by 1 test: return NotName;
Executed by:
  • tst_qxmlsimplereader - unknown status
23
1264}-
1265-
1266static NameChar determineNameChar(QChar ch)-
1267{-
1268 return
executed 40888 times by 6 tests: return fastDetermineNameChar(ch);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
fastDetermineNameChar(ch);
executed 40888 times by 6 tests: return fastDetermineNameChar(ch);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
40888
1269}-
1270-
1271-
1272-
1273-
1274-
1275QXmlSimpleReader::QXmlSimpleReader()-
1276 : d_ptr(new QXmlSimpleReaderPrivate(this))-
1277{-
1278}
executed 2104 times by 6 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
  • tst_qxmlstream - unknown status
2104
1279-
1280-
1281-
1282-
1283QXmlSimpleReader::~QXmlSimpleReader()-
1284{-
1285}-
1286-
1287-
1288-
1289-
1290bool QXmlSimpleReader::feature(const QString& name, bool *ok) const-
1291{-
1292 const QXmlSimpleReaderPrivate *d = d_func();-
1293-
1294 if (ok != 0
ok != 0Description
TRUEnever evaluated
FALSEevaluated 246 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-246
1295 *
never executed: *ok = true;
ok = true;
never executed: *ok = true;
0
1296 if (name == QLatin1String("http://xml.org/sax/features/namespaces")
name == QLatin...s/namespaces")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 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
2-244
1297 return
executed 244 times by 5 tests: return d->useNamespaces;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
d->useNamespaces;
executed 244 times by 5 tests: return d->useNamespaces;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
244
1298 } else if (name == QLatin1String("http://xml.org/sax/features/namespace-prefixes")
name == QLatin...ace-prefixes")Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-2
1299 return
executed 2 times by 1 test: return d->useNamespacePrefixes;
Executed by:
  • tst_qxmlsimplereader - unknown status
d->useNamespacePrefixes;
executed 2 times by 1 test: return d->useNamespacePrefixes;
Executed by:
  • tst_qxmlsimplereader - unknown status
2
1300 } else if (name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData")
name == QLatin...nly-CharData")Description
TRUEnever evaluated
FALSEnever evaluated
0
1301 || name == QLatin1String("http://qt-project.org/xml/features/report-whitespace-only-CharData")
name == QLatin...nly-CharData")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1302 return
never executed: return d->reportWhitespaceCharData;
d->reportWhitespaceCharData;
never executed: return d->reportWhitespaceCharData;
0
1303 } else if (name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")
name == QLatin...t-end-entity")Description
TRUEnever evaluated
FALSEnever evaluated
0
1304 || name == QLatin1String("http://qt-project.org/xml/features/report-start-end-entity")
name == QLatin...t-end-entity")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1305 return
never executed: return d->reportEntities;
d->reportEntities;
never executed: return d->reportEntities;
0
1306 } else {-
1307 QMessageLogger(__FILE__, 2944, __PRETTY_FUNCTION__).warning("Unknown feature %s", name.toLatin1().data());-
1308 if (ok != 0
ok != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1309 *
never executed: *ok = false;
ok = false;
never executed: *ok = false;
0
1310 }
never executed: end of block
0
1311 return
never executed: return false;
false;
never executed: return false;
0
1312}-
1313void QXmlSimpleReader::setFeature(const QString& name, bool enable)-
1314{-
1315 QXmlSimpleReaderPrivate * const d = d_func();-
1316 if (name == QLatin1String("http://xml.org/sax/features/namespaces")
name == QLatin...s/namespaces")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 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
) {
244-488
1317 d->useNamespaces = enable;-
1318 }
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
else if (name == QLatin1String("http://xml.org/sax/features/namespace-prefixes")
name == QLatin...ace-prefixes")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 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
) {
244
1319 d->useNamespacePrefixes = enable;-
1320 }
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
else if (name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData")
name == QLatin...nly-CharData")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
FALSEnever evaluated
0-244
1321 || name == QLatin1String("http://qt-project.org/xml/features/report-whitespace-only-CharData")
name == QLatin...nly-CharData")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1322 d->reportWhitespaceCharData = enable;-
1323 }
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
else if (name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")
name == QLatin...t-end-entity")Description
TRUEnever evaluated
FALSEnever evaluated
0-244
1324 || name == QLatin1String("http://qt-project.org/xml/features/report-start-end-entity")
name == QLatin...t-end-entity")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1325 d->reportEntities = enable;-
1326 }
never executed: end of block
else {
0
1327 QMessageLogger(__FILE__, 2998, __PRETTY_FUNCTION__).warning("Unknown feature %s", name.toLatin1().data());-
1328 }
never executed: end of block
0
1329}-
1330-
1331-
1332-
1333bool QXmlSimpleReader::hasFeature(const QString& name) const-
1334{-
1335 if (name == QLatin1String("http://xml.org/sax/features/namespaces")
name == QLatin...s/namespaces")Description
TRUEnever evaluated
FALSEnever evaluated
0
1336 || name == QLatin1String("http://xml.org/sax/features/namespace-prefixes")
name == QLatin...ace-prefixes")Description
TRUEnever evaluated
FALSEnever evaluated
0
1337 || name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData")
name == QLatin...nly-CharData")Description
TRUEnever evaluated
FALSEnever evaluated
0
1338 || name == QLatin1String("http://qt-project.org/xml/features/report-whitespace-only-CharData")
name == QLatin...nly-CharData")Description
TRUEnever evaluated
FALSEnever evaluated
0
1339 || name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")
name == QLatin...t-end-entity")Description
TRUEnever evaluated
FALSEnever evaluated
0
1340 || name == QLatin1String("http://qt-project.org/xml/features/report-start-end-entity")
name == QLatin...t-end-entity")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1341 return
never executed: return true;
true;
never executed: return true;
0
1342 } else {-
1343 return
never executed: return false;
false;
never executed: return false;
0
1344 }-
1345}-
1346-
1347-
1348-
1349void* QXmlSimpleReader::property(const QString&, bool *ok) const-
1350{-
1351 if (ok != 0
ok != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1352 *
never executed: *ok = false;
ok = false;
never executed: *ok = false;
0
1353 return
never executed: return 0;
0;
never executed: return 0;
0
1354}-
1355-
1356-
1357-
1358void QXmlSimpleReader::setProperty(const QString&, void*)-
1359{-
1360}-
1361-
1362-
1363-
1364-
1365bool QXmlSimpleReader::hasProperty(const QString&) const-
1366{-
1367 return
never executed: return false;
false;
never executed: return false;
0
1368}-
1369-
1370-
1371-
1372-
1373void QXmlSimpleReader::setEntityResolver(QXmlEntityResolver* handler)-
1374{-
1375 QXmlSimpleReaderPrivate * const d = d_func();-
1376 d->entityRes = handler;-
1377}
executed 1845 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
1845
1378-
1379-
1380-
1381-
1382QXmlEntityResolver* QXmlSimpleReader::entityResolver() const-
1383{-
1384 const QXmlSimpleReaderPrivate *d = d_func();-
1385 return
never executed: return d->entityRes;
d->entityRes;
never executed: return d->entityRes;
0
1386}-
1387-
1388-
1389-
1390-
1391void QXmlSimpleReader::setDTDHandler(QXmlDTDHandler* handler)-
1392{-
1393 QXmlSimpleReaderPrivate * const d = d_func();-
1394 d->dtdHnd = handler;-
1395}
executed 2089 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
2089
1396-
1397-
1398-
1399-
1400QXmlDTDHandler* QXmlSimpleReader::DTDHandler() const-
1401{-
1402 const QXmlSimpleReaderPrivate *d = d_func();-
1403 return
never executed: return d->dtdHnd;
d->dtdHnd;
never executed: return d->dtdHnd;
0
1404}-
1405-
1406-
1407-
1408-
1409void QXmlSimpleReader::setContentHandler(QXmlContentHandler* handler)-
1410{-
1411 QXmlSimpleReaderPrivate * const d = d_func();-
1412 d->contentHnd = handler;-
1413}
executed 2100 times by 6 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
  • tst_qxmlstream - unknown status
2100
1414-
1415-
1416-
1417-
1418QXmlContentHandler* QXmlSimpleReader::contentHandler() const-
1419{-
1420 const QXmlSimpleReaderPrivate *d = d_func();-
1421 return
never executed: return d->contentHnd;
d->contentHnd;
never executed: return d->contentHnd;
0
1422}-
1423-
1424-
1425-
1426-
1427void QXmlSimpleReader::setErrorHandler(QXmlErrorHandler* handler)-
1428{-
1429 QXmlSimpleReaderPrivate * const d = d_func();-
1430 d->errorHnd = handler;-
1431}
executed 2094 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
2094
1432-
1433-
1434-
1435-
1436QXmlErrorHandler* QXmlSimpleReader::errorHandler() const-
1437{-
1438 const QXmlSimpleReaderPrivate *d = d_func();-
1439 return
never executed: return d->errorHnd;
d->errorHnd;
never executed: return d->errorHnd;
0
1440}-
1441-
1442-
1443-
1444-
1445void QXmlSimpleReader::setLexicalHandler(QXmlLexicalHandler* handler)-
1446{-
1447 QXmlSimpleReaderPrivate * const d = d_func();-
1448 d->lexicalHnd = handler;-
1449}
executed 2089 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
2089
1450-
1451-
1452-
1453-
1454QXmlLexicalHandler* QXmlSimpleReader::lexicalHandler() const-
1455{-
1456 const QXmlSimpleReaderPrivate *d = d_func();-
1457 return
never executed: return d->lexicalHnd;
d->lexicalHnd;
never executed: return d->lexicalHnd;
0
1458}-
1459-
1460-
1461-
1462-
1463void QXmlSimpleReader::setDeclHandler(QXmlDeclHandler* handler)-
1464{-
1465 QXmlSimpleReaderPrivate * const d = d_func();-
1466 d->declHnd = handler;-
1467}
executed 2092 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
2092
1468-
1469-
1470-
1471-
1472QXmlDeclHandler* QXmlSimpleReader::declHandler() const-
1473{-
1474 const QXmlSimpleReaderPrivate *d = d_func();-
1475 return
never executed: return d->declHnd;
d->declHnd;
never executed: return d->declHnd;
0
1476}-
1477-
1478-
1479-
1480-
1481-
1482-
1483bool QXmlSimpleReader::parse(const QXmlInputSource& input)-
1484{-
1485 return
executed 359 times by 2 tests: return parse(&input, false);
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
parse(&input, false);
executed 359 times by 2 tests: return parse(&input, false);
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
359
1486}-
1487-
1488-
1489-
1490-
1491-
1492bool QXmlSimpleReader::parse(const QXmlInputSource* input)-
1493{-
1494 return
executed 252 times by 5 tests: return parse(input, false);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
parse(input, false);
executed 252 times by 5 tests: return parse(input, false);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
252
1495}-
1496bool QXmlSimpleReader::parse(const QXmlInputSource *input, bool incremental)-
1497{-
1498 QXmlSimpleReaderPrivate * const d = d_func();-
1499-
1500 d->literalEntitySizes.clear();-
1501 d->referencesToOtherEntities.clear();-
1502 d->expandedSizes.clear();-
1503-
1504 if (incremental
incrementalDescription
TRUEevaluated 1490 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 616 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
616-1490
1505 d->initIncrementalParsing();-
1506 }
executed 1490 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else {
1490
1507 delete d->parseStack;-
1508 d->parseStack = 0;-
1509 }
executed 616 times by 6 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
  • tst_qxmlstream - unknown status
616
1510 d->init(input);-
1511-
1512-
1513 if (d->contentHnd
d->contentHndDescription
TRUEevaluated 2100 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
) {
6-2100
1514 d->contentHnd->setDocumentLocator(d->locator.data());-
1515 if (!d->contentHnd->startDocument()
!d->contentHnd...tartDocument()Description
TRUEnever evaluated
FALSEevaluated 2100 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-2100
1516 d->reportParseError(d->contentHnd->errorString());-
1517 clear(d->tags);-
1518 return
never executed: return false;
false;
never executed: return false;
0
1519 }-
1520 }
executed 2100 times by 6 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
  • tst_qxmlstream - unknown status
2100
1521 d->skipped_entity_in_content = false;-
1522 return
executed 2106 times by 6 tests: return d->parseBeginOrContinue(0, incremental);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
d->parseBeginOrContinue(0, incremental);
executed 2106 times by 6 tests: return d->parseBeginOrContinue(0, incremental);
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
2106
1523}-
1524bool QXmlSimpleReader::parseContinue()-
1525{-
1526 QXmlSimpleReaderPrivate * const d = d_func();-
1527 if (d->parseStack == 0
d->parseStack == 0Description
TRUEevaluated 1490 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 44908 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
|| d->parseStack->isEmpty()
d->parseStack->isEmpty()Description
TRUEnever evaluated
FALSEevaluated 44908 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
)
0-44908
1528 return
executed 1490 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 1490 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
1490
1529 d->initData();-
1530 int state = d->parseStack->pop().state;-
1531 return
executed 44908 times by 1 test: return d->parseBeginOrContinue(state, true);
Executed by:
  • tst_qxmlsimplereader - unknown status
d->parseBeginOrContinue(state, true);
executed 44908 times by 1 test: return d->parseBeginOrContinue(state, true);
Executed by:
  • tst_qxmlsimplereader - unknown status
44908
1532}-
1533-
1534-
1535-
1536-
1537bool QXmlSimpleReaderPrivate::parseBeginOrContinue(int state, bool incremental)-
1538{-
1539 bool atEndOrig = atEnd();-
1540-
1541 if (state==0
state==0Description
TRUEevaluated 36047 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 10967 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
10967-36047
1542 if (!parseProlog()
!parseProlog()Description
TRUEevaluated 34018 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 2029 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
2029-34018
1543 if (incremental
incrementalDescription
TRUEevaluated 33941 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 77 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& error.isNull()
error.isNull()Description
TRUEevaluated 33941 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-33941
1544 pushParseState(0, 0);-
1545 return
executed 33941 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 33941 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
33941
1546 } else {-
1547 clear(tags);-
1548 return
executed 77 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 77 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
77
1549 }-
1550 }-
1551 state = 1;-
1552 }
executed 2029 times by 6 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
  • tst_qxmlstream - unknown status
2029
1553 if (state==1
state==1Description
TRUEevaluated 10482 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 2514 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
2514-10482
1554 if (!parseElement()
!parseElement()Description
TRUEevaluated 8521 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1961 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1961-8521
1555 if (incremental
incrementalDescription
TRUEevaluated 8453 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& error.isNull()
error.isNull()Description
TRUEevaluated 8453 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-8453
1556 pushParseState(0, 1);-
1557 return
executed 8453 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 8453 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
8453
1558 } else {-
1559 clear(tags);-
1560 return
executed 68 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 68 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
68
1561 }-
1562 }-
1563 state = 2;-
1564 }
executed 1961 times by 6 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
  • tst_qxmlstream - unknown status
1961
1565-
1566 while (!atEnd()
!atEnd()Description
TRUEevaluated 2340 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 2392 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
2340-2392
1567 if (!parseMisc()
!parseMisc()Description
TRUEevaluated 2083 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 257 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
257-2083
1568 if (incremental
incrementalDescription
TRUEevaluated 2073 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& error.isNull()
error.isNull()Description
TRUEevaluated 2073 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) {
0-2073
1569 pushParseState(0, 2);-
1570 return
executed 2073 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 2073 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
2073
1571 } else {-
1572 clear(tags);-
1573 return
executed 10 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 10 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
10
1574 }-
1575 }-
1576 }
executed 257 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
257
1577 if (!atEndOrig
!atEndOrigDescription
TRUEevaluated 902 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 1490 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
&& incremental
incrementalDescription
TRUEevaluated 441 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 461 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
441-1490
1578-
1579 pushParseState(0, 2);-
1580 return
executed 441 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
true;
executed 441 times by 1 test: return true;
Executed by:
  • tst_qxmlsimplereader - unknown status
441
1581 }-
1582-
1583 if (!tags.empty()
!tags.empty()Description
TRUEnever evaluated
FALSEevaluated 1951 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& !error.isNull()
!error.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-1951
1584 reportParseError(QLatin1String("unexpected end of file"));-
1585 clear(tags);-
1586 return
never executed: return false;
false;
never executed: return false;
0
1587 }-
1588-
1589 if (contentHnd
contentHndDescription
TRUEevaluated 1950 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qxmlinputsource - unknown status
) {
1-1950
1590 delete parseStack;-
1591 parseStack = 0;-
1592 if (!contentHnd->endDocument()
!contentHnd->endDocument()Description
TRUEnever evaluated
FALSEevaluated 1950 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-1950
1593 reportParseError(contentHnd->errorString());-
1594 return
never executed: return false;
false;
never executed: return false;
0
1595 }-
1596 }
executed 1950 times by 6 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
  • tst_qxmlstream - unknown status
1950
1597 return
executed 1951 times by 6 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
  • tst_qxmlstream - unknown status
true;
executed 1951 times by 6 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
  • tst_qxmlstream - unknown status
1951
1598}-
1599bool QXmlSimpleReaderPrivate::parseProlog()-
1600{-
1601 const signed char Init = 0;-
1602 const signed char EatWS = 1;-
1603 const signed char Lt = 2;-
1604 const signed char Em = 3;-
1605 const signed char DocType = 4;-
1606 const signed char Comment = 5;-
1607 const signed char CommentR = 6;-
1608 const signed char PInstr = 7;-
1609 const signed char PInstrR = 8;-
1610 const signed char Done = 9;-
1611-
1612 const signed char InpWs = 0;-
1613 const signed char InpLt = 1;-
1614 const signed char InpQm = 2;-
1615 const signed char InpEm = 3;-
1616 const signed char InpD = 4;-
1617 const signed char InpDash = 5;-
1618 const signed char InpUnknown = 6;-
1619-
1620 static const signed char table[9][7] = {-
1621-
1622 { EatWS, Lt, -1, -1, -1, -1, -1 },-
1623 { -1, Lt, -1, -1, -1, -1, -1 },-
1624 { -1, -1, PInstr,Em, Done, -1, Done },-
1625 { -1, -1, -1, -1, DocType, Comment, -1 },-
1626 { EatWS, Lt, -1, -1, -1, -1, -1 },-
1627 { EatWS, Lt, -1, -1, -1, -1, -1 },-
1628 { EatWS, Lt, -1, -1, -1, -1, -1 },-
1629 { EatWS, Lt, -1, -1, -1, -1, -1 },-
1630 { EatWS, Lt, -1, -1, -1, -1, -1 }-
1631 };-
1632 signed char state;-
1633 signed char input;-
1634-
1635 if (parseStack == 0
parseStack == 0Description
TRUEevaluated 616 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 35431 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
|| parseStack->isEmpty()
parseStack->isEmpty()Description
TRUEevaluated 1490 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 33941 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
616-35431
1636 xmldecl_possible = true;-
1637 doctype_read = false;-
1638 state = Init;-
1639 }
executed 2106 times by 6 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
  • tst_qxmlstream - unknown status
else {
2106
1640 state = parseStack->pop().state;-
1641-
1642-
1643-
1644 if (!parseStack->isEmpty()
!parseStack->isEmpty()Description
TRUEevaluated 32278 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1663 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
1663-32278
1645 ParseFunction function = parseStack->top().function;-
1646 if (function == &QXmlSimpleReaderPrivate::eat_ws
function == &Q...rivate::eat_wsDescription
TRUEevaluated 923 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 31355 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
923-31355
1647 parseStack->pop();-
1648-
1649-
1650-
1651 }
executed 923 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
923
1652 if (!(this->*function)()
!(this->*function)()Description
TRUEevaluated 29925 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 2353 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
2353-29925
1653 parseFailed(&QXmlSimpleReaderPrivate::parseProlog, state);-
1654 return
executed 29925 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 29925 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
29925
1655 }-
1656 }
executed 2353 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
2353
1657 }
executed 4016 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
4016
1658-
1659 for (;;) {-
1660 switch (state) {-
1661 case
executed 2370 times by 4 tests: case DocType:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
DocType:
executed 2370 times by 4 tests: case DocType:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
2370
1662 if (doctype_read
doctype_readDescription
TRUEnever evaluated
FALSEevaluated 2370 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-2370
1663 reportParseError(QLatin1String("more than one document type definition"));-
1664 return
never executed: return false;
false;
never executed: return false;
0
1665 } else {-
1666 doctype_read = false;-
1667 }
executed 2370 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
2370
1668 break;
executed 2370 times by 4 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
2370
1669 case
executed 21 times by 2 tests: case Comment:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Comment:
executed 21 times by 2 tests: case Comment:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
21
1670 if (lexicalHnd
lexicalHndDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
8-13
1671 if (!lexicalHnd->comment(string())
!lexicalHnd->comment(string())Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
0-13
1672 reportParseError(lexicalHnd->errorString());-
1673 return
never executed: return false;
false;
never executed: return false;
0
1674 }-
1675 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
13
1676 state = CommentR;-
1677 break;
executed 21 times by 2 tests: break;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
21
1678 case
executed 134 times by 2 tests: case PInstr:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
PInstr:
executed 134 times by 2 tests: case PInstr:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
134
1679-
1680 if (contentHnd
contentHndDescription
TRUEevaluated 131 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
3-131
1681 if (xmldecl_possible
xmldecl_possibleDescription
TRUEevaluated 120 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
&& !xmlVersion.isEmpty()
!xmlVersion.isEmpty()Description
TRUEevaluated 108 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
11-120
1682 QString value(QLatin1String("version='"));-
1683 value += xmlVersion;-
1684 value += QLatin1Char('\'');-
1685 if (!encoding.isEmpty()
!encoding.isEmpty()Description
TRUEevaluated 63 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 45 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
45-63
1686 value += QLatin1String(" encoding='");-
1687 value += encoding;-
1688 value += QLatin1Char('\'');-
1689 }
executed 63 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
63
1690 if (standalone == QXmlSimpleReaderPrivate::Yes
standalone == ...erPrivate::YesDescription
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 87 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
21-87
1691 value += QLatin1String(" standalone='yes'");-
1692 }
executed 21 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
else if (standalone == QXmlSimpleReaderPrivate::No
standalone == ...derPrivate::NoDescription
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 57 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
21-57
1693 value += QLatin1String(" standalone='no'");-
1694 }
executed 30 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
30
1695 if (!contentHnd->processingInstruction(QLatin1String("xml"), value)
!contentHnd->p..."xml"), value)Description
TRUEnever evaluated
FALSEevaluated 108 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-108
1696 reportParseError(contentHnd->errorString());-
1697 return
never executed: return false;
false;
never executed: return false;
0
1698 }-
1699 }
executed 108 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
else {
108
1700 if (!contentHnd->processingInstruction(name(), string())
!contentHnd->p...e(), string())Description
TRUEnever evaluated
FALSEevaluated 23 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
0-23
1701 reportParseError(contentHnd->errorString());-
1702 return
never executed: return false;
false;
never executed: return false;
0
1703 }-
1704 }
executed 23 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
23
1705 }-
1706-
1707 xmldecl_possible = false;-
1708 state = PInstrR;-
1709 break;
executed 134 times by 2 tests: break;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
134
1710 case
executed 2029 times by 6 tests: case Done:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Done:
executed 2029 times by 6 tests: case Done:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
2029
1711 return
executed 2029 times by 6 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
  • tst_qxmlstream - unknown status
true;
executed 2029 times by 6 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
  • tst_qxmlstream - unknown status
2029
1712 case
executed 6 times by 1 test: case -1:
Executed by:
  • tst_qxmlsimplereader - unknown status
-1:
executed 6 times by 1 test: case -1:
Executed by:
  • tst_qxmlsimplereader - unknown status
6
1713 reportParseError(QLatin1String("error occurred while parsing element"));-
1714 return
executed 6 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 6 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
6
1715 }-
1716-
1717 if (atEnd()
atEnd()Description
TRUEevaluated 1664 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 12160 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1664-12160
1718 unexpectedEof(&QXmlSimpleReaderPrivate::parseProlog, state);-
1719 return
executed 1664 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 1664 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
1664
1720 }-
1721 if (is_S(c)
is_S(c)Description
TRUEevaluated 1960 times by 4 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 10200 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1960-10200
1722 input = InpWs;-
1723 }
executed 1960 times by 4 tests: end of block
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
else if (c == QLatin1Char('<')
c == QLatin1Char('<')Description
TRUEevaluated 4124 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 6076 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1960-6076
1724 input = InpLt;-
1725 }
executed 4124 times by 6 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
  • tst_qxmlstream - unknown status
else if (c == QLatin1Char('?')
c == QLatin1Char('?')Description
TRUEevaluated 147 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 5929 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
147-5929
1726 input = InpQm;-
1727 }
executed 147 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
else if (c == QLatin1Char('!')
c == QLatin1Char('!')Description
TRUEevaluated 1948 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 3981 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
147-3981
1728 input = InpEm;-
1729 }
executed 1948 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
else if (c == QLatin1Char('D')
c == QLatin1Char('D')Description
TRUEevaluated 1923 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 2058 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1923-2058
1730 input = InpD;-
1731 }
executed 1923 times by 4 tests: end of block
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
else if (c == QLatin1Char('-')
c == QLatin1Char('-')Description
TRUEevaluated 23 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 2035 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
23-2035
1732 input = InpDash;-
1733 }
executed 23 times by 2 tests: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
else {
23
1734 input = InpUnknown;-
1735 }
executed 2035 times by 6 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
  • tst_qxmlstream - unknown status
2035
1736 state = table[state][input];-
1737-
1738 switch (state) {-
1739 case
executed 1960 times by 4 tests: case EatWS:
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
EatWS:
executed 1960 times by 4 tests: case EatWS:
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1960
1740-
1741 xmldecl_possible = false;-
1742 if (!eat_ws()
!eat_ws()Description
TRUEevaluated 746 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1214 times by 4 tests
Evaluated by:
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
746-1214
1743 parseFailed(&QXmlSimpleReaderPrivate::parseProlog, state);-
1744 return
executed 746 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 746 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
746
1745 }-
1746 break;
executed 1214 times by 4 tests: break;
Executed by:
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1214
1747 case
executed 4124 times by 6 tests: case Lt:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Lt:
executed 4124 times by 6 tests: case Lt:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
4124
1748 next();-
1749 break;
executed 4124 times by 6 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
4124
1750 case
executed 1948 times by 4 tests: case Em:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Em:
executed 1948 times by 4 tests: case Em:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1948
1751-
1752 xmldecl_possible = false;-
1753 next();-
1754 break;
executed 1948 times by 4 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1948
1755 case
executed 1923 times by 4 tests: case DocType:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
DocType:
executed 1923 times by 4 tests: case DocType:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
1923
1756 if (!parseDoctype()
!parseDoctype()Description
TRUEevaluated 1545 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 378 times by 4 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
378-1545
1757 parseFailed(&QXmlSimpleReaderPrivate::parseProlog, state);-
1758 return
executed 1545 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 1545 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
1545
1759 }-
1760 break;
executed 378 times by 4 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
378
1761 case
executed 23 times by 2 tests: case Comment:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Comment:
executed 23 times by 2 tests: case Comment:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
23
1762 case
never executed: case CommentR:
CommentR:
never executed: case CommentR:
0
1763 if (!parseComment()
!parseComment()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
11-12
1764 parseFailed(&QXmlSimpleReaderPrivate::parseProlog, state);-
1765 return
executed 11 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 11 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
11
1766 }-
1767 break;
executed 12 times by 2 tests: break;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
12
1768 case
executed 147 times by 2 tests: case PInstr:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
PInstr:
executed 147 times by 2 tests: case PInstr:
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
147
1769 case
never executed: case PInstrR:
PInstrR:
never executed: case PInstrR:
0
1770 parsePI_xmldecl = xmldecl_possible;-
1771 if (!parsePI()
!parsePI()Description
TRUEevaluated 121 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
26-121
1772 parseFailed(&QXmlSimpleReaderPrivate::parseProlog, state);-
1773 return
executed 121 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 121 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
121
1774 }-
1775 break;
executed 26 times by 2 tests: break;
Executed by:
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
26
1776 }-
1777 }
executed 9737 times by 6 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
  • tst_qxmlstream - unknown status
9737
1778 return
never executed: return false;
false;
never executed: return false;
0
1779}-
1780-
1781-
1782-
1783-
1784-
1785-
1786bool QXmlSimpleReaderPrivate::parseElement()-
1787{-
1788 const int Init = 0;-
1789 const int ReadName = 1;-
1790 const int Ws1 = 2;-
1791 const int STagEnd = 3;-
1792 const int STagEnd2 = 4;-
1793 const int ETagBegin = 5;-
1794 const int ETagBegin2 = 6;-
1795 const int Ws2 = 7;-
1796 const int EmptyTag = 8;-
1797 const int Attrib = 9;-
1798 const int AttribPro = 10;-
1799 const int Ws3 = 11;-
1800 const int Done = 12;-
1801-
1802 const int InpWs = 0;-
1803 const int InpNameBe = 1;-
1804 const int InpGt = 2;-
1805 const int InpSlash = 3;-
1806 const int InpUnknown = 4;-
1807-
1808 static const int table[12][5] = {-
1809-
1810 { -1, ReadName, -1, -1, -1 },-
1811 { Ws1, Attrib, STagEnd, EmptyTag, -1 },-
1812 { -1, Attrib, STagEnd, EmptyTag, -1 },-
1813 { STagEnd2, STagEnd2, STagEnd2, STagEnd2, STagEnd2 },-
1814 { -1, -1, -1, ETagBegin, -1 },-
1815 { -1, ETagBegin2, -1, -1, -1 },-
1816 { Ws2, -1, Done, -1, -1 },-
1817 { -1, -1, Done, -1, -1 },-
1818 { -1, -1, Done, -1, -1 },-
1819 { Ws3, Attrib, STagEnd, EmptyTag, -1 },-
1820 { Ws3, Attrib, STagEnd, EmptyTag, -1 },-
1821 { -1, Attrib, STagEnd, EmptyTag, -1 }-
1822 };-
1823 int state;-
1824 int input;-
1825-
1826 if (parseStack == 0
parseStack == 0Description
TRUEevaluated 3992 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 11462 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
|| parseStack->isEmpty()
parseStack->isEmpty()Description
TRUEevaluated 1814 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 9648 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
1814-11462
1827 state = Init;-
1828 }
executed 5806 times by 6 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
  • tst_qxmlstream - unknown status
else {
5806
1829 state = parseStack->pop().state;-
1830-
1831-
1832-
1833 if (!parseStack->isEmpty()
!parseStack->isEmpty()Description
TRUEevaluated 8425 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 1223 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
1223-8425
1834 ParseFunction function = parseStack->top().function;-
1835 if (function == &QXmlSimpleReaderPrivate::eat_ws
function == &Q...rivate::eat_wsDescription
TRUEevaluated 136 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 8289 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
136-8289
1836 parseStack->pop();-
1837-
1838-
1839-
1840 }
executed 136 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
136
1841 if (!(this->*function)()
!(this->*function)()Description
TRUEevaluated 4859 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 3566 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
) {
3566-4859
1842 parseFailed(&QXmlSimpleReaderPrivate::parseElement, state);-
1843 return
executed 4859 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 4859 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
4859
1844 }-
1845 }
executed 3566 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
3566
1846 }
executed 4789 times by 1 test: end of block
Executed by:
  • tst_qxmlsimplereader - unknown status
4789
1847-
1848 for (;;) {-
1849 switch (state) {-
1850 case
executed 5802 times by 6 tests: case ReadName:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
ReadName:
executed 5802 times by 6 tests: case ReadName:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
5802
1851-
1852 tags.push(name());-
1853-
1854 attList.clear();-
1855 if (useNamespaces
useNamespacesDescription
TRUEevaluated 4781 times by 3 tests
Evaluated by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - 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
)
1021-4781
1856 namespaceSupport.pushContext();
executed 4781 times by 3 tests: namespaceSupport.pushContext();
Executed by:
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
4781
1857 break;
executed 5802 times by 6 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
5802
1858 case
executed 5180 times by 6 tests: case ETagBegin2:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
ETagBegin2:
executed 5180 times by 6 tests: case ETagBegin2:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
5180
1859 if (!processElementETagBegin2()
!processElementETagBegin2()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 5176 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
4-5176
1860 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
4
1861 break;
executed 5176 times by 6 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
5176
1862 case
executed 12894 times by 6 tests: case Attrib:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Attrib:
executed 12894 times by 6 tests: case Attrib:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
12894
1863 if (!processElementAttribute()
!processElementAttribute()Description
TRUEnever evaluated
FALSEevaluated 12894 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
)
0-12894
1864 return
never executed: return false;
false;
never executed: return false;
0
1865 state = AttribPro;-
1866 break;
executed 12894 times by 6 tests: break;
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
12894
1867 case
executed 5723 times by 6 tests: case Done:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
Done:
executed 5723 times by 6 tests: case Done:
Executed by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
5723
1868 return
executed 5723 times by 6 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
  • tst_qxmlstream - unknown status
true;
executed 5723 times by 6 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
  • tst_qxmlstream - unknown status
5723
1869 case
executed 14 times by 1 test: case -1:
Executed by:
  • tst_qxmlsimplereader - unknown status
-1:
executed 14 times by 1 test: case -1:
Executed by:
  • tst_qxmlsimplereader - unknown status
14
1870 reportParseError(QLatin1String("error occurred while parsing element"));-
1871 return
executed 14 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 14 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
14
1872 }-
1873-
1874 if (atEnd()
atEnd()Description
TRUEevaluated 1225 times by 1 test
Evaluated by:
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 58942 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
) {
1225-58942
1875 unexpectedEof(&QXmlSimpleReaderPrivate::parseElement, state);-
1876 return
executed 1225 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
false;
executed 1225 times by 1 test: return false;
Executed by:
  • tst_qxmlsimplereader - unknown status
1225
1877 }-
1878 if (fastDetermineNameChar(c) == NameBeginning
fastDetermineN... NameBeginningDescription
TRUEevaluated 24149 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
  • tst_qxmlstream - unknown status
FALSEevaluated 34793 times by 6 tests
Evaluated by:
  • tst_qcssparser - unknown status
  • tst_qdbusxmlparser - unknown status
  • tst_qtextdocument - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimpl