summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2016-05-13 08:53:38 +0200
committerAndy Shaw <andy.shaw@qt.io>2016-05-16 20:16:05 +0000
commit6e928460bc92d7d67a5b95790225142a65de32fa (patch)
tree1a19fdcea607cc4410ea45992ae3709d0bf40986 /src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
parent45eba73492c89157b8c353548a948d538748cd43 (diff)
Use QPlatformTheme for the context to translate the color dialog buttons
QDialogButtonBox does not have translations, it queries QPlatformTheme for button texts. So in order to ensure that the buttons added to QColorDialog natively are translated it should be set to use QPlatformTheme instead. Change-Id: I67d0e509398aa81f9de9b8785544c1e23bb596d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
index 8843e009a2..ed17ef8fe9 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
@@ -52,7 +52,7 @@ static NSButton *macCreateButton(const char *text, NSView *superview)
[button setButtonType:NSMomentaryLightButton];
[button setBezelStyle:NSRoundedBezelStyle];
[button setTitle:(NSString*)(CFStringRef)QCFString(
- qt_mac_removeMnemonics(QCoreApplication::translate("QDialogButtonBox", text)))];
+ qt_mac_removeMnemonics(QCoreApplication::translate("QPlatformTheme", text)))];
[[button cell] setFont:[NSFont systemFontOfSize:
[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
[superview addSubview:button];