forked from qt-creator/qt-creator
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user