diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h index 70887c41c9..2ffc1395ba 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h @@ -177,8 +177,6 @@ public: void maybeCancelWaitForMoreEvents(); void ensureNSAppInitialized(); - void removeQueuedUserInputEvents(int nsWinNumber); - QCFSocketNotifier cfSocketNotifier; QList queuedUserInputEvents; // NSEvent * CFRunLoopSourceRef postedEventsSource; diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index cc63213904..874d3fc24b 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -889,21 +889,6 @@ void QCocoaEventDispatcherPrivate::processPostedEvents() } } -void QCocoaEventDispatcherPrivate::removeQueuedUserInputEvents(int nsWinNumber) -{ - if (nsWinNumber) { - int eventIndex = queuedUserInputEvents.size(); - - while (--eventIndex >= 0) { - NSEvent * nsevent = static_cast(queuedUserInputEvents.at(eventIndex)); - if ([nsevent windowNumber] == nsWinNumber) { - queuedUserInputEvents.removeAt(eventIndex); - [nsevent release]; - } - } - } -} - void QCocoaEventDispatcherPrivate::firstLoopEntry(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info) diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm index 588a91b944..df9e7b8067 100644 --- a/src/plugins/platforms/cocoa/qnswindow.mm +++ b/src/plugins/platforms/cocoa/qnswindow.mm @@ -147,15 +147,7 @@ static bool isMouseEvent(NSEvent *ev) - (void)clearWindow { - if (_window) { - QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast(QGuiApplication::instance()->eventDispatcher()); - if (cocoaEventDispatcher) { - QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = static_cast(QObjectPrivate::get(cocoaEventDispatcher)); - cocoaEventDispatcherPrivate->removeQueuedUserInputEvents([_window windowNumber]); - } - - _window = nil; - } + _window = nil; } - (void)dealloc