From a0c81e29713f991afa0a2442a7ca3b095ad97c2a Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 16 Dec 2014 13:44:14 +0100 Subject: Replace usage of stdout for debug output by qDebug This way even paranoid Androids can be show interesting stuff. Task-number: QTBUG-43109 Change-Id: Ib0ef9e8f6c6fc66e9ea9bfcaf2cd9e33d7469070 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4isel_p.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/qml/compiler/qv4isel_p.cpp') diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index e419084238..167ea8337c 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -31,6 +31,8 @@ ** ****************************************************************************/ +#include +#include #include "qv4jsir_p.h" #include "qv4isel_p.h" #include "qv4isel_util_p.h" @@ -41,11 +43,6 @@ #include -namespace { -Q_GLOBAL_STATIC_WITH_ARGS(QTextStream, qout, (stderr, QIODevice::WriteOnly)); -#define qout *qout() -} // anonymous namespace - using namespace QV4; using namespace QV4::IR; @@ -218,8 +215,12 @@ void IRDecoder::visitMove(IR::Move *s) // For anything else...: Q_UNIMPLEMENTED(); + QBuffer buf; + buf.open(QIODevice::WriteOnly); + QTextStream qout(&buf); IRPrinter(&qout).print(s); qout << endl; + qDebug("%s", buf.data().constData()); Q_ASSERT(!"TODO"); } @@ -398,7 +399,10 @@ void IRDecoder::callBuiltin(IR::Call *call, Expr *result) } Q_UNIMPLEMENTED(); + QBuffer buf; + buf.open(QIODevice::WriteOnly); + QTextStream qout(&buf); IRPrinter(&qout).print(call); qout << endl; - Q_ASSERT(!"TODO!"); + qDebug("%s", buf.data().constData()); Q_UNREACHABLE(); } -- cgit v1.2.3