diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2018-04-09 12:06:57 -0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2018-04-10 16:27:23 +0000 |
commit | 4840ec7c68476c95d2d762ed5591f5e0b71ae3e3 (patch) | |
tree | f6f54f3ace7c80fcb9b8c51d707a1da0dc7c0b24 /src/plugins/platforms/cocoa/qnsview_complextext.mm | |
parent | a6c7eeacdc22d82f74eaac15910ed811f73fee3b (diff) |
QNSView: Remove useless QWindow pointer check
It seems that's the only place we were doing any check.
We can remove it since it's not supposed to happen, and
it would have crashed already if it had.
Change-Id: Ic2034d2d278899f30a7d07284057e63a12e8eb10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview_complextext.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_complextext.mm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_complextext.mm b/src/plugins/platforms/cocoa/qnsview_complextext.mm index f0d544c63d..d357082d33 100644 --- a/src/plugins/platforms/cocoa/qnsview_complextext.mm +++ b/src/plugins/platforms/cocoa/qnsview_complextext.mm @@ -257,6 +257,7 @@ { Q_UNUSED(aRange) Q_UNUSED(actualRange) + QObject *fo = m_platformWindow->window()->focusObject(); if (!fo) return NSZeroRect; @@ -267,9 +268,6 @@ if (!queryEvent.value(Qt::ImEnabled).toBool()) return NSZeroRect; - if (!m_platformWindow->window()) - return NSZeroRect; - // The returned rect is always based on the internal cursor. QRect mr = qApp->inputMethod()->cursorRectangle().toRect(); mr.moveBottomLeft(m_platformWindow->window()->mapToGlobal(mr.bottomLeft())); |