Cocoa: Set the COCOA_MENU_ANCESTOR() also when sync'ing
Task-number: QTBUG-38044 Change-Id: I2769bf2f4beec058c15ba1d126e59106f41dab37 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
b1afb91ffe
commit
78af725907
@ -269,7 +269,6 @@ void QCocoaMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *
|
||||
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
||||
QCocoaMenuItem *beforeItem = static_cast<QCocoaMenuItem *>(before);
|
||||
|
||||
SET_COCOA_MENU_ANCESTOR(menuItem, this);
|
||||
cocoaItem->sync();
|
||||
if (beforeItem) {
|
||||
int index = m_menuItems.indexOf(beforeItem);
|
||||
@ -315,6 +314,7 @@ void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem)
|
||||
} else {
|
||||
[m_nativeMenu addItem: item->nsItem()];
|
||||
}
|
||||
SET_COCOA_MENU_ANCESTOR(item, this);
|
||||
}
|
||||
|
||||
void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem)
|
||||
|
Loading…
Reference in New Issue
Block a user