diff options
-rw-r--r-- | src/libs/utils/fancylineedit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp index 2a2e135005..07de1d799c 100644 --- a/src/libs/utils/fancylineedit.cpp +++ b/src/libs/utils/fancylineedit.cpp @@ -445,9 +445,9 @@ void FancyLineEdit::validate() d->m_errorMessage.clear(); // Are we displaying the placeholder text? const bool isDisplayingPlaceholderText = !placeholderText().isEmpty() && t.isEmpty(); - const State newState = isDisplayingPlaceholderText ? - DisplayingPlaceholderText : - (d->m_validationFunction(this, &d->m_errorMessage) ? Valid : Invalid); + const bool validates = d->m_validationFunction(this, &d->m_errorMessage); + const State newState = isDisplayingPlaceholderText ? DisplayingPlaceholderText + : (validates ? Valid : Invalid); setToolTip(d->m_errorMessage); // Changed..figure out if valid changed. DisplayingPlaceholderText is not valid, // but should not show error color. Also trigger on the first change. |