qjson.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/json/qjson.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4namespace QJsonPrivate-
5{-
6-
7-
8-
9-
10-
11-
12-
13static const Base emptyArray = { { (sizeof(Base)) }, { 0 }, { 0 } };-
14static const Base emptyObject = { { (sizeof(Base)) }, { 0 }, { 0 } };-
15-
16-
17void Data::compact()-
18{-
19 ((!(sizeof(Value) == sizeof(offset))) ? qt_assert("sizeof(Value) == sizeof(offset)",__FILE__,54) : qt_noop());-
20-
21 if (!compactionCounter
!compactionCounterDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
22 return;
never executed: return;
0
23-
24 Base *base = header->root();-
25 int reserve = 0;-
26 if (base->is_object
base->is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
27 Object *o = static_cast<Object *>(base);-
28 for (int i = 0; i < (int)o->length
i < (int)o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
29 reserve += o->entryAt(i)->usedStorage(o);
never executed: reserve += o->entryAt(i)->usedStorage(o);
0
30 }
never executed: end of block
else {
0
31 Array *a = static_cast<Array *>(base);-
32 for (int i = 0; i < (int)a->length
i < (int)a->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
33 reserve += (*a)[i].usedStorage(a);
never executed: reserve += (*a)[i].usedStorage(a);
0
34 }
never executed: end of block
0
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
b->is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
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 < (int)o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
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
dataSizeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
62 memcpy((char *)no + offset, e->value.data(o), dataSize);-
63 ne->value.value = offset;-
64 offset += dataSize;-
65 }
never executed: end of block
0
66 }
never executed: end of block
0
67 }
never executed: end of block
else {
0
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 < (int)a->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
72 const Value &v = (*a)[i];-
73 Value &nv = (*na)[i];-
74 nv = v;-
75 int dataSize = v.usedStorage(a);-
76 if (dataSize
dataSizeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
77 memcpy((char *)na + offset, v.data(a), dataSize);-
78 nv.value = offset;-
79 offset += dataSize;-
80 }
never executed: end of block
0
81 }
never executed: end of block
0
82 }
never executed: end of block
0
83 ((!(offset == (int)b->tableOffset)) ? qt_assert("offset == (int)b->tableOffset",__FILE__,118) : qt_noop());-
84-
85 free(header);-
86 header = h;-
87 this->alloc = alloc;-
88 compactionCounter = 0;-
89}
never executed: end of block
0
90-
91bool Data::valid() const-
92{-
93 if (header->tag != QJsonDocument::BinaryFormatTag
header->tag !=...inaryFormatTagDescription
TRUEnever evaluated
FALSEevaluated 679 times by 110 tests
Evaluated 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
  • ...
|| header->version != 1u
header->version != 1uDescription
TRUEnever evaluated
FALSEevaluated 679 times by 110 tests
Evaluated 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-679
94 return
never executed: return false;
false;
never executed: return false;
0
95-
96 bool res = false;-
97 Base *root = header->root();-
98 int maxSize = alloc - sizeof(Header);-
99 if (root->is_object
root->is_objectDescription
TRUEevaluated 679 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
)
0-679
100 res = static_cast<Object *>(root)->isValid(maxSize);
executed 679 times by 110 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
  • ...
679
101 else-
102 res = static_cast<Array *>(root)->isValid(maxSize);
never executed: res = static_cast<Array *>(root)->isValid(maxSize);
0
103-
104 return
executed 679 times by 110 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
  • ...
res;
executed 679 times by 110 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
  • ...
679
105}-
106-
107-
108int 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__,145) : qt_noop());-
111 if (size + dataSize >= Value::MaxSize
size + dataSiz...Value::MaxSizeDescription
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QMetaType
) {
0-16
112 QMessageLogger(__FILE__, 147, __PRETTY_FUNCTION__).warning("QJson: Document too large to store in data structure %d %d %d", (uint)size, dataSize, Value::MaxSize);-
113 return
never executed: return 0;
0;
never executed: return 0;
0
114 }-
115-
116 offset off = tableOffset;-
117-
118 if (replace
replaceDescription
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QMetaType
) {
0-16
119 memmove((char *)(table()) + dataSize, table(), length*sizeof(offset));-
120 }
never executed: end of block
else {
0
121 memmove((char *)(table() + posInTable + numItems) + dataSize, table() + posInTable, (length - posInTable)*sizeof(offset));-
122 memmove((char *)(table()) + dataSize, table(), posInTable*sizeof(offset));-
123 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_QMetaType
16
124 tableOffset += dataSize;-
125 for (int i = 0; i < (int)numItems
i < (int)numItemsDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QMetaType
; ++i)
16
126 table()[posInTable + i] = off;
executed 16 times by 1 test: table()[posInTable + i] = off;
Executed by:
  • tst_QMetaType
16
127 size += dataSize;-
128 if (!replace
!replaceDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEnever evaluated
) {
0-16
129 length += numItems;-
130 size += numItems * sizeof(offset);-
131 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_QMetaType
16
132 return
executed 16 times by 1 test: return off;
Executed by:
  • tst_QMetaType
off;
executed 16 times by 1 test: return off;
Executed by:
  • tst_QMetaType
16
133}-
134-
135void Base::removeItems(int pos, int numItems)-
136{-
137 ((!(pos >= 0 && pos <= (int)length)) ? qt_assert("pos >= 0 && pos <= (int)length",__FILE__,172) : qt_noop());-
138 if (pos + numItems < (int)length
pos + numItems < (int)lengthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
139 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
140 length -= numItems;-
141}
never executed: end of block
0
142-
143int Object::indexOf(const QString &key, bool *exists)-
144{-
145 int min = 0;-
146 int n = length;-
147 while (n > 0
n > 0Description
TRUEevaluated 217481 times by 117 tests
Evaluated 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
  • ...
FALSEevaluated 87497 times by 117 tests
Evaluated 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
  • ...
) {
87497-217481
148 int half = n >> 1;-
149 int middle = min + half;-
150 if (*
*entryAt(middle) >= keyDescription
TRUEevaluated 171071 times by 116 tests
Evaluated 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
  • ...
FALSEevaluated 46410 times by 117 tests
Evaluated 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) >= key
*entryAt(middle) >= keyDescription
TRUEevaluated 171071 times by 116 tests
Evaluated 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
  • ...
FALSEevaluated 46410 times by 117 tests
Evaluated 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
  • ...
) {
46410-171071
151 n = half;-
152 }
executed 171071 times by 116 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 {
171071
153 min = middle + 1;-
154 n -= half + 1;-
155 }
executed 46410 times by 117 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
  • ...
46410
156 }-
157 if (min < (int)length
min < (int)lengthDescription
TRUEevaluated 87430 times by 116 tests
Evaluated 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
  • ...
FALSEevaluated 67 times by 3 tests
Evaluated by:
  • tst_QFactoryLoader
  • tst_QMetaType
  • tst_QOpenGlConfig
&& *
*entryAt(min) == keyDescription
TRUEevaluated 87180 times by 116 tests
Evaluated 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
  • ...
FALSEevaluated 250 times by 2 tests
Evaluated by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
entryAt(min) == key
*entryAt(min) == keyDescription
TRUEevaluated 87180 times by 116 tests
Evaluated 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
  • ...
FALSEevaluated 250 times by 2 tests
Evaluated by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
) {
67-87430
158 *exists = true;-
159 return
executed 87180 times by 116 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 87180 times by 116 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
  • ...
87180
160 }-
161 *exists = false;-
162 return
executed 317 times by 4 tests: return min;
Executed by:
  • tst_QFactoryLoader
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
min;
executed 317 times by 4 tests: return min;
Executed by:
  • tst_QFactoryLoader
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
317
163}-
164-
165bool Object::isValid(int maxSize) const-
166{-
167 if (size > (uint)maxSize
size > (uint)maxSizeDescription
TRUEnever evaluated
FALSEevaluated 1358 times by 110 tests
Evaluated 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
  • ...
|| tableOffset + length*sizeof(offset) > size
tableOffset + ...offset) > sizeDescription
TRUEnever evaluated
FALSEevaluated 1358 times by 110 tests
Evaluated 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-1358
168 return
never executed: return false;
false;
never executed: return false;
0
169-
170 QString lastKey;-
171 for (uint i = 0; i < length
i < lengthDescription
TRUEevaluated 4291 times by 110 tests
Evaluated 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
  • ...
FALSEevaluated 1358 times by 110 tests
Evaluated 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
  • ...
; ++i) {
1358-4291
172 offset entryOffset = table()[i];-
173 if (entryOffset + sizeof(Entry) >= tableOffset
entryOffset + ...>= tableOffsetDescription
TRUEnever evaluated
FALSEevaluated 4291 times by 110 tests
Evaluated 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-4291
174 return
never executed: return false;
false;
never executed: return false;
0
175 Entry *e = entryAt(i);-
176 if (!e->isValid(tableOffset - table()[i])
!e->isValid(ta... - table()[i])Description
TRUEnever evaluated
FALSEevaluated 4291 times by 110 tests
Evaluated 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-4291
177 return
never executed: return false;
false;
never executed: return false;
0
178 QString key = e->key();-
179 if (key < lastKey
key < lastKeyDescription
TRUEnever evaluated
FALSEevaluated 4291 times by 110 tests
Evaluated 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-4291
180 return
never executed: return false;
false;
never executed: return false;
0
181 if (!e->value.isValid(this)
!e->value.isValid(this)Description
TRUEnever evaluated
FALSEevaluated 4291 times by 110 tests
Evaluated 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-4291
182 return
never executed: return false;
false;
never executed: return false;
0
183 lastKey = key;-
184 }
executed 4291 times by 110 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
  • ...
4291
185 return
executed 1358 times by 110 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 1358 times by 110 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
  • ...
1358
186}-
187-
188-
189-
190bool Array::isValid(int maxSize) const-
191{-
192 if (size > (uint)maxSize
size > (uint)maxSizeDescription
TRUEnever evaluated
FALSEevaluated 896 times by 107 tests
Evaluated 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
  • ...
|| tableOffset + length*sizeof(offset) > size
tableOffset + ...offset) > sizeDescription
TRUEnever evaluated
FALSEevaluated 896 times by 107 tests
Evaluated 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-896
193 return
never executed: return false;
false;
never executed: return false;
0
194-
195 for (uint i = 0; i < length
i < lengthDescription
TRUEevaluated 1187 times by 107 tests
Evaluated 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
  • ...
FALSEevaluated 896 times by 107 tests
Evaluated 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
  • ...
; ++i) {
896-1187
196 if (!at(i).isValid(this)
!at(i).isValid(this)Description
TRUEnever evaluated
FALSEevaluated 1187 times by 107 tests
Evaluated 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-1187
197 return
never executed: return false;
false;
never executed: return false;
0
198 }
executed 1187 times by 107 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
  • ...
1187
199 return
executed 896 times by 107 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
  • ...
true;
executed 896 times by 107 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
  • ...
896
200}-
201-
202-
203bool Entry::operator ==(const QString &key) const-
204{-
205 if (value.latinKey
value.latinKeyDescription
TRUEevaluated 87430 times by 116 tests
Evaluated 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
  • ...
FALSEnever evaluated
)
0-87430
206 return
executed 87430 times by 116 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 87430 times by 116 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
  • ...
87430
207 else-
208 return
never executed: return (shallowKey() == key);
(shallowKey() == key);
never executed: return (shallowKey() == key);
0
209}-
210-
211bool Entry::operator ==(const Entry &other) const-
212{-
213 if (value.latinKey
value.latinKeyDescription
TRUEevaluated 711 times by 3 tests
Evaluated by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
FALSEnever evaluated
) {
0-711
214 if (other.value.latinKey
other.value.latinKeyDescription
TRUEevaluated 711 times by 3 tests
Evaluated by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
FALSEnever evaluated
)
0-711
215 return
executed 711 times by 3 tests: return shallowLatin1Key() == other.shallowLatin1Key();
Executed by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
shallowLatin1Key() == other.shallowLatin1Key();
executed 711 times by 3 tests: return shallowLatin1Key() == other.shallowLatin1Key();
Executed by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
711
216 return
never executed: return shallowLatin1Key() == other.shallowKey();
shallowLatin1Key() == other.shallowKey();
never executed: return shallowLatin1Key() == other.shallowKey();
0
217 } else if (other.value.latinKey
other.value.latinKeyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
218 return
never executed: return shallowKey() == other.shallowLatin1Key();
shallowKey() == other.shallowLatin1Key();
never executed: return shallowKey() == other.shallowLatin1Key();
0
219 }-
220 return
never executed: return shallowKey() == other.shallowKey();
shallowKey() == other.shallowKey();
never executed: return shallowKey() == other.shallowKey();
0
221}-
222-
223bool Entry::operator >=(const Entry &other) const-
224{-
225 if (value.latinKey
value.latinKeyDescription
TRUEevaluated 1397 times by 3 tests
Evaluated by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
FALSEnever evaluated
) {
0-1397
226 if (other.value.latinKey
other.value.latinKeyDescription
TRUEevaluated 1397 times by 3 tests
Evaluated by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
FALSEnever evaluated
)
0-1397
227 return
executed 1397 times by 3 tests: return shallowLatin1Key() >= other.shallowLatin1Key();
Executed by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
shallowLatin1Key() >= other.shallowLatin1Key();
executed 1397 times by 3 tests: return shallowLatin1Key() >= other.shallowLatin1Key();
Executed by:
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_qmakelib
1397
228 return
never executed: return shallowLatin1Key() >= other.shallowKey();
shallowLatin1Key() >= other.shallowKey();
never executed: return shallowLatin1Key() >= other.shallowKey();
0
229 } else if (other.value.latinKey
other.value.latinKeyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
230 return
never executed: return shallowKey() >= other.shallowLatin1Key();
shallowKey() >= other.shallowLatin1Key();
never executed: return shallowKey() >= other.shallowLatin1Key();
0
231 }-
232 return
never executed: return shallowKey() >= other.shallowKey();
shallowKey() >= other.shallowKey();
never executed: return shallowKey() >= other.shallowKey();
0
233}-
234-
235-
236int Value::usedStorage(const Base *b) const-
237{-
238 int s = 0;-
239 switch (type) {-
240 case
never executed: case QJsonValue::Double:
QJsonValue::Double:
never executed: case QJsonValue::Double:
0
241 if (latinOrIntValue
latinOrIntValueDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
242 break;
never executed: break;
0
243 s = sizeof(double);-
244 break;
never executed: break;
0
245 case
never executed: case QJsonValue::String:
QJsonValue::String:
never executed: case QJsonValue::String:
{
0
246 char *d = data(b);-
247 if (latinOrIntValue
latinOrIntValueDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
248 s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d);
never executed: s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d);
0
249 else-
250 s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);
never executed: s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);
0
251 break;
never executed: break;
0
252 }-
253 case
never executed: case QJsonValue::Array:
QJsonValue::Array:
never executed: case QJsonValue::Array:
0
254 case
never executed: case QJsonValue::Object:
QJsonValue::Object:
never executed: case QJsonValue::Object:
0
255 s = base(b)->size;-
256 break;
never executed: break;
0
257 case
never executed: case QJsonValue::Null:
QJsonValue::Null:
never executed: case QJsonValue::Null:
0
258 case
never executed: case QJsonValue::Bool:
QJsonValue::Bool:
never executed: case QJsonValue::Bool:
0
259 default
never executed: default:
:
never executed: default:
0
260 break;
never executed: break;
0
261 }-
262 return
never executed: return alignedSize(s);
alignedSize(s);
never executed: return alignedSize(s);
0
263}-
264-
265inline bool isValidValueOffset(uint offset, uint tableOffset)-
266{-
267 return
executed 4120 times by 110 tests: return offset >= sizeof(Base) && offset + sizeof(uint) <= tableOffset;
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
  • ...
offset >= sizeof(Base)
offset >= sizeof(Base)Description
TRUEevaluated 4120 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
executed 4120 times by 110 tests: return offset >= sizeof(Base) && offset + sizeof(uint) <= tableOffset;
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-4120
268 && offset + sizeof(uint) <= tableOffset
offset + sizeo...<= tableOffsetDescription
TRUEevaluated 4120 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
;
executed 4120 times by 110 tests: return offset >= sizeof(Base) && offset + sizeof(uint) <= tableOffset;
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-4120
269}-
270-
271bool Value::isValid(const Base *b) const-
272{-
273 switch (type) {-
274 case
never executed: case QJsonValue::Null:
QJsonValue::Null:
never executed: case QJsonValue::Null:
0
275 case
executed 679 times by 110 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 679 times by 110 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
  • ...
679
276 return
executed 679 times by 110 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 679 times by 110 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
  • ...
679
277 case
executed 679 times by 110 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::Double:
executed 679 times by 110 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
  • ...
679
278 return
executed 679 times by 110 tests: return latinOrIntValue || isValidValueOffset(value, b->tableOffset);
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
  • ...
latinOrIntValue || isValidValueOffset(value, b->tableOffset)
isValidValueOf...->tableOffset)Description
TRUEnever evaluated
FALSEnever evaluated
;
executed 679 times by 110 tests: return latinOrIntValue || isValidValueOffset(value, b->tableOffset);
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-679
279 case
executed 2545 times by 110 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::String:
executed 2545 times by 110 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
  • ...
2545
280 if (!isValidValueOffset(value, b->tableOffset)
!isValidValueO...->tableOffset)Description
TRUEnever evaluated
FALSEevaluated 2545 times by 110 tests
Evaluated 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-2545
281 return
never executed: return false;
false;
never executed: return false;
0
282 if (latinOrIntValue
latinOrIntValueDescription
TRUEevaluated 2545 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
)
0-2545
283 return
executed 2545 times by 110 tests: return asLatin1String(b).isValid(b->tableOffset - value);
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
  • ...
asLatin1String(b).isValid(b->tableOffset - value);
executed 2545 times by 110 tests: return asLatin1String(b).isValid(b->tableOffset - value);
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
  • ...
2545
284 return
never executed: return asString(b).isValid(b->tableOffset - value);
asString(b).isValid(b->tableOffset - value);
never executed: return asString(b).isValid(b->tableOffset - value);
0
285 case
executed 896 times by 107 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::Array:
executed 896 times by 107 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
  • ...
896
286 return
executed 896 times by 107 tests: return isValidValueOffset(value, b->tableOffset) && static_cast<Array *>(base(b))->isValid(b->tableOffset - value);
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
  • ...
isValidValueOffset(value, b->tableOffset)
isValidValueOf...->tableOffset)Description
TRUEevaluated 896 times by 107 tests
Evaluated 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
  • ...
FALSEnever evaluated
executed 896 times by 107 tests: return isValidValueOffset(value, b->tableOffset) && static_cast<Array *>(base(b))->isValid(b->tableOffset - value);
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
  • ...
0-896
287 && static_cast<
static_cast<Ar...ffset - value)Description
TRUEevaluated 896 times by 107 tests
Evaluated 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
  • ...
FALSEnever evaluated
Array *>(base(b))->isValid(b->tableOffset - value)
static_cast<Ar...ffset - value)Description
TRUEevaluated 896 times by 107 tests
Evaluated 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
  • ...
FALSEnever evaluated
;
executed 896 times by 107 tests: return isValidValueOffset(value, b->tableOffset) && static_cast<Array *>(base(b))->isValid(b->tableOffset - value);
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
  • ...
0-896
288 case
executed 679 times by 110 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 679 times by 110 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
  • ...
679
289 return
executed 679 times by 110 tests: return isValidValueOffset(value, b->tableOffset) && static_cast<Object *>(base(b))->isValid(b->tableOffset - value);
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
  • ...
isValidValueOffset(value, b->tableOffset)
isValidValueOf...->tableOffset)Description
TRUEevaluated 679 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
executed 679 times by 110 tests: return isValidValueOffset(value, b->tableOffset) && static_cast<Object *>(base(b))->isValid(b->tableOffset - value);
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-679
290 && static_cast<
static_cast<Ob...ffset - value)Description
TRUEevaluated 679 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
Object *>(base(b))->isValid(b->tableOffset - value)
static_cast<Ob...ffset - value)Description
TRUEevaluated 679 times by 110 tests
Evaluated 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
  • ...
FALSEnever evaluated
;
executed 679 times by 110 tests: return isValidValueOffset(value, b->tableOffset) && static_cast<Object *>(base(b))->isValid(b->tableOffset - value);
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-679
291 default
never executed: default:
:
never executed: default:
0
292 return
never executed: return false;
false;
never executed: return false;
0
293 }-
294}-
295-
296-
297-
298-
299int Value::requiredStorage(QJsonValue &v, bool *compressed)-
300{-
301 *compressed = false;-
302 switch (v.t) {-
303 case
executed 4 times by 1 test: case QJsonValue::Double:
Executed by:
  • tst_QMetaType
QJsonValue::Double:
executed 4 times by 1 test: case QJsonValue::Double:
Executed by:
  • tst_QMetaType
4
304 if (QJsonPrivate::compressedNumber(v.dbl) != 2147483647
QJsonPrivate::... != 2147483647Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEnever evaluated
) {
0-4
305 *compressed = true;-
306 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QMetaType
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QMetaType
4
307 }-
308 return
never executed: return sizeof(double);
sizeof(double);
never executed: return sizeof(double);
0
309 case
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
QJsonValue::String:
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
{
4
310 QString s = v.toString();-
311 *compressed = QJsonPrivate::useCompressed(s);-
312 return
executed 4 times by 1 test: return QJsonPrivate::qStringSize(s, *compressed);
Executed by:
  • tst_QMetaType
QJsonPrivate::qStringSize(s, *compressed);
executed 4 times by 1 test: return QJsonPrivate::qStringSize(s, *compressed);
Executed by:
  • tst_QMetaType
4
313 }-
314 case
never executed: case QJsonValue::Array:
QJsonValue::Array:
never executed: case QJsonValue::Array:
0
315 case
never executed: case QJsonValue::Object:
QJsonValue::Object:
never executed: case QJsonValue::Object:
0
316 if (v.d
v.dDescription
TRUEnever evaluated
FALSEnever evaluated
&& v.d->compactionCounter
v.d->compactionCounterDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
317 v.detach();-
318 v.d->compact();-
319 v.base = static_cast<QJsonPrivate::Base *>(v.d->header->root());-
320 }
never executed: end of block
0
321 return
never executed: return v.base ? v.base->size : sizeof(QJsonPrivate::Base);
v.base
v.baseDescription
TRUEnever evaluated
FALSEnever evaluated
? v.base->size : sizeof(QJsonPrivate::Base);
never executed: return v.base ? v.base->size : sizeof(QJsonPrivate::Base);
0
322 case
never executed: case QJsonValue::Undefined:
QJsonValue::Undefined:
never executed: case QJsonValue::Undefined:
0
323 case
executed 4 times by 1 test: case QJsonValue::Null:
Executed by:
  • tst_QMetaType
QJsonValue::Null:
executed 4 times by 1 test: case QJsonValue::Null:
Executed by:
  • tst_QMetaType
4
324 case
executed 4 times by 1 test: case QJsonValue::Bool:
Executed by:
  • tst_QMetaType
QJsonValue::Bool:
executed 4 times by 1 test: case QJsonValue::Bool:
Executed by:
  • tst_QMetaType
4
325 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_QMetaType
8
326 }-
327 return
executed 8 times by 1 test: return 0;
Executed by:
  • tst_QMetaType
0;
executed 8 times by 1 test: return 0;
Executed by:
  • tst_QMetaType
8
328}-
329-
330-
331-
332-
333uint Value::valueToStore(const QJsonValue &v, uint offset)-
334{-
335 switch (v.t) {-
336 case
never executed: case QJsonValue::Undefined:
QJsonValue::Undefined:
never executed: case QJsonValue::Undefined:
0
337 case
executed 4 times by 1 test: case QJsonValue::Null:
Executed by:
  • tst_QMetaType
QJsonValue::Null:
executed 4 times by 1 test: case QJsonValue::Null:
Executed by:
  • tst_QMetaType
4
338 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QMetaType
4
339 case
executed 4 times by 1 test: case QJsonValue::Bool:
Executed by:
  • tst_QMetaType
QJsonValue::Bool:
executed 4 times by 1 test: case QJsonValue::Bool:
Executed by:
  • tst_QMetaType
4
340 return
executed 4 times by 1 test: return v.b;
Executed by:
  • tst_QMetaType
v.b;
executed 4 times by 1 test: return v.b;
Executed by:
  • tst_QMetaType
4
341 case
executed 4 times by 1 test: case QJsonValue::Double:
Executed by:
  • tst_QMetaType
QJsonValue::Double:
executed 4 times by 1 test: case QJsonValue::Double:
Executed by:
  • tst_QMetaType
{
4
342 int c = QJsonPrivate::compressedNumber(v.dbl);-
343 if (c != 2147483647
c != 2147483647Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEnever evaluated
)
0-4
344 return
executed 4 times by 1 test: return c;
Executed by:
  • tst_QMetaType
c;
executed 4 times by 1 test: return c;
Executed by:
  • tst_QMetaType
4
345 }-
346-
347 case
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
code before this statement never executed: case QJsonValue::String:
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
QJsonValue::String:
code before this statement never executed: case QJsonValue::String:
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
0-4
348 case
never executed: case QJsonValue::Array:
QJsonValue::Array:
never executed: case QJsonValue::Array:
0
349 case
never executed: case QJsonValue::Object:
QJsonValue::Object:
never executed: case QJsonValue::Object:
0
350 return
executed 4 times by 1 test: return offset;
Executed by:
  • tst_QMetaType
offset;
executed 4 times by 1 test: return offset;
Executed by:
  • tst_QMetaType
4
351 }-
352 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QMetaType
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QMetaType
4
353}-
354-
355-
356-
357-
358void Value::copyData(const QJsonValue &v, char *dest, bool compressed)-
359{-
360 switch (v.t) {-
361 case
never executed: case QJsonValue::Double:
QJsonValue::Double:
never executed: case QJsonValue::Double:
0
362 if (!compressed
!compressedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
363 qToLittleEndian(v.ui, (uchar *)dest);-
364 }
never executed: end of block
0
365 break;
never executed: break;
0
366 case
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
QJsonValue::String:
executed 4 times by 1 test: case QJsonValue::String:
Executed by:
  • tst_QMetaType
{
4
367 QString str = v.toString();-
368 QJsonPrivate::copyString(dest, str, compressed);-
369 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QMetaType
4
370 }-
371 case
never executed: case QJsonValue::Array:
QJsonValue::Array:
never executed: case QJsonValue::Array:
0
372 case
never executed: case QJsonValue::Object:
QJsonValue::Object:
never executed: case QJsonValue::Object:
{
0
373 const QJsonPrivate::Base *b = v.base;-
374 if (!b
!bDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
375 b = (v.t == QJsonValue::Array
v.t == QJsonValue::ArrayDescription
TRUEnever evaluated
FALSEnever evaluated
? &emptyArray : &emptyObject);
never executed: b = (v.t == QJsonValue::Array ? &emptyArray : &emptyObject);
0
376 memcpy(dest, b, b->size);-
377 break;
never executed: break;
0
378 }-
379 default
never executed: default:
:
never executed: default:
0
380 break;
never executed: break;
0
381 }-
382}-
383-
384}-
385-
386-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9