Skip to content

Commit

Permalink
Build fix for -no-feature-validator
Browse files Browse the repository at this point in the history
Change-Id: I884381964d692eb5d3eb9088c87779c03057981d
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
paulolav authored and sbinner committed Mar 1, 2017
1 parent a58dafd commit 410d9ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/widgets/itemviews/qabstractitemdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 410d9ca

Please sign in to comment.