Cocoa: Remove NSMenuItem setEnabled used in wrong way.
Whether menu items are enabled or not is not set via NSMenuItem's enabled property but depends on the return value of CocoaMenu's validateMenuItem. Change-Id: I5673da18ab9eb3510b773e0ab520e5382a160844 Task-number: QTBUG-42511 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
parent
5744cbde42
commit
be6b27aaa1
@ -308,7 +308,6 @@ NSMenuItem *QCocoaMenuItem::sync()
|
||||
}
|
||||
|
||||
[m_native setHidden: !m_isVisible];
|
||||
[m_native setEnabled: m_enabled];
|
||||
[m_native setView:m_itemView];
|
||||
|
||||
QString text = mergeText();
|
||||
@ -410,7 +409,7 @@ void QCocoaMenuItem::syncModalState(bool modal)
|
||||
if (modal)
|
||||
[m_native setEnabled:NO];
|
||||
else
|
||||
[m_native setEnabled:m_enabled];
|
||||
[m_native setEnabled:YES];
|
||||
}
|
||||
|
||||
QPlatformMenuItem::MenuRole QCocoaMenuItem::effectiveRole() const
|
||||
|
Loading…
Reference in New Issue
Block a user