From 3a6e4860c4cec9cb17ef9d40fd25be0045e2fe43 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 30 Nov 2020 17:33:54 +0100 Subject: [PATCH] Wizards: Delay validity check in LineEditField MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... until the values have actually been set up. Fixes: QTCREATORBUG-24971 Change-Id: Ia967fe95545eda1c9044faf8ab1ee885bf3d9e02 Reviewed-by: Christian Stenger Reviewed-by: André Hartmann --- src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp index 0985dd80715..1fa94bf97d3 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp @@ -568,12 +568,8 @@ void LineEditField::setup(JsonFieldPage *page, const QString &name) bool LineEditField::validate(MacroExpander *expander, QString *message) { - if (!JsonFieldPage::Field::validate(expander, message)) - return false; - if (m_isValidating) return true; - m_isValidating = true; auto w = qobject_cast(widget()); @@ -594,9 +590,9 @@ bool LineEditField::validate(MacroExpander *expander, QString *message) m_currentText = w->text(); } + const bool baseValid = JsonFieldPage::Field::validate(expander, message); m_isValidating = false; - - return !w->text().isEmpty(); + return baseValid && !w->text().isEmpty(); } void LineEditField::initializeData(MacroExpander *expander)