KLocale method for removing accelerator markers

Chusslove Illich caslav.ilic at gmx.net
Sun Nov 16 12:56:22 GMT 2008

>> [: Chusslove Illich :]
>> At places KDE code does <some_ui_label>.remove('&')[...] this does not
>> work [...] for CJK-style markers ("&Open With..." ->
>> "アプリケーションで開く(&O)...", where complete "(&O)" should be removed as marker).
>> [...] So far we encountered several places [where this is needed]
> [: Allen Winter :]
> Looks good. Please commit.

I've committed it, but with something little extra.

At few of the mentioned places, it is Qt that's removing the marker; while
it of course takes escaped markers into consideration, it does not CJK
markers. This leaves a dangling "...(X)" in CJK labels. So I've added that
such "reduced" markers are removed too, but only if the label contains a CJK
character otherwise (approximated as unicode point >= 2E00).

The proper solution is probably to shift this uprated marker removal into Qt
itself at some point.

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: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081116/d64f6299/attachment.sig>

More information about the kde-core-devel mailing list