[Kde-bindings] Qyoto: Reading from stdin from a gui-application

Arno Rehn arno at arnorehn.de
Sun May 18 14:22:07 UTC 2008


Am Sonntag 18 Mai 2008 16:14:39 schrieb Arno Rehn:
> Am Sonntag 18 Mai 2008 15:52:29 schrieb Christoph Spielmann:
> > I tried out the fix you proposed and now the error message is gone but
> > it's still not working as expected. If I use QTextStream as proposed by
> > qt-documentation nothing happens (e.g when i use the Read*-methods of
> > QTextStream) or i get a endless-loop if i use AtEnd() for example. When
> > i use QFile directly using the Read*-methods i get very strange results:
> >
> > Read(string,long): nothing happens
> > ReadLine(string,long): the method returns the correct length of bytes
> > available but the string it's supposed to append the bytes to is not
> > changed
This is because these read methods expect a char*, that means a reference to a 
string in which the data is stored. In Qyoto the code is wrongly generated, 
so it won't work.

> > ReadAll(): nothing happens 
works for me.

> > So i guess i found another problem... ;)
>
> Strange. Have you tried to do it in C++ and does it work there? It would
> also be helpful if you sent the source of this, so we can test it.


-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list