diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-23 13:12:29 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-23 13:12:29 (GMT) |
commit | d9cd51f412cf84ec9cd929e5d35c995b8904b49d (patch) | |
tree | 96a346dca9eb703127bccea469aa5cd679e958ef /src/gui/util | |
parent | 0ba6a795f786dc19486551fed2344f394b144a08 (diff) | |
parent | 5138c39116a03e36005a03f47f718fced6cc6d4e (diff) | |
download | Qt-d9cd51f412cf84ec9cd929e5d35c995b8904b49d.zip Qt-d9cd51f412cf84ec9cd929e5d35c995b8904b49d.tar.gz Qt-d9cd51f412cf84ec9cd929e5d35c995b8904b49d.tar.bz2 |
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt
Conflicts:
src/3rdparty/webkit/VERSION
src/3rdparty/webkit/WebCore/ChangeLog
src/3rdparty/webkit/WebKit/qt/ChangeLog
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
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]; |