aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cppfilesettingspage.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-09-09 16:23:26 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-09-16 14:48:00 +0000
commit39490240a8e7d0a42ef85025d6afb109d7a33a80 (patch)
treed2664eefd33d32fab551cda4694313d51c8e913e /src/plugins/cpptools/cppfilesettingspage.cpp
parent81b4d70f1e9e1ebcdfc25e2e8191d968dce5bbb8 (diff)
LicenseTemplate: End the license template with at least one newline
Change-Id: I9bffcdbfba3c873324e12a8104da5d277259ea31 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cppfilesettingspage.cpp')
-rw-r--r--src/plugins/cpptools/cppfilesettingspage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp
index 960de9f597..f0af6904cc 100644
--- a/src/plugins/cpptools/cppfilesettingspage.cpp
+++ b/src/plugins/cpptools/cppfilesettingspage.cpp
@@ -248,11 +248,12 @@ QString CppFileSettings::licenseTemplate(const QString &fileName, const QString
QString license = licenseStream.readAll();
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');
if (!license.endsWith(newLine))
license += newLine;
- license += newLine;
+
return license;
}