Build fix for -no-feature-validator
Change-Id: I884381964d692eb5d3eb9088c87779c03057981d Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
a58dafd2e8
commit
410d9cabb7
|
|
@ -537,11 +537,13 @@ bool QAbstractItemDelegatePrivate::tryFixup(QWidget *editor)
|
|||
#ifndef QT_NO_LINEEDIT
|
||||
if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) {
|
||||
if (!e->hasAcceptableInput()) {
|
||||
#if QT_CONFIG(validator)
|
||||
if (const QValidator *validator = e->validator()) {
|
||||
QString text = e->text();
|
||||
validator->fixup(text);
|
||||
e->setText(text);
|
||||
}
|
||||
#endif
|
||||
return e->hasAcceptableInput();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue