[Lazarus] Setting clipboard on Linux adds ending #0
zeljko at holobit.net
Fri Mar 9 18:09:49 CET 2012
On Friday 09 of March 2012 15:36:09 cobines wrote:
> 2012/3/8 zeljko <zeljko at holobit.net>:
> > We cannot remove it just because you think so. If it's removed we need to
> > test consequences on gtk, gtk2 and qt.
> I know, I was counting on someone saying that it is needed and why.
> With copying to clipboard, I found this in LCLQT in
> if (QByteArray_length(Data) > 1) and QByteArray_endsWith(Data, #0)
> then QByteArray_chop(Data, 1);
> With pasting from clipboard, there is this in LCL:
> if (ASize>0) and (pchar(MemStream.Memory)[ASize-1]=#0) then
> If the #0 is specifically removed then maybe it doesn't need to be
> added as well. As I see it, the stream (or array) size determines the
> length, not the #0.
> I can only test by installing lots of applications and testing if
> copying/pasting still works after removing the #0.
Yeah, just try to copy something from openoffice under X11 and paste it into
qt application (or to win32 app running under wine) and you'll see problem
(and that comes from gtk2).
My wild guess is that #0 was added because of gtk2.
I'll fix qt in any case ... .whatever you put at the end, but who will fix
gtk2 or carbon ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus