From 4e2199617c51e8980f246b7ce436a4ff4a1a09ca Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Fri, 8 Jun 2012 12:55:55 +0200 Subject: [PATCH] Cocoa: Remove QtWidgets dependencies. Make the file/color dialog helpers use QCoreApplication:: translate("QDialogButtonBox", text) instead of QDialogButtonBox::tr(text) Change-Id: I7ee4c32f8f8b9cd002836e24b962ef1c0f2e0737 Reviewed-by: Kent Hansen Reviewed-by: Bradley T. Hughes --- src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 4 +--- src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index d617d1d210..44b022cfb2 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -45,8 +45,6 @@ #include #include -#include -#include #include "qcocoahelpers.h" @@ -61,7 +59,7 @@ 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(QDialogButtonBox::tr(text) + [button setTitle:(NSString*)(CFStringRef)QCFString(QCoreApplication::translate("QDialogButtonBox", text) .remove(QLatin1Char('&')))]; [[button cell] setFont:[NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize:NSRegularControlSize]]]; diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index 088f6265ca..141e0db245 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -45,8 +45,6 @@ #include #include -#include -#include #include #include @@ -81,7 +79,7 @@ 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(QDialogButtonBox::tr(text) + [button setTitle:(NSString*)(CFStringRef)QCFString(QCoreApplication::translate("QDialogButtonBox", text) .remove(QLatin1Char('&')))]; [[button cell] setFont:[NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize:NSRegularControlSize]]];