Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/plugins/qmltooling/packetprotocol/qpacket.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | QPacket::QPacket(int version) | - |
4 | { | - |
5 | buf.open(QIODevice::WriteOnly); | - |
6 | setDevice(&buf); | - |
7 | setVersion(version); | - |
8 | } executed 16167 times by 12 tests: end of block Executed by:
| 16167 |
9 | - | |
10 | - | |
11 | - | |
12 | - | |
13 | QPacket::QPacket(int version, const QByteArray &data) | - |
14 | { | - |
15 | buf.setData(data); | - |
16 | buf.open(QIODevice::ReadOnly); | - |
17 | setDevice(&buf); | - |
18 | setVersion(version); | - |
19 | } executed 12797 times by 12 tests: end of block Executed by:
| 12797 |
20 | - | |
21 | - | |
22 | - | |
23 | - | |
24 | const QByteArray &QPacket::data() const | - |
25 | { | - |
26 | return executed 8771 times by 12 tests: buf.data();return buf.data(); Executed by:
executed 8771 times by 12 tests: return buf.data(); Executed by:
| 8771 |
27 | } | - |
28 | - | |
29 | - | |
30 | - | |
31 | - | |
32 | - | |
33 | QByteArray QPacket::squeezedData() const | - |
34 | { | - |
35 | QByteArray ret = buf.data(); | - |
36 | ret.squeeze(); | - |
37 | return executed 312 times by 1 test: ret;return ret; Executed by:
executed 312 times by 1 test: return ret; Executed by:
| 312 |
38 | } | - |
39 | - | |
40 | - | |
41 | - | |
42 | - | |
43 | void QPacket::clear() | - |
44 | { | - |
45 | buf.reset(); | - |
46 | QByteArray &buffer = buf.buffer(); | - |
47 | - | |
48 | buffer.reserve(buffer.capacity()); | - |
49 | buffer.truncate(0); | - |
50 | } executed 312 times by 1 test: end of block Executed by:
| 312 |
51 | - | |
52 | - | |
Switch to Source code | Preprocessed file |