LicenseTemplate: End the license template with at least one newline

Change-Id: I9bffcdbfba3c873324e12a8104da5d277259ea31
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-09-09 16:23:26 +02:00
parent 81b4d70f1e
commit 39490240a8

View File

@@ -248,11 +248,12 @@ QString CppFileSettings::licenseTemplate(const QString &fileName, const QString
QString license = licenseStream.readAll(); QString license = licenseStream.readAll();
parseLicenseTemplatePlaceholders(&license, fileName, className); parseLicenseTemplatePlaceholders(&license, fileName, className);
// Ensure exactly one additional new line separating stuff
// Ensure at least one newline at the end of the license template to separate it from the code
const QChar newLine = QLatin1Char('\n'); const QChar newLine = QLatin1Char('\n');
if (!license.endsWith(newLine)) if (!license.endsWith(newLine))
license += newLine; license += newLine;
license += newLine;
return license; return license;
} }