diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-19 09:47:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-19 09:47:29 +0200 |
commit | 407302fb1b823fbe0ae09c031862f87b252489e6 (patch) | |
tree | f192faf40b9009ee6a884ed4b7d0b3942b6810ac /src/testlib/qtestblacklist.cpp | |
parent | 0f30dcaea8129092142fe87d2d14209c75363f66 (diff) | |
parent | ad3b41a06d9ba7219c79b5548c5b11698787288d (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/corelib/io/qwindowspipewriter.cpp
src/widgets/styles/qcommonstyle.cpp
Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
Diffstat (limited to 'src/testlib/qtestblacklist.cpp')
-rw-r--r-- | src/testlib/qtestblacklist.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp index af57ea0ee7..b24ce0578e 100644 --- a/src/testlib/qtestblacklist.cpp +++ b/src/testlib/qtestblacklist.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE /* The BLACKLIST file format is a grouped listing of keywords. - Blank lines and lines starting with # are simply ignored. An initial #-line + Blank lines and everything after # is simply ignored. An initial #-line referring to this documentation is kind to readers. Comments can also be used to indicate the reasons for ignoring particular cases. @@ -253,8 +253,12 @@ void parseBlackList() QByteArray function; while (!ignored.atEnd()) { - QByteArray line = ignored.readLine().simplified(); - if (line.isEmpty() || line.startsWith('#')) + QByteArray line = ignored.readLine(); + const int commentPosition = line.indexOf('#'); + if (commentPosition >= 0) + line.truncate(commentPosition); + line = line.simplified(); + if (line.isEmpty()) continue; if (line.startsWith('[')) { function = line.mid(1, line.length() - 2); |