[kde-freebsd] Qt 4.5 and GNU iconv [SOLUTION]

David Naylor naylor.b.david at gmail.com
Tue Apr 7 21:15:10 CEST 2009


On Tuesday 07 April 2009 07:25:16 David Johnson wrote:
> I played around with this, rebuilding libiconv after gettext, but to no
> effect. Oh well, it was worth a shot...

I've managed to get Qt 4.5 to behave well with libiconv.  It was a bit of a 
cheat though.  There is also another solution.  

SOLUTION 1:
Disable libiconv support altogether.  This, I believe, is a viable solution 
since Windows does not have iconv and we should be using whatever fallback it 
does.  This should result in no loss of functionality.  

SOLUTION 2:
qt4-corelib is the only part that is affected by libiconv (under 
src/corelib/codec/).  It appears that the changes introduces since Qt4.4.3 
are of an optimising nature and have some kind of state caching.  This 
caching is somehow breaking libiconv under FreeBSD.  

Even with the new libiconv port from ports/131769 it still does not work.  

The attached files restore the behaviour of the previous code.  This probably 
will result in a performance loss (but remain par with Qt4.4.3).  Since the 
changes are isolated to those two files and the API has not changed (for 
QTextCodec) this should not negatively affect anything.  I've tested this 
with qtdemo and everything works fine.  

Are either of these solutions (and if so which one) satisfactory?

Regards,

David

P.S. It will result in a smaller 'patch' if the files are copied across 
verbatim.  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-src-corelib-codec-qiconvcodec.cpp
Type: text/x-c++src
Size: 17916 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-freebsd/attachments/20090407/9abd2c67/attachment.cpp 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-src-corelib-codec-qiconvcodec_p.h
Type: text/x-diff
Size: 3533 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-freebsd/attachments/20090407/9abd2c67/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-freebsd/attachments/20090407/9abd2c67/attachment.sig 


More information about the kde-freebsd mailing list