aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_p.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-12-16 13:44:14 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2014-12-19 12:37:15 +0100
commita0c81e29713f991afa0a2442a7ca3b095ad97c2a (patch)
treeac9c30e0088bce64d48f8be1fefa8cb8b82d793c /src/qml/compiler/qv4isel_p.cpp
parent38cab579a0c5398b7621221fd8609bc43cf1f3c5 (diff)
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_p.cpp')
-rw-r--r--src/qml/compiler/qv4isel_p.cpp16
1 files changed, 10 insertions, 6 deletions
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 <QtCore/QDebug>
+#include <QtCore/QBuffer>
#include "qv4jsir_p.h"
#include "qv4isel_p.h"
#include "qv4isel_util_p.h"
@@ -41,11 +43,6 @@
#include <QString>
-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();
}