void Connection::readSocket() { QByteArray block = conection->readAll(); QDataStream in(&block, QIODevice::ReadOnly); in.setVersion(QDataStream::Qt_5_0); while (!in.atEnd()) { QByteArray p; in >> p; QJsonDocument j_doc = QJsonDocument::fromJson(p); qDebug() << j_doc.toJson(QJsonDocument::Compact); emit ReadReady(j_doc.object()); } }
void MockSinkWithSignal::HandleData(const QByteArray& data, ISender *from) { MockSink::HandleData(data, from); emit ReadReady(this); }