diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-10-19 15:35:25 +0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-11-15 19:04:32 +0000 |
commit | 26986276531b7f0a3f950d4b3960d5302010d204 (patch) | |
tree | b6568c416c21dfd1f629660192d3de86fc4e4b22 /src/widgets/widgets/qmenu_p.h | |
parent | c8a5f331c8fdbf243ccb467f7bc3c9f62bd47c9f (diff) |
QMenu: Refactor insertion of action in QPA menu
First, remove a bit of code duplication around the creation of
the platform menu item. Then, we move copyActionToPlatformItem()
inside QMenuPrivate to get rid of one parameter.
Change-Id: I5a33103566367f2313930479844365e79773d82f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu_p.h')
-rw-r--r-- | src/widgets/widgets/qmenu_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h index a81d8ffafb..ce5134958e 100644 --- a/src/widgets/widgets/qmenu_p.h +++ b/src/widgets/widgets/qmenu_p.h @@ -295,6 +295,9 @@ public: QPlatformMenu *createPlatformMenu(); void setPlatformMenu(QPlatformMenu *menu); void syncPlatformMenu(); + void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem *item); + QPlatformMenuItem *insertActionInPlatformMenu(const QAction *action, QPlatformMenuItem *beforeItem); + #ifdef Q_OS_OSX void moveWidgetToPlatformItem(QWidget *w, QPlatformMenuItem* item); #endif |