summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-26 12:28:38 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-26 12:28:38 (GMT)
commit4fb6cae4dd0c6a90008780df606abb8a9e73cb2c (patch)
treef7c96ff2d371807347f200ebff98ece60b00a0f2 /src/gui
parentfd330a5a6009c17e28fb9eb36b5bffbc19c5df68 (diff)
parentf1bbb1648a9770f37ca39b8d68d6bd269dd06250 (diff)
downloadQt-4fb6cae4dd0c6a90008780df606abb8a9e73cb2c.zip
Qt-4fb6cae4dd0c6a90008780df606abb8a9e73cb2c.tar.gz
Qt-4fb6cae4dd0c6a90008780df606abb8a9e73cb2c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Qualify ptrdiff_t's namespace in stltest configure test Fix the bug where the ampersand symbol would be discarded. QtScript: Add missing API shim for signal handling Designer: Fix broken resource view filtering.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm4
-rw-r--r--src/gui/widgets/qmenu_mac.mm6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 7097291..074dd89 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -434,13 +434,13 @@ static inline bool isTreeView(const QWidget *widget)
QString qt_mac_removeMnemonics(const QString &original)
{
- // copied from qt_format_text (to be bug-for-bug compatible).
QString returnText(original.size(), 0);
int finalDest = 0;
int currPos = 0;
int l = original.length();
while (l) {
- if (original.at(currPos) == QLatin1Char('&')) {
+ if (original.at(currPos) == QLatin1Char('&')
+ && (l == 1 || original.at(currPos + 1) != QLatin1Char('&'))) {
++currPos;
--l;
if (l == 0)
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index 9a14ce6..6a0eb53 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -1391,7 +1391,11 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action)
} else {
[item setTitle: qt_mac_QStringToNSString(finalString)];
}
- [item setTitle:qt_mac_QStringToNSString(qt_mac_removeMnemonics(text))];
+
+ if (action->action->menuRole() == QAction::AboutRole || action->action->menuRole() == QAction::QuitRole)
+ [item setTitle:qt_mac_QStringToNSString(text)];
+ else
+ [item setTitle:qt_mac_QStringToNSString(qt_mac_removeMnemonics(text))];
// Cocoa Enabled
[item setEnabled: action->action->isEnabled()];