Change-Id: I348f924f2987f1c163c89ce4eef18fe864ec665d
Reviewed-on: http://codereview.qt-project.org/4407
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
QVariant QSGTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const
{
Q_D(const QSGTextEdit);
- return d->control->inputMethodQuery(property);
+
+ QVariant v;
+ switch (property) {
+ case Qt::ImEnabled:
+ v = (bool)(flags() & ItemAcceptsInputMethod);
+ break;
+ case Qt::ImHints:
+ v = (int)inputMethodHints();
+ break;
+ default:
+ v = d->control->inputMethodQuery(property);
+ break;
+ }
+ return v;
+
}
void QSGTextEdit::updateImageCache(const QRectF &)
{
Q_D(const QSGTextInput);
switch(property) {
+ case Qt::ImEnabled:
+ return QVariant((bool)(flags() & ItemAcceptsInputMethod));
+ case Qt::ImHints:
+ return QVariant((int)inputMethodHints());
case Qt::ImMicroFocus:
return cursorRectangle();
case Qt::ImFont: