added apply for parsing a stream from a QIODevice