diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-26 08:13:02 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-26 08:35:56 (GMT) |
commit | 51e5b6e876774406a9ee4f443ae7619390f5e9b4 (patch) | |
tree | fa2385fd2a6854d17f4a739c2d50672941af45d4 /src/gui/widgets/qmenu_p.h | |
parent | 54c03220afeacf6c9f561872d48e7746d97f8349 (diff) | |
download | Qt-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.h | 10 |
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; |