summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenubar_p.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-10-20 18:12:17 +0700
committerShawn Rutledge <shawn.rutledge@qt.io>2017-11-07 19:36:18 +0000
commit7986e1e2f0c88ea305dd8a842884908ed4724fd7 (patch)
tree277f55eeee0984be88ad39dadc3d1020db1262e7 /src/widgets/widgets/qmenubar_p.h
parent237b1c1d689fabf1680a8cf3d9226da5f712302d (diff)
QMenuBar: Update title on change
When one of the menubar actions changed, we would omit to update several properties on the platform menu, most notably its title. Manual tested with BigMenuCreator, where the sequence menu->addAction(action); // A-operation action->setMenu(submenu); // S-operation would result in an "Untitled" menubar item on macOS, and this regardless of when the submenu is populated. Change-Id: I43989f36f6bf3f0b7056310ac986c06f8e02f128 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenubar_p.h')
-rw-r--r--src/widgets/widgets/qmenubar_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index 01d8793a3a..c276a4512d 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -132,7 +132,9 @@ public:
QBasicTimer autoReleaseTimer;
QPlatformMenuBar *platformMenuBar;
- QPlatformMenu *getPlatformMenu(QAction *action);
+ QPlatformMenu *getPlatformMenu(const QAction *action);
+ QPlatformMenu *findInsertionPlatformMenu(const QAction *action);
+ void copyActionToPlatformMenu(const QAction *e, QPlatformMenu *menu);
inline int indexOf(QAction *act) const { return q_func()->actions().indexOf(act); }
};