summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-01-12 23:13:14 +0100
committerJamey Hicks <jamey.hicks@nokia.com>2012-01-13 03:52:46 +0100
commite5c4f0bc6c048010c3b01b7da856b75a2bf4d7d5 (patch)
treebf516feb78b94a43bb29a37ea045946cb2bc5830
parent9be2a4e9e843957fe5ff976a8309104caeed8418 (diff)
Fix the debug operators for aaray and object
The streaming operators for qDebug where always writing out the top level object, not the sub object. Change-Id: I70b70a700c1996bc3cbf26c4dc66dad4426fe3e9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
-rw-r--r--src/qjsonarray.cpp4
-rw-r--r--src/qjsonobject.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qjsonarray.cpp b/src/qjsonarray.cpp
index fd27763..5385ca2 100644
--- a/src/qjsonarray.cpp
+++ b/src/qjsonarray.cpp
@@ -316,12 +316,12 @@ QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug dbg, const QtJson::QJsonArray &a)
{
- if (!a.d) {
+ if (!a.a) {
dbg << "QJsonArray()";
return dbg;
}
QByteArray json;
- QtJson::QJsonWriter::arrayToJson(static_cast<QtJson::Private::Array *>(a.d->header->root()), json, 0, true);
+ QtJson::QJsonWriter::arrayToJson(a.a, json, 0, true);
dbg.nospace() << "QJsonArray("
<< json.constData() // print as utf-8 string without extra quotation marks
<< ")";
diff --git a/src/qjsonobject.cpp b/src/qjsonobject.cpp
index 8c09fbe..a953d8e 100644
--- a/src/qjsonobject.cpp
+++ b/src/qjsonobject.cpp
@@ -375,12 +375,12 @@ QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug dbg, const QtJson::QJsonObject &o)
{
- if (!o.d) {
+ if (!o.o) {
dbg << "QJsonObject()";
return dbg;
}
QByteArray json;
- QtJson::QJsonWriter::objectToJson(static_cast<QtJson::Private::Object *>(o.d->header->root()), json, 0, true);
+ QtJson::QJsonWriter::objectToJson(o.o, json, 0, true);
dbg.nospace() << "QJsonObject("
<< json.constData() // print as utf-8 string without extra quotation marks
<< ")";