OpenCoverage

qpacketprotocol.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QPacketProtocolPrivate : public QObjectPrivate-
6{-
7 inline QPacketProtocol* q_func() { return static_cast<QPacketProtocol *>(q_ptr); } inline const QPacketProtocol* q_func() const { return static_cast<const QPacketProtocol *>(q_ptr); } friend class QPacketProtocol;-
8public:-
9 QPacketProtocolPrivate(QIODevice *dev);-
10-
11 bool writeToDevice(const char *bytes, qint64 size);-
12 bool readFromDevice(char *buffer, qint64 size);-
13-
14 QList<qint32> sendingPackets;-
15 QList<QByteArray> packets;-
16 QByteArray inProgress;-
17 qint32 inProgressSize;-
18 bool waitingForPacket;-
19 QIODevice *dev;-
20};-
21-
22-
23-
24-
25-
26QPacketProtocol::QPacketProtocol(QIODevice *dev, QObject *parent)-
27 : QObject(*(new QPacketProtocolPrivate(dev)), parent)-
28{-
29 ((4 == sizeof(qint32)) ? static_cast<void>(0) : qt_assert("4 == sizeof(qint32)", __FILE__, 127));-
30 ((dev) ? static_cast<void>(0) : qt_assert("dev", __FILE__, 128));-
31-
32 QObject::connect(dev, &QIODevice::readyRead, this, &QPacketProtocol::readyToRead);-
33 QObject::connect(dev, &QIODevice::aboutToClose, this, &QPacketProtocol::aboutToClose);-
34 QObject::connect(dev, &QIODevice::bytesWritten, this, &QPacketProtocol::bytesWritten);-
35}
executed 601 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
601
36-
37-
38-
39-
40-
41-
42void QPacketProtocol::send(const QByteArray &data)-
43{-
44 QPacketProtocolPrivate * const d = d_func();-
45 static const qint32 maxSize = std::numeric_limits<qint32>::max() - sizeof(qint32);-
46-
47 if (data.isEmpty()
data.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 6289 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
)
0-6289
48 return;
never executed: return;
0
49-
50 if (data.size() > maxSize
data.size() > maxSizeDescription
TRUEnever evaluated
FALSEevaluated 6289 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
0-6289
51 error();-
52 return;
never executed: return;
0
53 }-
54-
55 const qint32 sendSize = data.size() + static_cast<qint32>(sizeof(qint32));-
56 d->sendingPackets.append(sendSize);-
57-
58 qint32 sendSizeLE = qToLittleEndian(sendSize);-
59 if (!d->writeToDevice((const char *)&sendSizeLE, sizeof(qint32))
!d->writeToDev...izeof(qint32))Description
TRUEnever evaluated
FALSEevaluated 6289 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
0-6289
60 || !d->writeToDevice(data.data(), data.size())
!d->writeToDev..., data.size())Description
TRUEnever evaluated
FALSEevaluated 6289 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
0-6289
61 error();-
62 }
never executed: end of block
0
63}
executed 6289 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
6289
64-
65-
66-
67-
68qint64 QPacketProtocol::packetsAvailable() const-
69{-
70 const QPacketProtocolPrivate * const d = d_func();-
71 return
executed 15350 times by 12 tests: return d->packets.count();
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
d->packets.count();
executed 15350 times by 12 tests: return d->packets.count();
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
15350
72}-
73-
74-
75-
76-
77-
78QByteArray QPacketProtocol::read()-
79{-
80 QPacketProtocolPrivate * const d = d_func();-
81 return
executed 8660 times by 12 tests: return d->packets.isEmpty() ? QByteArray() : d->packets.takeFirst();
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
d->packets.isEmpty() ? QByteArray() : d->packets.takeFirst();
executed 8660 times by 12 tests: return d->packets.isEmpty() ? QByteArray() : d->packets.takeFirst();
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
8660
82}-
83bool QPacketProtocol::waitForReadyRead(int msecs)-
84{-
85 QPacketProtocolPrivate * const d = d_func();-
86 if (!d->packets.isEmpty()
!d->packets.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlprofilerservice
)
0-22
87 return
never executed: return true;
true;
never executed: return true;
0
88-
89 QElapsedTimer stopWatch;-
90 stopWatch.start();-
91-
92 d->waitingForPacket = true;-
93 do {-
94 if (!d->dev->waitForReadyRead(msecs)
!d->dev->waitF...adyRead(msecs)Description
TRUEnever evaluated
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlprofilerservice
)
0-22
95 return
never executed: return false;
false;
never executed: return false;
0
96 if (!d->waitingForPacket
!d->waitingForPacketDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlprofilerservice
FALSEnever evaluated
)
0-22
97 return
executed 22 times by 2 tests: return true;
Executed by:
  • tst_qqmldebugjs
  • tst_qqmlprofilerservice
true;
executed 22 times by 2 tests: return true;
Executed by:
  • tst_qqmldebugjs
  • tst_qqmlprofilerservice
22
98 msecs = qt_subtract_from_timeout(msecs, stopWatch.elapsed());-
99 }
never executed: end of block
while (true);
0
100}
never executed: end of block
0
101-
102-
103-
104-
105void QPacketProtocol::aboutToClose()-
106{-
107 QPacketProtocolPrivate * const d = d_func();-
108 d->inProgress.clear();-
109 d->sendingPackets.clear();-
110 d->inProgressSize = -1;-
111}
executed 566 times by 11 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
566
112-
113void QPacketProtocol::bytesWritten(qint64 bytes)-
114{-
115 QPacketProtocolPrivate * const d = d_func();-
116 ((!d->sendingPackets.isEmpty()) ? static_cast<void>(0) : qt_assert("!d->sendingPackets.isEmpty()", __FILE__, 226));-
117-
118 while (bytes
bytesDescription
TRUEevaluated 6289 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 6267 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
6267-6289
119 if (d->sendingPackets.at(0) > bytes
d->sendingPack....at(0) > bytesDescription
TRUEnever evaluated
FALSEevaluated 6289 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
0-6289
120 d->sendingPackets[0] -= bytes;-
121 bytes = 0;-
122 }
never executed: end of block
else {
0
123 bytes -= d->sendingPackets.at(0);-
124 d->sendingPackets.removeFirst();-
125 }
executed 6289 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
6289
126 }-
127}
executed 6267 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
6267
128-
129void QPacketProtocol::readyToRead()-
130{-
131 QPacketProtocolPrivate * const d = d_func();-
132 while (true) {-
133-
134 if (-
-1 == d->inProgressSizeDescription
TRUEevaluated 13118 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
1 == d->inProgressSize
-1 == d->inProgressSizeDescription
TRUEevaluated 13118 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
8682-13118
135-
136 if (static_cast<
static_cast<qi...tesAvailable()Description
TRUEevaluated 4436 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
qint64>(sizeof(qint32)) > d->dev->bytesAvailable()
static_cast<qi...tesAvailable()Description
TRUEevaluated 4436 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
)
4436-8682
137 return;
executed 4436 times by 12 tests: return;
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
4436
138-
139-
140 qint32 inProgressSizeLE;-
141 if (!d->readFromDevice((char *)&inProgressSizeLE, sizeof(qint32))
!d->readFromDe...izeof(qint32))Description
TRUEnever evaluated
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
0-8682
142 error();-
143 return;
never executed: return;
0
144 }-
145 d->inProgressSize = qFromLittleEndian(inProgressSizeLE);-
146-
147-
148 if (d->inProgressSize < qint32(sizeof(qint32))
d->inProgressS...izeof(qint32))Description
TRUEnever evaluated
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
0-8682
149 disconnect(d->dev, &QIODevice::readyRead, this, &QPacketProtocol::readyToRead);-
150 disconnect(d->dev, &QIODevice::aboutToClose, this, &QPacketProtocol::aboutToClose);-
151 disconnect(d->dev, &QIODevice::bytesWritten, this, &QPacketProtocol::bytesWritten);-
152 d->dev = nullptr;-
153 error();-
154 return;
never executed: return;
0
155 }-
156-
157 d->inProgressSize -= sizeof(qint32);-
158 }
executed 8682 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
else {
8682
159-
160 const int bytesToRead = static_cast<int>(-
161 qMin(d->dev->bytesAvailable(),-
162 static_cast<qint64>(d->inProgressSize - d->inProgress.size())));-
163-
164 QByteArray toRead(bytesToRead, Qt::Uninitialized);-
165 if (!d->readFromDevice(toRead.data(), toRead.length())
!d->readFromDe...Read.length())Description
TRUEnever evaluated
FALSEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
0-8682
166 error();-
167 return;
never executed: return;
0
168 }-
169-
170 d->inProgress.append(toRead);-
171 if (d->inProgressSize == d->inProgress.size()
d->inProgressS...rogress.size()Description
TRUEevaluated 8682 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEnever evaluated
) {
0-8682
172-
173 d->packets.append(d->inProgress);-
174 d->inProgressSize = -1;-
175 d->inProgress.clear();-
176-
177 d->waitingForPacket = false;-
178 readyRead();-
179 }
executed 8682 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
else
8682
180 return;
never executed: return;
0
181 }-
182 }-
183}
never executed: end of block
0
184-
185QPacketProtocolPrivate::QPacketProtocolPrivate(QIODevice *dev) :-
186 inProgressSize(-1), waitingForPacket(false), dev(dev)-
187{-
188}
executed 601 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
601
189-
190bool QPacketProtocolPrivate::writeToDevice(const char *bytes, qint64 size)-
191{-
192 qint64 totalWritten = 0;-
193 while (totalWritten < size
totalWritten < sizeDescription
TRUEevaluated 12578 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 12578 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
12578
194 const qint64 chunkSize = dev->write(bytes + totalWritten, size - totalWritten);-
195 if (chunkSize < 0
chunkSize < 0Description
TRUEnever evaluated
FALSEevaluated 12578 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
)
0-12578
196 return
never executed: return false;
false;
never executed: return false;
0
197 totalWritten += chunkSize;-
198 }
executed 12578 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
12578
199 return
executed 12578 times by 12 tests: return totalWritten == size;
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
totalWritten == size;
executed 12578 times by 12 tests: return totalWritten == size;
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
12578
200}-
201-
202bool QPacketProtocolPrivate::readFromDevice(char *buffer, qint64 size)-
203{-
204 qint64 totalRead = 0;-
205 while (totalRead < size
totalRead < sizeDescription
TRUEevaluated 17364 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
FALSEevaluated 17364 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
) {
17364
206 const qint64 chunkSize = dev->read(buffer + totalRead, size - totalRead);-
207 if (chunkSize < 0
chunkSize < 0Description
TRUEnever evaluated
FALSEevaluated 17364 times by 12 tests
Evaluated by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
)
0-17364
208 return
never executed: return false;
false;
never executed: return false;
0
209 totalRead += chunkSize;-
210 }
executed 17364 times by 12 tests: end of block
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
17364
211 return
executed 17364 times by 12 tests: return totalRead == size;
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
totalRead == size;
executed 17364 times by 12 tests: return totalRead == size;
Executed by:
  • tst_qdebugmessageservice
  • tst_qpacketprotocol
  • tst_qqmldebugclient
  • tst_qqmldebuggingenabler
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginecontrol
  • tst_qqmlenginedebuginspectorintegration
  • tst_qqmlenginedebugservice
  • tst_qqmlinspector
  • tst_qqmlprofilerservice
17364
212}-
213-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0