summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-06-23 14:42:32 +0200
committerNorwegian Rock Cat <qt-info@nokia.com>2009-06-23 14:44:08 +0200
commitf65ed7b51a573dd8429feecc19c7abe8a0a36114 (patch)
tree5ce70bc3ca67573b4a3b07c13e1a8a8be520f4bd /src/gui/widgets
parent3464a05a94c4e638d91b2151d6aad70f78ea3087 (diff)
Remove some warnings in the Cocoa build.
After discussing with some of the Objective-C people I have finally got a fair number of the warnings to disappear in both 10.5 and 10.6. I also took the opportunity to remove a bunch of other warnings. Reviewed by: Morten Sørvig
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qcocoamenu_mac_p.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/widgets/qcocoamenu_mac_p.h b/src/gui/widgets/qcocoamenu_mac_p.h
index cd53692451..8eb6fba08a 100644
--- a/src/gui/widgets/qcocoamenu_mac_p.h
+++ b/src/gui/widgets/qcocoamenu_mac_p.h
@@ -56,16 +56,23 @@
QT_FORWARD_DECLARE_CLASS(QMenu)
-@interface QT_MANGLE_NAMESPACE(QCocoaMenu) : NSMenu
-{
- QMenu *qmenu;
-}
-- (id)initWithQMenu:(QMenu*)menu;
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+
+@protocol NSMenuDelegate <NSObject>
- (void)menu:(NSMenu*)menu willHighlightItem:(NSMenuItem*)item;
- (void)menuWillOpen:(NSMenu*)menu;
- (void)menuWillClose:(NSMenu*)menu;
- (BOOL)hasShortcut:(NSMenu *)menu forKey:(NSString *)key forModifiers:(NSUInteger)modifier
whichItem:(NSMenuItem**)outItem;
+@end
+
+#endif
+
+@interface QT_MANGLE_NAMESPACE(QCocoaMenu) : NSMenu <NSMenuDelegate>
+{
+ QMenu *qmenu;
+}
+- (id)initWithQMenu:(QMenu*)menu;
- (BOOL)menuHasKeyEquivalent:(NSMenu *)menu forEvent:(NSEvent *)event target:(id *)target action:(SEL *)action;
@end
#endif