Replaced QTcpSocket * with a QIODevice * to make network independent unit tests possible.