summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-06-30 10:15:49 (GMT)
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 10:06:25 (GMT)
commit1e6e8e3cf34d766f9076e04e5ca20c829a92df90 (patch)
tree6f0cb1496c0d372f91692369cc0cdc84abd8cdd1 /src
parentc779d8e7a227d8c9253ca43987a69d6d74c58abd (diff)
downloadQt-1e6e8e3cf34d766f9076e04e5ca20c829a92df90.zip
Qt-1e6e8e3cf34d766f9076e04e5ca20c829a92df90.tar.gz
Qt-1e6e8e3cf34d766f9076e04e5ca20c829a92df90.tar.bz2
Fixed a crash in menubar with invisible actions
That would happen because the loop to find the next action when navigating with the keyboard was not good enough. Task-number: QTBUG-11823 (cherry picked from commit 8ea60a39a8c4661db505a6dc1342e524ec2e460c)
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qmenubar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 5776565..82848b3 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -768,7 +768,7 @@ QAction *QMenuBarPrivate::getNextAction(const int _start, const int increment) c
const int start = (_start == -1 && increment == -1) ? actions.count() : _start;
const int end = increment == -1 ? 0 : actions.count() - 1;
- for (int i = start; start != end;) {
+ for (int i = start; i != end;) {
i += increment;
QAction *current = actions.at(i);
if (!actionRects.at(i).isNull() && (allowActiveAndDisabled || current->isEnabled()))