macOS: Don't assume platform input context is our own

A plugin (such as the Qt virtual keyboard) may provide a platform
input context.

Change-Id: I349ac6c4b96a3536bcde0d44a785cb7bb989fcc6
Fixes: QTBUG-68328
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Tor Arne Vestbø 2018-11-21 15:47:18 +01:00
parent a90694d1a6
commit 14984bd59a
1 changed files with 2 additions and 2 deletions

View File

@ -307,8 +307,8 @@
{
Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification)
if (([NSApp keyWindow] == self.window) && self.window.firstResponder == self) {
QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext());
ic->updateLocale();
if (QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext()))
ic->updateLocale();
}
}