* Andrzej Ostruszka <andrzej.ostrus...@gmail.com> [2015-09-14 12:25:20 +0200]: > From now on I'll talk about QIODevice only since QSerialPort is > inheriting from it for the bulk of functionality (and this could also > benefit QIODevice). > > Since '\n' is just hardcoded in QIODevice (actually in buffer used in > its private part) one option would be to add it as last optional > parameter to canReadLine() and readLine() with default value '\n'. What > do you think?
As an electronics engineer using Qt, this would definitely make my life easier sometimes. I don't think this is about "protocols using weird line-endings" - it's about the fact there are many sensible choices for low-level protocols to signal frames, not only \n. As an example, I was dealing with a protocol (via QSerialPort) which uses STX (start of text, ASCII 0x02) as delimiter. Florian -- http://www.the-compiler.org | m...@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/
pgpGaGeEpB6Fq.pgp
Description: PGP signature
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development