Howto create a KLocalizedString from a QString?

Chusslove Illich caslav.ilic at
Mon Mar 16 11:27:12 GMT 2009

> [: Andreas Pakulat :]
> So my question is: Can we add a constructor to KLocalizedString taking a
> QString, or adjusting KAboutData to introduce setter methods that use
> QString?

I wouldn't be in favor of making KLocalizedString accept translated text (in
form of QString or otherwise), as that works around its purpose, to
translate (with bells and whistles) the text given to it.

Having KAboutData take KLocalizedString for arguments was a forced solution
in the first place, due to the chicken-and-egg problem with KApplication (it
must exist to have translations, and yet it needs KAboutData to come into
existence, so KLocalizedString internally defers lookup for translation
until after KApplication is created). Therefore, so long as it is otherwise
fine to create KAboutData in the way you explained, it seems reasonable to
me to give KAboutData setter methods which take QString, which are expected
to already have been translated in any random way.

Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list