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 <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Morten Johan Sorvig 2012-06-08 12:55:55 +02:00 committed by Qt by Nokia
parent 69f0782c09
commit 4e2199617c
2 changed files with 2 additions and 6 deletions

View File

@ -45,8 +45,6 @@
#include <QtCore/qdebug.h>
#include <QtCore/qtimer.h>
#include <QtWidgets/qdialogbuttonbox.h>
#include <QtWidgets/qcolordialog.h>
#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]]];

View File

@ -45,8 +45,6 @@
#include <QtCore/qtimer.h>
#include <QtGui/qfontdatabase.h>
#include <QtWidgets/qdialogbuttonbox.h>
#include <QtWidgets/qfontdialog.h>
#include <private/qfont_p.h>
#include <private/qfontengine_p.h>
@ -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]]];