Build fix for -no-feature-validator

Change-Id: I385ce6e37611b7ba32503ef5d041628dd764fe23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Paul Olav Tvete 2017-02-16 15:33:27 +01:00 committed by Stephan Binner
parent a16b6e29e0
commit 40837c42a5

View File

@ -664,11 +664,13 @@ void QAccessibleLineEdit::setText(QAccessible::Text t, const QString &text)
}
QString newText = text;
#if QT_CONFIG(validator)
if (lineEdit()->validator()) {
int pos = 0;
if (lineEdit()->validator()->validate(newText, pos) != QValidator::Acceptable)
return;
}
#endif
lineEdit()->setText(newText);
}