You should check for errors, because it can happen that the method will return immediately on error.
From QtDoc:
bool QIODevice::waitForReadyRead(int msecs) [virtual]
Blocks until new data is available for reading and the readyRead() signal has been emitted, or until msecs milliseconds have passed. If msecs is -1, this function will not time out.
Returns true if new data is available for reading; otherwise returns false (if the operation timed out or if an error occurred).