title: Empty buffer when reading from a QTcpSocket
body: <p>I am creating a simple threaded TCP server (based on the threaded Fortune server example).  I have connected the readyRead signal to my readCommand slot, and I confirmed that the readCommand function fires after I've telnetted to my server and sent a string (followed by enter).</p>
  
  <p>The function below outputs "In readCommand" once I send the string HELLO, then the output "new inBuffer" always shows empty ("").  </p>
  
  <pre><code>void FortuneThread::readCommand()
  {
      qDebug() &lt;&lt; "in readCommand" &lt;&lt; endl;
      QDataStream in(tcpSocketPtr);
      in.setVersion(QDataStream::Qt_4_0);
      in &gt;&gt; inBuffer;
      qDebug() &lt;&lt; "new inBuffer: " &lt;&lt; inBuffer &lt;&lt; endl;
      ...
  }
  </code></pre>
  
  <p>If I print out tcpSocket->bytesAvailable(), then I see a growing count of characters as I send more via telnet.  I'm just not getting them out of the socket...the code above is copied from the Fortune Client example so I assumed it would work. Am I using QDataStream wrong?</p>