Mac OS X compile bug in klocale_mac.cpp, and possible fix

John Layt john at
Sat Oct 9 10:40:59 BST 2010

On Saturday 09 October 2010 06:28:50 Gregory Schlomoff wrote:
> Hello,
> kdecore/localization/klocale_mac.cpp is using QCFString::toQString to
> convert a CFString to a QString. Actually QCFString is a private class
> [1], and therefore kdecore isn't building on Mac OS X. (This change
> was introduced by r1166797, which wasn't tested on Mac.)
> So we need to duplicate QCFString::toQString somewhere. Actually, it
> is already duplicated as "static QString
> convert_CFString_to_QString(CFStringRef str)" in
> kdecore/kernel/kkernel_mac.cpp, but as this function isn't exported,
> we can't use it.
> So what would you guys suggest? Export convert_CFString_to_QString so
> that we can use it in klocale_mac.cpp? Or is there a better solution?
> Thanks,
> Greg
> [1] See:

[including mac list on cc: list]

Hi Gregory,

Thanks for spotting my goof, amazing it hasn't been picked up before now.  I'm 
also amazed Qt doesn't provide a public utility for this, seems an obvious 
thing for Mac coders to need.

Anyway, I believe the whole point of kkernel_mac is to provide such useful 
internal utilities so exporting the routine would seem the correct thing to 
do.  But perhaps it would be better to copy QCFType and QCFString as KCFType 
and KCFString for internal use only as I'm pretty sure we may need more type 
handling in the future, and it is easier to type.

If Benjamin agrees and if you have a working dev environment then could you 
please fix it, better than my doing it blind at the moment.



More information about the kde-core-devel mailing list