From 68dd1d40e4385914a14bf4c0d55b28378942dd8c Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 21 Apr 2010 15:34:48 +0200 Subject: Cocoa: fix namespace build breakage Cocoa would not build with namespace. This patch fix makes the day. Reviewed-by: prasanth --- src/gui/kernel/qcocoamenuloader_mac.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index b58fd7c..8d65aa1 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -53,6 +53,12 @@ QT_FORWARD_DECLARE_CLASS(QCFString) QT_FORWARD_DECLARE_CLASS(QString) +#ifndef QT_NO_TRANSLATION + QT_BEGIN_NAMESPACE + extern QString qt_mac_applicationmenu_string(int type); + QT_END_NAMESPACE +#endif + QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(QCocoaMenuLoader) @@ -226,7 +232,6 @@ QT_USE_NAMESPACE - (void)qtTranslateApplicationMenu { #ifndef QT_NO_TRANSLATION - extern QString qt_mac_applicationmenu_string(int type); [servicesItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(0))]; [hideItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(1).arg(qAppName()))]; [hideAllOthersItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(2))]; -- cgit v0.12