diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2018-03-29 12:49:29 -0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2018-04-05 18:54:48 +0000 |
commit | 13cb34c1b10bb00d19f2327f7e5709ac2bda02e1 (patch) | |
tree | 4daca5aef0fe8903e5809a990f3d13d35a471ce4 /src/plugins | |
parent | e2694fa602e95a9043561e7dfb9f5956c08a5f14 (diff) |
QNSView: Remove isMenuView property
This is always NO and no longer needed.
Change-Id: I32a3dca6cc427cb074ee3d58bf2202f57af4c623
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 4 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 11 |
3 files changed, 3 insertions, 13 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 35384c626e..8445323f19 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -949,7 +949,7 @@ void QCocoaWindow::windowDidBecomeKey() QWindowSystemInterface::handleEnterEvent(m_enterLeaveTargetWindow, windowPoint, screenPoint); } - if (!windowIsPopupType() && !qnsview_cast(m_view).isMenuView) + if (!windowIsPopupType()) QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>(window()); } @@ -967,7 +967,7 @@ void QCocoaWindow::windowDidResignKey() NSWindow *keyWindow = [NSApp keyWindow]; if (!keyWindow || keyWindow == m_view.window) { // No new key window, go ahead and set the active window to zero - if (!windowIsPopupType() && !qnsview_cast(m_view).isMenuView) + if (!windowIsPopupType()) QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>(0); } } diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index 5b92624e81..100f96d27a 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -85,7 +85,6 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper)); @interface QT_MANGLE_NAMESPACE(QNSView) (QtExtras) @property (nonatomic, readonly) QCocoaWindow *platformWindow; -@property (nonatomic, readonly) BOOL isMenuView; @end QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSView); diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index bd44f6568a..8fc6482f36 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -136,7 +136,6 @@ bool m_scrolling; bool m_updatingDrag; NSEvent *m_currentlyInterpretedKeyEvent; - bool m_isMenuView; QSet<quint32> m_acceptedKeyDowns; bool m_updateRequested; } @@ -161,7 +160,6 @@ m_scrolling = false; m_updatingDrag = false; m_currentlyInterpretedKeyEvent = 0; - m_isMenuView = false; self.focusRingType = NSFocusRingTypeNone; self.cursor = nil; m_updateRequested = false; @@ -296,7 +294,7 @@ return NO; if ([self isTransparentForUserInput]) return NO; - if (!m_platformWindow->windowIsPopupType() && !m_isMenuView) + if (!m_platformWindow->windowIsPopupType()) QWindowSystemInterface::handleWindowActivated([self topLevelWindow]); return YES; } @@ -305,8 +303,6 @@ { if (!m_platformWindow) return NO; - if (m_isMenuView) - return NO; if (m_platformWindow->shouldRefuseKeyWindowAndFirstResponder()) return NO; if ([self isTransparentForUserInput]) @@ -375,9 +371,4 @@ return m_platformWindow.data();; } -- (BOOL)isMenuView -{ - return m_isMenuView; -} - @end |