Re: [Development] Enhancement to QIODevice?

2015-09-21 Thread Andrzej Ostruszka
Thiago, my apologies for replying that late. For some strange reason gmail has decided to mark your reply as spam (even though previous conversation was perfectly OK). Since I see you active in the mailing list I had to dig deeper to find it. On Wed, Sep 16, 2015 at 8:17 PM, Thiago Macieira

Re: [Development] Enhancement to QIODevice?

2015-09-21 Thread Thiago Macieira
On Monday 21 September 2015 12:32:36 Andrzej Ostruszka wrote: > > Well, yeah, it needs to read at least one from the lower device into the > > QIODevice buffer. It will then copy the data again to your buffer. There's > > no way to avoid the double copy, unless device implementation > >

Re: [Development] Enhancement to QIODevice?

2015-09-16 Thread Thiago Macieira
On Tuesday 15 September 2015 11:41:10 Andrzej Ostruszka wrote: > On 09/15/2015 03:53 AM, Thiago Macieira wrote: > > 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

Re: [Development] Enhancement to QIODevice?

2015-09-16 Thread Andrzej Ostruszka
On 09/16/2015 08:57 AM, Thiago Macieira wrote: >>> You could use peek() to search the buffer, then read() exactly as much as >>> you really need. >> >> I understand that we are talking about >> QIODevicePrivateLinearBuffer::peek() here. > > No, I meant QIODevice::peek() First of all - I do not

Re: [Development] Enhancement to QIODevice?

2015-09-16 Thread Mark Gaiser
On Wed, Sep 16, 2015 at 1:13 PM, Andrzej Ostruszka < andrzej.ostrus...@gmail.com> wrote: > On 09/16/2015 08:57 AM, Thiago Macieira wrote: > >>> You could use peek() to search the buffer, then read() exactly as much > as > >>> you really need. > >> > >> I understand that we are talking about > >>

Re: [Development] Enhancement to QIODevice?

2015-09-16 Thread Thiago Macieira
On Wednesday 16 September 2015 13:13:01 Andrzej Ostruszka wrote: > On 09/16/2015 08:57 AM, Thiago Macieira wrote: > >>> You could use peek() to search the buffer, then read() exactly as much > >>> as > >>> you really need. > >> > >> I understand that we are talking about > >>

Re: [Development] Enhancement to QIODevice?

2015-09-15 Thread Andrzej Ostruszka
On 09/14/2015 12:43 PM, André Somers wrote > I guess that also means that your countTo() would need to be virtual, > right? That would not be bc. No. This would be just additional functionality of the QIODevicePrivateLinearBuffer. Since this buffer is available from QIODevicePrivate which itself

Re: [Development] Enhancement to QIODevice?

2015-09-15 Thread Andrzej Ostruszka
On 09/15/2015 03:53 AM, Thiago Macieira wrote: > 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

Re: [Development] Enhancement to QIODevice?

2015-09-14 Thread André Somers
Op 14-9-2015 om 12:25 schreef Andrzej Ostruszka: > Hello all, > > I'd like to ask for possibility to enhance a bit QIODevice. > > 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

Re: [Development] Enhancement to QIODevice?

2015-09-14 Thread Florian Bruhin
* Andrzej Ostruszka [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

Re: [Development] Enhancement to QIODevice?

2015-09-14 Thread Oswald Buddenhagen
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

Re: [Development] Enhancement to QIODevice?

2015-09-14 Thread Matthew Woehlke
On 2015-09-14 06:25, Andrzej Ostruszka wrote: > I'd like to ask for possibility to enhance a bit QIODevice. > > 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

Re: [Development] Enhancement to QIODevice?

2015-09-14 Thread Thiago Macieira
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

[Development] Enhancement to QIODevice?

2015-09-14 Thread Andrzej Ostruszka
Hello all, I'd like to ask for possibility to enhance a bit QIODevice. 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