diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2010-03-26 11:34:54 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2010-03-26 11:35:22 (GMT) |
commit | c19cb39ddbfd93802bfe61ecaa4f737a1bd1c1bb (patch) | |
tree | 14332be59fb6e3835c42bf7d0feb37b69a60a03f /src/gui/styles/qmacstyle_mac.mm | |
parent | 9a7dd6c047a8eebad94fd5f3e9fc2284c315b046 (diff) | |
download | Qt-c19cb39ddbfd93802bfe61ecaa4f737a1bd1c1bb.zip Qt-c19cb39ddbfd93802bfe61ecaa4f737a1bd1c1bb.tar.gz Qt-c19cb39ddbfd93802bfe61ecaa4f737a1bd1c1bb.tar.bz2 |
Fix the bug where the ampersand symbol would be discarded.
We are now checking that the QAction is not related
to the About or Quit button on Mac OS X
Task-number: QTBUG-7540
Reviewed-by: Morten Sorvig
Diffstat (limited to 'src/gui/styles/qmacstyle_mac.mm')
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 4 |
1 files changed, 2 insertions, 2 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) |