summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_p.h
diff options
context:
space:
mode:
authorMorten Sørvig <msorvig@trolltech.com>2009-06-16 11:12:26 (GMT)
committerMorten Sørvig <msorvig@trolltech.com>2009-06-16 11:19:55 (GMT)
commit1e6b142fa2833f55972d6d4aa7dde0bb215c2f25 (patch)
tree5fdca7f38b7849f00dd04a66da2d74ea164bf5d6 /src/gui/widgets/qmenu_p.h
parentd9308550f104526d29b1cdd56514ae3bb967d7f9 (diff)
downloadQt-1e6b142fa2833f55972d6d4aa7dde0bb215c2f25.zip
Qt-1e6b142fa2833f55972d6d4aa7dde0bb215c2f25.tar.gz
Qt-1e6b142fa2833f55972d6d4aa7dde0bb215c2f25.tar.bz2
Implement QMenu::separatorsCollapsible on Mac/Cocoa.
Hide duplicate separators and separators at the beginning and end of the menu. The main challenge here is that separators and "normal" menu items can be added in any order, for example add all the separators first and then fill in the items. This means that we have to redo the visibility decision for separators above and below when adding normal items. Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/gui/widgets/qmenu_p.h')
-rw-r--r--src/gui/widgets/qmenu_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 1dfe701..20c63fe 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -263,8 +263,9 @@ public:
struct QMacMenuPrivate {
QList<QMacMenuAction*> actionItems;
OSMenuRef menu;
- QMacMenuPrivate();
- ~QMacMenuPrivate();
+ QMenuPrivate *qmenu;
+ QMacMenuPrivate(QMenuPrivate *menu);
+ ~QMacMenuPrivate();
bool merged(const QAction *action) const;
void addAction(QAction *, QMacMenuAction* =0, QMenuPrivate *qmenu = 0);