tests: fix compilation with osx/clang, avoid implicit conversion

- osx clang does not support sending a newly created string to
   an ostream, converting it to c_str
 - avoid std::string(QBytearray), as that skips length (I suppose)

Change-Id: I3712df9d5e4a6f96420a8f2bf59c3bec9286b788
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-01-16 12:07:29 +01:00
committed by Erik Verbruggen
parent 725ecc5f91
commit 54bb06435a
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -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;
}