diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-23 12:42:32 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-23 12:44:08 (GMT) |
commit | f65ed7b51a573dd8429feecc19c7abe8a0a36114 (patch) | |
tree | 5ce70bc3ca67573b4a3b07c13e1a8a8be520f4bd /src/gui/util | |
parent | 3464a05a94c4e638d91b2151d6aad70f78ea3087 (diff) | |
download | Qt-f65ed7b51a573dd8429feecc19c7abe8a0a36114.zip Qt-f65ed7b51a573dd8429feecc19c7abe8a0a36114.tar.gz Qt-f65ed7b51a573dd8429feecc19c7abe8a0a36114.tar.bz2 |
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/util')
-rw-r--r-- | src/gui/util/qsystemtrayicon_mac.mm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index 370bc0c..b733db5 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -124,12 +124,20 @@ QT_USE_NAMESPACE -(void)mousePressed:(NSEvent *)mouseEvent; @end -@interface QNSMenu : NSMenu { + +#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5 + +@protocol NSMenuDelegate <NSObject> +-(void)menuNeedsUpdate:(NSMenu*)menu; +@end +#endif + + +@interface QNSMenu : NSMenu <NSMenuDelegate> { QMenu *qmenu; } -(QMenu*)menu; -(id)initWithQMenu:(QMenu*)qmenu; --(void)menuNeedsUpdate:(QNSMenu*)menu; -(void)selectedAction:(id)item; @end @@ -455,10 +463,11 @@ private: } return self; } --(QMenu*)menu { - return qmenu; +-(QMenu*)menu { + return qmenu; } --(void)menuNeedsUpdate:(QNSMenu*)menu { +-(void)menuNeedsUpdate:(NSMenu*)nsmenu { + QNSMenu *menu = static_cast<QNSMenu *>(nsmenu); emit static_cast<QSystemTrayIconQMenu*>(menu->qmenu)->doAboutToShow(); for(int i = [menu numberOfItems]-1; i >= 0; --i) [menu removeItemAtIndex:i]; |