summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-05-21 12:10:53 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-05-21 12:12:10 (GMT)
commit832b1a48050df80515353d9887976f364913ff8e (patch)
treee50a7ad16da2ea3856dc5f2263773af355a408fb /src/gui/widgets
parent17555ab77041d5b68972eab608fe98799e0789e9 (diff)
downloadQt-832b1a48050df80515353d9887976f364913ff8e.zip
Qt-832b1a48050df80515353d9887976f364913ff8e.tar.gz
Qt-832b1a48050df80515353d9887976f364913ff8e.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')
-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 879ba2a..c05829a 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -992,19 +992,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