diff options
Diffstat (limited to 'tests/tools')
-rw-r--r-- | tests/tools/cplusplus-ast2png/cplusplus-ast2png.cpp | 3 | ||||
-rw-r--r-- | tests/tools/qml-ast2dot/main.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/tools/cplusplus-ast2png/cplusplus-ast2png.cpp b/tests/tools/cplusplus-ast2png/cplusplus-ast2png.cpp index 51d7c37986..9c2829bbbb 100644 --- a/tests/tools/cplusplus-ast2png/cplusplus-ast2png.cpp +++ b/tests/tools/cplusplus-ast2png/cplusplus-ast2png.cpp @@ -57,6 +57,7 @@ #include <cstdlib> #include <fstream> #include <iostream> +#include <string> #ifdef __GNUC__ # include <cxxabi.h> #endif @@ -115,7 +116,7 @@ protected: void alignTerminals() { out<<"{ rank=same;" << std::endl; foreach (const QByteArray &terminalShape, _terminalShapes) { - out << " " << std::string(terminalShape) << ";" << std::endl; + out << " " << std::string(terminalShape.constData(), terminalShape.size()).c_str() << ";" << std::endl; } out<<"}"<<std::endl; } diff --git a/tests/tools/qml-ast2dot/main.cpp b/tests/tools/qml-ast2dot/main.cpp index db758387aa..7e066bfc22 100644 --- a/tests/tools/qml-ast2dot/main.cpp +++ b/tests/tools/qml-ast2dot/main.cpp @@ -43,6 +43,7 @@ #include <cstdlib> #include <fstream> #include <iostream> +#include <string> #ifdef __GNUC__ # include <cxxabi.h> #endif @@ -83,7 +84,7 @@ protected: void alignTerminals() { out<<"{ rank=same;" << endl; foreach (const QByteArray &terminalShape, _terminalShapes) { - out << " " << string(terminalShape) << ";" << endl; + out << " " << string(terminalShape.constData(), terminalShape.size()).c_str() << ";" << endl; } out<<"}"<<endl; } |