diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoamenu.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenu.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm index 732851ecf7..bde9ded14f 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.mm +++ b/src/plugins/platforms/cocoa/qcocoamenu.mm @@ -323,7 +323,8 @@ void QCocoaMenu::showPopup(const QWindow *parentWindow, QPoint pos, const QPlatf // typical use-case for a choice list, or non-editable combobox. We can't // re-use the popUpContextMenu:withEvent:forView: logic below since it won't // respect the menu's minimum width. - NSPopUpButtonCell *popupCell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]; + NSPopUpButtonCell *popupCell = [[[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO] + autorelease]; [popupCell setAltersStateOfSelectedItem:NO]; [popupCell setTransparent:YES]; [popupCell setMenu:m_nativeMenu]; @@ -350,7 +351,6 @@ void QCocoaMenu::showPopup(const QWindow *parentWindow, QPoint pos, const QPlatf eventNumber:0 clickCount:1 pressure:1.0]; - NSSize size = m_nativeMenu.size; [NSMenu popUpContextMenu:m_nativeMenu withEvent:menuEvent forView:view]; } |