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)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
63 | return; never executed: return; | 0 |
64 | | - |
65 | Base *base = header->root(); | - |
66 | int reserve = 0; | - |
67 | if (base->is_object) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
68 | Object *o = static_cast<Object *>(base); | - |
69 | for (int i = 0; i < (int)o->length; ++i)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
70 | reserve += o->entryAt(i)->usedStorage(o); never executed: reserve += o->entryAt(i)->usedStorage(o); | 0 |
71 | } else { never executed: end of block | 0 |
72 | Array *a = static_cast<Array *>(base); | - |
73 | for (int i = 0; i < (int)a->length; ++i)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
74 | reserve += (*a)[i].usedStorage(a); never executed: reserve += (*a)[i].usedStorage(a); | 0 |
75 | } never executed: end of block | 0 |
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) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
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) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
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) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
103 | memcpy((char *)no + offset, e->value.data(o), dataSize); | - |
104 | ne->value.value = offset; | - |
105 | offset += dataSize; | - |
106 | } never executed: end of block | 0 |
107 | } never executed: end of block | 0 |
108 | } else { never executed: end of block | 0 |
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) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
113 | const Value &v = (*a)[i]; | - |
114 | Value &nv = (*na)[i]; | - |
115 | nv = v; | - |
116 | int dataSize = v.usedStorage(a); | - |
117 | if (dataSize) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
118 | memcpy((char *)na + offset, v.data(a), dataSize); | - |
119 | nv.value = offset; | - |
120 | offset += dataSize; | - |
121 | } never executed: end of block | 0 |
122 | } never executed: end of block | 0 |
123 | } never executed: end of block | 0 |
124 | Q_ASSERT(offset == (int)b->tableOffset); | - |
125 | | - |
126 | free(header); | - |
127 | header = h; | - |
128 | this->alloc = alloc; | - |
129 | compactionCounter = 0; | - |
130 | } never executed: end of block | 0 |
131 | | - |
132 | bool Data::valid() const | - |
133 | { | - |
134 | if (header->tag != QJsonDocument::BinaryFormatTag || header->version != 1u)TRUE | never evaluated | FALSE | 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
- ...
|
TRUE | never evaluated | FALSE | 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
- ...
|
| 0-704 |
135 | return false; never executed: return false; | 0 |
136 | | - |
137 | bool res = false; | - |
138 | Base *root = header->root(); | - |
139 | int maxSize = alloc - sizeof(Header); | - |
140 | if (root->is_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 | never evaluated |
| 0-704 |
141 | res = static_cast<Object *>(root)->isValid(maxSize);executed 704 times by 111 tests: res = static_cast<Object *>(root)->isValid(maxSize); 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 |
142 | else | - |
143 | res = static_cast<Array *>(root)->isValid(maxSize); never executed: res = static_cast<Array *>(root)->isValid(maxSize); | 0 |
144 | | - |
145 | return res;executed 704 times by 111 tests: return res; 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 |
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) {TRUE | never evaluated | FALSE | evaluated 16 times by 1 test |
| 0-16 |
153 | qWarning("QJson: Document too large to store in data structure %d %d %d", (uint)size, dataSize, Value::MaxSize); | - |
154 | return 0; never executed: return 0; | 0 |
155 | } | - |
156 | | - |
157 | offset off = tableOffset; | - |
158 | | - |
159 | if (replace) {TRUE | never evaluated | FALSE | evaluated 16 times by 1 test |
| 0-16 |
160 | memmove((char *)(table()) + dataSize, table(), length*sizeof(offset)); | - |
161 | } else { never executed: end of block | 0 |
162 | memmove((char *)(table() + posInTable + numItems) + dataSize, table() + posInTable, (length - posInTable)*sizeof(offset)); | - |
163 | memmove((char *)(table()) + dataSize, table(), posInTable*sizeof(offset)); | - |
164 | }executed 16 times by 1 test: end of block | 16 |
165 | tableOffset += dataSize; | - |
166 | for (int i = 0; i < (int)numItems; ++i)TRUE | evaluated 16 times by 1 test | FALSE | evaluated 16 times by 1 test |
| 16 |
167 | table()[posInTable + i] = off;executed 16 times by 1 test: table()[posInTable + i] = off; | 16 |
168 | size += dataSize; | - |
169 | if (!replace) {TRUE | evaluated 16 times by 1 test | FALSE | never evaluated |
| 0-16 |
170 | length += numItems; | - |
171 | size += numItems * sizeof(offset); | - |
172 | }executed 16 times by 1 test: end of block | 16 |
173 | return off;executed 16 times by 1 test: return off; | 16 |
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)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
180 | memmove(table() + pos, table() + pos + numItems, (length - pos - numItems)*sizeof(offset)); never executed: memmove(table() + pos, table() + pos + numItems, (length - pos - numItems)*sizeof(offset)); | 0 |
181 | length -= numItems; | - |
182 | } never executed: end of block | 0 |
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)TRUE | never evaluated | FALSE | 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
- ...
|
TRUE | never evaluated | FALSE | 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
- ...
|
| 0-1408 |
231 | return false; never executed: return false; | 0 |
232 | | - |
233 | QString lastKey; | - |
234 | for (uint i = 0; i < length; ++i) {TRUE | evaluated 4444 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 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
- ...
|
| 1408-4444 |
235 | offset entryOffset = table()[i]; | - |
236 | if (entryOffset + sizeof(Entry) >= tableOffset)TRUE | never evaluated | FALSE | evaluated 4444 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-4444 |
237 | return false; never executed: return false; | 0 |
238 | Entry *e = entryAt(i); | - |
239 | if (!e->isValid(tableOffset - table()[i]))TRUE | never evaluated | FALSE | evaluated 4444 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-4444 |
240 | return false; never executed: return false; | 0 |
241 | QString key = e->key(); | - |
242 | if (key < lastKey)TRUE | never evaluated | FALSE | evaluated 4444 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-4444 |
243 | return false; never executed: return false; | 0 |
244 | if (!e->value.isValid(this))TRUE | never evaluated | FALSE | evaluated 4444 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-4444 |
245 | return false; never executed: return false; | 0 |
246 | lastKey = key; | - |
247 | }executed 4444 times by 111 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
- ...
| 4444 |
248 | 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 |
249 | } | - |
250 | | - |
251 | | - |
252 | | - |
253 | bool Array::isValid(int maxSize) const | - |
254 | { | - |
255 | if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size)TRUE | never evaluated | FALSE | 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
- ...
|
TRUE | never evaluated | FALSE | 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
- ...
|
| 0-924 |
256 | return false; never executed: return false; | 0 |
257 | | - |
258 | for (uint i = 0; i < length; ++i) {TRUE | evaluated 1223 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 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
- ...
|
| 924-1223 |
259 | if (!at(i).isValid(this))TRUE | never evaluated | FALSE | evaluated 1223 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
- ...
|
| 0-1223 |
260 | return false; never executed: return false; | 0 |
261 | }executed 1223 times by 108 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_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| 1223 |
262 | return true;executed 924 times by 108 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_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QFocusEvent
- tst_QFontComboBox
- ...
| 924 |
263 | } | - |
264 | | - |
265 | | - |
266 | bool Entry::operator ==(const QString &key) const | - |
267 | { | - |
268 | if (value.latinKey)TRUE | evaluated 1180 times by 1 test | FALSE | never evaluated |
| 0-1180 |
269 | return (shallowLatin1Key() == key);executed 1180 times by 1 test: return (shallowLatin1Key() == key); | 1180 |
270 | else | - |
271 | return (shallowKey() == key); never executed: return (shallowKey() == key); | 0 |
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) {TRUE | evaluated 711 times by 3 testsEvaluated by:- tst_QNetworkCookieJar
- tst_QOpenGlConfig
- tst_qmakelib
| FALSE | never evaluated |
| 0-711 |
285 | if (other.value.latinKey)TRUE | evaluated 711 times by 3 testsEvaluated by:- tst_QNetworkCookieJar
- tst_QOpenGlConfig
- tst_qmakelib
| FALSE | never evaluated |
| 0-711 |
286 | return shallowLatin1Key() == other.shallowLatin1Key();executed 711 times by 3 tests: return shallowLatin1Key() == other.shallowLatin1Key(); Executed by:- tst_QNetworkCookieJar
- tst_QOpenGlConfig
- tst_qmakelib
| 711 |
287 | return shallowLatin1Key() == other.shallowKey(); never executed: return shallowLatin1Key() == other.shallowKey(); | 0 |
288 | } else if (other.value.latinKey) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
289 | return shallowKey() == other.shallowLatin1Key(); never executed: return shallowKey() == other.shallowLatin1Key(); | 0 |
290 | } | - |
291 | return shallowKey() == other.shallowKey(); never executed: return shallowKey() == other.shallowKey(); | 0 |
292 | } | - |
293 | | - |
294 | bool Entry::operator >=(const Entry &other) const | - |
295 | { | - |
296 | if (value.latinKey) {TRUE | evaluated 1397 times by 3 testsEvaluated by:- tst_QNetworkCookieJar
- tst_QOpenGlConfig
- tst_qmakelib
| FALSE | never evaluated |
| 0-1397 |
297 | if (other.value.latinKey)TRUE | evaluated 1397 times by 3 testsEvaluated by:- tst_QNetworkCookieJar
- tst_QOpenGlConfig
- tst_qmakelib
| FALSE | never evaluated |
| 0-1397 |
298 | return shallowLatin1Key() >= other.shallowLatin1Key();executed 1397 times by 3 tests: return shallowLatin1Key() >= other.shallowLatin1Key(); Executed by:- tst_QNetworkCookieJar
- tst_QOpenGlConfig
- tst_qmakelib
| 1397 |
299 | return shallowLatin1Key() >= other.shallowKey(); never executed: return shallowLatin1Key() >= other.shallowKey(); | 0 |
300 | } else if (other.value.latinKey) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
301 | return shallowKey() >= other.shallowLatin1Key(); never executed: return shallowKey() >= other.shallowLatin1Key(); | 0 |
302 | } | - |
303 | return shallowKey() >= other.shallowKey(); never executed: return shallowKey() >= other.shallowKey(); | 0 |
304 | } | - |
305 | | - |
306 | | - |
307 | int Value::usedStorage(const Base *b) const | - |
308 | { | - |
309 | int s = 0; | - |
310 | switch (type) { | - |
311 | case QJsonValue::Double: never executed: case QJsonValue::Double: | 0 |
312 | if (latinOrIntValue)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
313 | break; never executed: break; | 0 |
314 | s = sizeof(double); | - |
315 | break; never executed: break; | 0 |
316 | 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
- ...
| 2631 |
317 | char *d = data(b); | - |
318 | if (latinOrIntValue)TRUE | 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
- ...
| FALSE | never evaluated |
| 0-2631 |
319 | s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d);executed 2631 times by 111 tests: s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d); 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 |
320 | else | - |
321 | s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); never executed: s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); | 0 |
322 | break;executed 2631 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
- ...
| 2631 |
323 | } | - |
324 | case QJsonValue::Array: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 |
325 | 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 |
326 | s = base(b)->size; | - |
327 | break;executed 1628 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
- ...
| 1628 |
328 | case QJsonValue::Null: never executed: case QJsonValue::Null: | 0 |
329 | case QJsonValue::Bool: never executed: case QJsonValue::Bool: | 0 |
330 | default: never executed: default: | 0 |
331 | break; never executed: break; | 0 |
332 | } | - |
333 | return alignedSize(s);executed 4259 times by 111 tests: return alignedSize(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
- ...
| 4259 |
334 | } | - |
335 | | - |
336 | bool Value::isValid(const Base *b) const | - |
337 | { | - |
338 | int offset = 0; | - |
339 | switch (type) { | - |
340 | case QJsonValue::Double: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::String: 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 | case QJsonValue::Array: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 | 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; | - |
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::Null: 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: | 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 (!offset)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 | if (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 | int s = usedStorage(b); | - |
361 | if (!s)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 true; never executed: return true; | 0 |
363 | if (s < 0 || s > (int)b->tableOffset - 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 false; never executed: return false; | 0 |
365 | if (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
- ...
|
| 924-3335 |
366 | return static_cast<Array *>(base(b))->isValid(s);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 | if (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 |
368 | return static_cast<Object *>(base(b))->isValid(s);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 | return true;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 |
370 | } | - |
371 | | - |
372 | | - |
373 | | - |
374 | | - |
375 | int Value::requiredStorage(QJsonValue &v, bool *compressed) | - |
376 | { | - |
377 | *compressed = false; | - |
378 | switch (v.t) { | - |
379 | case QJsonValue::Double:executed 4 times by 1 test: case QJsonValue::Double: | 4 |
380 | if (QJsonPrivate::compressedNumber(v.dbl) != INT_MAX) {TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
| 0-4 |
381 | *compressed = true; | - |
382 | return 0;executed 4 times by 1 test: return 0; | 4 |
383 | } | - |
384 | return sizeof(double); never executed: return sizeof(double); | 0 |
385 | case QJsonValue::String: {executed 4 times by 1 test: case QJsonValue::String: | 4 |
386 | QString s = v.toString(); | - |
387 | *compressed = QJsonPrivate::useCompressed(s); | - |
388 | return QJsonPrivate::qStringSize(s, *compressed);executed 4 times by 1 test: return QJsonPrivate::qStringSize(s, *compressed); | 4 |
389 | } | - |
390 | case QJsonValue::Array: never executed: case QJsonValue::Array: | 0 |
391 | case QJsonValue::Object: never executed: case QJsonValue::Object: | 0 |
392 | if (v.d && v.d->compactionCounter) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
393 | v.detach(); | - |
394 | v.d->compact(); | - |
395 | v.base = static_cast<QJsonPrivate::Base *>(v.d->header->root()); | - |
396 | } never executed: end of block | 0 |
397 | return v.base ? v.base->size : sizeof(QJsonPrivate::Base); never executed: return v.base ? v.base->size : sizeof(QJsonPrivate::Base); | 0 |
398 | case QJsonValue::Undefined: never executed: case QJsonValue::Undefined: | 0 |
399 | case QJsonValue::Null:executed 4 times by 1 test: case QJsonValue::Null: | 4 |
400 | case QJsonValue::Bool:executed 4 times by 1 test: case QJsonValue::Bool: | 4 |
401 | break;executed 8 times by 1 test: break; | 8 |
402 | } | - |
403 | return 0;executed 8 times by 1 test: return 0; | 8 |
404 | } | - |
405 | | - |
406 | | - |
407 | | - |
408 | | - |
409 | uint Value::valueToStore(const QJsonValue &v, uint offset) | - |
410 | { | - |
411 | switch (v.t) { | - |
412 | case QJsonValue::Undefined: never executed: case QJsonValue::Undefined: | 0 |
413 | case QJsonValue::Null:executed 4 times by 1 test: case QJsonValue::Null: | 4 |
414 | break;executed 4 times by 1 test: break; | 4 |
415 | case QJsonValue::Bool:executed 4 times by 1 test: case QJsonValue::Bool: | 4 |
416 | return v.b;executed 4 times by 1 test: return v.b; | 4 |
417 | case QJsonValue::Double: {executed 4 times by 1 test: case QJsonValue::Double: | 4 |
418 | int c = QJsonPrivate::compressedNumber(v.dbl); | - |
419 | if (c != INT_MAX)TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
| 0-4 |
420 | return c;executed 4 times by 1 test: return c; | 4 |
421 | } | - |
422 | | - |
423 | case QJsonValue::String: code before this statement never executed: case QJsonValue::String: executed 4 times by 1 test: case QJsonValue::String: | 0-4 |
424 | case QJsonValue::Array: never executed: case QJsonValue::Array: | 0 |
425 | case QJsonValue::Object: never executed: case QJsonValue::Object: | 0 |
426 | return offset;executed 4 times by 1 test: return offset; | 4 |
427 | } | - |
428 | return 0;executed 4 times by 1 test: return 0; | 4 |
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, 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 | - |
| | |