aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2020-07-02 09:10:24 +0200
committerMarco Bubke <marco.bubke@qt.io>2020-07-02 12:10:35 +0000
commit8f8c817294e8229a5fd58d034bbf3814f93fb949 (patch)
tree7fa132f562d20ac19eabb3c2e4595be288d711ac
parent7252505879a031a08d92f7701b9184ca09ae80ec (diff)
Utils: Fix small string ostream operator <<
It was used for test printing so we could see '\n' printed. I have to find a better way todo it only for tests. Task-number: QDS-2459 Change-Id: I10b38645bfdb8160cb9aeccd62c50a81fe953345 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/libs/utils/smallstringio.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libs/utils/smallstringio.h b/src/libs/utils/smallstringio.h
index 233b9b5d97..308b44f155 100644
--- a/src/libs/utils/smallstringio.h
+++ b/src/libs/utils/smallstringio.h
@@ -78,12 +78,7 @@ QDebug &operator<<(QDebug &debug, const String &string)
template <uint Size>
std::ostream &operator<<(std::ostream &out, const BasicSmallString<Size> &string)
{
- BasicSmallString<Size> formatedString = string.clone();
-
- formatedString.replace("\n", "\\n");
- formatedString.replace("\t", "\\t");
-
- out.write(formatedString.data(), std::streamsize(formatedString.size()));
+ out.write(string.data(), std::streamsize(string.size()));
return out;
}