diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-18 22:19:03 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-18 22:19:03 (GMT) |
commit | 6c459aaa628642e86f7f4b56bb35017a3fb06a35 (patch) | |
tree | 7cfea7e03f56d5829f137bfea11e35199f00c46d /tests | |
parent | c18beac8163634b48bbf1e7280923e96f5ef0a51 (diff) | |
parent | 505dc33a4060b6fb2a80f3a3ab2a6702ec0b5f3b (diff) | |
download | Qt-6c459aaa628642e86f7f4b56bb35017a3fb06a35.zip Qt-6c459aaa628642e86f7f4b56bb35017a3fb06a35.tar.gz Qt-6c459aaa628642e86f7f4b56bb35017a3fb06a35.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Make the licenseheader check pass trivial files.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/headers/tst_headers.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp index 5f79923..bf7ec3f 100644 --- a/tests/auto/headers/tst_headers.cpp +++ b/tests/auto/headers/tst_headers.cpp @@ -192,19 +192,20 @@ void tst_Headers::licenseCheck() QByteArray data = f.readAll(); data.replace("\r\n", "\n"); // Windows data.replace('\r', '\n'); // Mac OS9 - QStringList content = QString::fromLocal8Bit(data).split("\n"); + QStringList content = QString::fromLocal8Bit(data).split("\n", QString::SkipEmptyParts); + + if (content.count() <= 2) // likely a #include line and empty line only. Not a copyright issue. + return; if (content.first().contains("generated")) { content.takeFirst(); - if (content.first().isEmpty()) - content.takeFirst(); } if (sourceFile.endsWith("/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp") || sourceFile.endsWith("/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp")) { // These files are meant to start with empty lines. - while (content.first().isEmpty() || content.first().startsWith("//")) + while (content.first().startsWith("//")) content.takeFirst(); } |