Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | QIODevicePrivate::QIODevicePrivate() | - |
8 | : openMode(QIODevice::NotOpen), buffer(static_cast<long long>(16384LL)), | - |
9 | pos(0), devicePos(0), seqDumpPos(0) | - |
10 | , pPos(&pos), pDevicePos(&devicePos) | - |
11 | , baseReadLineDataCalled(false) | - |
12 | , firstRead(true) | - |
13 | , accessMode(Unset) | - |
14 | | - |
15 | | - |
16 | | - |
17 | { | - |
18 | } executed: } Execution Count:39349 | 39349 |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | QIODevicePrivate::~QIODevicePrivate() | - |
24 | { | - |
25 | } | - |
26 | QIODevice::QIODevice() | - |
27 | : QObject(*new QIODevicePrivate, 0) | - |
28 | { | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | } executed: } Execution Count:23 | 23 |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | QIODevice::QIODevice(QObject *parent) | - |
41 | : QObject(*new QIODevicePrivate, parent) | - |
42 | { | - |
43 | | - |
44 | | - |
45 | | - |
46 | } executed: } Execution Count:11 | 11 |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | QIODevice::QIODevice(QIODevicePrivate &dd, QObject *parent) | - |
52 | : QObject(dd, parent) | - |
53 | { | - |
54 | } executed: } Execution Count:39315 | 39315 |
55 | QIODevice::~QIODevice() | - |
56 | { | - |
57 | | - |
58 | | - |
59 | | - |
60 | } | - |
61 | bool QIODevice::isSequential() const | - |
62 | { | - |
63 | return false; executed: return false; Execution Count:8128 | 8128 |
64 | } | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
72 | QIODevice::OpenMode QIODevice::openMode() const | - |
73 | { | - |
74 | return d_func()->openMode; executed: return d_func()->openMode; Execution Count:6318 | 6318 |
75 | } | - |
76 | void QIODevice::setOpenMode(OpenMode openMode) | - |
77 | { | - |
78 | QIODevicePrivate * const d = d_func(); | - |
79 | | - |
80 | | - |
81 | | - |
82 | d->openMode = openMode; | - |
83 | d->accessMode = QIODevicePrivate::Unset; | - |
84 | d->firstRead = true; | - |
85 | if (!isReadable()) evaluated: !isReadable() yes Evaluation Count:2 | yes Evaluation Count:69 |
| 2-69 |
86 | d->buffer.clear(); executed: d->buffer.clear(); Execution Count:2 | 2 |
87 | } executed: } Execution Count:71 | 71 |
88 | void QIODevice::setTextModeEnabled(bool enabled) | - |
89 | { | - |
90 | QIODevicePrivate * const d = d_func(); | - |
91 | if (!isOpen()) { partially evaluated: !isOpen() no Evaluation Count:0 | yes Evaluation Count:82078611 |
| 0-82078611 |
92 | QMessageLogger("io/qiodevice.cpp", 467, __PRETTY_FUNCTION__).warning("QIODevice::setTextModeEnabled: The device is not open"); | - |
93 | return; | 0 |
94 | } | - |
95 | if (enabled) evaluated: enabled yes Evaluation Count:41038132 | yes Evaluation Count:41040479 |
| 41038132-41040479 |
96 | d->openMode |= Text; executed: d->openMode |= Text; Execution Count:41038132 | 41038132 |
97 | else | - |
98 | d->openMode &= ~Text; executed: d->openMode &= ~Text; Execution Count:41040479 | 41040479 |
99 | } | - |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | bool QIODevice::isTextModeEnabled() const | - |
107 | { | - |
108 | return d_func()->openMode & Text; executed: return d_func()->openMode & Text; Execution Count:41042456 | 41042456 |
109 | } | - |
110 | bool QIODevice::isOpen() const | - |
111 | { | - |
112 | return d_func()->openMode != NotOpen; executed: return d_func()->openMode != NotOpen; Execution Count:82401674 | 82401674 |
113 | } | - |
114 | bool QIODevice::isReadable() const | - |
115 | { | - |
116 | return (openMode() & ReadOnly) != 0; executed: return (openMode() & ReadOnly) != 0; Execution Count:4544 | 4544 |
117 | } | - |
118 | bool QIODevice::isWritable() const | - |
119 | { | - |
120 | return (openMode() & WriteOnly) != 0; executed: return (openMode() & WriteOnly) != 0; Execution Count:1760 | 1760 |
121 | } | - |
122 | bool QIODevice::open(OpenMode mode) | - |
123 | { | - |
124 | QIODevicePrivate * const d = d_func(); | - |
125 | d->openMode = mode; | - |
126 | d->pos = (mode & Append) ? size() : qint64(0); evaluated: (mode & Append) yes Evaluation Count:274 | yes Evaluation Count:30691 |
| 274-30691 |
127 | d->buffer.clear(); | - |
128 | d->accessMode = QIODevicePrivate::Unset; | - |
129 | d->firstRead = true; | - |
130 | | - |
131 | | - |
132 | | - |
133 | return true; executed: return true; Execution Count:30965 | 30965 |
134 | } | - |
135 | | - |
136 | | - |
137 | | - |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | void QIODevice::close() | - |
143 | { | - |
144 | QIODevicePrivate * const d = d_func(); | - |
145 | if (d->openMode == NotOpen) evaluated: d->openMode == NotOpen yes Evaluation Count:3579 | yes Evaluation Count:21705 |
| 3579-21705 |
146 | return; executed: return; Execution Count:3579 | 3579 |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | aboutToClose(); | - |
154 | | - |
155 | d->openMode = NotOpen; | - |
156 | d->errorString.clear(); | - |
157 | d->pos = 0; | - |
158 | d->seqDumpPos = 0; | - |
159 | d->buffer.clear(); | - |
160 | d->firstRead = true; | - |
161 | } executed: } Execution Count:21705 | 21705 |
162 | qint64 QIODevice::pos() const | - |
163 | { | - |
164 | const QIODevicePrivate * const d = d_func(); | - |
165 | | - |
166 | | - |
167 | | - |
168 | return d->pos; executed: return d->pos; Execution Count:459898 | 459898 |
169 | } | - |
170 | qint64 QIODevice::size() const | - |
171 | { | - |
172 | return d_func()->isSequential() ? bytesAvailable() : qint64(0); executed: return d_func()->isSequential() ? bytesAvailable() : qint64(0); Execution Count:69 | 69 |
173 | } | - |
174 | bool QIODevice::seek(qint64 pos) | - |
175 | { | - |
176 | QIODevicePrivate * const d = d_func(); | - |
177 | if (d->isSequential()) { evaluated: d->isSequential() yes Evaluation Count:1 | yes Evaluation Count:262822 |
| 1-262822 |
178 | QMessageLogger("io/qiodevice.cpp", 627, __PRETTY_FUNCTION__).warning("QIODevice::seek: Cannot call seek on a sequential device"); | - |
179 | return false; executed: return false; Execution Count:1 | 1 |
180 | } | - |
181 | if (d->openMode == NotOpen) { partially evaluated: d->openMode == NotOpen no Evaluation Count:0 | yes Evaluation Count:262822 |
| 0-262822 |
182 | QMessageLogger("io/qiodevice.cpp", 631, __PRETTY_FUNCTION__).warning("QIODevice::seek: The device is not open"); | - |
183 | return false; never executed: return false; | 0 |
184 | } | - |
185 | if (pos < 0) { partially evaluated: pos < 0 no Evaluation Count:0 | yes Evaluation Count:262822 |
| 0-262822 |
186 | QMessageLogger("io/qiodevice.cpp", 635, __PRETTY_FUNCTION__).warning("QIODevice::seek: Invalid pos: %d", int(pos)); | - |
187 | return false; never executed: return false; | 0 |
188 | } | - |
189 | | - |
190 | | - |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | qint64 offset = pos - d->pos; | - |
196 | d->pos = pos; | - |
197 | d->devicePos = pos; | - |
198 | | - |
199 | if (offset < 0 evaluated: offset < 0 yes Evaluation Count:126246 | yes Evaluation Count:136576 |
| 126246-136576 |
200 | || offset >= qint64(d->buffer.size())) evaluated: offset >= qint64(d->buffer.size()) yes Evaluation Count:117821 | yes Evaluation Count:18755 |
| 18755-117821 |
201 | | - |
202 | | - |
203 | | - |
204 | | - |
205 | d->buffer.clear(); executed: d->buffer.clear(); Execution Count:244067 | 244067 |
206 | else if (!d->buffer.isEmpty()) partially evaluated: !d->buffer.isEmpty() yes Evaluation Count:18755 | no Evaluation Count:0 |
| 0-18755 |
207 | d->buffer.skip(int(offset)); executed: d->buffer.skip(int(offset)); Execution Count:18755 | 18755 |
208 | | - |
209 | | - |
210 | | - |
211 | | - |
212 | | - |
213 | return true; executed: return true; Execution Count:262822 | 262822 |
214 | } | - |
215 | bool QIODevice::atEnd() const | - |
216 | { | - |
217 | const QIODevicePrivate * const d = d_func(); | - |
218 | | - |
219 | | - |
220 | | - |
221 | | - |
222 | return d->openMode == NotOpen || (d->buffer.isEmpty() && bytesAvailable() == 0); executed: return d->openMode == NotOpen || (d->buffer.isEmpty() && bytesAvailable() == 0); Execution Count:5434 | 5434 |
223 | } | - |
224 | bool QIODevice::reset() | - |
225 | { | - |
226 | | - |
227 | | - |
228 | | - |
229 | return seek(0); executed: return seek(0); Execution Count:102 | 102 |
230 | } | - |
231 | qint64 QIODevice::bytesAvailable() const | - |
232 | { | - |
233 | const QIODevicePrivate * const d = d_func(); | - |
234 | if (!d->isSequential()) evaluated: !d->isSequential() yes Evaluation Count:5562 | yes Evaluation Count:44316 |
| 5562-44316 |
235 | return qMax(size() - d->pos, qint64(0)); executed: return qMax(size() - d->pos, qint64(0)); Execution Count:5562 | 5562 |
236 | return d->buffer.size(); executed: return d->buffer.size(); Execution Count:44316 | 44316 |
237 | } | - |
238 | qint64 QIODevice::bytesToWrite() const | - |
239 | { | - |
240 | return qint64(0); never executed: return qint64(0); | 0 |
241 | } | - |
242 | qint64 QIODevice::read(char *data, qint64 maxSize) | - |
243 | { | - |
244 | QIODevicePrivate * const d = d_func(); | - |
245 | | - |
246 | | - |
247 | | - |
248 | | - |
249 | | - |
250 | | - |
251 | | - |
252 | if (maxSize == 1) { evaluated: maxSize == 1 yes Evaluation Count:43547119 | yes Evaluation Count:325283 |
| 325283-43547119 |
253 | int chint; | - |
254 | while ((chint = d->buffer.getChar()) != -1) { evaluated: (chint = d->buffer.getChar()) != -1 yes Evaluation Count:43400075 | yes Evaluation Count:147181 |
| 147181-43400075 |
255 | ++(*d->pPos); | - |
256 | | - |
257 | char c = char(uchar(chint)); | - |
258 | if (c == '\r' && (d->openMode & Text)) evaluated: c == '\r' yes Evaluation Count:15690 | yes Evaluation Count:43384385 |
evaluated: (d->openMode & Text) yes Evaluation Count:137 | yes Evaluation Count:15553 |
| 137-43384385 |
259 | continue; executed: continue; Execution Count:137 | 137 |
260 | *data = c; | - |
261 | | - |
262 | | - |
263 | | - |
264 | | - |
265 | if (d->buffer.isEmpty()) evaluated: d->buffer.isEmpty() yes Evaluation Count:2880 | yes Evaluation Count:43397058 |
| 2880-43397058 |
266 | readData(data, 0); executed: readData(data, 0); Execution Count:2880 | 2880 |
267 | return qint64(1); executed: return qint64(1); Execution Count:43399938 | 43399938 |
268 | } | - |
269 | } executed: } Execution Count:147181 | 147181 |
270 | | - |
271 | do { if (maxSize < 0) { QMessageLogger("io/qiodevice.cpp", 786, __PRETTY_FUNCTION__).warning("QIODevice::""read"": Called with maxSize < 0"); return qint64(-1); } } while (0); partially evaluated: maxSize < 0 no Evaluation Count:0 | yes Evaluation Count:472464 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:472464 |
never executed: return qint64(-1); executed: } Execution Count:472464 | 0-472464 |
272 | qint64 readSoFar = 0; | - |
273 | bool moreToRead = true; | - |
274 | do { | - |
275 | | - |
276 | int lastReadChunkSize = d->buffer.read(data, maxSize); | - |
277 | if (lastReadChunkSize > 0) { evaluated: lastReadChunkSize > 0 yes Evaluation Count:214422 | yes Evaluation Count:258064 |
| 214422-258064 |
278 | *d->pPos += lastReadChunkSize; | - |
279 | readSoFar += lastReadChunkSize; | - |
280 | | - |
281 | if (lastReadChunkSize == maxSize && !(d->openMode & Text)) { evaluated: lastReadChunkSize == maxSize yes Evaluation Count:195510 | yes Evaluation Count:18912 |
evaluated: !(d->openMode & Text) yes Evaluation Count:195504 | yes Evaluation Count:6 |
| 6-195510 |
282 | if (d->buffer.isEmpty()) { evaluated: d->buffer.isEmpty() yes Evaluation Count:5696 | yes Evaluation Count:189808 |
| 5696-189808 |
283 | d->buffer.clear(); | - |
284 | readData(data, 0); | - |
285 | } executed: } Execution Count:5696 | 5696 |
286 | return readSoFar; executed: return readSoFar; Execution Count:195504 | 195504 |
287 | } | - |
288 | | - |
289 | data += lastReadChunkSize; | - |
290 | maxSize -= lastReadChunkSize; | - |
291 | | - |
292 | | - |
293 | | - |
294 | | - |
295 | } else { executed: } Execution Count:18918 | 18918 |
296 | if (d->firstRead) { evaluated: d->firstRead yes Evaluation Count:18943 | yes Evaluation Count:239121 |
| 18943-239121 |
297 | | - |
298 | | - |
299 | do { if ((d->openMode & ReadOnly) == 0) { if (d->openMode == NotOpen) return qint64(-1); QMessageLogger("io/qiodevice.cpp", 814, __PRETTY_FUNCTION__).warning("QIODevice::""read"": WriteOnly device"); return qint64(-1); } } while (0); evaluated: (d->openMode & ReadOnly) == 0 yes Evaluation Count:27 | yes Evaluation Count:18916 |
evaluated: d->openMode == NotOpen yes Evaluation Count:25 | yes Evaluation Count:2 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:18916 |
executed: return qint64(-1); Execution Count:25 executed: return qint64(-1); Execution Count:2 executed: } Execution Count:18916 | 0-18916 |
300 | d->firstRead = false; | - |
301 | if (d->isSequential()) { evaluated: d->isSequential() yes Evaluation Count:2545 | yes Evaluation Count:16371 |
| 2545-16371 |
302 | d->pPos = &d->seqDumpPos; | - |
303 | d->pDevicePos = &d->seqDumpPos; | - |
304 | } executed: } Execution Count:2545 | 2545 |
305 | } executed: } Execution Count:18916 | 18916 |
306 | | - |
307 | if (!maxSize) evaluated: !maxSize yes Evaluation Count:1948 | yes Evaluation Count:256089 |
| 1948-256089 |
308 | return readSoFar; executed: return readSoFar; Execution Count:1948 | 1948 |
309 | | - |
310 | if ((d->openMode & Unbuffered) == 0 && maxSize < static_cast<long long>(16384LL)) { evaluated: (d->openMode & Unbuffered) == 0 yes Evaluation Count:117648 | yes Evaluation Count:138441 |
evaluated: maxSize < static_cast<long long>(16384LL) yes Evaluation Count:103444 | yes Evaluation Count:14204 |
| 14204-138441 |
311 | | - |
312 | | - |
313 | | - |
314 | int bytesToBuffer = static_cast<long long>(16384LL); | - |
315 | char *writePointer = d->buffer.reserve(bytesToBuffer); | - |
316 | | - |
317 | | - |
318 | if (d->pos != d->devicePos && !d->isSequential() && !seek(d->pos)) evaluated: d->pos != d->devicePos yes Evaluation Count:3341 | yes Evaluation Count:100103 |
evaluated: !d->isSequential() yes Evaluation Count:414 | yes Evaluation Count:2927 |
partially evaluated: !seek(d->pos) no Evaluation Count:0 | yes Evaluation Count:414 |
| 0-100103 |
319 | return readSoFar ? readSoFar : qint64(-1); never executed: return readSoFar ? readSoFar : qint64(-1); | 0 |
320 | qint64 readFromDevice = readData(writePointer, bytesToBuffer); | - |
321 | d->buffer.chop(bytesToBuffer - (readFromDevice < 0 ? 0 : int(readFromDevice))); | - |
322 | | - |
323 | if (readFromDevice > 0) { evaluated: readFromDevice > 0 yes Evaluation Count:38922 | yes Evaluation Count:64522 |
| 38922-64522 |
324 | *d->pDevicePos += readFromDevice; | - |
325 | | - |
326 | | - |
327 | | - |
328 | | - |
329 | if (!d->buffer.isEmpty()) { evaluated: !d->buffer.isEmpty() yes Evaluation Count:38859 | yes Evaluation Count:63 |
| 63-38859 |
330 | lastReadChunkSize = d->buffer.read(data, maxSize); | - |
331 | readSoFar += lastReadChunkSize; | - |
332 | data += lastReadChunkSize; | - |
333 | maxSize -= lastReadChunkSize; | - |
334 | *d->pPos += lastReadChunkSize; | - |
335 | | - |
336 | | - |
337 | | - |
338 | | - |
339 | } executed: } Execution Count:38859 | 38859 |
340 | } executed: } Execution Count:38922 | 38922 |
341 | } executed: } Execution Count:103444 | 103444 |
342 | } executed: } Execution Count:256088 | 256088 |
343 | | - |
344 | | - |
345 | if (maxSize > 0) { evaluated: maxSize > 0 yes Evaluation Count:238584 | yes Evaluation Count:36422 |
| 36422-238584 |
346 | | - |
347 | if (d->pos != d->devicePos && !d->isSequential() && !seek(d->pos)) evaluated: d->pos != d->devicePos yes Evaluation Count:5493 | yes Evaluation Count:233091 |
evaluated: !d->isSequential() yes Evaluation Count:482 | yes Evaluation Count:5011 |
partially evaluated: !seek(d->pos) no Evaluation Count:0 | yes Evaluation Count:482 |
| 0-233091 |
348 | return readSoFar ? readSoFar : qint64(-1); never executed: return readSoFar ? readSoFar : qint64(-1); | 0 |
349 | qint64 readFromDevice = readData(data, maxSize); | - |
350 | | - |
351 | | - |
352 | | - |
353 | if (readFromDevice == -1 && readSoFar == 0) { evaluated: readFromDevice == -1 yes Evaluation Count:4567 | yes Evaluation Count:234018 |
evaluated: readSoFar == 0 yes Evaluation Count:4558 | yes Evaluation Count:9 |
| 9-234018 |
354 | | - |
355 | return -1; executed: return -1; Execution Count:4558 | 4558 |
356 | } | - |
357 | if (readFromDevice > 0) { evaluated: readFromDevice > 0 yes Evaluation Count:148410 | yes Evaluation Count:85617 |
| 85617-148410 |
358 | lastReadChunkSize += int(readFromDevice); | - |
359 | readSoFar += readFromDevice; | - |
360 | data += readFromDevice; | - |
361 | maxSize -= readFromDevice; | - |
362 | *d->pPos += readFromDevice; | - |
363 | *d->pDevicePos += readFromDevice; | - |
364 | } executed: } Execution Count:148410 | 148410 |
365 | } executed: } Execution Count:234027 | 234027 |
366 | | - |
367 | moreToRead = false; | - |
368 | | - |
369 | if (readSoFar && d->openMode & Text) { evaluated: readSoFar yes Evaluation Count:200782 | yes Evaluation Count:69667 |
evaluated: d->openMode & Text yes Evaluation Count:821 | yes Evaluation Count:199961 |
| 821-200782 |
370 | char *readPtr = data - lastReadChunkSize; | - |
371 | const char *endPtr = data; | - |
372 | | - |
373 | if (readPtr < endPtr) { evaluated: readPtr < endPtr yes Evaluation Count:801 | yes Evaluation Count:20 |
| 20-801 |
374 | | - |
375 | while (*readPtr != '\r') { evaluated: *readPtr != '\r' yes Evaluation Count:2446824 | yes Evaluation Count:22 |
| 22-2446824 |
376 | if (++readPtr == endPtr) evaluated: ++readPtr == endPtr yes Evaluation Count:779 | yes Evaluation Count:2446045 |
| 779-2446045 |
377 | return readSoFar; executed: return readSoFar; Execution Count:779 | 779 |
378 | } executed: } Execution Count:2446045 | 2446045 |
379 | | - |
380 | char *writePtr = readPtr; | - |
381 | | - |
382 | while (readPtr < endPtr) { evaluated: readPtr < endPtr yes Evaluation Count:6501 | yes Evaluation Count:22 |
| 22-6501 |
383 | char ch = *readPtr++; | - |
384 | if (ch != '\r') evaluated: ch != '\r' yes Evaluation Count:6396 | yes Evaluation Count:105 |
| 105-6396 |
385 | *writePtr++ = ch; executed: *writePtr++ = ch; Execution Count:6396 | 6396 |
386 | else { | - |
387 | --readSoFar; | - |
388 | --data; | - |
389 | ++maxSize; | - |
390 | } executed: } Execution Count:105 | 105 |
391 | } | - |
392 | | - |
393 | | - |
394 | | - |
395 | | - |
396 | moreToRead = (readPtr != writePtr); | - |
397 | } executed: } Execution Count:22 | 22 |
398 | } executed: } Execution Count:42 | 42 |
399 | } while (moreToRead); evaluated: moreToRead yes Evaluation Count:22 | yes Evaluation Count:269647 |
executed: } Execution Count:269669 | 22-269669 |
400 | | - |
401 | | - |
402 | | - |
403 | | - |
404 | | - |
405 | | - |
406 | | - |
407 | if (d->buffer.isEmpty()) evaluated: d->buffer.isEmpty() yes Evaluation Count:239003 | yes Evaluation Count:30643 |
| 30643-239003 |
408 | readData(data, 0); executed: readData(data, 0); Execution Count:239003 | 239003 |
409 | | - |
410 | return readSoFar; executed: return readSoFar; Execution Count:269646 | 269646 |
411 | } | - |
412 | QByteArray QIODevice::read(qint64 maxSize) | - |
413 | { | - |
414 | QIODevicePrivate * const d = d_func(); | - |
415 | QByteArray result; | - |
416 | | - |
417 | do { if (maxSize < 0) { QMessageLogger("io/qiodevice.cpp", 947, __PRETTY_FUNCTION__).warning("QIODevice::""read"": Called with maxSize < 0"); return result; } } while (0); partially evaluated: maxSize < 0 no Evaluation Count:0 | yes Evaluation Count:49453 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:49453 |
never executed: return result; executed: } Execution Count:49453 | 0-49453 |
418 | | - |
419 | | - |
420 | | - |
421 | | - |
422 | | - |
423 | (void)d;; | - |
424 | | - |
425 | | - |
426 | if (maxSize != qint64(int(maxSize))) { partially evaluated: maxSize != qint64(int(maxSize)) no Evaluation Count:0 | yes Evaluation Count:49453 |
| 0-49453 |
427 | QMessageLogger("io/qiodevice.cpp", 957, __PRETTY_FUNCTION__).warning("QIODevice::read: maxSize argument exceeds QByteArray size limit"); | - |
428 | maxSize = 2147483647; | - |
429 | } | 0 |
430 | | - |
431 | qint64 readBytes = 0; | - |
432 | if (maxSize) { evaluated: maxSize yes Evaluation Count:49452 | yes Evaluation Count:1 |
| 1-49452 |
433 | result.resize(int(maxSize)); | - |
434 | if (!result.size()) { partially evaluated: !result.size() no Evaluation Count:0 | yes Evaluation Count:49452 |
| 0-49452 |
435 | | - |
436 | qint64 readResult; | - |
437 | do { | - |
438 | result.resize(int(qMin(maxSize, result.size() + static_cast<long long>(16384LL)))); | - |
439 | readResult = read(result.data() + readBytes, result.size() - readBytes); | - |
440 | if (readResult > 0 || readBytes == 0) never evaluated: readResult > 0 never evaluated: readBytes == 0 | 0 |
441 | readBytes += readResult; never executed: readBytes += readResult; | 0 |
442 | } while (readResult == static_cast<long long>(16384LL)); never evaluated: readResult == static_cast<long long>(16384LL) | 0 |
443 | } else { | 0 |
444 | readBytes = read(result.data(), result.size()); | - |
445 | } executed: } Execution Count:49452 | 49452 |
446 | } | - |
447 | | - |
448 | if (readBytes <= 0) evaluated: readBytes <= 0 yes Evaluation Count:93 | yes Evaluation Count:49360 |
| 93-49360 |
449 | result.clear(); executed: result.clear(); Execution Count:93 | 93 |
450 | else | - |
451 | result.resize(int(readBytes)); executed: result.resize(int(readBytes)); Execution Count:49360 | 49360 |
452 | | - |
453 | return result; executed: return result; Execution Count:49453 | 49453 |
454 | } | - |
455 | QByteArray QIODevice::readAll() | - |
456 | { | - |
457 | QIODevicePrivate * const d = d_func(); | - |
458 | | - |
459 | | - |
460 | | - |
461 | | - |
462 | | - |
463 | QByteArray result; | - |
464 | qint64 readBytes = 0; | - |
465 | | - |
466 | | - |
467 | if (!(d->openMode & Text) && !d->buffer.isEmpty()) { evaluated: !(d->openMode & Text) yes Evaluation Count:9423 | yes Evaluation Count:599 |
evaluated: !d->buffer.isEmpty() yes Evaluation Count:1557 | yes Evaluation Count:7866 |
| 599-9423 |
468 | result = d->buffer.readAll(); | - |
469 | readBytes = result.size(); | - |
470 | d->pos += readBytes; | - |
471 | } executed: } Execution Count:1557 | 1557 |
472 | | - |
473 | qint64 theSize; | - |
474 | if (d->isSequential() || (theSize = size()) == 0) { evaluated: d->isSequential() yes Evaluation Count:3726 | yes Evaluation Count:6296 |
evaluated: (theSize = size()) == 0 yes Evaluation Count:18 | yes Evaluation Count:6278 |
| 18-6296 |
475 | | - |
476 | qint64 readResult; | - |
477 | do { | - |
478 | result.resize(result.size() + static_cast<long long>(16384LL)); | - |
479 | readResult = read(result.data() + readBytes, result.size() - readBytes); | - |
480 | if (readResult > 0 || readBytes == 0) evaluated: readResult > 0 yes Evaluation Count:1740 | yes Evaluation Count:3744 |
evaluated: readBytes == 0 yes Evaluation Count:958 | yes Evaluation Count:2786 |
| 958-3744 |
481 | readBytes += readResult; executed: readBytes += readResult; Execution Count:2698 | 2698 |
482 | } while (readResult > 0); evaluated: readResult > 0 yes Evaluation Count:1740 | yes Evaluation Count:3744 |
executed: } Execution Count:5484 | 1740-5484 |
483 | } else { executed: } Execution Count:3744 | 3744 |
484 | | - |
485 | | - |
486 | result.resize(int(readBytes + theSize - d->pos)); | - |
487 | readBytes += read(result.data() + readBytes, result.size() - readBytes); | - |
488 | } executed: } Execution Count:6278 | 6278 |
489 | | - |
490 | if (readBytes <= 0) evaluated: readBytes <= 0 yes Evaluation Count:2167 | yes Evaluation Count:7855 |
| 2167-7855 |
491 | result.clear(); executed: result.clear(); Execution Count:2167 | 2167 |
492 | else | - |
493 | result.resize(int(readBytes)); executed: result.resize(int(readBytes)); Execution Count:7855 | 7855 |
494 | | - |
495 | return result; executed: return result; Execution Count:10022 | 10022 |
496 | } | - |
497 | qint64 QIODevice::readLine(char *data, qint64 maxSize) | - |
498 | { | - |
499 | QIODevicePrivate * const d = d_func(); | - |
500 | if (maxSize < 2) { evaluated: maxSize < 2 yes Evaluation Count:5 | yes Evaluation Count:77493 |
| 5-77493 |
501 | QMessageLogger("io/qiodevice.cpp", 1085, __PRETTY_FUNCTION__).warning("QIODevice::readLine: Called with maxSize < 2"); | - |
502 | return qint64(-1); executed: return qint64(-1); Execution Count:5 | 5 |
503 | } | - |
504 | | - |
505 | | - |
506 | | - |
507 | | - |
508 | | - |
509 | | - |
510 | | - |
511 | --maxSize; | - |
512 | | - |
513 | const bool sequential = d->isSequential(); | - |
514 | | - |
515 | qint64 readSoFar = 0; | - |
516 | if (!d->buffer.isEmpty()) { evaluated: !d->buffer.isEmpty() yes Evaluation Count:77057 | yes Evaluation Count:436 |
| 436-77057 |
517 | readSoFar = d->buffer.readLine(data, maxSize); | - |
518 | if (d->buffer.isEmpty()) evaluated: d->buffer.isEmpty() yes Evaluation Count:1233 | yes Evaluation Count:75824 |
| 1233-75824 |
519 | readData(data,0); executed: readData(data,0); Execution Count:1233 | 1233 |
520 | if (!sequential) evaluated: !sequential yes Evaluation Count:75882 | yes Evaluation Count:1175 |
| 1175-75882 |
521 | d->pos += readSoFar; executed: d->pos += readSoFar; Execution Count:75882 | 75882 |
522 | | - |
523 | | - |
524 | | - |
525 | | - |
526 | | - |
527 | | - |
528 | if (readSoFar && data[readSoFar - 1] == '\n') { partially evaluated: readSoFar yes Evaluation Count:77057 | no Evaluation Count:0 |
evaluated: data[readSoFar - 1] == '\n' yes Evaluation Count:76407 | yes Evaluation Count:650 |
| 0-77057 |
529 | if (d->openMode & Text) { evaluated: d->openMode & Text yes Evaluation Count:163 | yes Evaluation Count:76244 |
| 163-76244 |
530 | | - |
531 | if (readSoFar > 1 && data[readSoFar - 2] == '\r') { partially evaluated: readSoFar > 1 yes Evaluation Count:163 | no Evaluation Count:0 |
evaluated: data[readSoFar - 2] == '\r' yes Evaluation Count:161 | yes Evaluation Count:2 |
| 0-163 |
532 | --readSoFar; | - |
533 | data[readSoFar - 1] = '\n'; | - |
534 | } executed: } Execution Count:161 | 161 |
535 | } executed: } Execution Count:163 | 163 |
536 | data[readSoFar] = '\0'; | - |
537 | return readSoFar; executed: return readSoFar; Execution Count:76407 | 76407 |
538 | } | - |
539 | } executed: } Execution Count:650 | 650 |
540 | | - |
541 | if (d->pos != d->devicePos && !sequential && !seek(d->pos)) evaluated: d->pos != d->devicePos yes Evaluation Count:65 | yes Evaluation Count:1021 |
evaluated: !sequential yes Evaluation Count:64 | yes Evaluation Count:1 |
partially evaluated: !seek(d->pos) no Evaluation Count:0 | yes Evaluation Count:64 |
| 0-1021 |
542 | return qint64(-1); never executed: return qint64(-1); | 0 |
543 | d->baseReadLineDataCalled = false; | - |
544 | qint64 readBytes = readLineData(data + readSoFar, maxSize - readSoFar); | - |
545 | | - |
546 | | - |
547 | | - |
548 | | - |
549 | | - |
550 | | - |
551 | | - |
552 | if (readBytes < 0) { evaluated: readBytes < 0 yes Evaluation Count:355 | yes Evaluation Count:731 |
| 355-731 |
553 | data[readSoFar] = '\0'; | - |
554 | return readSoFar ? readSoFar : -1; executed: return readSoFar ? readSoFar : -1; Execution Count:355 | 355 |
555 | } | - |
556 | readSoFar += readBytes; | - |
557 | if (!d->baseReadLineDataCalled && !sequential) { partially evaluated: !d->baseReadLineDataCalled no Evaluation Count:0 | yes Evaluation Count:731 |
never evaluated: !sequential | 0-731 |
558 | d->pos += readBytes; | - |
559 | | - |
560 | | - |
561 | d->devicePos = qint64(-1); | - |
562 | } | 0 |
563 | data[readSoFar] = '\0'; | - |
564 | | - |
565 | if (d->openMode & Text) { evaluated: d->openMode & Text yes Evaluation Count:178 | yes Evaluation Count:553 |
| 178-553 |
566 | if (readSoFar > 1 && data[readSoFar - 1] == '\n' && data[readSoFar - 2] == '\r') { partially evaluated: readSoFar > 1 yes Evaluation Count:178 | no Evaluation Count:0 |
evaluated: data[readSoFar - 1] == '\n' yes Evaluation Count:146 | yes Evaluation Count:32 |
partially evaluated: data[readSoFar - 2] == '\r' no Evaluation Count:0 | yes Evaluation Count:146 |
| 0-178 |
567 | data[readSoFar - 2] = '\n'; | - |
568 | data[readSoFar - 1] = '\0'; | - |
569 | --readSoFar; | - |
570 | } | 0 |
571 | } executed: } Execution Count:178 | 178 |
572 | | - |
573 | | - |
574 | | - |
575 | | - |
576 | | - |
577 | | - |
578 | return readSoFar; executed: return readSoFar; Execution Count:731 | 731 |
579 | } | - |
580 | QByteArray QIODevice::readLine(qint64 maxSize) | - |
581 | { | - |
582 | QIODevicePrivate * const d = d_func(); | - |
583 | QByteArray result; | - |
584 | | - |
585 | do { if (maxSize < 0) { QMessageLogger("io/qiodevice.cpp", 1180, __PRETTY_FUNCTION__).warning("QIODevice::""readLine"": Called with maxSize < 0"); return result; } } while (0); partially evaluated: maxSize < 0 no Evaluation Count:0 | yes Evaluation Count:21432 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:21432 |
never executed: return result; executed: } Execution Count:21432 | 0-21432 |
586 | | - |
587 | | - |
588 | | - |
589 | | - |
590 | | - |
591 | (void)d;; | - |
592 | | - |
593 | | - |
594 | if (maxSize > 2147483647) { partially evaluated: maxSize > 2147483647 no Evaluation Count:0 | yes Evaluation Count:21432 |
| 0-21432 |
595 | QMessageLogger("io/qiodevice.cpp", 1190, __PRETTY_FUNCTION__).warning("QIODevice::read: maxSize argument exceeds QByteArray size limit"); | - |
596 | maxSize = 2147483647; | - |
597 | } | 0 |
598 | | - |
599 | result.resize(int(maxSize)); | - |
600 | qint64 readBytes = 0; | - |
601 | if (!result.size()) { evaluated: !result.size() yes Evaluation Count:21423 | yes Evaluation Count:9 |
| 9-21423 |
602 | | - |
603 | if (maxSize == 0) partially evaluated: maxSize == 0 yes Evaluation Count:21423 | no Evaluation Count:0 |
| 0-21423 |
604 | maxSize = 2147483647; executed: maxSize = 2147483647; Execution Count:21423 | 21423 |
605 | | - |
606 | | - |
607 | result.resize(1); | - |
608 | | - |
609 | qint64 readResult; | - |
610 | do { | - |
611 | result.resize(int(qMin(maxSize, result.size() + static_cast<long long>(16384LL)))); | - |
612 | readResult = readLine(result.data() + readBytes, result.size() - readBytes); | - |
613 | if (readResult > 0 || readBytes == 0) evaluated: readResult > 0 yes Evaluation Count:21406 | yes Evaluation Count:85 |
partially evaluated: readBytes == 0 yes Evaluation Count:85 | no Evaluation Count:0 |
| 0-21406 |
614 | readBytes += readResult; executed: readBytes += readResult; Execution Count:21491 | 21491 |
615 | } while (readResult == static_cast<long long>(16384LL) executed: } Execution Count:21491 evaluated: readResult == static_cast<long long>(16384LL) yes Evaluation Count:76 | yes Evaluation Count:21415 |
| 76-21491 |
616 | && result[int(readBytes - 1)] != '\n'); evaluated: result[int(readBytes - 1)] != '\n' yes Evaluation Count:68 | yes Evaluation Count:8 |
| 8-68 |
617 | } else executed: } Execution Count:21423 | 21423 |
618 | readBytes = readLine(result.data(), result.size()); executed: readBytes = readLine(result.data(), result.size()); Execution Count:9 | 9 |
619 | | - |
620 | if (readBytes <= 0) evaluated: readBytes <= 0 yes Evaluation Count:85 | yes Evaluation Count:21347 |
| 85-21347 |
621 | result.clear(); executed: result.clear(); Execution Count:85 | 85 |
622 | else | - |
623 | result.resize(readBytes); executed: result.resize(readBytes); Execution Count:21347 | 21347 |
624 | | - |
625 | return result; executed: return result; Execution Count:21432 | 21432 |
626 | } | - |
627 | qint64 QIODevice::readLineData(char *data, qint64 maxSize) | - |
628 | { | - |
629 | QIODevicePrivate * const d = d_func(); | - |
630 | qint64 readSoFar = 0; | - |
631 | char c; | - |
632 | int lastReadReturn = 0; | - |
633 | d->baseReadLineDataCalled = true; | - |
634 | | - |
635 | while (readSoFar < maxSize && (lastReadReturn = read(&c, 1)) == 1) { evaluated: readSoFar < maxSize yes Evaluation Count:837125 | yes Evaluation Count:87 |
evaluated: (lastReadReturn = read(&c, 1)) == 1 yes Evaluation Count:836792 | yes Evaluation Count:333 |
| 87-837125 |
636 | *data++ = c; | - |
637 | ++readSoFar; | - |
638 | if (c == '\n') evaluated: c == '\n' yes Evaluation Count:658 | yes Evaluation Count:836134 |
| 658-836134 |
639 | break; executed: break; Execution Count:658 | 658 |
640 | } executed: } Execution Count:836134 | 836134 |
641 | | - |
642 | | - |
643 | | - |
644 | | - |
645 | | - |
646 | if (lastReadReturn != 1 && readSoFar == 0) evaluated: lastReadReturn != 1 yes Evaluation Count:350 | yes Evaluation Count:728 |
evaluated: readSoFar == 0 yes Evaluation Count:349 | yes Evaluation Count:1 |
| 1-728 |
647 | return isSequential() ? lastReadReturn : -1; executed: return isSequential() ? lastReadReturn : -1; Execution Count:349 | 349 |
648 | return readSoFar; executed: return readSoFar; Execution Count:729 | 729 |
649 | } | - |
650 | bool QIODevice::canReadLine() const | - |
651 | { | - |
652 | return d_func()->buffer.canReadLine(); executed: return d_func()->buffer.canReadLine(); Execution Count:596 | 596 |
653 | } | - |
654 | qint64 QIODevice::write(const char *data, qint64 maxSize) | - |
655 | { | - |
656 | QIODevicePrivate * const d = d_func(); | - |
657 | do { if ((d->openMode & WriteOnly) == 0) { if (d->openMode == NotOpen) return qint64(-1); QMessageLogger("io/qiodevice.cpp", 1300, __PRETTY_FUNCTION__).warning("QIODevice::""write"": ReadOnly device"); return qint64(-1); } } while (0); executed: return qint64(-1); Execution Count:2 executed: return qint64(-1); Execution Count:1 executed: } Execution Count:1551836 evaluated: (d->openMode & WriteOnly) == 0 yes Evaluation Count:3 | yes Evaluation Count:1551836 |
evaluated: d->openMode == NotOpen yes Evaluation Count:2 | yes Evaluation Count:1 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:1551836 |
| 0-1551836 |
658 | do { if (maxSize < 0) { QMessageLogger("io/qiodevice.cpp", 1301, __PRETTY_FUNCTION__).warning("QIODevice::""write"": Called with maxSize < 0"); return qint64(-1); } } while (0); never executed: return qint64(-1); executed: } Execution Count:1551836 partially evaluated: maxSize < 0 no Evaluation Count:0 | yes Evaluation Count:1551836 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:1551836 |
| 0-1551836 |
659 | | - |
660 | const bool sequential = d->isSequential(); | - |
661 | | - |
662 | if (d->pos != d->devicePos && !sequential && !seek(d->pos)) evaluated: d->pos != d->devicePos yes Evaluation Count:12038 | yes Evaluation Count:1539798 |
evaluated: !sequential yes Evaluation Count:46 | yes Evaluation Count:11992 |
partially evaluated: !seek(d->pos) no Evaluation Count:0 | yes Evaluation Count:46 |
| 0-1539798 |
663 | return qint64(-1); never executed: return qint64(-1); | 0 |
664 | qint64 written = writeData(data, maxSize); | - |
665 | if (written > 0) { evaluated: written > 0 yes Evaluation Count:1549661 | yes Evaluation Count:2175 |
| 2175-1549661 |
666 | if (!sequential) { evaluated: !sequential yes Evaluation Count:270908 | yes Evaluation Count:1278753 |
| 270908-1278753 |
667 | d->pos += written; | - |
668 | d->devicePos += written; | - |
669 | } executed: } Execution Count:270908 | 270908 |
670 | if (!d->buffer.isEmpty() && !sequential) evaluated: !d->buffer.isEmpty() yes Evaluation Count:14 | yes Evaluation Count:1549647 |
evaluated: !sequential yes Evaluation Count:2 | yes Evaluation Count:12 |
| 2-1549647 |
671 | d->buffer.skip(written); executed: d->buffer.skip(written); Execution Count:2 | 2 |
672 | } executed: } Execution Count:1549661 | 1549661 |
673 | return written; executed: return written; Execution Count:1551836 | 1551836 |
674 | } | - |
675 | qint64 QIODevice::write(const char *data) | - |
676 | { | - |
677 | return write(data, qstrlen(data)); executed: return write(data, qstrlen(data)); Execution Count:2913 | 2913 |
678 | } | - |
679 | void QIODevice::ungetChar(char c) | - |
680 | { | - |
681 | QIODevicePrivate * const d = d_func(); | - |
682 | do { if ((d->openMode & ReadOnly) == 0) { if (d->openMode == NotOpen) return ; QMessageLogger("io/qiodevice.cpp", 1414, __PRETTY_FUNCTION__).warning("QIODevice::""read"": WriteOnly device"); return ; } } while (0); executed: } Execution Count:36147 partially evaluated: (d->openMode & ReadOnly) == 0 no Evaluation Count:0 | yes Evaluation Count:36147 |
never evaluated: d->openMode == NotOpen partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:36147 |
| 0-36147 |
683 | | - |
684 | | - |
685 | | - |
686 | | - |
687 | | - |
688 | d->buffer.ungetChar(c); | - |
689 | if (!d->isSequential()) evaluated: !d->isSequential() yes Evaluation Count:35697 | yes Evaluation Count:450 |
| 450-35697 |
690 | --d->pos; executed: --d->pos; Execution Count:35697 | 35697 |
691 | } executed: } Execution Count:36147 | 36147 |
692 | bool QIODevice::putChar(char c) | - |
693 | { | - |
694 | return d_func()->putCharHelper(c); executed: return d_func()->putCharHelper(c); Execution Count:18513 | 18513 |
695 | } | - |
696 | | - |
697 | | - |
698 | | - |
699 | | - |
700 | bool QIODevicePrivate::putCharHelper(char c) | - |
701 | { | - |
702 | return q_func()->write(&c, 1) == 1; executed: return q_func()->write(&c, 1) == 1; Execution Count:17209 | 17209 |
703 | } | - |
704 | | - |
705 | | - |
706 | | - |
707 | | - |
708 | qint64 QIODevicePrivate::peek(char *data, qint64 maxSize) | - |
709 | { | - |
710 | qint64 readBytes = q_func()->read(data, maxSize); | - |
711 | if (readBytes <= 0) evaluated: readBytes <= 0 yes Evaluation Count:544 | yes Evaluation Count:4277 |
| 544-4277 |
712 | return readBytes; executed: return readBytes; Execution Count:544 | 544 |
713 | | - |
714 | buffer.ungetBlock(data, readBytes); | - |
715 | *pPos -= readBytes; | - |
716 | return readBytes; executed: return readBytes; Execution Count:4277 | 4277 |
717 | } | - |
718 | | - |
719 | | - |
720 | | - |
721 | | - |
722 | QByteArray QIODevicePrivate::peek(qint64 maxSize) | - |
723 | { | - |
724 | QByteArray result = q_func()->read(maxSize); | - |
725 | | - |
726 | if (result.isEmpty()) evaluated: result.isEmpty() yes Evaluation Count:7 | yes Evaluation Count:523 |
| 7-523 |
727 | return result; executed: return result; Execution Count:7 | 7 |
728 | | - |
729 | buffer.ungetBlock(result.constData(), result.size()); | - |
730 | *pPos -= result.size(); | - |
731 | return result; executed: return result; Execution Count:523 | 523 |
732 | } | - |
733 | bool QIODevice::getChar(char *c) | - |
734 | { | - |
735 | | - |
736 | char ch; | - |
737 | return (1 == read(c ? c : &ch, 1)); executed: return (1 == read(c ? c : &ch, 1)); Execution Count:1466148 | 1466148 |
738 | } | - |
739 | qint64 QIODevice::peek(char *data, qint64 maxSize) | - |
740 | { | - |
741 | return d_func()->peek(data, maxSize); executed: return d_func()->peek(data, maxSize); Execution Count:6269 | 6269 |
742 | } | - |
743 | QByteArray QIODevice::peek(qint64 maxSize) | - |
744 | { | - |
745 | return d_func()->peek(maxSize); executed: return d_func()->peek(maxSize); Execution Count:714 | 714 |
746 | } | - |
747 | bool QIODevice::waitForReadyRead(int msecs) | - |
748 | { | - |
749 | (void)msecs;; | - |
750 | return false; executed: return false; Execution Count:325 | 325 |
751 | } | - |
752 | bool QIODevice::waitForBytesWritten(int msecs) | - |
753 | { | - |
754 | (void)msecs;; | - |
755 | return false; never executed: return false; | 0 |
756 | } | - |
757 | | - |
758 | | - |
759 | | - |
760 | | - |
761 | | - |
762 | | - |
763 | | - |
764 | void QIODevice::setErrorString(const QString &str) | - |
765 | { | - |
766 | d_func()->errorString = str; | - |
767 | } executed: } Execution Count:1677 | 1677 |
768 | | - |
769 | | - |
770 | | - |
771 | | - |
772 | | - |
773 | | - |
774 | | - |
775 | QString QIODevice::errorString() const | - |
776 | { | - |
777 | const QIODevicePrivate * const d = d_func(); | - |
778 | if (d->errorString.isEmpty()) { evaluated: d->errorString.isEmpty() yes Evaluation Count:3053 | yes Evaluation Count:388 |
| 388-3053 |
779 | | - |
780 | | - |
781 | | - |
782 | return tr("Unknown error"); executed: return tr("Unknown error"); Execution Count:3053 | 3053 |
783 | | - |
784 | } | - |
785 | return d->errorString; executed: return d->errorString; Execution Count:388 | 388 |
786 | } | - |
787 | QDebug operator<<(QDebug debug, QIODevice::OpenMode modes) | - |
788 | { | - |
789 | debug << "OpenMode("; | - |
790 | QStringList modeList; | - |
791 | if (modes == QIODevice::NotOpen) { never evaluated: modes == QIODevice::NotOpen | 0 |
792 | modeList << QLatin1String("NotOpen"); | - |
793 | } else { | 0 |
794 | if (modes & QIODevice::ReadOnly) never evaluated: modes & QIODevice::ReadOnly | 0 |
795 | modeList << QLatin1String("ReadOnly"); never executed: modeList << QLatin1String("ReadOnly"); | 0 |
796 | if (modes & QIODevice::WriteOnly) never evaluated: modes & QIODevice::WriteOnly | 0 |
797 | modeList << QLatin1String("WriteOnly"); never executed: modeList << QLatin1String("WriteOnly"); | 0 |
798 | if (modes & QIODevice::Append) never evaluated: modes & QIODevice::Append | 0 |
799 | modeList << QLatin1String("Append"); never executed: modeList << QLatin1String("Append"); | 0 |
800 | if (modes & QIODevice::Truncate) never evaluated: modes & QIODevice::Truncate | 0 |
801 | modeList << QLatin1String("Truncate"); never executed: modeList << QLatin1String("Truncate"); | 0 |
802 | if (modes & QIODevice::Text) never evaluated: modes & QIODevice::Text | 0 |
803 | modeList << QLatin1String("Text"); never executed: modeList << QLatin1String("Text"); | 0 |
804 | if (modes & QIODevice::Unbuffered) never evaluated: modes & QIODevice::Unbuffered | 0 |
805 | modeList << QLatin1String("Unbuffered"); never executed: modeList << QLatin1String("Unbuffered"); | 0 |
806 | } | 0 |
807 | qSort(modeList); | - |
808 | debug << modeList.join(QLatin1Char('|')); | - |
809 | debug << ')'; | - |
810 | return debug; never executed: return debug; | 0 |
811 | } | - |
812 | | - |
813 | | - |
814 | | - |
815 | | - |
| | |