diff options
Diffstat (limited to 'src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp')
-rw-r--r-- | src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp index 6f141fe58e..6a7ecbbcd6 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp @@ -561,7 +561,7 @@ bool LineEditField::validate(MacroExpander *expander, QString *message) m_currentText.clear(); } } else { - setDefaultText(w, expander); + w->setText(expander->expand(m_defaultText)); m_isModified = false; } } else { @@ -579,7 +579,7 @@ void LineEditField::initializeData(MacroExpander *expander) auto w = qobject_cast<FancyLineEdit *>(widget()); QTC_ASSERT(w, return); m_isValidating = true; - setDefaultText(w, expander); + w->setText(expander->expand(m_defaultText)); w->setPlaceholderText(m_placeholderText); m_isModified = false; m_isValidating = false; @@ -595,15 +595,6 @@ QVariant LineEditField::toSettings() const return qobject_cast<FancyLineEdit *>(widget())->text(); } -void LineEditField::setDefaultText(FancyLineEdit *edit, MacroExpander *expander) -{ - if (!edit->text().isEmpty()) - return; - - const QString expandedText = expander->expand(m_defaultText); - edit->setText(expandedText); -} - // -------------------------------------------------------------------- // TextEditFieldData: // -------------------------------------------------------------------- |