macOS: Fix member variable name in QCocoaInputContext

Pick-to: 6.2
Change-Id: I7e61df4e6afbfd7e962499f0cfca5739658244dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2021-08-18 20:56:35 +02:00
parent f9beb3c4eb
commit c7ec8c0973
2 changed files with 8 additions and 8 deletions

View File

@ -67,7 +67,7 @@ private Q_SLOTS:
void focusObjectChanged(QObject *focusObject);
private:
QPointer<QWindow> mWindow;
QPointer<QWindow> m_focusWindow;
QLocale m_locale;
QMacNotificationObserver m_inputSourceObserver;
};

View File

@ -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<QCocoaWindow *>(mWindow->handle());
QCocoaWindow *window = static_cast<QCocoaWindow *>(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<QCocoaWindow *>(mWindow->handle());
QCocoaWindow *window = static_cast<QCocoaWindow *>(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();
}
}