summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible/qaccessiblewidget.cpp
diff options
context:
space:
mode:
authorJanne Koskinen <janne.p.koskinen@digia.com>2009-05-11 12:16:25 (GMT)
committerJanne Koskinen <janne.p.koskinen@digia.com>2009-05-11 12:16:25 (GMT)
commitf005af3b8c8405219b39bacd348d3861f1243aa8 (patch)
treea2d1f332de493d3d2cf0e0d1b3ad7c062176fe39 /src/gui/accessible/qaccessiblewidget.cpp
parent8aaa0cbf3451dee7bc8e8276faad3b2f2954dc1c (diff)
parent565f2957fb049f2df0330fac72ec5335860b9c7f (diff)
downloadQt-f005af3b8c8405219b39bacd348d3861f1243aa8.zip
Qt-f005af3b8c8405219b39bacd348d3861f1243aa8.tar.gz
Qt-f005af3b8c8405219b39bacd348d3861f1243aa8.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: src/gui/widgets/qmenu_symbian.cpp
Diffstat (limited to 'src/gui/accessible/qaccessiblewidget.cpp')
-rw-r--r--src/gui/accessible/qaccessiblewidget.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/accessible/qaccessiblewidget.cpp b/src/gui/accessible/qaccessiblewidget.cpp
index 4b2b2ab..753ac57 100644
--- a/src/gui/accessible/qaccessiblewidget.cpp
+++ b/src/gui/accessible/qaccessiblewidget.cpp
@@ -131,9 +131,16 @@ QString Q_GUI_EXPORT qt_accHotKey(const QString &text)
int fa = 0;
QChar ac;
while ((fa = text.indexOf(QLatin1Char('&'), fa)) != -1) {
- if (fa == text.length() - 1 || text.at(fa+1) != QLatin1Char('&')) {
- ac = text.at(fa+1);
- break;
+ ++fa;
+ if (fa < text.length()) {
+ // ignore "&&"
+ if (text.at(fa) == QLatin1Char('&')) {
+ ++fa;
+ continue;
+ } else {
+ ac = text.at(fa);
+ break;
+ }
}
}
if (ac.isNull())