forked from qt-creator/qt-creator
FormWizard: Fix newlines being escaped in generated output
Export the form contents as a list of lines and join them when needed instead of hoping to unescape '\\n' in all places where it is necessary. This approach should be a bit saver since it will cause parse errors in the wizard, which are more visible than broken output in the generated files. Task-number: QTCREATORBUG-13456 Change-Id: I434a9227082f92be3c2ce75006f61ac79a2b6fd6 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -122,7 +122,7 @@ bool FormTemplateWizardPage::validatePage()
|
||||
QMessageBox::critical(this, tr("%1 - Error").arg(title()), errorMessage);
|
||||
return false;
|
||||
}
|
||||
wizard()->setProperty("FormContents", m_templateContents.replace(QLatin1Char('\n'), QLatin1String("\\n")));
|
||||
wizard()->setProperty("FormContents", m_templateContents.split(QLatin1Char('\n')));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user