Commit f11b746e authored by Marco Bubke's avatar Marco Bubke
Browse files

Utils: Improve debug output of SmallString

Change-Id: I738ac9d139271b7d154dd39f30ae3c08b5e5b921
Reviewed-by: Tim Jenssen's avatarTim Jenssen <>
parent 19a00f41
......@@ -78,18 +78,27 @@ QDebug &operator<<(QDebug &debug, const SmallString &string)
return debug;
std::ostream &operator<<(std::ostream &stream, const SmallString &string)
template <uint Size>
std::ostream &operator<<(std::ostream &stream, const BasicSmallString<Size> &string)
using std::operator<<;
return stream << std::string(, string.size());
void PrintTo(const SmallString &string, ::std::ostream *os)
template <uint Size>
void PrintTo(const BasicSmallString<Size> &string, ::std::ostream *os)
*os << "'" << << "'";
Utils::SmallString formatedString = string.clone();
formatedString.replace("\n", "\\n");
formatedString.replace("\t", "\\t");
*os << "'";
os->write(, formatedString.size());
*os<< "'";
inline QDataStream &operator<<(QDataStream &out, const SmallStringVector &stringVector)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment