The QLocalSocket class is emitting a readyRead signal after writing to the socket. The amount read by readAll() is equal to the amount of data written, however, the data read is invalid. This appears to occur when a QLocalSocket connects to a server using connectToServer(QString) and then writes to stream.
This is confirmed working correctly in 4.8.2, and not working in 5.0beta1.
Attached is a simple program that demonstrates the issue.