Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/json/qjsondocument.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | QJsonDocument::QJsonDocument() | - | ||||||||||||
4 | : d(0) | - | ||||||||||||
5 | { | - | ||||||||||||
6 | } executed 331 times by 5 tests: end of block Executed by:
| 331 | ||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | - | |||||||||||||
11 | QJsonDocument::QJsonDocument(const QJsonObject &object) | - | ||||||||||||
12 | : d(0) | - | ||||||||||||
13 | { | - | ||||||||||||
14 | setObject(object); | - | ||||||||||||
15 | } never executed: end of block | 0 | ||||||||||||
16 | - | |||||||||||||
17 | - | |||||||||||||
18 | - | |||||||||||||
19 | - | |||||||||||||
20 | QJsonDocument::QJsonDocument(const QJsonArray &array) | - | ||||||||||||
21 | : d(0) | - | ||||||||||||
22 | { | - | ||||||||||||
23 | setArray(array); | - | ||||||||||||
24 | } never executed: end of block | 0 | ||||||||||||
25 | - | |||||||||||||
26 | - | |||||||||||||
27 | - | |||||||||||||
28 | - | |||||||||||||
29 | QJsonDocument::QJsonDocument(QJsonPrivate::Data *data) | - | ||||||||||||
30 | : d(data) | - | ||||||||||||
31 | { | - | ||||||||||||
32 | ((!(d)) ? qt_assert("d",__FILE__,108) : qt_noop()); | - | ||||||||||||
33 | d->ref.ref(); | - | ||||||||||||
34 | } executed 686 times by 113 tests: end of block Executed by:
| 686 | ||||||||||||
35 | - | |||||||||||||
36 | - | |||||||||||||
37 | - | |||||||||||||
38 | - | |||||||||||||
39 | - | |||||||||||||
40 | - | |||||||||||||
41 | QJsonDocument::~QJsonDocument() | - | ||||||||||||
42 | { | - | ||||||||||||
43 | if (d
| 7-687 | ||||||||||||
44 | delete d; executed 7 times by 3 tests: delete d; Executed by:
| 7 | ||||||||||||
45 | } executed 1103 times by 116 tests: end of block Executed by:
| 1103 | ||||||||||||
46 | - | |||||||||||||
47 | - | |||||||||||||
48 | - | |||||||||||||
49 | - | |||||||||||||
50 | QJsonDocument::QJsonDocument(const QJsonDocument &other) | - | ||||||||||||
51 | { | - | ||||||||||||
52 | d = other.d; | - | ||||||||||||
53 | if (d
| 0-86 | ||||||||||||
54 | d->ref.ref(); never executed: d->ref.ref(); | 0 | ||||||||||||
55 | } executed 86 times by 3 tests: end of block Executed by:
| 86 | ||||||||||||
56 | - | |||||||||||||
57 | - | |||||||||||||
58 | - | |||||||||||||
59 | - | |||||||||||||
60 | - | |||||||||||||
61 | QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other) | - | ||||||||||||
62 | { | - | ||||||||||||
63 | if (d != other.d
| 1 | ||||||||||||
64 | if (d
| 0-1 | ||||||||||||
65 | delete d; never executed: delete d; | 0 | ||||||||||||
66 | d = other.d; | - | ||||||||||||
67 | if (d
| 0-1 | ||||||||||||
68 | d->ref.ref(); executed 1 time by 1 test: d->ref.ref(); Executed by:
| 1 | ||||||||||||
69 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||
70 | - | |||||||||||||
71 | return executed 2 times by 2 tests: *this;return *this; Executed by:
executed 2 times by 2 tests: return *this; Executed by:
| 2 | ||||||||||||
72 | } | - | ||||||||||||
73 | QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidation validation) | - | ||||||||||||
74 | { | - | ||||||||||||
75 | if (quintptr(data) & 3
| 0 | ||||||||||||
76 | QMessageLogger(__FILE__, 181, __PRETTY_FUNCTION__).warning() <<"QJsonDocument::fromRawData: data has to have 4 byte alignment"; | - | ||||||||||||
77 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
78 | } | - | ||||||||||||
79 | - | |||||||||||||
80 | if (size < (int)(sizeof(QJsonPrivate::Header) + sizeof(QJsonPrivate::Base))
| 0 | ||||||||||||
81 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
82 | - | |||||||||||||
83 | QJsonPrivate::Data *d = new QJsonPrivate::Data((char *)data, size); | - | ||||||||||||
84 | d->ownsData = false; | - | ||||||||||||
85 | - | |||||||||||||
86 | if (validation != BypassValidation
| 0 | ||||||||||||
87 | delete d; | - | ||||||||||||
88 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
89 | } | - | ||||||||||||
90 | - | |||||||||||||
91 | return never executed: QJsonDocument(d);return QJsonDocument(d); never executed: return QJsonDocument(d); | 0 | ||||||||||||
92 | } | - | ||||||||||||
93 | const char *QJsonDocument::rawData(int *size) const | - | ||||||||||||
94 | { | - | ||||||||||||
95 | if (!d
| 0 | ||||||||||||
96 | *size = 0; | - | ||||||||||||
97 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
98 | } | - | ||||||||||||
99 | *size = d->alloc; | - | ||||||||||||
100 | return never executed: d->rawData;return d->rawData; never executed: return d->rawData; | 0 | ||||||||||||
101 | } | - | ||||||||||||
102 | QJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidation validation) | - | ||||||||||||
103 | { | - | ||||||||||||
104 | if (data.size() < (int)(sizeof(QJsonPrivate::Header) + sizeof(QJsonPrivate::Base))
| 0-679 | ||||||||||||
105 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
106 | - | |||||||||||||
107 | QJsonPrivate::Header h; | - | ||||||||||||
108 | memcpy(&h, data.constData(), sizeof(QJsonPrivate::Header)); | - | ||||||||||||
109 | QJsonPrivate::Base root; | - | ||||||||||||
110 | memcpy(&root, data.constData() + sizeof(QJsonPrivate::Header), sizeof(QJsonPrivate::Base)); | - | ||||||||||||
111 | - | |||||||||||||
112 | - | |||||||||||||
113 | if (h.tag != QJsonDocument::BinaryFormatTag
| 0-679 | ||||||||||||
114 | sizeof(QJsonPrivate::Header) + root.size > (uint)data.size()
| 0-679 | ||||||||||||
115 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
116 | - | |||||||||||||
117 | const uint size = sizeof(QJsonPrivate::Header) + root.size; | - | ||||||||||||
118 | char *raw = (char *)malloc(size); | - | ||||||||||||
119 | if (!raw
| 0-679 | ||||||||||||
120 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
121 | - | |||||||||||||
122 | memcpy(raw, data.constData(), size); | - | ||||||||||||
123 | QJsonPrivate::Data *d = new QJsonPrivate::Data(raw, size); | - | ||||||||||||
124 | - | |||||||||||||
125 | if (validation != BypassValidation
| 0-679 | ||||||||||||
126 | delete d; | - | ||||||||||||
127 | return never executed: QJsonDocument();return QJsonDocument(); never executed: return QJsonDocument(); | 0 | ||||||||||||
128 | } | - | ||||||||||||
129 | - | |||||||||||||
130 | return executed 679 times by 110 tests: QJsonDocument(d);return QJsonDocument(d); Executed by:
executed 679 times by 110 tests: return QJsonDocument(d); Executed by:
| 679 | ||||||||||||
131 | } | - | ||||||||||||
132 | QJsonDocument QJsonDocument::fromVariant(const QVariant &variant) | - | ||||||||||||
133 | { | - | ||||||||||||
134 | QJsonDocument doc; | - | ||||||||||||
135 | if (variant.type() == QVariant::Map
| 0 | ||||||||||||
136 | doc.setObject(QJsonObject::fromVariantMap(variant.toMap())); | - | ||||||||||||
137 | } never executed: else if (variant.type() == QVariant::Listend of block
| 0 | ||||||||||||
138 | doc.setArray(QJsonArray::fromVariantList(variant.toList())); | - | ||||||||||||
139 | } never executed: else if (variant.type() == QVariant::StringListend of block
| 0 | ||||||||||||
140 | doc.setArray(QJsonArray::fromStringList(variant.toStringList())); | - | ||||||||||||
141 | } never executed: end of block | 0 | ||||||||||||
142 | return never executed: doc;return doc; never executed: return doc; | 0 | ||||||||||||
143 | } | - | ||||||||||||
144 | QVariant QJsonDocument::toVariant() const | - | ||||||||||||
145 | { | - | ||||||||||||
146 | if (!d
| 0 | ||||||||||||
147 | return never executed: QVariant();return QVariant(); never executed: return QVariant(); | 0 | ||||||||||||
148 | - | |||||||||||||
149 | if (d->header->root()->isArray()
| 0 | ||||||||||||
150 | return never executed: QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())).toVariantList();return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())).toVariantList(); never executed: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())).toVariantList(); | 0 | ||||||||||||
151 | else | - | ||||||||||||
152 | return never executed: QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())).toVariantMap();return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())).toVariantMap(); never executed: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())).toVariantMap(); | 0 | ||||||||||||
153 | } | - | ||||||||||||
154 | - | |||||||||||||
155 | - | |||||||||||||
156 | - | |||||||||||||
157 | - | |||||||||||||
158 | - | |||||||||||||
159 | - | |||||||||||||
160 | - | |||||||||||||
161 | QByteArray QJsonDocument::toJson() const | - | ||||||||||||
162 | { | - | ||||||||||||
163 | return never executed: toJson(Indented);return toJson(Indented); never executed: return toJson(Indented); | 0 | ||||||||||||
164 | } | - | ||||||||||||
165 | QByteArray QJsonDocument::toJson(JsonFormat format) const | - | ||||||||||||
166 | { | - | ||||||||||||
167 | if (!d
| 0 | ||||||||||||
168 | return never executed: QByteArray();return QByteArray(); never executed: return QByteArray(); | 0 | ||||||||||||
169 | - | |||||||||||||
170 | QByteArray json; | - | ||||||||||||
171 | - | |||||||||||||
172 | if (d->header->root()->isArray()
| 0 | ||||||||||||
173 | QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(d->header->root()), json, 0, (format == Compact)); never executed: QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(d->header->root()), json, 0, (format == Compact)); | 0 | ||||||||||||
174 | else | - | ||||||||||||
175 | QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(d->header->root()), json, 0, (format == Compact)); never executed: QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(d->header->root()), json, 0, (format == Compact)); | 0 | ||||||||||||
176 | - | |||||||||||||
177 | return never executed: json;return json; never executed: return json; | 0 | ||||||||||||
178 | } | - | ||||||||||||
179 | QJsonDocument QJsonDocument::fromJson(const QByteArray &json, QJsonParseError *error) | - | ||||||||||||
180 | { | - | ||||||||||||
181 | QJsonPrivate::Parser parser(json.constData(), json.length()); | - | ||||||||||||
182 | return executed 10 times by 4 tests: parser.parse(error);return parser.parse(error); Executed by:
executed 10 times by 4 tests: return parser.parse(error); Executed by:
| 10 | ||||||||||||
183 | } | - | ||||||||||||
184 | - | |||||||||||||
185 | - | |||||||||||||
186 | - | |||||||||||||
187 | - | |||||||||||||
188 | bool QJsonDocument::isEmpty() const | - | ||||||||||||
189 | { | - | ||||||||||||
190 | if (!d
| 0 | ||||||||||||
191 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||
192 | - | |||||||||||||
193 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
194 | } | - | ||||||||||||
195 | QByteArray QJsonDocument::toBinaryData() const | - | ||||||||||||
196 | { | - | ||||||||||||
197 | if (!d
| 0 | ||||||||||||
198 | return never executed: QByteArray();return QByteArray(); never executed: return QByteArray(); | 0 | ||||||||||||
199 | - | |||||||||||||
200 | return never executed: QByteArray(d->rawData, d->header->root()->size + sizeof(QJsonPrivate::Header));return QByteArray(d->rawData, d->header->root()->size + sizeof(QJsonPrivate::Header)); never executed: return QByteArray(d->rawData, d->header->root()->size + sizeof(QJsonPrivate::Header)); | 0 | ||||||||||||
201 | } | - | ||||||||||||
202 | - | |||||||||||||
203 | - | |||||||||||||
204 | - | |||||||||||||
205 | - | |||||||||||||
206 | - | |||||||||||||
207 | - | |||||||||||||
208 | bool QJsonDocument::isArray() const | - | ||||||||||||
209 | { | - | ||||||||||||
210 | if (!d
| 0-2 | ||||||||||||
211 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
212 | - | |||||||||||||
213 | QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData; | - | ||||||||||||
214 | return executed 2 times by 2 tests: h->root()->isArray();return h->root()->isArray(); Executed by:
executed 2 times by 2 tests: return h->root()->isArray(); Executed by:
| 2 | ||||||||||||
215 | } | - | ||||||||||||
216 | - | |||||||||||||
217 | - | |||||||||||||
218 | - | |||||||||||||
219 | - | |||||||||||||
220 | - | |||||||||||||
221 | - | |||||||||||||
222 | bool QJsonDocument::isObject() const | - | ||||||||||||
223 | { | - | ||||||||||||
224 | if (!d
| 0-1 | ||||||||||||
225 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
226 | - | |||||||||||||
227 | QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData; | - | ||||||||||||
228 | return executed 1 time by 1 test: h->root()->isObject();return h->root()->isObject(); Executed by:
executed 1 time by 1 test: return h->root()->isObject(); Executed by:
| 1 | ||||||||||||
229 | } | - | ||||||||||||
230 | QJsonObject QJsonDocument::object() const | - | ||||||||||||
231 | { | - | ||||||||||||
232 | if (d
| 0-685 | ||||||||||||
233 | QJsonPrivate::Base *b = d->header->root(); | - | ||||||||||||
234 | if (b->isObject()
| 0-685 | ||||||||||||
235 | return executed 685 times by 112 tests: QJsonObject(d, static_cast<QJsonPrivate::Object *>(b));return QJsonObject(d, static_cast<QJsonPrivate::Object *>(b)); Executed by:
executed 685 times by 112 tests: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(b)); Executed by:
| 685 | ||||||||||||
236 | } never executed: end of block | 0 | ||||||||||||
237 | return never executed: QJsonObject();return QJsonObject(); never executed: return QJsonObject(); | 0 | ||||||||||||
238 | } | - | ||||||||||||
239 | QJsonArray QJsonDocument::array() const | - | ||||||||||||
240 | { | - | ||||||||||||
241 | if (d
| 0-1 | ||||||||||||
242 | QJsonPrivate::Base *b = d->header->root(); | - | ||||||||||||
243 | if (b->isArray()
| 0-1 | ||||||||||||
244 | return executed 1 time by 1 test: QJsonArray(d, static_cast<QJsonPrivate::Array *>(b));return QJsonArray(d, static_cast<QJsonPrivate::Array *>(b)); Executed by:
executed 1 time by 1 test: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(b)); Executed by:
| 1 | ||||||||||||
245 | } never executed: end of block | 0 | ||||||||||||
246 | return never executed: QJsonArray();return QJsonArray(); never executed: return QJsonArray(); | 0 | ||||||||||||
247 | } | - | ||||||||||||
248 | - | |||||||||||||
249 | - | |||||||||||||
250 | - | |||||||||||||
251 | - | |||||||||||||
252 | - | |||||||||||||
253 | - | |||||||||||||
254 | void QJsonDocument::setObject(const QJsonObject &object) | - | ||||||||||||
255 | { | - | ||||||||||||
256 | if (d
| 0 | ||||||||||||
257 | delete d; never executed: delete d; | 0 | ||||||||||||
258 | - | |||||||||||||
259 | d = object.d; | - | ||||||||||||
260 | - | |||||||||||||
261 | if (!d
| 0 | ||||||||||||
262 | d = new QJsonPrivate::Data(0, QJsonValue::Object); | - | ||||||||||||
263 | } never executed: else if (d->compactionCounterend of block
| 0 | ||||||||||||
264 | QJsonObject o(object); | - | ||||||||||||
265 | if (d->compactionCounter
| 0 | ||||||||||||
266 | o.compact(); never executed: o.compact(); | 0 | ||||||||||||
267 | else | - | ||||||||||||
268 | o.detach2(); never executed: o.detach2(); | 0 | ||||||||||||
269 | d = o.d; | - | ||||||||||||
270 | d->ref.ref(); | - | ||||||||||||
271 | return; never executed: return; | 0 | ||||||||||||
272 | } | - | ||||||||||||
273 | d->ref.ref(); | - | ||||||||||||
274 | } never executed: end of block | 0 | ||||||||||||
275 | - | |||||||||||||
276 | - | |||||||||||||
277 | - | |||||||||||||
278 | - | |||||||||||||
279 | - | |||||||||||||
280 | - | |||||||||||||
281 | void QJsonDocument::setArray(const QJsonArray &array) | - | ||||||||||||
282 | { | - | ||||||||||||
283 | if (d
| 0 | ||||||||||||
284 | delete d; never executed: delete d; | 0 | ||||||||||||
285 | - | |||||||||||||
286 | d = array.d; | - | ||||||||||||
287 | - | |||||||||||||
288 | if (!d
| 0 | ||||||||||||
289 | d = new QJsonPrivate::Data(0, QJsonValue::Array); | - | ||||||||||||
290 | } never executed: else if (d->compactionCounterend of block
| 0 | ||||||||||||
291 | QJsonArray a(array); | - | ||||||||||||
292 | if (d->compactionCounter
| 0 | ||||||||||||
293 | a.compact(); never executed: a.compact(); | 0 | ||||||||||||
294 | else | - | ||||||||||||
295 | a.detach2(); never executed: a.detach2(); | 0 | ||||||||||||
296 | d = a.d; | - | ||||||||||||
297 | d->ref.ref(); | - | ||||||||||||
298 | return; never executed: return; | 0 | ||||||||||||
299 | } | - | ||||||||||||
300 | d->ref.ref(); | - | ||||||||||||
301 | } never executed: end of block | 0 | ||||||||||||
302 | - | |||||||||||||
303 | - | |||||||||||||
304 | - | |||||||||||||
305 | - | |||||||||||||
306 | bool QJsonDocument::operator==(const QJsonDocument &other) const | - | ||||||||||||
307 | { | - | ||||||||||||
308 | if (d == other.d
| 0-8 | ||||||||||||
309 | return executed 8 times by 1 test: true;return true; Executed by:
executed 8 times by 1 test: return true; Executed by:
| 8 | ||||||||||||
310 | - | |||||||||||||
311 | if (!d
| 0 | ||||||||||||
312 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
313 | - | |||||||||||||
314 | if (d->header->root()->isArray() != other.d->header->root()->isArray()
| 0 | ||||||||||||
315 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
316 | - | |||||||||||||
317 | if (d->header->root()->isObject()
| 0 | ||||||||||||
318 | return never executed: QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root()))return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())) == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.d->header->root())); never executed: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())) == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.d->header->root())); | 0 | ||||||||||||
319 | == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.d->header->root())); never executed: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())) == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.d->header->root())); | 0 | ||||||||||||
320 | else | - | ||||||||||||
321 | return never executed: QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root()))return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())) == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.d->header->root())); never executed: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())) == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.d->header->root())); | 0 | ||||||||||||
322 | == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.d->header->root())); never executed: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())) == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.d->header->root())); | 0 | ||||||||||||
323 | } | - | ||||||||||||
324 | bool QJsonDocument::isNull() const | - | ||||||||||||
325 | { | - | ||||||||||||
326 | return executed 661 times by 113 tests: (d == 0);return (d == 0); Executed by:
executed 661 times by 113 tests: return (d == 0); Executed by:
| 661 | ||||||||||||
327 | } | - | ||||||||||||
328 | - | |||||||||||||
329 | - | |||||||||||||
330 | QDebug operator<<(QDebug dbg, const QJsonDocument &o) | - | ||||||||||||
331 | { | - | ||||||||||||
332 | QDebugStateSaver saver(dbg); | - | ||||||||||||
333 | if (!o.d
| 0-1 | ||||||||||||
334 | dbg << "QJsonDocument()"; | - | ||||||||||||
335 | return executed 1 time by 1 test: dbg;return dbg; Executed by:
executed 1 time by 1 test: return dbg; Executed by:
| 1 | ||||||||||||
336 | } | - | ||||||||||||
337 | QByteArray json; | - | ||||||||||||
338 | if (o.d->header->root()->isArray()
| 0 | ||||||||||||
339 | QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(o.d->header->root()), json, 0, true); never executed: QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(o.d->header->root()), json, 0, true); | 0 | ||||||||||||
340 | else | - | ||||||||||||
341 | QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(o.d->header->root()), json, 0, true); never executed: QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(o.d->header->root()), json, 0, true); | 0 | ||||||||||||
342 | dbg.nospace() << "QJsonDocument(" | - | ||||||||||||
343 | << json.constData() | - | ||||||||||||
344 | << ')'; | - | ||||||||||||
345 | return never executed: dbg;return dbg; never executed: return dbg; | 0 | ||||||||||||
346 | } | - | ||||||||||||
347 | - | |||||||||||||
348 | - | |||||||||||||
349 | - | |||||||||||||
Switch to Source code | Preprocessed file |