forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -78,12 +78,7 @@ QDebug &operator<<(QDebug &debug, const String &string)
|
|||||||
template <uint Size>
|
template <uint Size>
|
||||||
std::ostream &operator<<(std::ostream &out, const BasicSmallString<Size> &string)
|
std::ostream &operator<<(std::ostream &out, const BasicSmallString<Size> &string)
|
||||||
{
|
{
|
||||||
BasicSmallString<Size> formatedString = string.clone();
|
out.write(string.data(), std::streamsize(string.size()));
|
||||||
|
|
||||||
formatedString.replace("\n", "\\n");
|
|
||||||
formatedString.replace("\t", "\\t");
|
|
||||||
|
|
||||||
out.write(formatedString.data(), std::streamsize(formatedString.size()));
|
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user