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 5213 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 >= 'a'Description
TRUEevaluated 155 times by 4 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 5058 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
&& c <= 'f'
c <= 'f'Description
TRUEevaluated 126 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 29 times by 3 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
) ||
executed 5213 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
29-5213
130 (c >= 'A'
c >= 'A'Description
TRUEevaluated 1575 times by 6 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 3512 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
&& c <= 'F'
c <= 'F'Description
TRUEevaluated 1546 times by 5 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 29 times by 3 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
) ||
executed 5213 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
29-5213
131 (c >= '0'
c >= '0'Description
TRUEevaluated 3530 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 11 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
&& c <= '9'
c <= '9'Description
TRUEevaluated 3500 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 30 times by 3 tests
Evaluated by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
);
executed 5213 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
11-5213
132}-
133-
134static inline bool isUpperHex(ushort c)-
135{-
136-
137 return
executed 3707 times by 6 tests: return c < 0x60;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
c < 0x60;
executed 3707 times by 6 tests: return c < 0x60;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
3707
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)
isUpperHex(c)Description
TRUEevaluated 197 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 51 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
? 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
51-248
143}-
144-
145static inline ushort decodeNibble(ushort c)-
146{-
147 return
executed 5146 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'Description
TRUEevaluated 109 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 5037 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
? c - 'a' + 0xA :
executed 5146 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
109-5146
148 c >= 'A'
c >= 'A'Description
TRUEevaluated 1537 times by 5 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 3500 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
? c - 'A' + 0xA : c - '0';
executed 5146 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
1537-5146
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 2509 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 2489 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-2509
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 2489 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 2489 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
2489
161}-
162-
163static inline ushort encodeNibble(ushort c)-
164{-
165 return
executed 4470 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 4470 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
4470
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 1454 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-1454
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 10255 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 1454 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)
1454-10255
187 output[i] = begin[i];
executed 10255 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
10255
188 output += i;-
189 }
executed 1454 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
1454
190}
executed 2776 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
2776
191-
192namespace {-
193struct QUrlUtf8Traits : public QUtf8BaseTraitsNoAscii-
194{-
195-
196 static void appendByte(ushort *&ptr, uchar b)-
197 {-
198-
199 *ptr++ = '%';-
200 *ptr++ = encodeNibble(b >> 4);-
201 *ptr++ = encodeNibble(b & 0xf);-
202 }
executed 228 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
228
203-
204 static uchar peekByte(const ushort *ptr, int n = 0)-
205 {-
206-
207-
208-
209-
210 return
executed 189 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 189 times by 4 tests: return uchar(decodePercentEncoding(ptr + n * 3)) * uchar(ptr[n * 3] == '%');
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
189
211 * uchar(ptr[n * 3] == '%');
executed 189 times by 4 tests: return uchar(decodePercentEncoding(ptr + n * 3)) * uchar(ptr[n * 3] == '%');
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
189
212 }-
213-
214 static qptrdiff availableBytes(const ushort *ptr, const ushort *end)-
215 {-
216 return
executed 154 times by 5 tests: return (end - ptr) / 3;
Executed by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
(end - ptr) / 3;
executed 154 times by 5 tests: return (end - ptr) / 3;
Executed by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
154
217 }-
218-
219 static void advanceByte(const ushort *&ptr, int n = 1)-
220 {-
221 ptr += n * 3;-
222 }
executed 96 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
96
223};-
224}-
225-
226-
227static bool encodedUtf8ToUtf16(QString &result, ushort *&output, const ushort *begin, const ushort *&input,-
228 const ushort *end, ushort decoded)-
229{-
230 uint ucs4, *dst = &ucs4;-
231 const ushort *src = input + 3;-
232 int charsNeeded = QUtf8Functions::fromUtf8<QUrlUtf8Traits>(decoded, dst, src, end);-
233 if (charsNeeded < 0
charsNeeded < 0Description
TRUEevaluated 213 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-213
234 return
executed 213 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
false;
executed 213 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
213
235-
236 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
237-
238-
239-
240 ensureDetached(result, output, begin, input, end, -3 * charsNeeded + 1);-
241 *output++ = ucs4;-
242 }
executed 92 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else {
92
243-
244-
245 ensureDetached(result, output, begin, input, end, -10);-
246 *output++ = QChar::highSurrogate(ucs4);-
247 *output++ = QChar::lowSurrogate(ucs4);-
248 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
4
249-
250 input = src - 1;-
251 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
252}-
253-
254static void unicodeToEncodedUtf8(QString &result, ushort *&output, const ushort *begin,-
255 const ushort *&input, const ushort *end, ushort decoded)-
256{-
257-
258 int utf8len = QChar::isHighSurrogate(decoded)
QChar::isHighS...ogate(decoded)Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 87 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 70 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
? 3 : 2;
11-87
259-
260-
261 if (!output
!outputDescription
TRUEevaluated 83 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-83
262-
263-
264 ensureDetached(result, output, begin, input, end, 3*utf8len - 3);-
265 }
executed 83 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
else {
83
266-
267 int charsRemaining = end - input - 1;-
268 int pos = output - reinterpret_cast<const ushort *>(result.constData());-
269 int spaceRemaining = result.size() - pos;-
270 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
271-
272 result.resize(result.size() + 3*utf8len);-
273-
274-
275 output = const_cast<ushort *>(reinterpret_cast<const ushort *>(result.constData()));-
276 output += pos;-
277 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
10
278 }
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
15
279-
280 ++input;-
281 int res = QUtf8Functions::toUtf8<QUrlUtf8Traits>(decoded, output, input, end);-
282 --input;-
283 if (res < 0
res < 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QUrlInternal
FALSEevaluated 96 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
2-96
284-
285-
286-
287-
288-
289 uchar c = 0xe0 | uchar(decoded >> 12);-
290 *output++ = '%';-
291 *output++ = 'E';-
292 *output++ = encodeNibble(c & 0xf);-
293-
294-
295 c = 0x80 | (uchar(decoded >> 6) & 0x3f);-
296 *output++ = '%';-
297 *output++ = encodeNibble(c >> 4);-
298 *output++ = encodeNibble(c & 0xf);-
299-
300-
301 c = 0x80 | (decoded & 0x3f);-
302 *output++ = '%';-
303 *output++ = encodeNibble(c >> 4);-
304 *output++ = encodeNibble(c & 0xf);-
305 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QUrlInternal
2
306}
executed 98 times by 4 tests: end of block
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
98
307-
308static int recode(QString &result, const ushort *begin, const ushort *end, QUrl::ComponentFormattingOptions encoding,-
309 const uchar *actionTable, bool retryBadEncoding)-
310{-
311 const int origSize = result.size();-
312 const ushort *input = begin;-
313 ushort *output = 0;-
314-
315 EncodingAction action = EncodeCharacter;-
316 for ( ; input != end
input != endDescription
TRUEevaluated 37763 times by 52 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 8018 times by 24 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_qnetworkreply - unknown status
  • tst_selftests - unknown status
; ++input) {
8018-37763
317 ushort c;-
318-
319 for ( ; input != end
input != endDescription
TRUEevaluated 782497 times by 52 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 32947 times by 52 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) {
32947-782497
320 c = *input;-
321 if (c < 0x20U
c < 0x20UDescription
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 782477 times by 52 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-782477
322 action = EncodeCharacter;
executed 20 times by 3 tests: action = EncodeCharacter;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
20
323 if (c < 0x20U
c < 0x20UDescription
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 782477 times by 52 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 351 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 782126 times by 52 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-782477
324 goto
executed 371 times by 4 tests: goto non_trivial;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
non_trivial;
executed 371 times by 4 tests: goto non_trivial;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
371
325 action = EncodingAction(actionTable[c - ' ']);-
326 if (action == EncodeCharacter
action == EncodeCharacterDescription
TRUEevaluated 4445 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 777681 times by 52 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
  • ...
)
4445-777681
327 goto
executed 4445 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 4445 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
4445
328 if (output
outputDescription
TRUEevaluated 8347 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
FALSEevaluated 769334 times by 52 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
  • ...
)
8347-769334
329 *
executed 8347 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 8347 times by 7 tests: *output++ = c;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
8347
330 }
executed 777681 times by 52 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
  • ...
777681
331 break;
executed 32947 times by 52 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
  • ...
32947
332-
333non_trivial:-
334 uint decoded;-
335 if (c == '%'
c == '%'Description
TRUEevaluated 2473 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 2343 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 2370 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-2473
336-
337 ensureDetached(result, output, begin, input, end);-
338 *output++ = '%';-
339 *output++ = '2';-
340 *output++ = '5';-
341 continue;
executed 103 times by 4 tests: continue;
Executed by:
  • tst_QNetworkRequest
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
103
342 } else if (c == '%'
c == '%'Description
TRUEevaluated 2370 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 2343 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
) {
2343-2370
343-
344 if (input + 2 >= end
input + 2 >= endDescription
TRUEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 2333 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 2303 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 2303 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-2333
345-
346 result.resize(origSize);-
347 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
348 }-
349-
350 if (decoded >= 0x80
decoded >= 0x80Description
TRUEevaluated 624 times by 5 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1679 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTcpServer
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
624-1679
351-
352 if (!(encoding & QUrl::EncodeUnicode)
!(encoding & Q...EncodeUnicode)Description
TRUEevaluated 309 times by 5 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 315 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
&&
309-315
353 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 213 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
)
96-213
354 continue;
executed 96 times by 4 tests: continue;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
96
355-
356-
357 action = LeaveCharacter;-
358 }
executed 528 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
else if (decoded >= 0x20
decoded >= 0x20Description
TRUEevaluated 1344 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-1344
359 action = EncodingAction(actionTable[decoded - ' ']);-
360 }
executed 1344 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
1344
361 }
executed 2207 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 {
2207
362 decoded = c;-
363 if (decoded >= 0x80
decoded >= 0x80Description
TRUEevaluated 351 times by 4 tests
Evaluated by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1992 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) {
351-1992
364-
365 unicodeToEncodedUtf8(result, output, begin, input, end, decoded);-
366 continue;
executed 98 times by 4 tests: continue;
Executed by:
  • tst_QDataUrl
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
98
367 } else if (decoded >= 0x80
decoded >= 0x80Description
TRUEevaluated 253 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 1992 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QTextBrowser
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
  • tst_Spdy
) {
253-1992
368 if (output
outputDescription
TRUEnever evaluated
FALSEevaluated 253 times by 3 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
)
0-253
369 *
never executed: *output++ = c;
output++ = c;
never executed: *output++ = c;
0
370 continue;
executed 253 times by 3 tests: continue;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
253
371 }-
372 }
executed 1992 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
1992
373-
374-
375-
376-
377-
378-
379-
380 if (c == '%'
c == '%'Description
TRUEevaluated 2207 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 1992 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 1829 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-2207
381-
382-
383 if (output
outputDescription
TRUEevaluated 96 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
FALSEevaluated 1733 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 1726 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 1705 times by 6 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
) {
7-1733
384 ensureDetached(result, output, begin, input, end);-
385 *output++ = '%';-
386 *output++ = toUpperHex(*++input);-
387 *output++ = toUpperHex(*++input);-
388 }
executed 124 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
124
389 }
executed 1829 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 1992 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-1992
390-
391 ensureDetached(result, output, begin, input, end);-
392 *output++ = decoded;-
393 input += 2;-
394 }
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
395-
396 ensureDetached(result, output, begin, input, end);-
397 *output++ = '%';-
398 *output++ = encodeNibble(c >> 4);-
399 *output++ = encodeNibble(c & 0xf);-
400 }
executed 1992 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
1992
401 }-
402-
403 if (output
outputDescription
TRUEevaluated 1452 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 39513 times by 52 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
  • ...
) {
1452-39513
404 int len = output - reinterpret_cast<const ushort *>(result.constData());-
405 result.truncate(len);-
406 return
executed 1452 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 1452 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
1452
407 }-
408 return
executed 39513 times by 52 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 39513 times by 52 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
  • ...
39513
409}-
410static int decode(QString &appendTo, const ushort *begin, const ushort *end)-
411{-
412 const int origSize = appendTo.size();-
413 const ushort *input = begin;-
414 ushort *output = 0;-
415 while (input != end
input != endDescription
TRUEevaluated 623611 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 16464 times by 26 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
  • ...
) {
16464-623611
416 if (*
*input != '%'Description
TRUEevaluated 623504 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 623504 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-623504
417 if (output
outputDescription
TRUEevaluated 142 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 623362 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-623362
418 *
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
419 ++input;-
420 continue;
executed 623504 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
623504
421 }-
422-
423 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
424-
425 appendTo.resize(origSize + (end - begin));-
426 memcpy(appendTo.begin() + origSize, begin, (end - begin) * sizeof(ushort));-
427 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
428 }-
429-
430 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
431-
432 appendTo.resize(origSize + (end - begin));-
433 output = reinterpret_cast<ushort *>(appendTo.begin()) + origSize;-
434 memcpy(output, begin, (input - begin) * sizeof(ushort));-
435 output += input - begin;-
436 }
executed 45 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
45
437-
438 ++input;-
439 *output++ = decodeNibble(input[0]) << 4 | decodeNibble(input[1]);-
440 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
441 output[-1] = QChar::ReplacementCharacter;
executed 18 times by 1 test: output[-1] = QChar::ReplacementCharacter;
Executed by:
  • tst_QUrlInternal
18
442 input += 2;-
443 }
executed 84 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
84
444-
445 if (output
outputDescription
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 16430 times by 26 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-16430
446 int len = output - reinterpret_cast<ushort *>(appendTo.begin());-
447 appendTo.truncate(len);-
448 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
449 }-
450 return
executed 16430 times by 26 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 16430 times by 26 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
  • ...
16430
451}-
452-
453template <size_t N>-
454static void maskTable(uchar (&table)[N], const uchar (&mask)[N])-
455{-
456 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
457 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
458}
executed 709 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
709
459__attribute__((visibility("default"))) int-
460qt_urlRecode(QString &appendTo, const QChar *begin, const QChar *end,-
461 QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications)-
462{-
463 uchar actionTable[sizeof defaultActionTable];-
464 if (encoding == QUrl::FullyDecoded
encoding == QUrl::FullyDecodedDescription
TRUEevaluated 16487 times by 26 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 40965 times by 52 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
  • ...
) {
16487-40965
465 return
executed 16487 times by 26 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 16487 times by 26 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
  • ...
16487
466 }-
467-
468 memcpy(actionTable, defaultActionTable, sizeof actionTable);-
469 if (encoding & QUrl::DecodeReserved
encoding & QUr...DecodeReservedDescription
TRUEevaluated 709 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
FALSEevaluated 40256 times by 52 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-40256
470 maskTable(actionTable, reservedMask);
executed 709 times by 4 tests: maskTable(actionTable, reservedMask);
Executed by:
  • tst_QNetworkReply
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QUrlQuery
709
471 if (!(encoding & QUrl::EncodeSpaces)
!(encoding & Q...:EncodeSpaces)Description
TRUEevaluated 34452 times by 52 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 6513 times by 25 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_qnetworkreply - unknown status
  • tst_selftests - unknown status
)
6513-34452
472 actionTable[0] = DecodeCharacter;
executed 34452 times by 52 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
  • ...
34452
473-
474 if (tableModifications
tableModificationsDescription
TRUEevaluated 30181 times by 38 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 10784 times by 39 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
  • ...
) {
10784-30181
475 for (const ushort *p = tableModifications; *
*pDescription
TRUEevaluated 234767 times by 38 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 30181 times by 38 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 234767 times by 38 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 30181 times by 38 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)
30181-234767
476 actionTable[uchar(*p) - ' '] = *p >> 8;
executed 234767 times by 38 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
  • ...
234767
477 }
executed 30181 times by 38 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
  • ...
30181
478-
479 return
executed 40965 times by 52 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 40965 times by 52 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
  • ...
40965
480 encoding, actionTable, false);
executed 40965 times by 52 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
  • ...
40965
481}-
482__attribute__((visibility("default")))-
483QString qt_urlRecodeByteArray(const QByteArray &ba)-
484{-
485 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
486 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
487-
488-
489-
490 const char *in = ba.constData();-
491 const char *const end = ba.constEnd();-
492 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
493 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
494 break;
executed 5 times by 2 tests: break;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
5
495 }
executed 547 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
547
496-
497 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
498-
499 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
500 }-
501-
502-
503 QByteArray intermediate = ba;-
504 intermediate.resize(ba.size() * 3 - (in - ba.constData()));-
505 uchar *out = reinterpret_cast<uchar *>(intermediate.data() + (in - ba.constData()));-
506 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
507 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
508-
509 *out++ = '%';-
510 *out++ = encodeNibble(uchar(*in) >> 4);-
511 *out++ = encodeNibble(uchar(*in) & 0xf);-
512 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
else {
10
513-
514 *out++ = uchar(*in);-
515 }
never executed: end of block
0
516 }-
517-
518-
519 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
520}-
521-
522-
Switch to Source codePreprocessed file

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