macOS: Decide enabled state of menu items correctly
We use automatic menu enabling, so the only property that should define whether the item in the menu is enabled or not is QCocoaMenuItem::enabled, which will then get read from validateMenuItem:, and synced to the native menu item by AppKit. Change-Id: I860d05bf4675c9bc2058d2ede44b5ac3551453b6 Fixes: QTBUG-81375 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
5b9f6862b1
commit
d31910709c
|
|
@ -334,7 +334,7 @@ void QCocoaMenu::setEnabled(bool enabled)
|
|||
|
||||
bool QCocoaMenu::isEnabled() const
|
||||
{
|
||||
return m_attachedItem ? m_attachedItem.enabled : m_enabled && m_parentEnabled;
|
||||
return m_enabled && m_parentEnabled;
|
||||
}
|
||||
|
||||
void QCocoaMenu::setVisible(bool visible)
|
||||
|
|
|
|||
Loading…
Reference in New Issue