Changeset 846 for trunk/src/gui/kernel/qeventdispatcher_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/qeventdispatcher_mac.mm
r769 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) … … 91 91 #ifndef QT_NO_THREAD 92 92 # include "qmutex.h" 93 #endif 93 94 94 95 QT_BEGIN_NAMESPACE 95 96 96 97 QT_USE_NAMESPACE 97 #endif98 98 99 99 /***************************************************************************** … … 493 493 case NSOtherMouseUp: 494 494 case NSOtherMouseDragged: 495 #ifndef QT_NO_GESTURES 495 496 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 496 497 case NSEventTypeGesture: // touch events … … 501 502 case NSEventTypeEndGesture: 502 503 #endif 504 #endif // QT_NO_GESTURES 503 505 result = true; 504 506 break; … … 549 551 Q_D(QEventDispatcherMac); 550 552 d->interrupt = false; 553 554 #ifdef QT_MAC_USE_COCOA 555 bool interruptLater = false; 556 QtMacInterruptDispatcherHelp::cancelInterruptLater(); 557 #endif 558 551 559 // In case we end up recursing while we now process events, make sure 552 560 // that we send remaining posted Qt events before this call returns: … … 563 571 NSEvent* event = 0; 564 572 565 // If Qt is used as a plugin, or just added into a native cocoa 566 // application, we should not run or stop NSApplication; 567 // This will be done from outside Qt. 568 // And if processEvents is called manually (rather than from QEventLoop), we 569 // cannot enter a tight loop and block the call, but instead return after one flush: 570 bool canExec_3rdParty = d->nsAppRunCalledByQt || ![NSApp isRunning]; 571 bool canExec_Qt = flags & QEventLoop::DialogExec || flags & QEventLoop::EventLoopExec; 573 // First, send all previously excluded input events, if any: 574 if (!(flags & QEventLoop::ExcludeUserInputEvents)) { 575 while (!d->queuedUserInputEvents.isEmpty()) { 576 event = static_cast<NSEvent *>(d->queuedUserInputEvents.takeFirst()); 577 if (!filterEvent(event)) { 578 qt_mac_send_event(flags, event, 0); 579 retVal = true; 580 } 581 [event release]; 582 } 583 } 584 585 // If Qt is used as a plugin, or as an extension in a native cocoa 586 // application, we should not run or stop NSApplication; This will be 587 // done from the application itself. And if processEvents is called 588 // manually (rather than from a QEventLoop), we cannot enter a tight 589 // loop and block this call, but instead we need to return after one flush: 590 const bool canExec_3rdParty = d->nsAppRunCalledByQt || ![NSApp isRunning]; 591 const bool canExec_Qt = flags & QEventLoop::DialogExec || flags & QEventLoop::EventLoopExec; 572 592 573 593 if (canExec_Qt && canExec_3rdParty) { 574 594 // We can use exec-mode, meaning that we can stay in a tight loop until 575 // interrupted. This is mostly an optimization, but it also allow us 576 // to use [NSApp run], which is the recommended way of running applications 577 // in cocoa. [NSApp run] should be called at least once for any cocoa app. 595 // interrupted. This is mostly an optimization, but it allow us to use 596 // [NSApp run], which is the normal code path for cocoa applications. 578 597 if (NSModalSession session = d->currentModalSession()) { 579 598 QBoolBlocker execGuard(d->currentExecIsNSAppRun, false); 580 599 while ([NSApp runModalSession:session] == NSRunContinuesResponse && !d->interrupt) 581 600 qt_mac_waitForMoreModalSessionEvents(); 601 582 602 if (!d->interrupt && session == d->currentModalSessionCached) { 583 // INVARIANT: Someone called e.g.[NSApp stopModal:] from outside the event603 // Someone called [NSApp stopModal:] from outside the event 584 604 // dispatcher (e.g to stop a native dialog). But that call wrongly stopped 585 605 // 'session' as well. As a result, we need to restart all internal sessions: … … 592 612 } 593 613 retVal = true; 594 } else do{595 // INVARIANT:We cannot block the thread (and run in a tight loop).614 } else { 615 // We cannot block the thread (and run in a tight loop). 596 616 // Instead we will process all current pending events and return. 597 bool mustRelease = false; 598 599 if (!(flags & QEventLoop::ExcludeUserInputEvents) && !d->queuedUserInputEvents.isEmpty()) { 600 // Process a pending user input event 601 mustRelease = true; 602 event = static_cast<NSEvent *>(d->queuedUserInputEvents.takeFirst()); 603 } else { 604 if (NSModalSession session = d->currentModalSession()) { 605 if (flags & QEventLoop::WaitForMoreEvents) 606 qt_mac_waitForMoreModalSessionEvents(); 607 NSInteger status = [NSApp runModalSession:session]; 608 if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { 609 // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event 610 // dispatcher (e.g to stop a native dialog). But that call wrongly stopped 611 // 'session' as well. As a result, we need to restart all internal sessions: 612 d->temporarilyStopAllModalSessions(); 613 } 614 retVal = true; 615 break; 616 } else { 617 event = [NSApp nextEventMatchingMask:NSAnyEventMask 618 untilDate:nil 619 inMode:NSDefaultRunLoopMode 620 dequeue: YES]; 621 622 if (event != nil) { 623 if (flags & QEventLoop::ExcludeUserInputEvents) { 624 if (IsMouseOrKeyEvent(event)) { 625 // retain event here? 626 [event retain]; 627 d->queuedUserInputEvents.append(event); 628 continue; 629 } 617 d->ensureNSAppInitialized(); 618 if (NSModalSession session = d->currentModalSession()) { 619 if (flags & QEventLoop::WaitForMoreEvents) 620 qt_mac_waitForMoreModalSessionEvents(); 621 NSInteger status = [NSApp runModalSession:session]; 622 if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { 623 // INVARIANT: Someone called [NSApp stopModal:] from outside the event 624 // dispatcher (e.g to stop a native dialog). But that call wrongly stopped 625 // 'session' as well. As a result, we need to restart all internal sessions: 626 d->temporarilyStopAllModalSessions(); 627 } 628 retVal = true; 629 } else do { 630 event = [NSApp nextEventMatchingMask:NSAnyEventMask 631 untilDate:nil 632 inMode:NSDefaultRunLoopMode 633 dequeue: YES]; 634 635 if (event) { 636 if (flags & QEventLoop::ExcludeUserInputEvents) { 637 if (IsMouseOrKeyEvent(event)) { 638 [event retain]; 639 d->queuedUserInputEvents.append(event); 640 continue; 630 641 } 631 642 } 643 if (!filterEvent(event) && qt_mac_send_event(flags, event, 0)) 644 retVal = true; 632 645 } 633 } 634 if (event) { 635 if (!filterEvent(event) && qt_mac_send_event(flags, event, 0))636 retVal = true;637 if (mustRelease)638 [event release];639 }640 } while(!d->interrupt && event != nil);641 646 } while (!d->interrupt && event != nil); 647 648 // Since the window that holds modality might have changed while processing 649 // events, we we need to interrupt when we return back the previous process 650 // event recursion to ensure that we spin the correct modal session. 651 // We do the interruptLater at the end of the function to ensure that we don't 652 // disturb the 'wait for more events' below (as deleteLater will post an event): 653 interruptLater = true; 654 } 642 655 #else 643 656 do { … … 691 704 } 692 705 706 // If we're interrupted, we need to interrupt the _current_ 707 // recursion as well to check if it is still supposed to be 708 // executing. This way we wind down the stack until we land 709 // on a recursion that again calls processEvents (typically 710 // from QEventLoop), and set interrupt to false: 711 if (d->interrupt) 712 interrupt(); 713 693 714 #ifdef QT_MAC_USE_COCOA 694 // In case we _now_ process events using [NSApp run], we need to stop it to 695 // ensure that: 696 // 1. the QEventLoop that called us is still executing, or 697 // 2. we have a modal session that needs to be spun instead. 698 // In case this is a plain call to processEvents (perhaps from a loop) 699 // from the application (rather than from a QEventLoop), we delay the 700 // interrupting until we/ actually enter a lower loop level (hence the 701 // deffered delete of the object below): 702 QtMacInterruptDispatcherHelp::interruptLater(); 703 #endif 704 705 if (d->interrupt) { 706 // We should continue to leave all recursion to processEvents until 707 // processEvents is called again (e.g. from a QEventLoop that 708 // was not yet told to quit: 709 interrupt(); 710 } 715 if (interruptLater) 716 QtMacInterruptDispatcherHelp::interruptLater(); 717 #endif 711 718 712 719 return retVal; … … 738 745 MacTimerHash QEventDispatcherMacPrivate::macTimerHash; 739 746 bool QEventDispatcherMacPrivate::blockSendPostedEvents = false; 747 bool QEventDispatcherMacPrivate::interrupt = false; 740 748 741 749 #ifdef QT_MAC_USE_COCOA … … 743 751 bool QEventDispatcherMacPrivate::currentExecIsNSAppRun = false; 744 752 bool QEventDispatcherMacPrivate::nsAppRunCalledByQt = false; 753 bool QEventDispatcherMacPrivate::cleanupModalSessionsNeeded = false; 745 754 NSModalSession QEventDispatcherMacPrivate::currentModalSessionCached = 0; 746 755 747 int QEventDispatcherMacPrivate::activeModalSessionCount() 748 { 749 // Returns the number of modal sessions created 750 // (and not just pushed onto the stack, pending to be created) 751 int count = 0; 752 for (int i=cocoaModalSessionStack.size()-1; i>=0; --i) { 753 QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; 754 if (info.session) 755 ++count; 756 } 757 return count; 756 void QEventDispatcherMacPrivate::ensureNSAppInitialized() 757 { 758 // Some elements in Cocoa require NSApplication to be running before 759 // they get fully initialized, in particular the menu bar. This 760 // function is intended for cases where a dialog is told to execute before 761 // QApplication::exec is called, or the application spins the events loop 762 // manually rather than calling QApplication:exec. 763 // The function makes sure that NSApplication starts running, but stops 764 // it again as soon as the send posted events callback is called. That way 765 // we let Cocoa finish the initialization it seems to need. We'll only 766 // apply this trick at most once for any application, and we avoid doing it 767 // for the common case where main just starts QApplication::exec. 768 if (nsAppRunCalledByQt || [NSApp isRunning]) 769 return; 770 nsAppRunCalledByQt = true; 771 QBoolBlocker block1(interrupt, true); 772 QBoolBlocker block2(currentExecIsNSAppRun, true); 773 [NSApp run]; 758 774 } 759 775 760 776 void QEventDispatcherMacPrivate::temporarilyStopAllModalSessions() 761 777 { 762 // Stop all created modal session, and as such, make then 763 // pending again. The next call to currentModalSession will 764 // recreate the session on top again: 778 // Flush, and Stop, all created modal session, and as 779 // such, make them pending again. The next call to 780 // currentModalSession will recreate them again. The 781 // reason to stop all session like this is that otherwise 782 // a call [NSApp stop] would not stop NSApp, but rather 783 // the current modal session. So if we need to stop NSApp 784 // we need to stop all the modal session first. To avoid changing 785 // the stacking order of the windows while doing so, we put 786 // up a block that is used in QCocoaWindow and QCocoaPanel: 765 787 int stackSize = cocoaModalSessionStack.size(); 766 for (int i= stackSize-1; i>=0; --i) {788 for (int i=0; i<stackSize; ++i) { 767 789 QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; 768 790 if (info.session) { … … 783 805 if (cocoaModalSessionStack.isEmpty()) 784 806 return 0; 785 786 // Since this code will end up calling our Qt event handler787 // (also from beginModalSessionForWindow), we need to block788 // that to avoid side effects of events beeing delivered:789 QBoolBlocker block(blockSendPostedEvents, true);790 791 if (![NSApp isRunning]) {792 // Sadly, we need to introduce this little event flush793 // to stop dialogs from blinking/poping in front if a794 // modal session restart was needed:795 while (NSEvent *event = [NSApp nextEventMatchingMask:0796 untilDate:nil797 inMode:NSDefaultRunLoopMode798 dequeue: YES]) {799 qt_mac_send_event(0, event, 0);800 }801 }802 807 803 808 int sessionCount = cocoaModalSessionStack.size(); … … 813 818 if (!window) 814 819 continue; 820 821 ensureNSAppInitialized(); 822 QBoolBlocker block1(blockSendPostedEvents, true); 823 info.nswindow = window; 824 [(NSWindow*) info.nswindow retain]; 825 int levelBeforeEnterModal = [window level]; 815 826 info.session = [NSApp beginModalSessionForWindow:window]; 827 // Make sure we don't stack the window lower that it was before 828 // entering modal, in case it e.g. had the stays-on-top flag set: 829 if (levelBeforeEnterModal > [window level]) 830 [window setLevel:levelBeforeEnterModal]; 816 831 } 817 832 currentModalSessionCached = info.session; 818 }819 833 cleanupModalSessionsNeeded = false; 834 } 820 835 return currentModalSessionCached; 821 836 } … … 830 845 if (window && [window isKindOfClass:[NSPanel class]]) { 831 846 [static_cast<NSPanel *>(window) setWorksWhenModal:worksWhenModal]; 832 if (worksWhenModal && dialogs[i]->isVisible()){847 if (worksWhenModal && [window isVisible]){ 833 848 [window orderFront:window]; 834 849 } … … 842 857 // active. And make the dialog children of 843 858 // the previous modal dialog unactive again: 859 QMacCocoaAutoReleasePool pool; 844 860 int size = cocoaModalSessionStack.size(); 845 861 if (size > 0){ … … 853 869 } 854 870 871 void QEventDispatcherMacPrivate::cleanupModalSessions() 872 { 873 // Go through the list of modal sessions, and end those 874 // that no longer has a widget assosiated; no widget means 875 // the the session has logically ended. The reason we wait like 876 // this to actually end the sessions for real (rather than at the 877 // point they were marked as stopped), is that ending a session 878 // when no other session runs below it on the stack will make cocoa 879 // drop some events on the floor. 880 QMacCocoaAutoReleasePool pool; 881 int stackSize = cocoaModalSessionStack.size(); 882 883 for (int i=stackSize-1; i>=0; --i) { 884 QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; 885 if (info.widget) { 886 // This session has a widget, and is therefore not marked 887 // as stopped. So just make it current. There might still be other 888 // stopped sessions on the stack, but those will be stopped on 889 // a later "cleanup" call. 890 currentModalSessionCached = info.session; 891 break; 892 } 893 cocoaModalSessionStack.remove(i); 894 currentModalSessionCached = 0; 895 if (info.session) { 896 [NSApp endModalSession:info.session]; 897 [(NSWindow *)info.nswindow release]; 898 } 899 } 900 901 updateChildrenWorksWhenModal(); 902 cleanupModalSessionsNeeded = false; 903 } 904 855 905 void QEventDispatcherMacPrivate::beginModalSession(QWidget *widget) 856 906 { … … 861 911 // currentModalSession). A QCocoaModalSessionInfo is considered pending to be stopped if 862 912 // the widget pointer is zero, and the session pointer is non-zero (it will be fully 863 // stopped in endModalSession().864 QCocoaModalSessionInfo info = {widget, 0 };913 // stopped in cleanupModalSessions()). 914 QCocoaModalSessionInfo info = {widget, 0, 0}; 865 915 cocoaModalSessionStack.push(info); 866 916 updateChildrenWorksWhenModal(); … … 878 928 for (int i=stackSize-1; i>=0; --i) { 879 929 QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; 880 if (info.widget == widget) 930 if (info.widget == widget) { 881 931 info.widget = 0; 882 } 883 884 // Now we stop, and remove, all sessions marked as pending 885 // to be stopped on _top_ of the stack, if any: 886 bool needToInterruptEventDispatcher = false; 887 bool needToUpdateChildrenWorksWhenModal = false; 888 889 for (int i=stackSize-1; i>=0; --i) { 890 QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; 891 if (info.widget) 892 break; 893 cocoaModalSessionStack.remove(i); 894 needToUpdateChildrenWorksWhenModal = true; 895 currentModalSessionCached = 0; 896 if (info.session) { 897 [NSApp endModalSession:info.session]; 898 needToInterruptEventDispatcher = true; 899 } 900 } 901 902 if (needToUpdateChildrenWorksWhenModal) 903 updateChildrenWorksWhenModal(); 904 if (needToInterruptEventDispatcher) 905 QEventDispatcherMac::instance()->interrupt(); 932 if (i == stackSize-1) { 933 // The top sessions ended. Interrupt the event dispatcher 934 // to start spinning the correct session immidiatly: 935 currentModalSessionCached = 0; 936 cleanupModalSessionsNeeded = true; 937 QEventDispatcherMac::instance()->interrupt(); 938 } 939 } 940 } 906 941 } 907 942 … … 909 944 910 945 QEventDispatcherMacPrivate::QEventDispatcherMacPrivate() 911 : interrupt(false)912 946 { 913 947 } … … 968 1002 inline static void processPostedEvents(QEventDispatcherMacPrivate *const d, const bool blockSendPostedEvents) 969 1003 { 970 if (blockSendPostedEvents || d->interrupt) { 1004 if (blockSendPostedEvents) { 1005 // We're told to not send posted events (because the event dispatcher 1006 // is currently working on setting up the correct session to run). But 1007 // we still need to make sure that we don't fall asleep until pending events 1008 // are sendt, so we just signal this need, and return: 971 1009 CFRunLoopSourceSignal(d->postedEventsSource); 972 } else { 973 if (!d->threadData->canWait || (d->serialNumber != d->lastSerial)) { 974 d->lastSerial = d->serialNumber; 975 QApplicationPrivate::sendPostedEvents(0, 0, d->threadData); 976 } 1010 return; 1011 } 1012 1013 #ifdef QT_MAC_USE_COCOA 1014 if (d->cleanupModalSessionsNeeded) 1015 d->cleanupModalSessions(); 1016 #endif 1017 1018 if (d->interrupt) { 1019 #ifdef QT_MAC_USE_COCOA 1020 if (d->currentExecIsNSAppRun) { 1021 // The event dispatcher has been interrupted. But since 1022 // [NSApplication run] is running the event loop, we 1023 // delayed stopping it until now (to let cocoa process 1024 // pending cocoa events first). 1025 if (d->currentModalSessionCached) 1026 d->temporarilyStopAllModalSessions(); 1027 [NSApp stop:NSApp]; 1028 d->cancelWaitForMoreEvents(); 1029 } 1030 #endif 1031 return; 1032 } 1033 1034 if (!d->threadData->canWait || (d->serialNumber != d->lastSerial)) { 1035 d->lastSerial = d->serialNumber; 1036 QApplicationPrivate::sendPostedEvents(0, 0, d->threadData); 977 1037 } 978 1038 } … … 984 1044 Q_UNUSED(ref); 985 1045 Q_UNUSED(activity); 1046 #ifdef QT_MAC_USE_COCOA 1047 QApplicationPrivate::qt_initAfterNSAppStarted(); 1048 #endif 986 1049 processPostedEvents(static_cast<QEventDispatcherMacPrivate *>(info), blockSendPostedEvents); 987 1050 } … … 991 1054 processPostedEvents(static_cast<QEventDispatcherMacPrivate *>(info), blockSendPostedEvents); 992 1055 } 1056 1057 #ifdef QT_MAC_USE_COCOA 1058 void QEventDispatcherMacPrivate::cancelWaitForMoreEvents() 1059 { 1060 // In case the event dispatcher is waiting for more 1061 // events somewhere, we post a dummy event to wake it up: 1062 QMacCocoaAutoReleasePool pool; 1063 [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint 1064 modifierFlags:0 timestamp:0. windowNumber:0 context:0 1065 subtype:QtCocoaEventSubTypeWakeup data1:0 data2:0] atStart:NO]; 1066 } 1067 #endif 993 1068 994 1069 void QEventDispatcherMac::interrupt() … … 1001 1076 CFRunLoopStop(mainRunLoop()); 1002 1077 #else 1003 QMacCocoaAutoReleasePool pool; 1004 // In case we wait for more events inside 1005 // processEvents (or NSApp run), post a dummy to wake it up: 1006 static const short NSAppShouldStopForQt = SHRT_MAX; 1007 [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint 1008 modifierFlags:0 timestamp:0. windowNumber:0 context:0 1009 subtype:NSAppShouldStopForQt data1:0 data2:0] atStart:NO]; 1010 1011 if (d->activeModalSessionCount() == 0) { 1012 // We should only stop NSApp if we actually started it (and 1013 // not some 3rd party application, e.g. if we are a plugin). 1014 if (d->nsAppRunCalledByQt) 1015 [NSApp stop:NSApp]; 1016 } 1078 // We do nothing more here than setting d->interrupt = true, and 1079 // poke the event loop if it is sleeping. Actually stopping 1080 // NSApp, or the current modal session, is done inside the send 1081 // posted events callback. We do this to ensure that all current pending 1082 // cocoa events gets delivered before we stop. Otherwise, if we now stop 1083 // the last event loop recursion, cocoa will just drop pending posted 1084 // events on the floor before we get a chance to reestablish a new session. 1085 d->cancelWaitForMoreEvents(); 1017 1086 #endif 1018 1087 } … … 1055 1124 } 1056 1125 1057 /////////////////////////////////////////////////////////////////////////////1058 1059 1126 #ifdef QT_MAC_USE_COCOA 1060 1127 … … 1063 1130 QtMacInterruptDispatcherHelp::QtMacInterruptDispatcherHelp() : cancelled(false) 1064 1131 { 1065 // This is the whole point of encapsulation this code 1066 // inside a class; we can make the code (inside destructor) 1067 // execute on lower loop level: 1132 // The whole point of this class is that we enable a way to interrupt 1133 // the event dispatcher when returning back to a lower recursion level 1134 // than where interruptLater was called. This is needed to detect if 1135 // [NSApp run] should still be running at the recursion level it is at. 1136 // Since the interrupt is canceled if processEvents is called before 1137 // this object gets deleted, we also avoid interrupting unnecessary. 1068 1138 deleteLater(); 1069 1139 } … … 1073 1143 if (cancelled) 1074 1144 return; 1075 1076 1145 instance = 0; 1077 1078 if (QEventDispatcherMacPrivate::currentExecIsNSAppRun) {1079 int activeCount = QEventDispatcherMacPrivate::activeModalSessionCount();1080 if (activeCount > 0) {1081 // The problem we now have hit: [NSApp stop] will not stop NSApp1082 // if a session is active; it will stop the session instead.1083 // So to stop NSApp, we need to temporarily stop all the1084 // sessions, then stop NSApp, then restart the session on top again.1085 // We need to do this to ensure that we're not stuck inside1086 // [NSApp run] when we really should be running a modal session:1087 QEventDispatcherMacPrivate::temporarilyStopAllModalSessions();1088 }1089 }1090 // Always interrupt once more in case the modal session stack changed1091 // while processEvents was called manually from within the application:1092 1146 QEventDispatcherMac::instance()->interrupt(); 1093 1147 } 1094 1148 1095 void QtMacInterruptDispatcherHelp::interruptLater() { 1096 if (instance) { 1097 instance->cancelled = true; 1098 delete instance; 1099 } 1149 void QtMacInterruptDispatcherHelp::cancelInterruptLater() 1150 { 1151 if (!instance) 1152 return; 1153 instance->cancelled = true; 1154 delete instance; 1155 instance = 0; 1156 } 1157 1158 void QtMacInterruptDispatcherHelp::interruptLater() 1159 { 1160 cancelInterruptLater(); 1100 1161 instance = new QtMacInterruptDispatcherHelp; 1101 1162 } … … 1104 1165 1105 1166 QT_END_NAMESPACE 1167
Note:
See TracChangeset
for help on using the changeset viewer.