diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-25 13:56:27 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-25 14:26:32 (GMT) |
commit | f405a89621b4bfe957d7e0e4d321a9ea0931d34b (patch) | |
tree | b8e1613664e15c8d557ff8fd66d178da4ca33517 /src/gui/util | |
parent | df4d9f46e370a35c3178d95cae2a873e8a23ddb5 (diff) | |
download | Qt-f405a89621b4bfe957d7e0e4d321a9ea0931d34b.zip Qt-f405a89621b4bfe957d7e0e4d321a9ea0931d34b.tar.gz Qt-f405a89621b4bfe957d7e0e4d321a9ea0931d34b.tar.bz2 |
Cocoa: Usage of QMacCocoaAutoReleasePool makes CPU peak
The reason was that QMacCocoaAutoReleasePool included a
a call to NSApplicationLoad(). This call should only be
made for carbon based application anyway, so we just ifdef
it out (event how clumsy the placing of the call is). The
CPU problem came because after the call, [NSApp isRunning]
would return true, an as such, confuse the event dispatcher
later on.
Reviewed-by: MortenS
Diffstat (limited to 'src/gui/util')
-rw-r--r-- | src/gui/util/qsystemtrayicon_mac.mm | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index ae805f6..0265a83 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -569,16 +569,3 @@ private: } @end - -/* Done here because this is the only .mm for now! -Sam */ -QMacCocoaAutoReleasePool::QMacCocoaAutoReleasePool() -{ - NSApplicationLoad(); - pool = (void*)[[NSAutoreleasePool alloc] init]; -} - -QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool() -{ - [(NSAutoreleasePool*)pool release]; -} - |