MCPcopy Create free account
hub / github.com/KDAB/GammaRay / findAndSkipCString

Method findAndSkipCString

common/message.cpp:265–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void Message::findAndSkipCString(const char *marker, int from) const
266{
267 if (!marker)
268 return;
269
270 if (payload().status() == QDataStream::Ok) {
271 from = payload().device()->pos();
272 payload().device()->seek(from + qstrlen(marker));
273 return;
274 }
275
276 int f = m_buffer->data.data().indexOf(marker, from);
277 if (f != -1) {
278 int len = qstrlen(marker);
279 m_buffer->stream.device()->seek(f + len);
280 m_buffer->stream.resetStatus();
281 }
282}
283
284int Message::writeCStringMarker(const char *bytes, int len)
285{

Callers 1

newMessageMethod · 0.80

Calls 4

deviceMethod · 0.80
resetStatusMethod · 0.80
posMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected