[Development] Enhancement to QIODevice?

Oswald Buddenhagen oswald.buddenhagen at theqtcompany.com
Mon Sep 14 12:47:11 CEST 2015


On Mon, Sep 14, 2015 at 12:25:20PM +0200, Andrzej Ostruszka wrote:
> My problem/wish is following.  I'm using QSerialPort and (as all 
> QIODevice-s) it is tailored for reading in "lines" ('\n') which is fine 
> since most of the time this is exactly what I need.  But I just happen 
> to have to deal with an older lock-in device which communicates via 
> messages terminated by '\r'.
> 
just \r, without a subsequent \n? that's old-style mac. i'm not sure we
want to add complexity to support such legacy cases.

> So what I'm aiming to is to make the "line" (or more generally "packet") 
> termination a bit more flexible, that is to allow user to specify the 
> delimiter.
> 
i'd endorse making CRLF conversions available on linux as well, as the
current limitation to windows has bothered me more than once. i wouldn't
go further than that.

i expect opinions from thiago and alex t. :)




More information about the Development mailing list