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
Volker Hilsheimer 2020-01-22 16:43:47 +01:00 committed by Tor Arne Vestbø
parent 5b9f6862b1
commit d31910709c
1 changed files with 1 additions and 1 deletions

View File

@ -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)