qurlrecode.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qurlrecode.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5enum EncodingAction {-
6 DecodeCharacter = 0,-
7 LeaveCharacter = 1,-
8 EncodeCharacter = 2-
9};-
10-
11-
12-
13-
14-
15-
16-
17static const uchar defaultActionTable[96] = {-
18 2,-
19 1,-
20 2,-
21 1,-
22 1,-
23 2,-
24 1,-
25 1,-
26 1,-
27 1,-
28 1,-
29 1,-
30 1,-
31 0,-
32 0,-
33 1,-
34-
35 0, 0, 0, 0, 0,-
36 0, 0, 0, 0, 0,-
37 1,-
38 1,-
39 2,-
40 1,-
41 2,-
42 1,-
43-
44 1,-
45 0, 0, 0, 0, 0,-
46 0, 0, 0, 0, 0,-
47 0, 0, 0, 0, 0,-
48 0, 0, 0, 0, 0,-
49 0, 0, 0, 0, 0, 0,-
50 1,-
51 2,-
52 1,-
53 2,-
54 0,-
55-
56 2,-
57 0, 0, 0, 0, 0,-
58 0, 0, 0, 0, 0,-
59 0, 0, 0, 0, 0,-
60 0, 0, 0, 0, 0,-
61 0, 0, 0, 0, 0, 0,-
62 2,-
63 2,-
64 2,-
65 0,-
66-
67 2-
68};-
69-
70-
71-
72-
73-
74static const uchar reservedMask[96] = {-
75 0xff,-
76 0xff,-
77 0x00,-
78 0xff,-
79 0xff,-
80 0xff,-
81 0xff,-
82 0xff,-
83 0xff,-
84 0xff,-
85 0xff,-
86 0xff,-
87 0xff,-
88 0xff,-
89 0xff,-
90 0xff,-
91-
92 0xff, 0xff, 0xff, 0xff, 0xff,-
93 0xff, 0xff, 0xff, 0xff, 0xff,-
94 0xff,-
95 0xff,-
96 0x00,-
97 0xff,-
98 0x00,-
99 0xff,-
100-
101 0xff,-
102 0xff, 0xff, 0xff, 0xff, 0xff,-
103 0xff, 0xff, 0xff, 0xff, 0xff,-
104 0xff, 0xff, 0xff, 0xff, 0xff,-
105 0xff, 0xff, 0xff, 0xff, 0xff,-
106 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,-
107 0xff,-
108 0x00,-
109 0xff,-
110 0x00,-
111 0xff,-
112-
113 0x00,-
114 0xff, 0xff, 0xff, 0xff, 0xff,-
115 0xff, 0xff, 0xff, 0xff, 0xff,-
116 0xff, 0xff, 0xff, 0xff, 0xff,-
117 0xff, 0xff, 0xff, 0xff, 0xff,-
118 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,-
119 0x00,-
120 0x00,-
121 0x00,-
122 0xff,-
123-
124 0xff-
125};-
126-
127static inline bool isHex(ushort c)-
128{-
129 return
executed 6573 times by 10 tests: return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9');
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
(c >= 'a' && c <= 'f') ||
executed 6573 times by 10 tests: return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9');
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
6573
130 (c >= 'A' && c <= 'F') ||
executed 6573 times by 10 tests: return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9');
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
6573
131 (c >= '0' && c <= '9');
executed 6573 times by 10 tests: return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9');
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
6573
132}-
133-
134static inline bool isUpperHex(ushort c)-
135{-
136-
137 return
executed 4803 times by 6 tests: return c < 0x60;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
c < 0x60;
executed 4803 times by 6 tests: return c < 0x60;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
4803
138}-
139-
140static inline ushort toUpperHex(ushort c)-
141{-
142 return
executed 248 times by 4 tests: return isUpperHex(c) ? c : c - 0x20;
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
isUpperHex(c) ? c : c - 0x20;
executed 248 times by 4 tests: return isUpperHex(c) ? c : c - 0x20;
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
248
143}-
144-
145static inline ushort decodeNibble(ushort c)-
146{-
147 return
executed 6506 times by 10 tests: return c >= 'a' ? c - 'a' + 0xA : c >= 'A' ? c - 'A' + 0xA : c - '0';
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
c >= 'a' ? c - 'a' + 0xA :
executed 6506 times by 10 tests: return c >= 'a' ? c - 'a' + 0xA : c >= 'A' ? c - 'A' + 0xA : c - '0';
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
6506
148 c >= 'A' ? c - 'A' + 0xA : c - '0';
executed 6506 times by 10 tests: return c >= 'a' ? c - 'a' + 0xA : c >= 'A' ? c - 'A' + 0xA : c - '0';
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
6506
149}-
150-
151-
152-
153-
154static inline ushort decodePercentEncoding(const ushort *input)-
155{-
156 ushort c1 = input[1];-
157 ushort c2 = input[2];-
158 if (!isHex(c1)
!isHex(c1)Description
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 3189 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
|| !isHex(c2)
!isHex(c2)Description
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 3169 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
)
13-3189
159 return
executed 33 times by 3 tests: return ushort(-1);
Executed by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
ushort(-1);
executed 33 times by 3 tests: return ushort(-1);
Executed by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
33
160 return
executed 3169 times by 10 tests: return decodeNibble(c1) << 4 | decodeNibble(c2);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
decodeNibble(c1) << 4 | decodeNibble(c2);
executed 3169 times by 10 tests: return decodeNibble(c1) << 4 | decodeNibble(c2);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
3169
161}-
162-
163static inline ushort encodeNibble(ushort c)-
164{-
165 return
executed 4489 times by 9 tests: return ushort(QtMiscUtils::toHexUpper(c));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
ushort(QtMiscUtils::toHexUpper(c));
executed 4489 times by 9 tests: return ushort(QtMiscUtils::toHexUpper(c));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
4489
166}-
167-
168static void ensureDetached(QString &result, ushort *&output, const ushort *begin, const ushort *input, const ushort *end,-
169 int add = 0)-
170{-
171 if (!output
!outputDescription
TRUEevaluated 1460 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
FALSEevaluated 1322 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
) {
1322-1460
172-
173-
174 int charsProcessed = input - begin;-
175 int charsRemaining = end - input;-
176 int spaceNeeded = end - begin + 2 * charsRemaining + add;-
177 int origSize = result.size();-
178 result.resize(origSize + spaceNeeded);-
179-
180-
181 output = const_cast<ushort *>(reinterpret_cast<const ushort *>(result.constData()))-
182 + origSize;-
183-
184-
185 int i;-
186 for (i = 0; i < charsProcessed
i < charsProcessedDescription
TRUEevaluated 10259 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
FALSEevaluated 1460 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
; ++i)
1460-10259
187 output[i] = begin[i];
executed 10259 times by 9 tests: output[i] = begin[i];
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
10259
188 output += i;-
189 }
executed 1460 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
1460
190}
executed 2782 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
2782
191-
192namespace {-
193struct QUrlUtf8Traits : public QUtf8BaseTraitsNoAscii-
194{-
195 static const bool allowNonCharacters = false;-
196-
197-
198 static void appendByte(ushort *&ptr, uchar b)-
199 {-
200-
201 *ptr++ = '%';-
202 *ptr++ = encodeNibble(b >> 4);-
203 *ptr++ = encodeNibble(b & 0xf);-
204 }
executed 233 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
233
205-
206 static uchar peekByte(const ushort *ptr, int n = 0)-
207 {-
208-
209-
210-
211-
212 return
executed 321 times by 4 tests: return uchar(decodePercentEncoding(ptr + n * 3)) * uchar(ptr[n * 3] == '%');
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
uchar(decodePercentEncoding(ptr + n * 3))
executed 321 times by 4 tests: return uchar(decodePercentEncoding(ptr + n * 3)) * uchar(ptr[n * 3] == '%');
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
321
213 * uchar(ptr[n * 3] == '%');
executed 321 times by 4 tests: return uchar(decodePercentEncoding(ptr + n * 3)) * uchar(ptr[n * 3] == '%');
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
321
214 }-
215-
216 static qptrdiff availableBytes(const ushort *ptr, const ushort *end)-
217 {-
218 return
executed 204 times by 5 tests: return (end - ptr) / 3;
Executed by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
(end - ptr) / 3;
executed 204 times by 5 tests: return (end - ptr) / 3;
Executed by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
204
219 }-
220-
221 static void advanceByte(const ushort *&ptr, int n = 1)-
222 {-
223 ptr += n * 3;-
224 }
executed 96 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
96
225};-
226}-
227-
228-
229static bool encodedUtf8ToUtf16(QString &result, ushort *&output, const ushort *begin, const ushort *&input,-
230 const ushort *end, ushort decoded)-
231{-
232 uint ucs4, *dst = &ucs4;-
233 const ushort *src = input + 3;-
234 int charsNeeded = QUtf8Functions::fromUtf8<QUrlUtf8Traits>(decoded, dst, src, end);-
235 if (charsNeeded < 0
charsNeeded < 0Description
TRUEevaluated 395 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 96 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
)
96-395
236 return
executed 395 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
false;
executed 395 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
395
237-
238 if (!QChar::requiresSurrogates(ucs4)
!QChar::requir...rrogates(ucs4)Description
TRUEevaluated 92 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
) {
4-92
239-
240-
241-
242 ensureDetached(result, output, begin, input, end, -3 * charsNeeded + 1);-
243 *output++ = ucs4;-
244 }
executed 92 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else {
92
245-
246-
247 ensureDetached(result, output, begin, input, end, -10);-
248 *output++ = QChar::highSurrogate(ucs4);-
249 *output++ = QChar::lowSurrogate(ucs4);-
250 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
4
251-
252 input = src - 1;-
253 return
executed 96 times by 4 tests: return true;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
true;
executed 96 times by 4 tests: return true;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
96
254}-
255-
256static void unicodeToEncodedUtf8(QString &result, ushort *&output, const ushort *begin,-
257 const ushort *&input, const ushort *end, ushort decoded)-
258{-
259-
260 int utf8len = QChar::isHighSurrogate(decoded)
QChar::isHighS...ogate(decoded)Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 91 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
? 4 : decoded >= 0x800
decoded >= 0x800Description
TRUEevaluated 17 times by 3 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
? 3 : 2;
11-91
261-
262-
263 if (!output
!outputDescription
TRUEevaluated 87 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
15-87
264-
265-
266 ensureDetached(result, output, begin, input, end, 3*utf8len - 3);-
267 }
executed 87 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else {
87
268-
269 int charsRemaining = end - input - 1;-
270 int pos = output - reinterpret_cast<const ushort *>(result.constData());-
271 int spaceRemaining = result.size() - pos;-
272 if (spaceRemaining < 3*charsRemaining + 3*utf8len
spaceRemaining...ng + 3*utf8lenDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
5-10
273-
274 result.resize(result.size() + 3*utf8len);-
275-
276-
277 output = const_cast<ushort *>(reinterpret_cast<const ushort *>(result.constData()));-
278 output += pos;-
279 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
10
280 }
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
15
281-
282 ++input;-
283 int res = QUtf8Functions::toUtf8<QUrlUtf8Traits>(decoded, output, input, end);-
284 --input;-
285 if (res < 0
res < 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QUrlInternal
FALSEevaluated 99 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
3-99
286-
287-
288-
289-
290-
291 uchar c = 0xe0 | uchar(decoded >> 12);-
292 *output++ = '%';-
293 *output++ = 'E';-
294 *output++ = encodeNibble(c & 0xf);-
295-
296-
297 c = 0x80 | (uchar(decoded >> 6) & 0x3f);-
298 *output++ = '%';-
299 *output++ = encodeNibble(c >> 4);-
300 *output++ = encodeNibble(c & 0xf);-
301-
302-
303 c = 0x80 | (decoded & 0x3f);-
304 *output++ = '%';-
305 *output++ = encodeNibble(c >> 4);-
306 *output++ = encodeNibble(c & 0xf);-
307 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QUrlInternal
3
308}
executed 102 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
102
309-
310static int recode(QString &result, const ushort *begin, const ushort *end, QUrl::ComponentFormattingOptions encoding,-
311 const uchar *actionTable, bool retryBadEncoding)-
312{-
313 const int origSize = result.size();-
314 const ushort *input = begin;-
315 ushort *output = 0;-
316-
317 EncodingAction action = EncodeCharacter;-
318 for ( ; input != end
input != endDescription
TRUEevaluated 38619 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
FALSEevaluated 7992 times by 23 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_languageChange
  • tst_selftests - unknown status
; ++input) {
7992-38619
319 ushort c;-
320-
321 for ( ; input != end
input != endDescription
TRUEevaluated 783079 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
FALSEevaluated 33290 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
; ++input) {
33290-783079
322 c = *input;-
323 if (c < 0x20U
c < 0x20UDescription
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 783059 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
)
20-783059
324 action = EncodeCharacter;
executed 20 times by 3 tests: action = EncodeCharacter;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
20
325 if (c < 0x20U
c < 0x20UDescription
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 783059 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
|| c >= 0x80U
c >= 0x80UDescription
TRUEevaluated 314 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 782745 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
)
20-783059
326 goto
executed 334 times by 4 tests: goto non_trivial;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
non_trivial;
executed 334 times by 4 tests: goto non_trivial;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
334
327 action = EncodingAction(actionTable[c - ' ']);-
328 if (action == EncodeCharacter
action == EncodeCharacterDescription
TRUEevaluated 4995 times by 11 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
FALSEevaluated 777750 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
)
4995-777750
329 goto
executed 4995 times by 11 tests: goto non_trivial;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
non_trivial;
executed 4995 times by 11 tests: goto non_trivial;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
4995
330 if (output
outputDescription
TRUEevaluated 8369 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
FALSEevaluated 769381 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
)
8369-769381
331 *
executed 8369 times by 7 tests: *output++ = c;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
output++ = c;
executed 8369 times by 7 tests: *output++ = c;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
8369
332 }
executed 777750 times by 51 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
777750
333 break;
executed 33290 times by 51 tests: break;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
33290
334-
335non_trivial:-
336 uint decoded;-
337 if (c == '%'
c == '%'Description
TRUEevaluated 3021 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 2308 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
&& retryBadEncoding
retryBadEncodingDescription
TRUEevaluated 103 times by 4 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 2918 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
103-3021
338-
339 ensureDetached(result, output, begin, input, end);-
340 *output++ = '%';-
341 *output++ = '2';-
342 *output++ = '5';-
343 continue;
executed 103 times by 4 tests: continue;
Executed by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
103
344 } else if (c == '%'
c == '%'Description
TRUEevaluated 2918 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 2308 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
) {
2308-2918
345-
346 if (input + 2 >= end
input + 2 >= endDescription
TRUEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 2881 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
|| (
(decoded = dec... == ushort(-1)Description
TRUEevaluated 30 times by 3 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 2851 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
decoded = decodePercentEncoding(input)) == ushort(-1)
(decoded = dec... == ushort(-1)Description
TRUEevaluated 30 times by 3 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 2851 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
30-2881
347-
348 result.resize(origSize);-
349 return
executed 67 times by 4 tests: return recode(result, begin, end, encoding, actionTable, true);
Executed by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
recode(result, begin, end, encoding, actionTable, true);
executed 67 times by 4 tests: return recode(result, begin, end, encoding, actionTable, true);
Executed by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
67
350 }-
351-
352 if (decoded >= 0x80
decoded >= 0x80Description
TRUEevaluated 1170 times by 5 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1681 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
1170-1681
353-
354 if (!(encoding & QUrl::EncodeUnicode)
!(encoding & Q...EncodeUnicode)Description
TRUEevaluated 491 times by 5 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 679 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
&&
491-679
355 encodedUtf8ToUtf16(result, output, begin, input, end, decoded)
encodedUtf8ToU... end, decoded)Description
TRUEevaluated 96 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 395 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
)
96-395
356 continue;
executed 96 times by 4 tests: continue;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
96
357-
358-
359 action = LeaveCharacter;-
360 }
executed 1074 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
else if (decoded >= 0x20
decoded >= 0x20Description
TRUEevaluated 1346 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 335 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
335-1346
361 action = EncodingAction(actionTable[decoded - ' ']);-
362 }
executed 1346 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
1346
363 }
executed 2755 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else {
2755
364 decoded = c;-
365 if (decoded >= 0x80
decoded >= 0x80Description
TRUEevaluated 314 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1994 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
&& encoding & QUrl::EncodeUnicode) {
314-1994
366-
367 unicodeToEncodedUtf8(result, output, begin, input, end, decoded);-
368 continue;
executed 102 times by 4 tests: continue;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
102
369 } else if (decoded >= 0x80
decoded >= 0x80Description
TRUEevaluated 212 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1994 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
) {
212-1994
370 if (output
outputDescription
TRUEnever evaluated
FALSEevaluated 212 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
)
0-212
371 *
never executed: *output++ = c;
output++ = c;
never executed: *output++ = c;
0
372 continue;
executed 212 times by 3 tests: continue;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
212
373 }-
374 }
executed 1994 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
1994
375-
376-
377-
378-
379-
380-
381-
382 if (c == '%'
c == '%'Description
TRUEevaluated 2755 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1994 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
&& action != DecodeCharacter
action != DecodeCharacterDescription
TRUEevaluated 2377 times by 6 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 378 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
378-2755
383-
384-
385 if (output
outputDescription
TRUEevaluated 96 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
FALSEevaluated 2281 times by 6 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
|| !isUpperHex(input[1])
!isUpperHex(input[1])Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 2274 times by 6 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
|| !isUpperHex(input[2])
!isUpperHex(input[2])Description
TRUEevaluated 21 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 2253 times by 6 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
7-2281
386 ensureDetached(result, output, begin, input, end);-
387 *output++ = '%';-
388 *output++ = toUpperHex(*++input);-
389 *output++ = toUpperHex(*++input);-
390 }
executed 124 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
124
391 }
executed 2377 times by 6 tests: end of block
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else if (c == '%'
c == '%'Description
TRUEevaluated 378 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1994 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
&& action == DecodeCharacter
action == DecodeCharacterDescription
TRUEevaluated 378 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEnever evaluated
) {
0-2377
392-
393 ensureDetached(result, output, begin, input, end);-
394 *output++ = decoded;-
395 input += 2;-
396 }
executed 378 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else {
378
397-
398 ensureDetached(result, output, begin, input, end);-
399 *output++ = '%';-
400 *output++ = encodeNibble(c >> 4);-
401 *output++ = encodeNibble(c & 0xf);-
402 }
executed 1994 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
1994
403 }-
404-
405 if (output
outputDescription
TRUEevaluated 1458 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
FALSEevaluated 39824 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
) {
1458-39824
406 int len = output - reinterpret_cast<const ushort *>(result.constData());-
407 result.truncate(len);-
408 return
executed 1458 times by 9 tests: return len - origSize;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
len - origSize;
executed 1458 times by 9 tests: return len - origSize;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
1458
409 }-
410 return
executed 39824 times by 51 tests: return 0;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
0;
executed 39824 times by 51 tests: return 0;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
39824
411}-
412static int decode(QString &appendTo, const ushort *begin, const ushort *end)-
413{-
414 const int origSize = appendTo.size();-
415 const ushort *input = begin;-
416 ushort *output = 0;-
417 while (input != end
input != endDescription
TRUEevaluated 625217 times by 22 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
FALSEevaluated 16624 times by 25 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
) {
16624-625217
418 if (*
*input != '%'Description
TRUEevaluated 625110 times by 22 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
FALSEevaluated 107 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
input != '%'
*input != '%'Description
TRUEevaluated 625110 times by 22 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
FALSEevaluated 107 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
) {
107-625110
419 if (output
outputDescription
TRUEevaluated 142 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 624968 times by 22 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
)
142-624968
420 *
executed 142 times by 2 tests: *output++ = *input;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
output++ = *input;
executed 142 times by 2 tests: *output++ = *input;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
142
421 ++input;-
422 continue;
executed 625110 times by 22 tests: continue;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
625110
423 }-
424-
425 if (__builtin_expect(!!(end - input < 3 || !isHex(input[1]) || !isHex(input[2])), false)
__builtin_expe...t[2])), false)Description
TRUEevaluated 23 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 84 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
) {
23-84
426-
427 appendTo.resize(origSize + (end - begin));-
428 memcpy(appendTo.begin() + origSize, begin, (end - begin) * sizeof(ushort));-
429 return
executed 23 times by 2 tests: return end - begin;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
end - begin;
executed 23 times by 2 tests: return end - begin;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
23
430 }-
431-
432 if (__builtin_expect(!!(!output), false)
__builtin_expe...utput), false)Description
TRUEevaluated 45 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 39 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
) {
39-45
433-
434 appendTo.resize(origSize + (end - begin));-
435 output = reinterpret_cast<ushort *>(appendTo.begin()) + origSize;-
436 memcpy(output, begin, (input - begin) * sizeof(ushort));-
437 output += input - begin;-
438 }
executed 45 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
45
439-
440 ++input;-
441 *output++ = decodeNibble(input[0]) << 4 | decodeNibble(input[1]);-
442 if (output[-1] >= 0x80
output[-1] >= 0x80Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_QUrlInternal
FALSEevaluated 66 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
)
18-66
443 output[-1] = QChar::ReplacementCharacter;
executed 18 times by 1 test: output[-1] = QChar::ReplacementCharacter;
Executed by:
  • tst_QUrlInternal
18
444 input += 2;-
445 }
executed 84 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
84
446-
447 if (output
outputDescription
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 16590 times by 25 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
) {
34-16590
448 int len = output - reinterpret_cast<ushort *>(appendTo.begin());-
449 appendTo.truncate(len);-
450 return
executed 34 times by 2 tests: return len - origSize;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
len - origSize;
executed 34 times by 2 tests: return len - origSize;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
34
451 }-
452 return
executed 16590 times by 25 tests: return 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
0;
executed 16590 times by 25 tests: return 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
16590
453}-
454-
455template <size_t N>-
456static void maskTable(uchar (&table)[N], const uchar (&mask)[N])-
457{-
458 for (size_t i = 0; i < N
i < NDescription
TRUEevaluated 68064 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 709 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
; ++i)
709-68064
459 table[i] &= mask[i];
executed 68064 times by 4 tests: table[i] &= mask[i];
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
68064
460}
executed 709 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
709
461__attribute__((visibility("default"))) int-
462qt_urlRecode(QString &appendTo, const QChar *begin, const QChar *end,-
463 QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications)-
464{-
465 uchar actionTable[sizeof defaultActionTable];-
466 if (encoding == QUrl::FullyDecoded
encoding == QUrl::FullyDecodedDescription
TRUEevaluated 16647 times by 25 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
FALSEevaluated 41282 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
) {
16647-41282
467 return
executed 16647 times by 25 tests: return decode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
decode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end));
executed 16647 times by 25 tests: return decode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_languageChange
  • tst_qfileopenevent
16647
468 }-
469-
470 memcpy(actionTable, defaultActionTable, sizeof actionTable);-
471 if (encoding & QUrl::DecodeReserved
encoding & QUr...DecodeReservedDescription
TRUEevaluated 709 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 40573 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
)
709-40573
472 maskTable(actionTable, reservedMask);
executed 709 times by 4 tests: maskTable(actionTable, reservedMask);
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
709
473 if (!(encoding & QUrl::EncodeSpaces)
!(encoding & Q...:EncodeSpaces)Description
TRUEevaluated 34660 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
FALSEevaluated 6622 times by 24 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSidebar
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_selftests - unknown status
)
6622-34660
474 actionTable[0] = DecodeCharacter;
executed 34660 times by 51 tests: actionTable[0] = DecodeCharacter;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
34660
475-
476 if (tableModifications
tableModificationsDescription
TRUEevaluated 30362 times by 37 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
FALSEevaluated 10920 times by 38 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileSelector
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • ...
) {
10920-30362
477 for (const ushort *p = tableModifications; *
*pDescription
TRUEevaluated 236719 times by 37 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
FALSEevaluated 30362 times by 37 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
p
*pDescription
TRUEevaluated 236719 times by 37 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
FALSEevaluated 30362 times by 37 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
; ++p)
30362-236719
478 actionTable[uchar(*p) - ' '] = *p >> 8;
executed 236719 times by 37 tests: actionTable[uchar(*p) - ' '] = *p >> 8;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
236719
479 }
executed 30362 times by 37 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlainTextEdit
  • tst_QSidebar
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • ...
30362
480-
481 return
executed 41282 times by 51 tests: return recode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end), encoding, actionTable, false);
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
recode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end),
executed 41282 times by 51 tests: return recode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end), encoding, actionTable, false);
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
41282
482 encoding, actionTable, false);
executed 41282 times by 51 tests: return recode(appendTo, reinterpret_cast<const ushort *>(begin), reinterpret_cast<const ushort *>(end), encoding, actionTable, false);
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QObject
  • ...
41282
483}-
484__attribute__((visibility("default")))-
485QString qt_urlRecodeByteArray(const QByteArray &ba)-
486{-
487 if (ba.isNull()
ba.isNull()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 40 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
)
3-40
488 return
executed 3 times by 2 tests: return QString();
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
QString();
executed 3 times by 2 tests: return QString();
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
3
489-
490-
491-
492 const char *in = ba.constData();-
493 const char *const end = ba.constEnd();-
494 for ( ; in < end
in < endDescription
TRUEevaluated 552 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 35 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
; ++in) {
35-552
495 if (*
*in & 0x80Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 547 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
in & 0x80
*in & 0x80Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 547 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
)
5-547
496 break;
executed 5 times by 2 tests: break;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
5
497 }
executed 547 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
547
498-
499 if (in == end
in == endDescription
TRUEevaluated 35 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
) {
5-35
500-
501 return
executed 35 times by 2 tests: return QString::fromLatin1(ba, ba.size());
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
QString::fromLatin1(ba, ba.size());
executed 35 times by 2 tests: return QString::fromLatin1(ba, ba.size());
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
35
502 }-
503-
504-
505 QByteArray intermediate = ba;-
506 intermediate.resize(ba.size() * 3 - (in - ba.constData()));-
507 uchar *out = reinterpret_cast<uchar *>(intermediate.data() + (in - ba.constData()));-
508 for ( ; in < end
in < endDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
; ++in) {
5-10
509 if (*
*in & 0x80Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEnever evaluated
in & 0x80
*in & 0x80Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEnever evaluated
) {
0-10
510-
511 *out++ = '%';-
512 *out++ = encodeNibble(uchar(*in) >> 4);-
513 *out++ = encodeNibble(uchar(*in) & 0xf);-
514 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
else {
10
515-
516 *out++ = uchar(*in);-
517 }
never executed: end of block
0
518 }-
519-
520-
521 return
executed 5 times by 2 tests: return QString::fromLatin1(intermediate, out - reinterpret_cast<uchar *>(intermediate.data()));
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
QString::fromLatin1(intermediate, out - reinterpret_cast<uchar *>(intermediate.data()));
executed 5 times by 2 tests: return QString::fromLatin1(intermediate, out - reinterpret_cast<uchar *>(intermediate.data()));
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
5
522}-
523-
524-
Switch to Source codePreprocessed file

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