diff options
author | Marco Bubke <marco.bubke@qt.io> | 2018-11-12 19:27:51 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2018-11-20 14:24:03 +0000 |
commit | 64a3a130acc0dc7610168396422f6b8c735f45c8 (patch) | |
tree | efc2f24062d670ef95768280cf6e5b64d58def7a /src/libs | |
parent | e11ff791f0d154087422f138b1c06ef0eb8fb0b4 (diff) | |
download | qt-creator-64a3a130acc0dc7610168396422f6b8c735f45c8.tar.gz |
Clang: Add BuildDependencyCollector
IncludeCollector is renamed to BuildDependencyCollector. It is now
returning a BuildDependency instead of individual getter. The test coverage
is improved too.
Task-number: QTCREATORBUG-21379
Change-Id: Ifc2d1c40c85772cf498c21968de526f4408b6023
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/utils/smallstringio.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libs/utils/smallstringio.h b/src/libs/utils/smallstringio.h index 10efd06627..6e9e2a7bc2 100644 --- a/src/libs/utils/smallstringio.h +++ b/src/libs/utils/smallstringio.h @@ -32,6 +32,7 @@ #include <iterator> #include <ostream> +#include <sstream> namespace Utils { @@ -232,7 +233,19 @@ ostream &operator<<(ostream &out, const vector<T> &vector) { out << "["; - copy(vector.cbegin(), vector.cend(), ostream_iterator<T>(out, ", ")); + for (auto current = vector.begin(); current != vector.end(); ++current) { + std::ostringstream entryStream; + entryStream << *current; + std::string entryString = entryStream.str(); + + if (entryString.size() > 4) + out << "\n\t"; + + out << entryString; + + if (std::next(current) != vector.end()) + out << ", "; + } out << "]"; |