Howto create a KLocalizedString from a QString?

Albert Astals Cid aacid at kde.org
Mon Mar 16 20:09:33 GMT 2009


A Dilluns, 16 de març de 2009, Chusslove Illich va escriure:
> > [: 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.

I'm with Chusslove.

Albert





More information about the kde-core-devel mailing list