summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-11-04 14:08:33 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-13 20:03:20 +0100
commitbed25d8a3a27a439e5a50083be6b7218a8982d3c (patch)
tree0d36e9a1127bd905d99e54c1f817de8b4c5a2d1e
parentf12d4ee3fb6e647a0407c058ca76847ed3854a5e (diff)
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>
-rw-r--r--src/plugins/platforms/ios/qiosmenu.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qiosmenu.mm b/src/plugins/platforms/ios/qiosmenu.mm
index 005b06547e..f64c1a2f41 100644
--- a/src/plugins/platforms/ios/qiosmenu.mm
+++ b/src/plugins/platforms/ios/qiosmenu.mm
@@ -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;
}