forked from qt-creator/qt-creator
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:
committed by
Erik Verbruggen
parent
725ecc5f91
commit
54bb06435a
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user