diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 4 | ||||
-rw-r--r-- | src/gui/widgets/qmenu_mac.mm | 6 | ||||
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 1 |
3 files changed, 8 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()]; diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 83a811b..0477454 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -2074,6 +2074,7 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) JSC::JSValue slot; JSC::JSValue senderWrapper; int signalIndex = -1; + QScript::APIShim shim(engine); for (int i = 0; i < connections.size(); ++i) { const QVector<QObjectConnection> &cs = connections.at(i); for (int j = 0; j < cs.size(); ++j) { |