[Development] Enhancement to QIODevice?

Thiago Macieira thiago.macieira at intel.com
Tue Sep 15 03:53:22 CEST 2015


On Monday 14 September 2015 12:25:20 Andrzej Ostruszka wrote:
> 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.  Currently I think the only available solution for my wish is 
> double buffering - that is to introduce my own buffer that will suck 
> everything from QIODevice and allow searching for other delimiter but 
> I'd like to do better than that.

You could use peek() to search the buffer, then read() exactly as much as you 
really need.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list