summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2014-04-09 16:24:06 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-10 05:38:11 +0200
commit78af72590760ea4853fa79370cd7c017ad1760f7 (patch)
tree96d5ef9d327c3fb0f4077ebc61bc9685a5f4e20d
parentb1afb91ffe7727ec59e4baf0124d16e03b1d5539 (diff)
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>
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index 35e8fdebb4..6acc062eb9 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -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)