diff --git a/src/plugins/platforms/cocoa/qcocoainputcontext.h b/src/plugins/platforms/cocoa/qcocoainputcontext.h index 445dd91866..07317f7705 100644 --- a/src/plugins/platforms/cocoa/qcocoainputcontext.h +++ b/src/plugins/platforms/cocoa/qcocoainputcontext.h @@ -67,7 +67,7 @@ private Q_SLOTS: void focusObjectChanged(QObject *focusObject); private: - QPointer mWindow; + QPointer m_focusWindow; QLocale m_locale; QMacNotificationObserver m_inputSourceObserver; }; diff --git a/src/plugins/platforms/cocoa/qcocoainputcontext.mm b/src/plugins/platforms/cocoa/qcocoainputcontext.mm index 6fe48daa14..b1e4f0d931 100644 --- a/src/plugins/platforms/cocoa/qcocoainputcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoainputcontext.mm @@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE QCocoaInputContext::QCocoaInputContext() : QPlatformInputContext() - , mWindow(QGuiApplication::focusWindow()) + , m_focusWindow(QGuiApplication::focusWindow()) { QMetaObject::invokeMethod(this, "connectSignals", Qt::QueuedConnection); @@ -107,10 +107,10 @@ void QCocoaInputContext::reset() { QPlatformInputContext::reset(); - if (!mWindow) + if (!m_focusWindow) return; - QCocoaWindow *window = static_cast(mWindow->handle()); + QCocoaWindow *window = static_cast(m_focusWindow->handle()); QNSView *view = qnsview_cast(window->view()); if (!view) return; @@ -131,11 +131,11 @@ void QCocoaInputContext::connectSignals() void QCocoaInputContext::focusObjectChanged(QObject *focusObject) { Q_UNUSED(focusObject); - if (mWindow == QGuiApplication::focusWindow()) { - if (!mWindow) + if (m_focusWindow == QGuiApplication::focusWindow()) { + if (!m_focusWindow) return; - QCocoaWindow *window = static_cast(mWindow->handle()); + QCocoaWindow *window = static_cast(m_focusWindow->handle()); if (!window) return; QNSView *view = qnsview_cast(window->view()); @@ -147,7 +147,7 @@ void QCocoaInputContext::focusObjectChanged(QObject *focusObject) [view cancelComposingText]; } } else { - mWindow = QGuiApplication::focusWindow(); + m_focusWindow = QGuiApplication::focusWindow(); } }