Build fix for -no-feature-im

Change-Id: I5cd37b78c18847c9535584d0452c8214873db5f2
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
This commit is contained in:
Paul Olav Tvete 2017-03-08 10:15:22 +01:00
parent 2519e7f23a
commit c0713254c7
2 changed files with 6 additions and 0 deletions

View File

@ -1337,10 +1337,12 @@ bool QQuickComboBox::eventFilter(QObject *object, QEvent *event)
d->hidePopup(false);
setPressed(false);
break;
#if QT_CONFIG(im)
case QEvent::InputMethod:
if (d->extra.isAllocated())
d->extra->allowComplete = !static_cast<QInputMethodEvent*>(event)->commitString().isEmpty();
break;
#endif
default:
break;
}
@ -1363,6 +1365,7 @@ void QQuickComboBox::focusOutEvent(QFocusEvent *event)
setPressed(false);
}
#if QT_CONFIG(im)
void QQuickComboBox::inputMethodEvent(QInputMethodEvent *event)
{
Q_D(QQuickComboBox);
@ -1372,6 +1375,7 @@ void QQuickComboBox::inputMethodEvent(QInputMethodEvent *event)
else
event->ignore();
}
#endif
void QQuickComboBox::keyPressEvent(QKeyEvent *event)
{

View File

@ -178,7 +178,9 @@ protected:
bool eventFilter(QObject *object, QEvent *event) override;
void focusInEvent(QFocusEvent *event) override;
void focusOutEvent(QFocusEvent *event) override;
#if QT_CONFIG(im)
void inputMethodEvent(QInputMethodEvent *event) override;
#endif
void keyPressEvent(QKeyEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;