summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_p.h
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-26 08:13:02 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-26 08:35:56 (GMT)
commit51e5b6e876774406a9ee4f443ae7619390f5e9b4 (patch)
treefa2385fd2a6854d17f4a739c2d50672941af45d4 /src/gui/widgets/qmenu_p.h
parent54c03220afeacf6c9f561872d48e7746d97f8349 (diff)
downloadQt-51e5b6e876774406a9ee4f443ae7619390f5e9b4.zip
Qt-51e5b6e876774406a9ee4f443ae7619390f5e9b4.tar.gz
Qt-51e5b6e876774406a9ee4f443ae7619390f5e9b4.tar.bz2
QMenu refactor to simplify a bit geometry calculation
Diffstat (limited to 'src/gui/widgets/qmenu_p.h')
-rw-r--r--src/gui/widgets/qmenu_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 1ea8fe9..fef1ff9 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -155,10 +155,14 @@ public:
mutable uint itemsDirty : 1;
mutable uint maxIconWidth, tabWidth;
QRect actionRect(QAction *) const;
- mutable QMap<QAction*, QRect> actionRects;
- mutable QList<QAction*> actionList;
+
+ struct ActionRectInfo {
+ QAction *action;
+ QRect rect;
+ };
+ mutable QVector<ActionRectInfo> actionRects;
mutable QHash<QAction *, QWidget *> widgetItems;
- void calcActionRects(QMap<QAction*, QRect> &actionRects, QList<QAction*> &actionList) const;
+ void calcActionRects() const;
void updateActions();
QRect popupGeometry(int screen=-1) const;
QList<QAction *> filteredActions() const;