summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-05-19 14:33:48 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-05-19 14:39:13 (GMT)
commiteea978b9744c24200496af4f8a37d76228a29320 (patch)
treef00e5228d5ad99c7f10bca6f91aebe496a72ec01 /src/gui/widgets/qmenu.cpp
parent8a97a1cac688d0e6e6aef40bfa396a81d7bfc0b8 (diff)
downloadQt-eea978b9744c24200496af4f8a37d76228a29320.zip
Qt-eea978b9744c24200496af4f8a37d76228a29320.tar.gz
Qt-eea978b9744c24200496af4f8a37d76228a29320.tar.bz2
Fixed an assert in QMenu
The code was changed and changed the behaviour. This is basically a kind of revert. Reviewed-By: gabi Task-Number: QTBUG-10735
Diffstat (limited to 'src/gui/widgets/qmenu.cpp')
-rw-r--r--src/gui/widgets/qmenu.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index f84059d..7941c4e 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -983,19 +983,9 @@ bool QMenuPrivate::mouseEventTaken(QMouseEvent *e)
return false;
}
-class ExceptionGuard
-{
-public:
- inline ExceptionGuard(bool *w = 0) : watched(w) { Q_ASSERT(!(*watched)); *watched = true; }
- inline ~ExceptionGuard() { *watched = false; }
- inline operator bool() { return *watched; }
-private:
- bool *watched;
-};
-
void QMenuPrivate::activateCausedStack(const QList<QPointer<QWidget> > &causedStack, QAction *action, QAction::ActionEvent action_e, bool self)
{
- ExceptionGuard guard(&activationRecursionGuard);
+ QBoolBlocker guard(activationRecursionGuard);
#ifdef QT3_SUPPORT
const int actionId = q_func()->findIdForAction(action);
#endif