diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-05-05 10:16:53 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-05-05 10:34:18 (GMT) |
commit | 1e10fced4ceb59455b19f5e054b480f91aad273d (patch) | |
tree | d8429dd29996de175a8b5dcacf47a23fce3c5eb4 /src/gui | |
parent | 74a0f7526c5df992c2f2b7882d355f77076c33bd (diff) | |
download | Qt-1e10fced4ceb59455b19f5e054b480f91aad273d.zip Qt-1e10fced4ceb59455b19f5e054b480f91aad273d.tar.gz Qt-1e10fced4ceb59455b19f5e054b480f91aad273d.tar.bz2 |
WinCE: QMenuBar::triggered(QAction*) was emitted too often
Calling QMenuPrivate::activateAction instead of QAction::activate makes
use of the internal recursion guard and fixes this problem.
Also emitting QMenuBar::triggered in the command-in-menu-bar case will
QAction::activate do for us.
Task-number: QTBUG-10358
Reviewed-by: thartman
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qmenu_wince.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp index ea313f1..37ff4c4 100644 --- a/src/gui/widgets/qmenu_wince.cpp +++ b/src/gui/widgets/qmenu_wince.cpp @@ -312,14 +312,13 @@ bool QMenuBarPrivate::wceEmitSignals(QList<QWceMenuAction*> actions, uint comman { QAction *foundAction = 0; for (int i = 0; i < actions.size(); ++i) { - if (foundAction) - break; QWceMenuAction *action = actions.at(i); if (action->action->menu()) { foundAction = action->action->menu()->wceCommands(command); + if (foundAction) + break; } else if (action->command == command) { - emit q_func()->triggered(action->action); action->action->activate(QAction::Trigger); return true; } @@ -361,7 +360,7 @@ QAction *QMenuPrivate::wceCommands(uint command) foundAction = action->action->menu()->d_func()->wceCommands(command); } else if (action->command == command) { - action->action->activate(QAction::Trigger); + activateAction(action->action, QAction::Trigger); return action->action; } } |