qnetworkcookie.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qnetworkcookie.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QNetworkCookie::QNetworkCookie(const QByteArray &name, const QByteArray &value)-
5 : d(new QNetworkCookiePrivate)-
6{-
7 qRegisterMetaType<QNetworkCookie>();-
8 qRegisterMetaType<QList<QNetworkCookie> >();-
9-
10 d->name = name;-
11 d->value = value;-
12}
executed 919 times by 5 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
919
13-
14-
15-
16-
17-
18QNetworkCookie::QNetworkCookie(const QNetworkCookie &other)-
19 : d(other.d)-
20{-
21}
executed 2224 times by 5 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
2224
22-
23-
24-
25-
26QNetworkCookie::~QNetworkCookie()-
27{-
28-
29 d = 0;-
30}
executed 3143 times by 5 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
3143
31-
32-
33-
34-
35-
36QNetworkCookie &QNetworkCookie::operator=(const QNetworkCookie &other)-
37{-
38 d = other.d;-
39 return
executed 2 times by 1 test: return *this;
Executed by:
  • tst_qnetworkcookiejar - unknown status
*this;
executed 2 times by 1 test: return *this;
Executed by:
  • tst_qnetworkcookiejar - unknown status
2
40}-
41bool QNetworkCookie::operator==(const QNetworkCookie &other) const-
42{-
43 if (d == other.d
d == other.dDescription
TRUEevaluated 33 times by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 499 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
)
33-499
44 return
executed 33 times by 1 test: return true;
Executed by:
  • tst_qnetworkcookiejar - unknown status
true;
executed 33 times by 1 test: return true;
Executed by:
  • tst_qnetworkcookiejar - unknown status
33
45 return
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
d->name == other.d->name &&
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
46 d->value == other.d->value &&
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
47 d->expirationDate.toUTC() == other.d->expirationDate.toUTC() &&
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
48 d->domain == other.d->domain &&
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
49 d->path == other.d->path &&
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
50 d->secure == other.d->secure &&
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
51 d->comment == other.d->comment;
executed 499 times by 4 tests: return d->name == other.d->name && d->value == other.d->value && d->expirationDate.toUTC() == other.d->expirationDate.toUTC() && d->domain == other.d->domain && d->path == other.d->path && d->secure == other.d->secure && d->comment == other.d->comment;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
499
52}-
53-
54-
55-
56-
57-
58-
59-
60bool QNetworkCookie::hasSameIdentifier(const QNetworkCookie &other) const-
61{-
62 return
executed 45 times by 2 tests: return d->name == other.d->name && d->domain == other.d->domain && d->path == other.d->path;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
d->name == other.d->name && d->domain == other.d->domain && d->path == other.d->path;
executed 45 times by 2 tests: return d->name == other.d->name && d->domain == other.d->domain && d->path == other.d->path;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
45
63}-
64bool QNetworkCookie::isSecure() const-
65{-
66 return
executed 1312 times by 4 tests: return d->secure;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
d->secure;
executed 1312 times by 4 tests: return d->secure;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1312
67}-
68void QNetworkCookie::setSecure(bool enable)-
69{-
70 d->secure = enable;-
71}
executed 44 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
44
72bool QNetworkCookie::isHttpOnly() const-
73{-
74 return
executed 1106 times by 4 tests: return d->httpOnly;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
d->httpOnly;
executed 1106 times by 4 tests: return d->httpOnly;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1106
75}-
76-
77-
78-
79-
80-
81-
82void QNetworkCookie::setHttpOnly(bool enable)-
83{-
84 d->httpOnly = enable;-
85}
executed 19 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
19
86bool QNetworkCookie::isSessionCookie() const-
87{-
88 return
executed 1546 times by 4 tests: return !d->expirationDate.isValid();
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
!d->expirationDate.isValid();
executed 1546 times by 4 tests: return !d->expirationDate.isValid();
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1546
89}-
90QDateTime QNetworkCookie::expirationDate() const-
91{-
92 return
executed 252 times by 3 tests: return d->expirationDate;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
d->expirationDate;
executed 252 times by 3 tests: return d->expirationDate;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
252
93}-
94void QNetworkCookie::setExpirationDate(const QDateTime &date)-
95{-
96 d->expirationDate = date;-
97}
executed 507 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
507
98QString QNetworkCookie::domain() const-
99{-
100 return
executed 528 times by 3 tests: return d->domain;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
d->domain;
executed 528 times by 3 tests: return d->domain;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
528
101}-
102-
103-
104-
105-
106-
107-
108void QNetworkCookie::setDomain(const QString &domain)-
109{-
110 d->domain = domain;-
111}
executed 157 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
157
112-
113-
114-
115-
116-
117-
118-
119QString QNetworkCookie::path() const-
120{-
121 return
executed 308 times by 3 tests: return d->path;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
d->path;
executed 308 times by 3 tests: return d->path;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
308
122}-
123-
124-
125-
126-
127-
128-
129void QNetworkCookie::setPath(const QString &path)-
130{-
131 d->path = path;-
132}
executed 197 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
197
133-
134-
135-
136-
137-
138-
139-
140QByteArray QNetworkCookie::name() const-
141{-
142 return
executed 979 times by 5 tests: return d->name;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
d->name;
executed 979 times by 5 tests: return d->name;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
979
143}-
144void QNetworkCookie::setName(const QByteArray &cookieName)-
145{-
146 d->name = cookieName;-
147}
executed 858 times by 5 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
858
148QByteArray QNetworkCookie::value() const-
149{-
150 return
executed 305 times by 2 tests: return d->value;
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
d->value;
executed 305 times by 2 tests: return d->value;
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
305
151}-
152-
153-
154-
155-
156-
157-
158void QNetworkCookie::setValue(const QByteArray &value)-
159{-
160 d->value = value;-
161}
executed 866 times by 5 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
866
162-
163-
164static QPair<QByteArray, QByteArray> nextField(const QByteArray &text, int &position, bool isNameValue)-
165{-
166-
167-
168-
169-
170 const int length = text.length();-
171 position = nextNonWhitespace(text, position);-
172-
173 int semiColonPosition = text.indexOf(';', position);-
174 if (semiColonPosition < 0
semiColonPosition < 0Description
TRUEevaluated 717 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 694 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
)
694-717
175 semiColonPosition = length;
executed 717 times by 5 tests: semiColonPosition = length;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
717
176-
177 int equalsPosition = text.indexOf('=', position);-
178 if (equalsPosition < 0
equalsPosition < 0Description
TRUEevaluated 125 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1286 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
|| equalsPosition > semiColonPosition
equalsPosition...iColonPositionDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1266 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
20-1286
179 if (isNameValue
isNameValueDescription
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 111 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
34-111
180 return
executed 34 times by 2 tests: return qMakePair(QByteArray(), QByteArray());
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
qMakePair(QByteArray(), QByteArray());
executed 34 times by 2 tests: return qMakePair(QByteArray(), QByteArray());
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
34
181 equalsPosition = semiColonPosition;-
182 }
executed 111 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
111
183-
184 QByteArray first = text.mid(position, equalsPosition - position).trimmed();-
185 QByteArray second;-
186 int secondLength = semiColonPosition - equalsPosition - 1;-
187 if (secondLength > 0
secondLength > 0Description
TRUEevaluated 1237 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 140 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
140-1237
188 second = text.mid(equalsPosition + 1, secondLength).trimmed();
executed 1237 times by 5 tests: second = text.mid(equalsPosition + 1, secondLength).trimmed();
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1237
189-
190 position = semiColonPosition;-
191 return
executed 1377 times by 5 tests: return qMakePair(first, second);
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
qMakePair(first, second);
executed 1377 times by 5 tests: return qMakePair(first, second);
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1377
192}-
193QByteArray QNetworkCookie::toRawForm(RawForm form) const-
194{-
195 QByteArray result;-
196 if (d->name.isEmpty()
d->name.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 1120 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
)
6-1120
197 return
executed 6 times by 1 test: return result;
Executed by:
  • tst_qnetworkcookie - unknown status
result;
executed 6 times by 1 test: return result;
Executed by:
  • tst_qnetworkcookie - unknown status
6
198-
199 result = d->name;-
200 result += '=';-
201 result += d->value;-
202-
203 if (form == Full
form == FullDescription
TRUEevaluated 1106 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkrequest - unknown status
) {
14-1106
204-
205 if (isSecure()
isSecure()Description
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 1046 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
)
60-1046
206 result += "; secure";
executed 60 times by 1 test: result += "; secure";
Executed by:
  • tst_qnetworkcookie - unknown status
60
207 if (isHttpOnly()
isHttpOnly()Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 1066 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
)
40-1066
208 result += "; HttpOnly";
executed 40 times by 1 test: result += "; HttpOnly";
Executed by:
  • tst_qnetworkcookie - unknown status
40
209 if (!isSessionCookie()
!isSessionCookie()Description
TRUEevaluated 605 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 501 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
501-605
210 result += "; expires=";-
211 result += QLocale::c().toString(d->expirationDate.toUTC(),-
212 QLatin1String("ddd, dd-MMM-yyyy hh:mm:ss 'GMT")).toLatin1();-
213 }
executed 605 times by 1 test: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
605
214 if (!d->domain.isEmpty()
!d->domain.isEmpty()Description
TRUEevaluated 172 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 934 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkrequest - unknown status
) {
172-934
215 result += "; domain=";-
216 if (d->domain.startsWith(QLatin1Char('.'))
d->domain.star...tin1Char('.'))Description
TRUEevaluated 122 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 50 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
50-122
217 result += '.';-
218 result += QUrl::toAce(d->domain.mid(1));-
219 }
executed 122 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else {
122
220 QHostAddress hostAddr(d->domain);-
221 if (hostAddr.protocol() == QAbstractSocket::IPv6Protocol
hostAddr.proto...::IPv6ProtocolDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 49 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
1-49
222 result += '[';-
223 result += d->domain.toUtf8();-
224 result += ']';-
225 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qnetworkcookiejar - unknown status
else {
1
226 result += QUrl::toAce(d->domain);-
227 }
executed 49 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
49
228 }-
229 }-
230 if (!d->path.isEmpty()
!d->path.isEmpty()Description
TRUEevaluated 219 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 887 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkrequest - unknown status
) {
219-887
231 result += "; path=";-
232 result += d->path.toUtf8();-
233 }
executed 219 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
219
234 }
executed 1106 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1106
235 return
executed 1120 times by 4 tests: return result;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
result;
executed 1120 times by 4 tests: return result;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
1120
236}-
237-
238static const char zones[] =-
239 "pst\0"-
240 "pdt\0"-
241 "mst\0"-
242 "mdt\0"-
243 "cst\0"-
244 "cdt\0"-
245 "est\0"-
246 "edt\0"-
247 "ast\0"-
248 "nst\0"-
249 "gmt\0"-
250 "utc\0"-
251 "bst\0"-
252 "met\0"-
253 "eet\0"-
254 "jst\0"-
255 "\0";-
256static const int zoneOffsets[] = {-8, -8, -7, -7, -6, -6, -5, -5, -4, -3, 0, 0, 0, 1, 2, 9 };-
257-
258static const char months[] =-
259 "jan\0"-
260 "feb\0"-
261 "mar\0"-
262 "apr\0"-
263 "may\0"-
264 "jun\0"-
265 "jul\0"-
266 "aug\0"-
267 "sep\0"-
268 "oct\0"-
269 "nov\0"-
270 "dec\0"-
271 "\0";-
272-
273static inline bool isNumber(char s)-
274{ return
executed 4731 times by 3 tests: return s >= '0' && s <= '9';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
s >= '0' && s <= '9';
executed 4731 times by 3 tests: return s >= '0' && s <= '9';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
}
4731
275-
276static inline bool isTerminator(char c)-
277{ return
executed 6332 times by 3 tests: return c == '\n' || c == '\r';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
c == '\n' || c == '\r';
executed 6332 times by 3 tests: return c == '\n' || c == '\r';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
}
6332
278-
279static inline bool isValueSeparator(char c)-
280{ return
executed 6332 times by 3 tests: return isTerminator(c) || c == ';';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
isTerminator(c) || c == ';';
executed 6332 times by 3 tests: return isTerminator(c) || c == ';';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
}
6332
281-
282static inline bool isWhitespace(char c)-
283{ return
executed 315 times by 3 tests: return c == ' ' || c == '\t';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
c == ' ' || c == '\t';
executed 315 times by 3 tests: return c == ' ' || c == '\t';
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
}
315
284-
285static bool checkStaticArray(int &val, const QByteArray &dateString, int at, const char *array, int size)-
286{-
287 if (dateString[at] < 'a'
dateString[at] < 'a'Description
TRUEevaluated 2637 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1800 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| dateString[at] > 'z'
dateString[at] > 'z'Description
TRUEnever evaluated
FALSEevaluated 1800 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
0-2637
288 return
executed 2637 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
false;
executed 2637 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
2637
289 if (val == -1
val == -1Description
TRUEevaluated 1581 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 219 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& dateString.length() >= at + 3
dateString.length() >= at + 3Description
TRUEevaluated 1571 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
) {
10-1581
290 int j = 0;-
291 int i = 0;-
292 while (i <= size
i <= sizeDescription
TRUEevaluated 21501 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1156 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
1156-21501
293 const char *str = array + i;-
294 if (str[0] == dateString[at]
str[0] == dateString[at]Description
TRUEevaluated 1149 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 20352 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
1149-20352
295 && str[1] == dateString[at + 1]
str[1] == dateString[at + 1]Description
TRUEevaluated 460 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 689 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
460-689
296 && str[2] == dateString[at + 2]
str[2] == dateString[at + 2]Description
TRUEevaluated 415 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 45 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
) {
45-415
297 val = j;-
298 return
executed 415 times by 3 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
true;
executed 415 times by 3 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
415
299 }-
300 i += int(strlen(str)) + 1;-
301 ++j;-
302 }
executed 21086 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
21086
303 }
executed 1156 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
1156
304 return
executed 1385 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
false;
executed 1385 times by 3 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
1385
305}-
306static QDateTime parseDateString(const QByteArray &dateString)-
307{-
308 QTime time;-
309-
310 int unknown[3] = {-1, -1, -1};-
311 int month = -1;-
312 int day = -1;-
313 int year = -1;-
314 int zoneOffset = -1;-
315-
316-
317 QRegExp timeRx(QLatin1String("(\\d{1,2}):(\\d{1,2})(:(\\d{1,2})|)(\\.(\\d{1,3})|)((\\s{0,}(am|pm))|)"));-
318-
319 int at = 0;-
320 while (at < dateString.length()
at < dateString.length()Description
TRUEevaluated 3176 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 267 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
267-3176
321-
322-
323-
324 bool isNum = isNumber(dateString[at]);-
325-
326-
327 if (!isNum
!isNumDescription
TRUEevaluated 2354 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 822 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
822-2354
328 && checkStaticArray(month, dateString, at, months, sizeof(months)- 1)
checkStaticArr...of(months)- 1)Description
TRUEevaluated 229 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 2125 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
229-2125
329 ++month;-
330-
331-
332-
333 at += 3;-
334 continue;
executed 229 times by 3 tests: continue;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
229
335 }-
336-
337 if (!isNum
!isNumDescription
TRUEevaluated 2125 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 822 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
822-2125
338 && zoneOffset == -1
zoneOffset == -1Description
TRUEevaluated 2083 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
42-2083
339 && checkStaticArray(zoneOffset, dateString, at, zones, sizeof(zones)- 1)
checkStaticArr...eof(zones)- 1)Description
TRUEevaluated 186 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1897 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
186-1897
340 int sign = (at >= 0
at >= 0Description
TRUEevaluated 186 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEnever evaluated
&& dateString[at - 1] == '-'
dateString[at - 1] == '-'Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 185 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) ? -1 : 1;
0-186
341 zoneOffset = sign * zoneOffsets[zoneOffset] * 60 * 60;-
342-
343-
344-
345 at += 3;-
346 continue;
executed 186 times by 3 tests: continue;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
186
347 }-
348-
349 if (!isNum
!isNumDescription
TRUEevaluated 1939 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 822 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
822-1939
350 && (zoneOffset == -1
zoneOffset == -1Description
TRUEevaluated 1897 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| zoneOffset == 0
zoneOffset == 0Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
)
15-1897
351 && (dateString[at] == '+'
dateString[at] == '+'Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 1915 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| dateString[at] == '-'
dateString[at] == '-'Description
TRUEevaluated 306 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1609 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
9-1915
352 && (at == 0
at == 0Description
TRUEnever evaluated
FALSEevaluated 315 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
0-315
353 || isWhitespace(dateString[at - 1])
isWhitespace(d...tring[at - 1])Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 308 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
7-308
354 || dateString[at - 1] == ','
dateString[at - 1] == ','Description
TRUEnever evaluated
FALSEevaluated 308 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
0-308
355 || (at >= 3
at >= 3Description
TRUEevaluated 301 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
7-301
356 && (
(dateString[at - 3] == 'g')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 296 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
dateString[at - 3] == 'g')
(dateString[at - 3] == 'g')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 296 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
5-296
357 && (
(dateString[at - 2] == 'm')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
dateString[at - 2] == 'm')
(dateString[at - 2] == 'm')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
0-5
358 && (
(dateString[at - 1] == 't')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
dateString[at - 1] == 't')
(dateString[at - 1] == 't')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
))) {
0-5
359-
360 int end = 1;-
361 while (end < 5
end < 5Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
&& dateString.length() > at+end
dateString.length() > at+endDescription
TRUEevaluated 31 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
5-38
362 && dateString[at + end] >= '0'
dateString[at + end] >= '0'Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
&& dateString[at + end] <= '9'
dateString[at + end] <= '9'Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
)
0-31
363 ++
executed 31 times by 1 test: ++end;
Executed by:
  • tst_qnetworkcookie - unknown status
end;
executed 31 times by 1 test: ++end;
Executed by:
  • tst_qnetworkcookie - unknown status
31
364 int minutes = 0;-
365 int hours = 0;-
366 switch (end - 1) {-
367 case
executed 5 times by 1 test: case 4:
Executed by:
  • tst_qnetworkcookie - unknown status
4:
executed 5 times by 1 test: case 4:
Executed by:
  • tst_qnetworkcookie - unknown status
5
368 minutes = atoi(dateString.mid(at + 3, 2).constData());-
369-
370 case
executed 2 times by 1 test: case 2:
Executed by:
  • tst_qnetworkcookie - unknown status
2:
executed 2 times by 1 test: case 2:
Executed by:
  • tst_qnetworkcookie - unknown status
code before this statement executed 5 times by 1 test: case 2:
Executed by:
  • tst_qnetworkcookie - unknown status
2-5
371 hours = atoi(dateString.mid(at + 1, 2).constData());-
372 break;
executed 7 times by 1 test: break;
Executed by:
  • tst_qnetworkcookie - unknown status
7
373 case
executed 4 times by 1 test: case 1:
Executed by:
  • tst_qnetworkcookie - unknown status
1:
executed 4 times by 1 test: case 1:
Executed by:
  • tst_qnetworkcookie - unknown status
4
374 hours = atoi(dateString.mid(at + 1, 1).constData());-
375 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qnetworkcookie - unknown status
4
376 default
executed 1 time by 1 test: default:
Executed by:
  • tst_qnetworkcookie - unknown status
:
executed 1 time by 1 test: default:
Executed by:
  • tst_qnetworkcookie - unknown status
1
377 at += end;-
378 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_qnetworkcookie - unknown status
1
379 }-
380 if (end != 1
end != 1Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
) {
0-11
381 int sign = dateString[at] == '-'
dateString[at] == '-'Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
? -1 : 1;
3-8
382 zoneOffset = sign * ((minutes * 60) + (hours * 60 * 60));-
383-
384-
385-
386 at += end;-
387 continue;
executed 11 times by 1 test: continue;
Executed by:
  • tst_qnetworkcookie - unknown status
11
388 }-
389 }
never executed: end of block
0
390-
391-
392 if (isNum
isNumDescription
TRUEevaluated 822 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1927 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& time.isNull()
time.isNull()Description
TRUEevaluated 805 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 17 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
17-1927
393 && dateString.length() >= at + 3
dateString.length() >= at + 3Description
TRUEevaluated 804 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
1-804
394 && (dateString[at + 2] == ':'
dateString[at + 2] == ':'Description
TRUEevaluated 184 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 620 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| dateString[at + 1] == ':'
dateString[at + 1] == ':'Description
TRUEevaluated 78 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 542 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)) {
78-620
395-
396-
397 int pos = timeRx.indexIn(QLatin1String(dateString), at);-
398 if (pos != -1
pos != -1Description
TRUEevaluated 262 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEnever evaluated
) {
0-262
399 QStringList list = timeRx.capturedTexts();-
400 int h = atoi(list.at(1).toLatin1().constData());-
401 int m = atoi(list.at(2).toLatin1().constData());-
402 int s = atoi(list.at(4).toLatin1().constData());-
403 int ms = atoi(list.at(6).toLatin1().constData());-
404 if (h < 12
h < 12Description
TRUEevaluated 199 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 63 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& !list.at(9).isEmpty()
!list.at(9).isEmpty()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 191 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
8-199
405 if (list.at(9) == QLatin1String("pm")
list.at(9) == ...n1String("pm")Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
)
2-6
406 h += 12;
executed 6 times by 1 test: h += 12;
Executed by:
  • tst_qnetworkcookie - unknown status
6
407 time = QTime(h, m, s, ms);-
408-
409-
410-
411 at += timeRx.matchedLength();-
412 continue;
executed 262 times by 3 tests: continue;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
262
413 }-
414 }
never executed: end of block
0
415-
416-
417 if (isNum
isNumDescription
TRUEevaluated 560 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1927 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
560-1927
418 && year == -1
year == -1Description
TRUEevaluated 538 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
22-538
419 && dateString.length() > at + 3
dateString.length() > at + 3Description
TRUEevaluated 534 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
) {
4-534
420 if (isNumber(dateString[at + 1])
isNumber(dateString[at + 1])Description
TRUEevaluated 463 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 71 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
71-463
421 && isNumber(dateString[at + 2])
isNumber(dateString[at + 2])Description
TRUEevaluated 166 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 297 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
166-297
422 && isNumber(dateString[at + 3])
isNumber(dateString[at + 3])Description
TRUEevaluated 166 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEnever evaluated
) {
0-166
423 year = atoi(dateString.mid(at, 4).constData());-
424 at += 4;-
425-
426-
427-
428 continue;
executed 166 times by 2 tests: continue;
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
166
429 }-
430 }
executed 368 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
368
431-
432-
433-
434 if (isNum
isNumDescription
TRUEevaluated 394 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1927 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
394-1927
435 int length = 1;-
436 if (dateString.length() > at + 1
dateString.length() > at + 1Description
TRUEevaluated 392 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
2-392
437 && isNumber(dateString[at + 1])
isNumber(dateString[at + 1])Description
TRUEevaluated 314 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 78 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
)
78-314
438 ++
executed 314 times by 3 tests: ++length;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
length;
executed 314 times by 3 tests: ++length;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
314
439 int x = atoi(dateString.mid(at, length).constData());-
440 if (year == -1
year == -1Description
TRUEevaluated 372 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
&& (x > 31
x > 31Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 302 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| x == 0
x == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 300 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)) {
2-372
441 year = x;-
442 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
else {
72
443 if (unknown[0] == -1
unknown[0] == -1Description
TRUEevaluated 263 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 59 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
) unknown[0] = x;
executed 263 times by 3 tests: unknown[0] = x;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
59-263
444 else if (unknown[1] == -1
unknown[1] == -1Description
TRUEevaluated 41 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
) unknown[1] = x;
executed 41 times by 2 tests: unknown[1] = x;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
18-41
445 else if (unknown[2] == -1
unknown[2] == -1Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
) unknown[2] = x;
executed 18 times by 1 test: unknown[2] = x;
Executed by:
  • tst_qnetworkcookie - unknown status
0-18
446 }
executed 322 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
447 at += length;-
448-
449-
450-
451 continue;
executed 394 times by 3 tests: continue;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
394
452 }-
453-
454-
455 ++at;-
456 }
executed 1927 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
1927
457-
458-
459-
460-
461 int couldBe[3] = { 0, 0, 0 };-
462 int unknownCount = 3;-
463 for (int i = 0; i < unknownCount
i < unknownCountDescription
TRUEevaluated 571 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 267 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
; ++i) {
267-571
464 if (unknown[i] == -1
unknown[i] == -1Description
TRUEevaluated 249 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
249-322
465 couldBe[i] = 1 | 4 | 2;-
466 unknownCount = i;-
467 continue;
executed 249 times by 3 tests: continue;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
249
468 }-
469-
470 if (unknown[i] >= 1
unknown[i] >= 1Description
TRUEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEnever evaluated
)
0-322
471 couldBe[i] = 1;
executed 322 times by 3 tests: couldBe[i] = 1;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
472-
473 if (month == -1
month == -1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 236 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& unknown[i] >= 1
unknown[i] >= 1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
&& unknown[i] <= 12
unknown[i] <= 12Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
)
0-236
474 couldBe[i] |= 2;
executed 52 times by 1 test: couldBe[i] |= 2;
Executed by:
  • tst_qnetworkcookie - unknown status
52
475-
476 if (year == -1
year == -1Description
TRUEevaluated 68 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
68-254
477 couldBe[i] |= 4;
executed 68 times by 2 tests: couldBe[i] |= 4;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
68
478 }
executed 322 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
479-
480-
481-
482-
483-
484-
485-
486 for (int i = 0; i < unknownCount
i < unknownCountDescription
TRUEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 267 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
; ++i) {
267-322
487 int currentValue = unknown[i];-
488 bool findMatchingMonth = couldBe[i] & 1
couldBe[i] & 1Description
TRUEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEnever evaluated
&& currentValue >= 29
currentValue >= 29Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 296 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
;
0-322
489 bool findMatchingDay = couldBe[i] & 2;-
490 if (!findMatchingMonth
!findMatchingMonthDescription
TRUEevaluated 296 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
|| !findMatchingDay
!findMatchingDayDescription
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
)
0-296
491 continue;
executed 322 times by 3 tests: continue;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
492 for (int j = 0; j < 3
j < 3Description
TRUEnever evaluated
FALSEnever evaluated
; ++j) {
0
493 if (j == i
j == iDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
494 continue;
never executed: continue;
0
495 for (int k = 0; k < 2
k < 2Description
TRUEnever evaluated
FALSEnever evaluated
; ++k) {
0
496 if (k == 0
k == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& !(findMatchingMonth
findMatchingMonthDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(couldBe[j] & 2)Description
TRUEnever evaluated
FALSEnever evaluated
couldBe[j] & 2)
(couldBe[j] & 2)Description
TRUEnever evaluated
FALSEnever evaluated
))
0
497 continue;
never executed: continue;
0
498 else if (k == 1
k == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& !(findMatchingDay
findMatchingDayDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(couldBe[j] & 1)Description
TRUEnever evaluated
FALSEnever evaluated
couldBe[j] & 1)
(couldBe[j] & 1)Description
TRUEnever evaluated
FALSEnever evaluated
))
0
499 continue;
never executed: continue;
0
500 int m = currentValue;-
501 int d = unknown[j];-
502 if (k == 0
k == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
503 qSwap(m, d);
never executed: qSwap(m, d);
0
504 if (m == -1
m == -1Description
TRUEnever evaluated
FALSEnever evaluated
) m = month;
never executed: m = month;
0
505 bool found = true;-
506 switch(m) {-
507 case
never executed: case 2:
2:
never executed: case 2:
0
508-
509-
510-
511 if (d <= 29
d <= 29Description
TRUEnever evaluated
FALSEnever evaluated
)
0
512 found = false;
never executed: found = false;
0
513 break;
never executed: break;
0
514 case
never executed: case 4:
4:
never executed: case 4:
case
never executed: case 6:
6:
never executed: case 6:
case
never executed: case 9:
9:
never executed: case 9:
case
never executed: case 11:
11:
never executed: case 11:
0
515 if (d <= 30
d <= 30Description
TRUEnever evaluated
FALSEnever evaluated
)
0
516 found = false;
never executed: found = false;
0
517 break;
never executed: break;
0
518 default
never executed: default:
:
never executed: default:
0
519 if (d > 0
d > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& d <= 31
d <= 31Description
TRUEnever evaluated
FALSEnever evaluated
)
0
520 found = false;
never executed: found = false;
0
521 }
never executed: end of block
0
522 if (k == 0
k == 0Description
TRUEnever evaluated
FALSEnever evaluated
) findMatchingMonth = found;
never executed: findMatchingMonth = found;
0
523 else if (k == 1
k == 1Description
TRUEnever evaluated
FALSEnever evaluated
) findMatchingDay = found;
never executed: findMatchingDay = found;
0
524 }
never executed: end of block
0
525 }
never executed: end of block
0
526 if (findMatchingMonth
findMatchingMonthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
527 couldBe[i] &= ~1;
never executed: couldBe[i] &= ~1;
0
528 if (findMatchingDay
findMatchingDayDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
529 couldBe[i] &= ~2;
never executed: couldBe[i] &= ~2;
0
530 }
never executed: end of block
0
531-
532-
533-
534 for (int i = 0; i < unknownCount
i < unknownCountDescription
TRUEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 267 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
; ++i) {
267-322
535 int unset = 0;-
536 for (int j = 0; j < 3
j < 3Description
TRUEevaluated 552 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEnever evaluated
; ++j) {
0-552
537 if (couldBe[j] == 1
couldBe[j] == 1Description
TRUEevaluated 232 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 320 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& day == -1
day == -1Description
TRUEevaluated 230 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
) {
2-320
538 day = unknown[j];-
539 unset |= 1;-
540 }
executed 230 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else if (couldBe[j] == 2
couldBe[j] == 2Description
TRUEnever evaluated
FALSEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& month == -1
month == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-322
541 month = unknown[j];-
542 unset |= 2;-
543 }
never executed: end of block
else if (couldBe[j] == 4
couldBe[j] == 4Description
TRUEnever evaluated
FALSEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& year == -1
year == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-322
544 year = unknown[j];-
545 unset |= 4;-
546 }
never executed: end of block
else {
0
547-
548 break;
executed 322 times by 3 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
549 }-
550 couldBe[j] &= ~unset;-
551 }
executed 230 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
230
552 }
executed 322 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
553-
554-
555 for (int i = 0; i < unknownCount
i < unknownCountDescription
TRUEevaluated 322 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 267 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
; ++i) {
267-322
556 if (couldBe[i] & 2
couldBe[i] & 2Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 270 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& month == -1
month == -1Description
TRUEevaluated 33 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
) month = unknown[i];
executed 33 times by 1 test: month = unknown[i];
Executed by:
  • tst_qnetworkcookie - unknown status
19-270
557 else if (couldBe[i] & 1
couldBe[i] & 1Description
TRUEevaluated 59 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 230 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& day == -1
day == -1Description
TRUEevaluated 33 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
) day = unknown[i];
executed 33 times by 2 tests: day = unknown[i];
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
26-230
558 else if (couldBe[i] & 4
couldBe[i] & 4Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 232 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
&& year == -1
year == -1Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEnever evaluated
) year = unknown[i];
executed 24 times by 2 tests: year = unknown[i];
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
0-232
559 }
executed 322 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
322
560-
561-
562-
563-
564 if (year == -1
year == -1Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 262 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| month == -1
month == -1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 261 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
|| day == -1
day == -1Description
TRUEnever evaluated
FALSEevaluated 261 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
0-262
565-
566-
567-
568 return
executed 6 times by 1 test: return QDateTime();
Executed by:
  • tst_qnetworkcookie - unknown status
QDateTime();
executed 6 times by 1 test: return QDateTime();
Executed by:
  • tst_qnetworkcookie - unknown status
6
569 }-
570-
571-
572 int y2k = 0;-
573 if (year < 70
year < 70Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 234 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
27-234
574 y2k = 2000;
executed 27 times by 2 tests: y2k = 2000;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
27
575 else if (year < 100
year < 100Description
TRUEevaluated 68 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 166 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
68-166
576 y2k = 1900;
executed 68 times by 1 test: y2k = 1900;
Executed by:
  • tst_qnetworkcookie - unknown status
68
577-
578 QDate date(year + y2k, month, day);-
579-
580-
581-
582-
583-
584-
585 if (!date.isValid()
!date.isValid()Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
FALSEevaluated 252 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
9-252
586 date = QDate(day + y2k, month, year);
executed 9 times by 1 test: date = QDate(day + y2k, month, year);
Executed by:
  • tst_qnetworkcookie - unknown status
9
587-
588 QDateTime dateTime(date, time, Qt::UTC);-
589-
590 if (zoneOffset != -1
zoneOffset != -1Description
TRUEevaluated 191 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 70 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
) {
70-191
591 dateTime = dateTime.addSecs(zoneOffset);-
592 }
executed 191 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
191
593 if (!dateTime.isValid()
!dateTime.isValid()Description
TRUEnever evaluated
FALSEevaluated 261 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
0-261
594 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
595 return
executed 261 times by 3 tests: return dateTime;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
dateTime;
executed 261 times by 3 tests: return dateTime;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
261
596}-
597QList<QNetworkCookie> QNetworkCookie::parseCookies(const QByteArray &cookieString)-
598{-
599-
600-
601 QList<QNetworkCookie> cookies;-
602 QList<QByteArray> list = cookieString.split('\n');-
603 for (int a = 0; a < list.size()
a < list.size()Description
TRUEevaluated 734 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 726 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
; a++)
726-734
604 cookies += QNetworkCookiePrivate::parseSetCookieHeaderLine(list.at(a));
executed 734 times by 5 tests: cookies += QNetworkCookiePrivate::parseSetCookieHeaderLine(list.at(a));
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
734
605 return
executed 726 times by 5 tests: return cookies;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
cookies;
executed 726 times by 5 tests: return cookies;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
726
606}-
607-
608QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByteArray &cookieString)-
609{-
610 QList<QNetworkCookie> result;-
611 const QDateTime now = QDateTime::currentDateTimeUtc();-
612-
613 int position = 0;-
614 const int length = cookieString.length();-
615 while (position < length
position < lengthDescription
TRUEevaluated 728 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 680 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
680-728
616 QNetworkCookie cookie;-
617-
618-
619 QPair<QByteArray,QByteArray> field = nextField(cookieString, position, true);-
620 if (field.first.isEmpty()
field.first.isEmpty()Description
TRUEevaluated 46 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 682 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
)
46-682
621-
622 break;
executed 46 times by 2 tests: break;
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
46
623 cookie.setName(field.first);-
624 cookie.setValue(field.second);-
625-
626 position = nextNonWhitespace(cookieString, position);-
627 while (position < length
position < lengthDescription
TRUEevaluated 683 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 674 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
674-683
628 switch (cookieString.at(position++)) {-
629 case
executed 683 times by 4 tests: case ';':
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
';':
executed 683 times by 4 tests: case ';':
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
683
630-
631 field = nextField(cookieString, position, false);-
632 field.first = field.first.toLower();-
633-
634 if (field.first == "expires"
field.first == "expires"Description
TRUEevaluated 267 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 416 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
267-416
635 position -= field.second.length();-
636 int end;-
637 for (end = position; end < length
end < lengthDescription
TRUEevaluated 6332 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 245 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
; ++end)
245-6332
638 if (isValueSeparator(cookieString.at(end))
isValueSeparat...tring.at(end))Description
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 6310 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
)
22-6310
639 break;
executed 22 times by 3 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
22
640-
641 QByteArray dateString = cookieString.mid(position, end - position).trimmed();-
642 position = end;-
643 QDateTime dt = parseDateString(dateString.toLower());-
644 if (dt.isValid()
dt.isValid()Description
TRUEevaluated 261 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qnetworkcookie - unknown status
)
6-261
645 cookie.setExpirationDate(dt);
executed 261 times by 3 tests: cookie.setExpirationDate(dt);
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
261
646-
647 }
executed 267 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else if (field.first == "domain"
field.first == "domain"Description
TRUEevaluated 122 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 294 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
122-294
648 QByteArray rawDomain = field.second;-
649-
650 if (!rawDomain.isEmpty()
!rawDomain.isEmpty()Description
TRUEevaluated 118 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
) {
4-118
651 QString maybeLeadingDot;-
652 if (rawDomain.startsWith('.')
rawDomain.startsWith('.')Description
TRUEevaluated 67 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 51 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
51-67
653 maybeLeadingDot = QLatin1Char('.');-
654 rawDomain = rawDomain.mid(1);-
655 }
executed 67 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
67
656-
657-
658 QString normalizedDomain = QUrl::fromAce(QUrl::toAce(QString::fromUtf8(rawDomain)));-
659 if (!normalizedDomain.isEmpty()
!normalizedDomain.isEmpty()Description
TRUEevaluated 110 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
8-110
660 cookie.setDomain(maybeLeadingDot + normalizedDomain);-
661 }
executed 110 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else {
110
662-
663-
664-
665 return
executed 8 times by 2 tests: return result;
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
result;
executed 8 times by 2 tests: return result;
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
8
666 }-
667 }-
668 }
executed 114 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else if (field.first == "max-age"
field.first == "max-age"Description
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 273 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
) {
21-273
669 bool ok = false;-
670 int secs = field.second.toInt(&ok);-
671 if (ok
okDescription
TRUEevaluated 19 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
) {
2-19
672 if (secs <= 0
secs <= 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
8-11
673-
674 cookie.setExpirationDate(QDateTime::fromTime_t(0));-
675 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qnetworkcookiejar - unknown status
else {
8
676 cookie.setExpirationDate(now.addSecs(secs));-
677 }
executed 11 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
11
678 }-
679-
680 }
executed 21 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else if (field.first == "path"
field.first == "path"Description
TRUEevaluated 145 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 128 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
21-145
681 if (field.second.startsWith('/')
field.second.startsWith('/')Description
TRUEevaluated 135 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
10-135
682-
683-
684 cookie.setPath(QString::fromUtf8(field.second));-
685 }
executed 135 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
else {
135
686-
687-
688 cookie.setPath(QString());-
689 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
10
690 } else if (field.first == "secure"
field.first == "secure"Description
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 90 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
38-90
691 cookie.setSecure(true);-
692 }
executed 38 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
else if (field.first == "httponly"
field.first == "httponly"Description
TRUEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
FALSEevaluated 73 times by 2 tests
Evaluated by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
) {
17-73
693 cookie.setHttpOnly(true);-
694 }
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
else {
17
695-
696 }
executed 73 times by 2 tests: end of block
Executed by:
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
73
697-
698 position = nextNonWhitespace(cookieString, position);-
699 }
executed 675 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
675
700 }
executed 675 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
675
701-
702 if (!cookie.name().isEmpty()
!cookie.name().isEmpty()Description
TRUEevaluated 674 times by 5 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
FALSEnever evaluated
)
0-674
703 result += cookie;
executed 674 times by 5 tests: result += cookie;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
674
704 }
executed 674 times by 5 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
674
705-
706 return
executed 726 times by 5 tests: return result;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
result;
executed 726 times by 5 tests: return result;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_qnetworkcookie - unknown status
  • tst_qnetworkcookiejar - unknown status
  • tst_qnetworkrequest - unknown status
726
707}-
708-
709-
710-
711-
712-
713-
714void QNetworkCookie::normalize(const QUrl &url)-
715{-
716-
717 if (d->path.isEmpty()
d->path.isEmpty()Description
TRUEevaluated 183 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 73 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
) {
73-183
718 QString pathAndFileName = url.path();-
719 QString defaultPath = pathAndFileName.left(pathAndFileName.lastIndexOf(QLatin1Char('/'))+1);-
720 if (defaultPath.isEmpty()
defaultPath.isEmpty()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 180 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
)
3-180
721 defaultPath = QLatin1Char('/');
executed 3 times by 1 test: defaultPath = QLatin1Char('/');
Executed by:
  • tst_qnetworkcookiejar - unknown status
3
722 d->path = defaultPath;-
723 }
executed 183 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
183
724-
725 if (d->domain.isEmpty()
d->domain.isEmpty()Description
TRUEevaluated 191 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 65 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
) {
65-191
726 d->domain = url.host();-
727 }
executed 191 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
else {
191
728 QHostAddress hostAddress(d->domain);-
729 if (hostAddress.protocol() != QAbstractSocket::IPv4Protocol
hostAddress.pr...::IPv4ProtocolDescription
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
1-64
730 && hostAddress.protocol() != QAbstractSocket::IPv6Protocol
hostAddress.pr...::IPv6ProtocolDescription
TRUEevaluated 63 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
1-63
731 && !d->domain.startsWith(QLatin1Char('.'))
!d->domain.sta...tin1Char('.'))Description
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_qnetworkcookiejar - unknown status
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
) {
27-36
732-
733-
734-
735-
736 d->domain.prepend(QLatin1Char('.'));-
737 }
executed 27 times by 1 test: end of block
Executed by:
  • tst_qnetworkcookiejar - unknown status
27
738 }
executed 65 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qnetworkcookiejar - unknown status
65
739}-
740-
741-
742QDebug operator<<(QDebug s, const QNetworkCookie &cookie)-
743{-
744 QDebugStateSaver saver(s);-
745 s.resetFormat().nospace();-
746 s << "QNetworkCookie(" << cookie.toRawForm(QNetworkCookie::Full) << ')';-
747 return
never executed: return s;
s;
never executed: return s;
0
748}-
749-
750-
751-
Switch to Source codePreprocessed file

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