[Kde-pim] [Patch] Some Q3CString porting

Ingo Klöcker kloecker at kde.org
Thu Feb 15 22:34:46 GMT 2007


On Thursday 15 February 2007 22:09, Mathias Soeken wrote:
> Hi
> inspired by a recently commit I have begun porting the Q3CString's to
> QByteArray's. I have not already finished yet but I decided to send
> that patch now because it effected to many files otherwise.
> The source compiles and the programm runs normally. I have only
> changed kmail-files. If I have done it well then I can also replace
> the other occurencies.

Thanks for the patch. The patch looks good as far as I can see. The 
problem is not replacing Q3CString by QByteArray but to check whether 
in any of those cases assumptions are made which are only true for 
Q3CString. This is mostly the case when the data inside the Q3CString 
is accessed directly. One difference that comes to mind is that one 
always had to take care of adding a trailing '\0' to a QCString when 
setting the data by writing directly to QCString::data(). For 
QByteArray this isn't necessary because Qt takes care of adding the 
trailing '\0'. Therefore a q3cstring.resize( len + 1 ) will usually 
become a qbytearray.resize( len ). I don't think this is relevant for 
your changes but you should keep it in mind.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070215/76b7fe14/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/


More information about the kde-pim mailing list