iOS: let focusobject be ImEnabled when a menu is attached
Since the picker menu uses IM to set an alternative input view, we also need to specify that we IM is enabled. Task-number: QTBUG-42523 Change-Id: Ia559fbc0ca7e6a1a4499d5eb179baa2d915ecb17 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
parent
f12d4ee3fb
commit
bed25d8a3a
@ -452,11 +452,11 @@ void QIOSMenu::toggleShowUsingUIPickerView(bool show)
|
||||
Q_ASSERT(!focusObjectWithPickerView);
|
||||
focusObjectWithPickerView = qApp->focusWindow()->focusObject();
|
||||
focusObjectWithPickerView->installEventFilter(this);
|
||||
qApp->inputMethod()->update(Qt::ImPlatformData);
|
||||
qApp->inputMethod()->update(Qt::ImEnabled | Qt::ImPlatformData);
|
||||
} else {
|
||||
Q_ASSERT(focusObjectWithPickerView);
|
||||
focusObjectWithPickerView->removeEventFilter(this);
|
||||
qApp->inputMethod()->update(Qt::ImPlatformData);
|
||||
qApp->inputMethod()->update(Qt::ImEnabled | Qt::ImPlatformData);
|
||||
focusObjectWithPickerView = 0;
|
||||
|
||||
Q_ASSERT(m_pickerView);
|
||||
@ -477,6 +477,7 @@ bool QIOSMenu::eventFilter(QObject *obj, QEvent *event)
|
||||
imPlatformData.insert(kImePlatformDataInputView, QVariant::fromValue(static_cast<void *>(m_pickerView)));
|
||||
imPlatformData.insert(kImePlatformDataInputAccessoryView, QVariant::fromValue(static_cast<void *>(m_pickerView.toolbar)));
|
||||
queryEvent->setValue(Qt::ImPlatformData, imPlatformData);
|
||||
queryEvent->setValue(Qt::ImEnabled, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user