From cee3c9796fcc2f246d98218693ffb2e518bf85a2 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 3 Jul 2019 00:16:39 +0100 Subject: [PATCH] Squash a compiler warning that was also a potential defect --- widgets/RestrictedSpinBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/RestrictedSpinBox.cpp b/widgets/RestrictedSpinBox.cpp index 3d18ce488..0c71634bb 100644 --- a/widgets/RestrictedSpinBox.cpp +++ b/widgets/RestrictedSpinBox.cpp @@ -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;