diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-13 23:40:55 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-13 23:40:55 (GMT) |
commit | ac519ee416e06f4ab471f102da306f94de21c90d (patch) | |
tree | 7ae2cbba367996618d2c73a2d7b06f09aef5cdf2 /src/gui/util/qsystemtrayicon_mac.mm | |
parent | 115b7172d54a5a331b9e00d20f6694749179c484 (diff) | |
parent | 8c6b5c53a2f6f8c9113fa616b458dde0be86a9e2 (diff) | |
download | Qt-ac519ee416e06f4ab471f102da306f94de21c90d.zip Qt-ac519ee416e06f4ab471f102da306f94de21c90d.tar.gz Qt-ac519ee416e06f4ab471f102da306f94de21c90d.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (159 commits)
Doc: Adding loading image to search textbox
qdoc: Yet another revision of the top doc page.
Doc: Update on web template
Added QDateTime::msecsTo()
Doc: Fixed tables and images for the new docs
qdoc: Yet another revision of the top doc page.
Revert "Improve QUrl handling of local file paths"
Revert "[QNAM FTP] Check for the "ftp" scheme case-insensitively"
Revert "QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, not to"
Revert "Use QUrl::isLocalFile and fix the scheme checking in local URLs."
qdoc: Another revision of the top doc page.
Doc correction to css
Doc: Updates to the html template and javascript
tst_SuiteTest: Fix a meaningless switch statement
My 4.7.0 changelog entries.
qdoc: Fixed annotated list generation to use <td>, not <th>.
Doc: Tuning search script
qdoc: Reorganized examples panel.
Doc: Chages to search feature, css and table order
QtDeclarative: avoid waiting for a network load on URIs with empty schemes.
...
Diffstat (limited to 'src/gui/util/qsystemtrayicon_mac.mm')
-rw-r--r-- | src/gui/util/qsystemtrayicon_mac.mm | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index d943c8c..8aaaa0f 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -75,8 +75,6 @@ #define QT_MAC_SYSTEMTRAY_USE_GROWL -@class QNSMenu; - #include <private/qt_cocoa_helpers_mac_p.h> #include <private/qsystemtrayicon_p.h> #include <qtemporaryfile.h> @@ -98,13 +96,14 @@ QT_END_NAMESPACE QT_USE_NAMESPACE -@class QNSImageView; +@class QT_MANGLE_NAMESPACE(QNSMenu); +@class QT_MANGLE_NAMESPACE(QNSImageView); -@interface QNSStatusItem : NSObject { +@interface QT_MANGLE_NAMESPACE(QNSStatusItem) : NSObject { NSStatusItem *item; QSystemTrayIcon *icon; QSystemTrayIconPrivate *iconPrivate; - QNSImageView *imageCell; + QT_MANGLE_NAMESPACE(QNSImageView) *imageCell; } -(id)initWithIcon:(QSystemTrayIcon*)icon iconPrivate:(QSystemTrayIconPrivate *)iprivate; -(void)dealloc; @@ -115,11 +114,11 @@ QT_USE_NAMESPACE - (void)doubleClickSelector:(id)sender; @end -@interface QNSImageView : NSImageView { +@interface QT_MANGLE_NAMESPACE(QNSImageView) : NSImageView { BOOL down; - QNSStatusItem *parent; + QT_MANGLE_NAMESPACE(QNSStatusItem) *parent; } --(id)initWithParent:(QNSStatusItem*)myParent; +-(id)initWithParent:(QT_MANGLE_NAMESPACE(QNSStatusItem)*)myParent; -(QSystemTrayIcon*)icon; -(void)menuTrackingDone:(NSNotification*)notification; -(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton; @@ -134,7 +133,7 @@ QT_USE_NAMESPACE #endif -@interface QNSMenu : NSMenu <NSMenuDelegate> { +@interface QT_MANGLE_NAMESPACE(QNSMenu) : NSMenu <NSMenuDelegate> { QMenu *qmenu; } -(QMenu*)menu; @@ -148,14 +147,14 @@ class QSystemTrayIconSys public: QSystemTrayIconSys(QSystemTrayIcon *icon, QSystemTrayIconPrivate *d) { QMacCocoaAutoReleasePool pool; - item = [[QNSStatusItem alloc] initWithIcon:icon iconPrivate:d]; + item = [[QT_MANGLE_NAMESPACE(QNSStatusItem) alloc] initWithIcon:icon iconPrivate:d]; } ~QSystemTrayIconSys() { QMacCocoaAutoReleasePool pool; [[[item item] view] setHidden: YES]; [item release]; } - QNSStatusItem *item; + QT_MANGLE_NAMESPACE(QNSStatusItem) *item; }; void QSystemTrayIconPrivate::install_sys() @@ -299,8 +298,8 @@ QT_END_NAMESPACE @implementation NSStatusItem (Qt) @end -@implementation QNSImageView --(id)initWithParent:(QNSStatusItem*)myParent { +@implementation QT_MANGLE_NAMESPACE(QNSImageView) +-(id)initWithParent:(QT_MANGLE_NAMESPACE(QNSStatusItem)*)myParent { self = [super init]; parent = myParent; down = NO; @@ -400,7 +399,7 @@ QT_END_NAMESPACE } @end -@implementation QNSStatusItem +@implementation QT_MANGLE_NAMESPACE(QNSStatusItem) -(id)initWithIcon:(QSystemTrayIcon*)i iconPrivate:(QSystemTrayIconPrivate *)iPrivate { @@ -409,7 +408,7 @@ QT_END_NAMESPACE icon = i; iconPrivate = iPrivate; item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; - imageCell = [[QNSImageView alloc] initWithParent:self]; + imageCell = [[QT_MANGLE_NAMESPACE(QNSImageView) alloc] initWithParent:self]; [item setView: imageCell]; } return self; @@ -453,7 +452,7 @@ QT_END_NAMESPACE [[[self item] view] removeAllToolTips]; iconPrivate->updateToolTip_sys(); #endif - NSMenu *m = [[QNSMenu alloc] initWithQMenu:icon->contextMenu()]; + NSMenu *m = [[QT_MANGLE_NAMESPACE(QNSMenu) alloc] initWithQMenu:icon->contextMenu()]; [m setAutoenablesItems: NO]; [[NSNotificationCenter defaultCenter] addObserver:imageCell selector:@selector(menuTrackingDone:) @@ -481,7 +480,7 @@ private: QSystemTrayIconQMenu(); }; -@implementation QNSMenu +@implementation QT_MANGLE_NAMESPACE(QNSMenu) -(id)initWithQMenu:(QMenu*)qm { self = [super init]; if(self) { @@ -494,7 +493,7 @@ private: return qmenu; } -(void)menuNeedsUpdate:(NSMenu*)nsmenu { - QNSMenu *menu = static_cast<QNSMenu *>(nsmenu); + QT_MANGLE_NAMESPACE(QNSMenu) *menu = static_cast<QT_MANGLE_NAMESPACE(QNSMenu) *>(nsmenu); emit static_cast<QSystemTrayIconQMenu*>(menu->qmenu)->doAboutToShow(); for(int i = [menu numberOfItems]-1; i >= 0; --i) [menu removeItemAtIndex:i]; @@ -539,7 +538,7 @@ private: [nsimage release]; } if(action->menu()) { - QNSMenu *sub = [[QNSMenu alloc] initWithQMenu:action->menu()]; + QT_MANGLE_NAMESPACE(QNSMenu) *sub = [[QT_MANGLE_NAMESPACE(QNSMenu) alloc] initWithQMenu:action->menu()]; [item setSubmenu:sub]; } else { [item setAction:@selector(selectedAction:)]; |