Guard usage of [NSApp setDockMenu].
setDockMenu is not documented an may disappear. Closest documented replacement seems to be [NSApplicationDelegate applicationDockMenu:]. It can't be used as a direct replacement since it's a "virtual" getter that the application delegate implements. Change-Id: Id161196018057b75cbe7d6f6d2610c0932345c5f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>bb10
parent
5ad615ae8c
commit
7b5ad88489
|
|
@ -191,7 +191,10 @@ void QCocoaNativeInterface::setDockMenu(QPlatformMenu *platformMenu)
|
|||
QCocoaMenu *cocoaPlatformMenu = static_cast<QCocoaMenu *>(platformMenu);
|
||||
NSMenu *menu = cocoaPlatformMenu->nsMenu();
|
||||
// setDockMenu seems to be undocumented, but this is what Qt 4 did.
|
||||
[NSApp setDockMenu: menu];
|
||||
if ([NSApp respondsToSelector:@selector(setDockMenu:)])
|
||||
[NSApp setDockMenu: menu];
|
||||
else
|
||||
qWarning("Could not set dock menu: [NSApp setDockMenu] is not available.");
|
||||
}
|
||||
|
||||
void *QCocoaNativeInterface::qMenuToNSMenu(QPlatformMenu *platformMenu)
|
||||
|
|
|
|||
Loading…
Reference in New Issue