Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #include "qjson_p.h" | - |
41 | #include <qalgorithms.h> | - |
42 | | - |
43 | QT_BEGIN_NAMESPACE | - |
44 | | - |
45 | namespace QJsonPrivate | - |
46 | { | - |
47 | | - |
48 | #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN | - |
49 | #define Q_TO_LITTLE_ENDIAN(x) (x) | - |
50 | #else | - |
51 | #define Q_TO_LITTLE_ENDIAN(x) ( ((x & 0xff) << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | ((x & 0xff000000) >> 24) ) | - |
52 | #endif | - |
53 | | - |
54 | static const Base emptyArray = { { Q_TO_LITTLE_ENDIAN(sizeof(Base)) }, { 0 }, { 0 } }; | - |
55 | static const Base emptyObject = { { Q_TO_LITTLE_ENDIAN(sizeof(Base)) }, { 0 }, { 0 } }; | - |
56 | | - |
57 | | - |
58 | void Data::compact() | - |
59 | { | - |
60 | Q_ASSERT(sizeof(Value) == sizeof(offset)); | - |
61 | | - |
62 | if (!compactionCounter) | - |
63 | return; | - |
64 | | - |
65 | Base *base = header->root(); | - |
66 | int reserve = 0; | - |
67 | if (base->is_object) { | - |
68 | Object *o = static_cast<Object *>(base); | - |
69 | for (int i = 0; i < (int)o->length; ++i) | - |
70 | reserve += o->entryAt(i)->usedStorage(o); | - |
71 | } else { | - |
72 | Array *a = static_cast<Array *>(base); | - |
73 | for (int i = 0; i < (int)a->length; ++i) | - |
74 | reserve += (*a)[i].usedStorage(a); | - |
75 | } | - |
76 | | - |
77 | int size = sizeof(Base) + reserve + base->length*sizeof(offset); | - |
78 | int alloc = sizeof(Header) + size; | - |
79 | Header *h = (Header *) malloc(alloc); | - |
80 | h->tag = QJsonDocument::BinaryFormatTag; | - |
81 | h->version = 1; | - |
82 | Base *b = h->root(); | - |
83 | b->size = size; | - |
84 | b->is_object = header->root()->is_object; | - |
85 | b->length = base->length; | - |
86 | b->tableOffset = reserve + sizeof(Array); | - |
87 | | - |
88 | int offset = sizeof(Base); | - |
89 | if (b->is_object) { | - |
90 | Object *o = static_cast<Object *>(base); | - |
91 | Object *no = static_cast<Object *>(b); | - |
92 | | - |
93 | for (int i = 0; i < (int)o->length; ++i) { | - |
94 | no->table()[i] = offset; | - |
95 | | - |
96 | const Entry *e = o->entryAt(i); | - |
97 | Entry *ne = no->entryAt(i); | - |
98 | int s = e->size(); | - |
99 | memcpy(ne, e, s); | - |
100 | offset += s; | - |
101 | int dataSize = e->value.usedStorage(o); | - |
102 | if (dataSize) { | - |
103 | memcpy((char *)no + offset, e->value.data(o), dataSize); | - |
104 | ne->value.value = offset; | - |
105 | offset += dataSize; | - |
106 | } | - |
107 | } | - |
108 | } else { | - |
109 | Array *a = static_cast<Array *>(base); | - |
110 | Array *na = static_cast<Array *>(b); | - |
111 | | - |
112 | for (int i = 0; i < (int)a->length; ++i) { | - |
113 | const Value &v = (*a)[i]; | - |
114 | Value &nv = (*na)[i]; | - |
115 | nv = v; | - |
116 | int dataSize = v.usedStorage(a); | - |
117 | if (dataSize) { | - |
118 | memcpy((char *)na + offset, v.data(a), dataSize); | - |
119 | nv.value = offset; | - |
120 | offset += dataSize; | - |
121 | } | - |
122 | } | - |
123 | } | - |
124 | Q_ASSERT(offset == (int)b->tableOffset); | - |
125 | | - |
126 | free(header); | - |
127 | header = h; | - |
128 | this->alloc = alloc; | - |
129 | compactionCounter = 0; | - |
130 | } | - |
131 | | - |
132 | bool Data::valid() const | - |
133 | { | - |
134 | if (header->tag != QJsonDocument::BinaryFormatTag || header->version != 1u) | - |
135 | return false; | - |
136 | | - |
137 | bool res = false; | - |
138 | Base *root = header->root(); | - |
139 | int maxSize = alloc - sizeof(Header); | - |
140 | if (root->is_object) | - |
141 | res = static_cast<Object *>(root)->isValid(maxSize); | - |
142 | else | - |
143 | res = static_cast<Array *>(root)->isValid(maxSize); | - |
144 | | - |
145 | return res; | - |
146 | } | - |
147 | | - |
148 | | - |
149 | int Base::reserveSpace(uint dataSize, int posInTable, uint numItems, bool replace) | - |
150 | { | - |
151 | Q_ASSERT(posInTable >= 0 && posInTable <= (int)length); | - |
152 | if (size + dataSize >= Value::MaxSize) { | - |
153 | qWarning("QJson: Document too large to store in data structure %d %d %d", (uint)size, dataSize, Value::MaxSize); | - |
154 | return 0; | - |
155 | } | - |
156 | | - |
157 | offset off = tableOffset; | - |
158 | | - |
159 | if (replace) { | - |
160 | memmove((char *)(table()) + dataSize, table(), length*sizeof(offset)); | - |
161 | } else { | - |
162 | memmove((char *)(table() + posInTable + numItems) + dataSize, table() + posInTable, (length - posInTable)*sizeof(offset)); | - |
163 | memmove((char *)(table()) + dataSize, table(), posInTable*sizeof(offset)); | - |
164 | } | - |
165 | tableOffset += dataSize; | - |
166 | for (int i = 0; i < (int)numItems; ++i) | - |
167 | table()[posInTable + i] = off; | - |
168 | size += dataSize; | - |
169 | if (!replace) { | - |
170 | length += numItems; | - |
171 | size += numItems * sizeof(offset); | - |
172 | } | - |
173 | return off; | - |
174 | } | - |
175 | | - |
176 | void Base::removeItems(int pos, int numItems) | - |
177 | { | - |
178 | Q_ASSERT(pos >= 0 && pos <= (int)length); | - |
179 | if (pos + numItems < (int)length) | - |
180 | memmove(table() + pos, table() + pos + numItems, (length - pos - numItems)*sizeof(offset)); | - |
181 | length -= numItems; | - |
182 | } | - |
183 | | - |
184 | int Object::indexOf(const QString &key, bool *exists) const | - |
185 | { | - |
186 | int min = 0; | - |
187 | int n = length; | - |
188 | while (n > 0) {TRUE | evaluated 2494 times by 2 testsEvaluated by:- tst_QMetaType
- tst_QNetworkCookieJar
| FALSE | evaluated 1188 times by 2 testsEvaluated by:- tst_QMetaType
- tst_QNetworkCookieJar
|
| 1188-2494 |
189 | int half = n >> 1; | - |
190 | int middle = min + half; | - |
191 | if (*entryAt(middle) >= key) {TRUE | evaluated 1676 times by 1 test | FALSE | evaluated 818 times by 2 testsEvaluated by:- tst_QMetaType
- tst_QNetworkCookieJar
|
| 818-1676 |
192 | n = half; | - |
193 | } else {executed 1676 times by 1 test: end of block | 1676 |
194 | min = middle + 1; | - |
195 | n -= half + 1; | - |
196 | }executed 818 times by 2 tests: end of block Executed by:- tst_QMetaType
- tst_QNetworkCookieJar
| 818 |
197 | } | - |
198 | if (min < (int)length && *entryAt(min) == key) {TRUE | evaluated 1180 times by 1 test | FALSE | evaluated 8 times by 1 test |
TRUE | evaluated 1025 times by 1 test | FALSE | evaluated 155 times by 1 test |
| 8-1180 |
199 | *exists = true; | - |
200 | return min;executed 1025 times by 1 test: return min; | 1025 |
201 | } | - |
202 | *exists = false; | - |
203 | return min;executed 163 times by 2 tests: return min; Executed by:- tst_QMetaType
- tst_QNetworkCookieJar
| 163 |
204 | } | - |
205 | | - |
206 | int Object::indexOf(QLatin1String key, bool *exists) const | - |
207 | { | - |
208 | int min = 0; | - |
209 | int n = length; | - |
210 | while (n > 0) {TRUE | evaluated 215416 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 86439 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 86439-215416 |
211 | int half = n >> 1; | - |
212 | int middle = min + half; | - |
213 | if (*entryAt(middle) >= key) {TRUE | evaluated 169679 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 45737 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 45737-169679 |
214 | n = half; | - |
215 | } else {executed 169679 times by 115 tests: end of block Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 169679 |
216 | min = middle + 1; | - |
217 | n -= half + 1; | - |
218 | }executed 45737 times by 115 tests: end of block Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 45737 |
219 | } | - |
220 | if (min < (int)length && *entryAt(min) == key) {TRUE | evaluated 86380 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 59 times by 2 testsEvaluated by:- tst_QFactoryLoader
- tst_QOpenGlConfig
|
TRUE | evaluated 86285 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 95 times by 1 test |
| 59-86380 |
221 | *exists = true; | - |
222 | return min;executed 86285 times by 115 tests: return min; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 86285 |
223 | } | - |
224 | *exists = false; | - |
225 | return min;executed 154 times by 2 tests: return min; Executed by:- tst_QFactoryLoader
- tst_QOpenGlConfig
| 154 |
226 | } | - |
227 | | - |
228 | bool Object::isValid(int maxSize) const | - |
229 | { | - |
230 | if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size) | - |
231 | return false; | - |
232 | | - |
233 | QString lastKey; | - |
234 | for (uint i = 0; i < length; ++i) { | - |
235 | offset entryOffset = table()[i]; | - |
236 | if (entryOffset + sizeof(Entry) >= tableOffset) | - |
237 | return false; | - |
238 | Entry *e = entryAt(i); | - |
239 | if (!e->isValid(tableOffset - table()[i])) | - |
240 | return false; | - |
241 | QString key = e->key(); | - |
242 | if (key < lastKey) | - |
243 | return false; | - |
244 | if (!e->value.isValid(this)) | - |
245 | return false; | - |
246 | lastKey = key; | - |
247 | } | - |
248 | return true; | - |
249 | } | - |
250 | | - |
251 | | - |
252 | | - |
253 | bool Array::isValid(int maxSize) const | - |
254 | { | - |
255 | if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size) | - |
256 | return false; | - |
257 | | - |
258 | for (uint i = 0; i < length; ++i) { | - |
259 | if (!at(i).isValid(this)) | - |
260 | return false; | - |
261 | } | - |
262 | return true; | - |
263 | } | - |
264 | | - |
265 | | - |
266 | bool Entry::operator ==(const QString &key) const | - |
267 | { | - |
268 | if (value.latinKey) | - |
269 | return (shallowLatin1Key() == key); | - |
270 | else | - |
271 | return (shallowKey() == key); | - |
272 | } | - |
273 | | - |
274 | bool Entry::operator==(QLatin1String key) const | - |
275 | { | - |
276 | if (value.latinKey)TRUE | evaluated 86380 times by 115 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | never evaluated |
| 0-86380 |
277 | return shallowLatin1Key() == key;executed 86380 times by 115 tests: return shallowLatin1Key() == key; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 86380 |
278 | else | - |
279 | return shallowKey() == key; never executed: return shallowKey() == key; | 0 |
280 | } | - |
281 | | - |
282 | bool Entry::operator ==(const Entry &other) const | - |
283 | { | - |
284 | if (value.latinKey) { | - |
285 | if (other.value.latinKey) | - |
286 | return shallowLatin1Key() == other.shallowLatin1Key(); | - |
287 | return shallowLatin1Key() == other.shallowKey(); | - |
288 | } else if (other.value.latinKey) { | - |
289 | return shallowKey() == other.shallowLatin1Key(); | - |
290 | } | - |
291 | return shallowKey() == other.shallowKey(); | - |
292 | } | - |
293 | | - |
294 | bool Entry::operator >=(const Entry &other) const | - |
295 | { | - |
296 | if (value.latinKey) { | - |
297 | if (other.value.latinKey) | - |
298 | return shallowLatin1Key() >= other.shallowLatin1Key(); | - |
299 | return shallowLatin1Key() >= other.shallowKey(); | - |
300 | } else if (other.value.latinKey) { | - |
301 | return shallowKey() >= other.shallowLatin1Key(); | - |
302 | } | - |
303 | return shallowKey() >= other.shallowKey(); | - |
304 | } | - |
305 | | - |
306 | | - |
307 | int Value::usedStorage(const Base *b) const | - |
308 | { | - |
309 | int s = 0; | - |
310 | switch (type) { | - |
311 | case QJsonValue::Double: | - |
312 | if (latinOrIntValue) | - |
313 | break; | - |
314 | s = sizeof(double); | - |
315 | break; | - |
316 | case QJsonValue::String: { | - |
317 | char *d = data(b); | - |
318 | if (latinOrIntValue) | - |
319 | s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d); | - |
320 | else | - |
321 | s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); | - |
322 | break; | - |
323 | } | - |
324 | case QJsonValue::Array: | - |
325 | case QJsonValue::Object: | - |
326 | s = base(b)->size; | - |
327 | break; | - |
328 | case QJsonValue::Null: | - |
329 | case QJsonValue::Bool: | - |
330 | default: | - |
331 | break; | - |
332 | } | - |
333 | return alignedSize(s); | - |
| } | |
| | |
| inline bool isValidValueOffset(uint offset, uint tableOffset) | |
| { | |
| return offset >= sizeof(Base) | |
| && offset + sizeof(uint) <= tableOffset;} | |
335 | | - |
336 | bool Value::isValid(const Base *b) const | - |
337 | { | - |
338 | int offset = 0; | - |
339 | switch (type) { | - |
340 | case QJsonValue::NullDouble:executed 704 times by 111 tests: case QJsonValue::Double: Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 704 |
341 | if (latinOrIntValue)TRUE | evaluated 704 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | never evaluated |
| 0-704 |
342 | break;executed 704 times by 111 tests: break; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 704 |
343 | | - |
344 | case QJsonValue::BoolString: code before this statement never executed: case QJsonValue::String: executed 2631 times by 111 tests: case QJsonValue::String: Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 0-2631 |
345 | return true;case QJsonValue::DoubleArray:executed 924 times by 108 tests: case QJsonValue::Array: Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| 924 |
346 | return latinOrIntValue || isValidValueOffset(case QJsonValue::Object:executed 704 times by 111 tests: case QJsonValue::Object: Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 704 |
347 | offset = value, b->tableOffset);; | - |
348 | break;executed 4259 times by 111 tests: break; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 4259 |
349 | case QJsonValue::StringNull: never executed: case QJsonValue::Null: | 0 |
350 | case QJsonValue::Bool:executed 704 times by 111 tests: case QJsonValue::Bool: Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 704 |
351 | default never executed: default: :never executed: default: | 0 |
352 | break;executed 704 times by 111 tests: break; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 704 |
353 | } | - |
354 | | - |
355 | if (!isValidValueOffsetoffset)TRUE | evaluated 1408 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 1408-4259 |
356 | return true;executed 1408 times by 111 tests: return true; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 1408 |
357 | ifTRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
(value,offset + sizeof(uint) > b->tableOffset)))TRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 0-4259 |
358 | return false; never executed: return false; | 0 |
359 | | - |
360 | ifint s = usedStorage(latinOrIntValueb); | - |
361 | if (!sTRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
)TRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 0-4259 |
362 | return asLatin1Stringtrue; never executed: return true; | 0 |
363 | ifTRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
TRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
(b).isValids < 0 || s > (int)b->tableOffset - value);offset)TRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
TRUE | never evaluated | FALSE | evaluated 4259 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 0-4259 |
364 | return asString(b).isValidfalse; never executed: return false; | 0 |
365 | ifTRUE | evaluated 924 times by 108 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| FALSE | evaluated 3335 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
(b->tableOffset - value);TRUE | evaluated 924 times by 108 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| FALSE | evaluated 3335 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 924-3335 |
| caseTRUE | evaluated 924 times by 108 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| FALSE | evaluated 3335 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
type == QJsonValue::Array:TRUE | evaluated 924 times by 108 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| FALSE | evaluated 3335 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| |
| return isValidValueOffset(value, b->tableOffsetTRUE | evaluated 924 times by 108 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| FALSE | evaluated 3335 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
)TRUE | evaluated 924 times by 108 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| FALSE | evaluated 3335 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| |
366 | &&return static_cast<Array *>(base(b))->isValid(b->tableOffset - values);executed 924 times by 108 tests: return static_cast<Array *>(base(b))->isValid(s); Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| 924 |
367 | caseif (type == QJsonValue::Object:TRUE | evaluated 704 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 2631 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| 704-2631 |
| return isValidValueOffset(value, b->tableOffsetTRUE | evaluated 704 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 2631 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
)TRUE | evaluated 704 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| FALSE | evaluated 2631 times by 111 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
|
| |
368 | &&return static_cast<Object *>(base(b))->isValid(b->tableOffset - values);executed 704 times by 111 tests: return static_cast<Object *>(base(b))->isValid(s); Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 704 |
369 | default:return falsetrue;executed 2631 times by 111 tests: return true; Executed by:- tst_NetworkSelfTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QCompleter
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialog
- tst_QDoubleSpinBox
- tst_QFactoryLoader
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- ...
| 2631 |
| }} | |
371 | | - |
372 | | - |
373 | | - |
374 | | - |
375 | int Value::requiredStorage(QJsonValue &v, bool *compressed) | - |
376 | { | - |
377 | *compressed = false; | - |
378 | switch (v.t) { | - |
379 | case QJsonValue::Double: | - |
380 | if (QJsonPrivate::compressedNumber(v.dbl) != INT_MAX) { | - |
381 | *compressed = true; | - |
382 | return 0; | - |
383 | } | - |
384 | return sizeof(double); | - |
385 | case QJsonValue::String: { | - |
386 | QString s = v.toString(); | - |
387 | *compressed = QJsonPrivate::useCompressed(s); | - |
388 | return QJsonPrivate::qStringSize(s, *compressed); | - |
389 | } | - |
390 | case QJsonValue::Array: | - |
391 | case QJsonValue::Object: | - |
392 | if (v.d && v.d->compactionCounter) { | - |
393 | v.detach(); | - |
394 | v.d->compact(); | - |
395 | v.base = static_cast<QJsonPrivate::Base *>(v.d->header->root()); | - |
396 | } | - |
397 | return v.base ? v.base->size : sizeof(QJsonPrivate::Base); | - |
398 | case QJsonValue::Undefined: | - |
399 | case QJsonValue::Null: | - |
400 | case QJsonValue::Bool: | - |
401 | break; | - |
402 | } | - |
403 | return 0; | - |
404 | } | - |
405 | | - |
406 | | - |
407 | | - |
408 | | - |
409 | uint Value::valueToStore(const QJsonValue &v, uint offset) | - |
410 | { | - |
411 | switch (v.t) { | - |
412 | case QJsonValue::Undefined: | - |
413 | case QJsonValue::Null: | - |
414 | break; | - |
415 | case QJsonValue::Bool: | - |
416 | return v.b; | - |
417 | case QJsonValue::Double: { | - |
418 | int c = QJsonPrivate::compressedNumber(v.dbl); | - |
419 | if (c != INT_MAX) | - |
420 | return c; | - |
421 | } | - |
422 | | - |
423 | case QJsonValue::String: | - |
424 | case QJsonValue::Array: | - |
425 | case QJsonValue::Object: | - |
426 | return offset; | - |
427 | } | - |
428 | return 0; | - |
429 | } | - |
430 | | - |
431 | | - |
432 | | - |
433 | | - |
434 | void Value::copyData(const QJsonValue &v, char *dest, bool compressed) | - |
435 | { | - |
436 | switch (v.t) { | - |
437 | case QJsonValue::Double: never executed: case QJsonValue::Double: | 0 |
438 | if (!compressed) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
439 | qToLittleEndian(v.ui, (uchar *)dest); | - |
440 | } never executed: end of block | 0 |
441 | break; never executed: break; | 0 |
442 | case QJsonValue::String: {executed 4 times by 1 test: case QJsonValue::String: | 4 |
443 | QString str = v.toString(); | - |
444 | QJsonPrivate::copyString(dest, str, compressed); | - |
445 | break;executed 4 times by 1 test: break; | 4 |
446 | } | - |
447 | case QJsonValue::Array: never executed: case QJsonValue::Array: | 0 |
448 | case QJsonValue::Object: { never executed: case QJsonValue::Object: | 0 |
449 | const QJsonPrivate::Base *b = v.base; | - |
450 | if (!b)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
451 | b = (v.t == QJsonValue::Array ? &emptyArray : &emptyObject); never executed: b = (v.t == QJsonValue::Array ? &emptyArray : &emptyObject); TRUE | never evaluated | FALSE | never evaluated |
| 0 |
452 | memcpy(dest, b, b->size); | - |
453 | break; never executed: break; | 0 |
454 | } | - |
455 | default: never executed: default: | 0 |
456 | break; never executed: break; | 0 |
457 | } | - |
458 | } | - |
459 | | - |
460 | } | - |
461 | | - |
462 | QT_END_NAMESPACE | - |
| | |