0 is a plausible intermediate length in positive context (#12508)

This commit is contained in:
Juergen Spitzmueller 2022-03-17 08:15:09 +01:00
parent 2e9c962a24
commit 0f80de308c

View File

@ -56,6 +56,10 @@ QValidator::State LengthValidator::validate(QString & qtext, int &) const
if (ok && unsigned_ && d < 0)
return QValidator::Invalid;
if (ok && positive_ && d == 0)
// A plausible intermediate value, see #12508
return QValidator::Intermediate;
if (ok && positive_ && d <=0)
return QValidator::Invalid;