diff options
author | Takumi Asaki <asaki@sra.co.jp> | 2014-04-25 17:14:31 +0900 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-08-08 10:44:29 +0200 |
commit | 8e3aacf61bcfe036acdba8fac4d07d68ff0f5ab3 (patch) | |
tree | fedd2a572282210d37a1f68f525ca1030e1d28c5 /src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | |
parent | bb760d9514ed617ee8e7344152b3fa697b2c4171 (diff) |
OS X: Remove mnemonics in parentheses
In some language, mnemonics put after label text within parentheses.
e.g. "&Open" is translated to "開く(&O)" in Japanese.
OS X doesn't use mnemonics and '&' in label text is removed.
Mnemonics in parentheses (and spaces before them) also should be removed.
Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index be2bab8ce7..5a7cdec83e 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -59,8 +59,8 @@ static NSButton *macCreateButton(const char *text, NSView *superview) NSButton *button = [[NSButton alloc] initWithFrame:buttonFrameRect]; [button setButtonType:NSMomentaryLightButton]; [button setBezelStyle:NSRoundedBezelStyle]; - [button setTitle:(NSString*)(CFStringRef)QCFString(QCoreApplication::translate("QDialogButtonBox", text) - .remove(QLatin1Char('&')))]; + [button setTitle:(NSString*)(CFStringRef)QCFString( + qt_mac_removeMnemonics(QCoreApplication::translate("QDialogButtonBox", text)))]; [[button cell] setFont:[NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize:NSRegularControlSize]]]; [superview addSubview:button]; |