summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_p.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-04 13:04:40 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-04 13:12:09 (GMT)
commitff1bd9c821aa1e314d6ca738204cdd0ae60a8369 (patch)
treed653d7a683820b21762cc7a07d246dfb24033ee7 /src/gui/widgets/qmenu_p.h
parenta1ccc70d07235ac8f0a76c8d2393afc97f968060 (diff)
downloadQt-ff1bd9c821aa1e314d6ca738204cdd0ae60a8369.zip
Qt-ff1bd9c821aa1e314d6ca738204cdd0ae60a8369.tar.gz
Qt-ff1bd9c821aa1e314d6ca738204cdd0ae60a8369.tar.bz2
Fix crash in QMenu when using QWidgetAction
If the QWidgetAction is not the first in a menu, it crashed. This is because when the QEvent::ActionRemoved is sent, the event->before() is not set. We need to find another way to clean up the widgetItems list. This basically revert 4b6ab00e6d68c7 Reviewed-by: Thierry
Diffstat (limited to 'src/gui/widgets/qmenu_p.h')
-rw-r--r--src/gui/widgets/qmenu_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 9348f7b..a5bde7c 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -190,7 +190,7 @@ public:
QRect actionRect(QAction *) const;
mutable QVector<QRect> actionRects;
- mutable QWidgetList widgetItems;
+ mutable QHash<QAction *, QWidget *> widgetItems;
void updateActionRects() const;
QRect popupGeometry(const QWidget *widget) const;
QRect popupGeometry(int screen = -1) const;