diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2015-08-09 07:06:52 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-08-09 07:06:52 +0000 |
commit | 5bfac9d653357c906946563b9494d7ae69cdad92 (patch) | |
tree | 0cc119af894a398497eba6f56fe2f224f6947616 /src/widgets/kernel/qaction.cpp | |
parent | f08e1ecdc88e9373a31c1505d5db7f905431c644 (diff) | |
parent | 77da617dc8e378a631ee8c15b1b414f16b87f147 (diff) |
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/widgets/kernel/qaction.cpp')
-rw-r--r-- | src/widgets/kernel/qaction.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index 255ffbd258..95c4877eb9 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -58,14 +58,9 @@ QT_BEGIN_NAMESPACE static QString qt_strippedText(QString s) { s.remove( QString::fromLatin1("...") ); - int i = 0; - while (i < s.size()) { - ++i; - if (s.at(i-1) != QLatin1Char('&')) - continue; - if (i < s.size() && s.at(i) == QLatin1Char('&')) - ++i; - s.remove(i-1,1); + for (int i = 0; i < s.size(); ++i) { + if (s.at(i) == QLatin1Char('&')) + s.remove(i, 1); } return s.trimmed(); } |