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