summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.h1
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm5
2 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/platforms/ios/qiosinputcontext.h b/src/plugins/platforms/ios/qiosinputcontext.h
index aec1686b93..13255ada56 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.h
+++ b/src/plugins/platforms/ios/qiosinputcontext.h
@@ -77,7 +77,6 @@ private:
QIOSKeyboardListener *m_keyboardListener;
QUIView *m_focusView;
bool m_hasPendingHideRequest;
- QObject *m_focusObject;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm
index 15f5082f62..d426028c46 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.mm
+++ b/src/plugins/platforms/ios/qiosinputcontext.mm
@@ -179,7 +179,6 @@ QIOSInputContext::QIOSInputContext()
, m_keyboardListener([[QIOSKeyboardListener alloc] initWithQIOSInputContext:this])
, m_focusView(0)
, m_hasPendingHideRequest(false)
- , m_focusObject(0)
{
if (isQtApplication())
connect(qGuiApp->inputMethod(), &QInputMethod::cursorRectangleChanged, this, &QIOSInputContext::cursorRectangleChanged);
@@ -227,8 +226,6 @@ bool QIOSInputContext::isInputPanelVisible() const
void QIOSInputContext::setFocusObject(QObject *focusObject)
{
- m_focusObject = focusObject;
-
if (!focusObject || !m_focusView || !m_focusView.isFirstResponder) {
scroll(0);
return;
@@ -262,7 +259,7 @@ void QIOSInputContext::cursorRectangleChanged()
// itself moves, we need to ask the focus object for ImCursorRectangle:
static QPoint prevCursor;
QInputMethodQueryEvent queryEvent(Qt::ImCursorRectangle);
- QCoreApplication::sendEvent(m_focusObject, &queryEvent);
+ QCoreApplication::sendEvent(qApp->focusObject(), &queryEvent);
QPoint cursor = queryEvent.value(Qt::ImCursorRectangle).toRect().topLeft();
if (cursor != prevCursor)
scrollToCursor();