From e996c74164f6a161c030d3aff1348b1ef7f5da6f Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 19 Oct 2017 10:51:55 +0700 Subject: QCocoaMenu: Derive custom NSMenu class, make delegate a singleton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Out of the box, this saves one delegate instance per NSMenu. It also weak-couples the NSMenu instance with its owning QCocoaMenu, making it safer to inspect from the menu delegate. In the future, this will be helpful for debugging by just overriding any NSMenu method. Change-Id: I7eb801009b97f6a8ee2003306c0e152621bbce54 Reviewed-by: Jake Petroules Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/cocoa.pro | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/cocoa/cocoa.pro') diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index 5354bdafbc..2694cb3607 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -14,6 +14,7 @@ SOURCES += main.mm \ qcocoaeventdispatcher.mm \ qcocoaapplicationdelegate.mm \ qcocoaapplication.mm \ + qcocoansmenu.mm \ qcocoamenu.mm \ qcocoamenuitem.mm \ qcocoamenubar.mm \ @@ -47,6 +48,7 @@ HEADERS += qcocoaintegration.h \ qcocoaeventdispatcher.h \ qcocoaapplicationdelegate.h \ qcocoaapplication.h \ + qcocoansmenu.h \ qcocoamenu.h \ qcocoamenuitem.h \ qcocoamenubar.h \ -- cgit v1.2.3