summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoamenuloader_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qcocoamenuloader_mac.mm')
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm
index ce30ad2..2a2fb50 100644
--- a/src/gui/kernel/qcocoamenuloader_mac.mm
+++ b/src/gui/kernel/qcocoamenuloader_mac.mm
@@ -260,5 +260,17 @@ QT_USE_NAMESPACE
{
[NSApp orderFrontCharacterPalette:sender];
}
+
+- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
+{
+ if ([menuItem action] == @selector(hide:)
+ || [menuItem action] == @selector(hideOtherApplications:)
+ || [menuItem action] == @selector(unhideAllApplications:)) {
+ return [NSApp validateMenuItem:menuItem];
+ } else {
+ return [menuItem isEnabled];
+ }
+}
+
@end
#endif // QT_MAC_USE_COCOA