Changeset 846 for trunk/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 180 180 181 181 // This function will only be called when NSApp is actually running. Before 182 // that, the kAEQuitApplication apple event will be sendt to182 // that, the kAEQuitApplication Apple event will be sent to 183 183 // QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm 184 184 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender … … 202 202 // INVARIANT: No event loop is executing. This probably 203 203 // means that Qt is used as a plugin, or as a part of a native 204 // Cocoa application. In any case it should be fine to 204 // Cocoa application. In any case it should be fine to 205 205 // terminate now: 206 206 return NSTerminateNow; 207 } else { 208 // Prevent Cocoa from terminating the application, since this simply 209 // exits the program whithout allowing QApplication::exec() to return. 210 // The call to QApplication::quit() above will instead quit the 211 // application from the Qt side. 212 return NSTerminateCancel; 213 } 207 } 208 209 return NSTerminateCancel; 214 210 } 215 211 … … 318 314 } 319 315 316 - (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent 317 { 318 Q_UNUSED(event); 319 Q_UNUSED(replyEvent); 320 [NSApp terminate:self]; 321 } 322 323 - (void)qtDispatcherToQAction:(id)sender 324 { 325 [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; 326 } 327 320 328 @end 321 329 #endif
Note:
See TracChangeset
for help on using the changeset viewer.