From fc5bd87eb202edb3ede1f349da46c4c86ca82ca3 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 Pick-to: 5.15 Reviewed-by: Mitch Curtis --- src/imports/platform/qquickplatformmenubar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/imports') 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(); } -- cgit v1.2.3