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:
Christoph Schleifenbaum 2015-04-12 17:59:19 +02:00
parent 5744cbde42
commit be6b27aaa1

View File

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