diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-23 11:43:26 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-23 12:03:22 (GMT) |
commit | 7d878ba53909157cf1911c30ce973378589c2cc0 (patch) | |
tree | 87bc360c38138d6b5c7a9fe5573d32805d54247f /src/gui | |
parent | 9c97aa4946a1d6b22bdcd8475f32b5ead7051976 (diff) | |
download | Qt-7d878ba53909157cf1911c30ce973378589c2cc0.zip Qt-7d878ba53909157cf1911c30ce973378589c2cc0.tar.gz Qt-7d878ba53909157cf1911c30ce973378589c2cc0.tar.bz2 |
Incorrect translations for application menu items on Mac OS X.
This is a regression fron 4.6 release. Menu entries with some specific
roles are automatically merged to the application menu. They are now
translated based on the context "MAC_APPLICATION_MENU" instead of
"QMenuBar" context. This patch eanbles the use for both contexts.
Task-number: QTBUG-13878
Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 43d5772..185af9a 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2397,8 +2397,13 @@ static const char *application_menu_strings[] = { }; QString qt_mac_applicationmenu_string(int type) { - return qApp->translate("MAC_APPLICATION_MENU", - application_menu_strings[type]); + QString menuString = QString::fromLatin1(application_menu_strings[type]); + QString translated = qApp->translate("QMenuBar", application_menu_strings[type]); + if (translated != menuString) + return translated; + else + return qApp->translate("MAC_APPLICATION_MENU", + application_menu_strings[type]); } #endif #endif |