[Qt] problem with CopyUnicodeToPWideString() from qt4.pas
zeljko
zeljko at holobit.net
Thu May 31 12:00:17 CEST 2007
Hi,
I'm implementing TCustomEdit OnChange event, and found that
qt4.CopyUnicodeToPWideString() raises AV
{$IFDEF LINUX}
begin
SetLength(S, Len); <-------------------- HERE IS AV
Move(Unicode[0],S[1],Len*2);
end;
{$ENDIF}
so I added an small workaround, not QLineEdit_textChanged_Event properly
works:
{$IFDEF LINUX}
begin
try
SetLength(S, Len); <-------------------- HERE IS AV
except
exit;
end;
Move(Unicode[0],S[1],Len*2);
end;
{$ENDIF}
After adding try..except everything works fine.
What are you guys think about this ? FPC bug ?
Felipe, please apply my last patch withTQtWSCustomEdit update.
cheers,
zeljko
More information about the Qt
mailing list