Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qcocoaapplicationdelegate_mac.mm

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    180180
    181181// This function will only be called when NSApp is actually running. Before
    182 // that, the kAEQuitApplication apple event will be sendt to
     182// that, the kAEQuitApplication Apple event will be sent to
    183183// QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm
    184184- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
     
    202202        // INVARIANT: No event loop is executing. This probably
    203203        // 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
    205205        // terminate now:
    206206        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;
    214210}
    215211
     
    318314}
    319315
     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
    320328@end
    321329#endif
Note: See TracChangeset for help on using the changeset viewer.