Squash a compiler warning that was also a potential defect

This commit is contained in:
Bill Somerville 2019-07-03 00:16:39 +01:00
parent a9fd073023
commit cee3c9796f
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ QValidator::State RestrictedSpinBox::validate (QString& input, int& pos) const
// start by doing the standard QSpinBox validation
auto valid = HintedSpinBox::validate (input, pos);
// extra validation
if (QValidator::Acceptable
if (QValidator::Acceptable == valid
&& values ().end () == std::find (values ().begin (), values ().end (), valueFromText (input)))
{
valid = QValidator::Intermediate;