KLocale method for removing accelerator markers

Allen Winter winter at kde.org
Sun Nov 16 12:44:58 GMT 2008

On Saturday 15 November 2008 1:45:09 pm Chusslove Illich wrote:
> At places KDE code does <some_ui_label>.remove('&'), when a UI label needs
> to be used without the accelerator marker. E.g. action text when used as
> toolbar button label. However, this does not work in presence of escaped
> ampersand ("Foo && Bar"), and, in particular, for CJK-style markers (
> "&Open With..." -> "アプリケーションで開く(&O)...", where complete "(&O)" should be
> removed as marker).
> So far we encountered several places in kdelibs where accelerator marker is
> being removed, and one in Gwenview and Konsole. It's possible to patch them
> on case-by-case basis, but I think it merits a dedicated method of KLocale.
> The patch attached. Units tests show desired behavior.
Looks good.
Please commit.

More information about the kde-core-devel mailing list