From a95aad7f6dd9c87e87dc685dcf62d33b8609ecb4 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 29 May 2020 11:39:55 +0200 Subject: 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 Reviewed-by: Mitch Curtis (cherry picked from commit fc5bd87eb202edb3ede1f349da46c4c86ca82ca3) Reviewed-by: Qt Cherry-pick Bot --- src/imports/platform/qquickplatformmenubar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/imports/platform/qquickplatformmenubar.cpp b/src/imports/platform/qquickplatformmenubar.cpp index 99757829..f7199083 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(); } -- cgit v1.2.3