diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-05-29 11:39:55 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2020-06-03 14:32:32 +0200 |
commit | fc5bd87eb202edb3ede1f349da46c4c86ca82ca3 (patch) | |
tree | 94ecc462bffa64a5693dd8de7f5187f88b6e2784 /src/imports/platform | |
parent | abdc351b4d5b560296cc024cdcab8eea0b536d23 (diff) |
Sync the platform menu after inserting it to the menubar
By syncing the platform menu, we ensure that it passes on the title of
the menu to the native handle if it was dynamically added.
Change-Id: Idd11fa7d9cd3d251e2ed19f99f575f5e2ec5ac1d
Pick-to: 5.15
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/platform')
-rw-r--r-- | src/imports/platform/qquickplatformmenubar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/platform/qquickplatformmenubar.cpp b/src/imports/platform/qquickplatformmenubar.cpp index 592a6bfe..e77e1f28 100644 --- a/src/imports/platform/qquickplatformmenubar.cpp +++ b/src/imports/platform/qquickplatformmenubar.cpp @@ -205,6 +205,7 @@ void QQuickPlatformMenuBar::insertMenu(int index, QQuickPlatformMenu *menu) menu->setMenuBar(this); if (m_handle) m_handle->insertMenu(menu->create(), before ? before->handle() : nullptr); + menu->sync(); emit menusChanged(); } |