[Development] Enhancement to QIODevice?
Florian Bruhin
me at the-compiler.org
Mon Sep 14 13:04:11 CEST 2015
* Andrzej Ostruszka <andrzej.ostruszka at 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 | me at 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150914/ca73250d/attachment.sig>
More information about the Development
mailing list