qjsonobject.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/json/qjsonobject.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QJsonObject::QJsonObject()-
4 : d(0), o(0)-
5{-
6}
executed 43570 times by 142 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • 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_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • ...
43570
7QJsonObject::QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object)-
8 : d(data), o(object)-
9{-
10 ((!(d)) ? qt_assert("d",__FILE__,137) : qt_noop());-
11 ((!(o)) ? qt_assert("o",__FILE__,138) : qt_noop());-
12 d->ref.ref();-
13}
executed 42729 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
  • ...
42729
14void QJsonObject::initialize()-
15{-
16 d = 0;-
17 o = 0;-
18}
never executed: end of block
0
19-
20-
21-
22-
23QJsonObject::~QJsonObject()-
24{-
25 if (d
dDescription
TRUEevaluated 86679 times by 359 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 42799 times by 120 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
  • ...
&& !d->ref.deref()
!d->ref.deref()Description
TRUEevaluated 2835 times by 248 tests
Evaluated by:
  • tst_QFactoryLoader
  • tst_QGuiApplication
  • tst_QMetaType
  • tst_QPluginLoader
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • ...
FALSEevaluated 83844 times by 118 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
  • ...
)
2835-86679
26 delete d;
executed 2835 times by 248 tests: delete d;
Executed by:
  • tst_QFactoryLoader
  • tst_QGuiApplication
  • tst_QMetaType
  • tst_QPluginLoader
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • ...
2835
27}
executed 129478 times by 362 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
  • ...
129478
28-
29-
30-
31-
32-
33-
34-
35QJsonObject::QJsonObject(const QJsonObject &other)-
36{-
37 d = other.d;-
38 o = other.o;-
39 if (d
dDescription
TRUEevaluated 41141 times by 112 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 3 times by 1 test
Evaluated by:
  • tst_QVariant
)
3-41141
40 d->ref.ref();
executed 41141 times by 112 tests: d->ref.ref();
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
  • ...
41141
41}
executed 41144 times by 113 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
  • ...
41144
42-
43-
44-
45-
46QJsonObject &QJsonObject::operator =(const QJsonObject &other)-
47{-
48 if (d != other.d
d != other.dDescription
TRUEevaluated 678 times by 111 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 1 time by 1 test
Evaluated by:
  • tst_QVariant
) {
1-678
49 if (d
dDescription
TRUEnever evaluated
FALSEevaluated 678 times by 111 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
  • ...
&& !d->ref.deref()
!d->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-678
50 delete d;
never executed: delete d;
0
51 d = other.d;-
52 if (d
dDescription
TRUEevaluated 678 times by 111 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-678
53 d->ref.ref();
executed 678 times by 111 tests: d->ref.ref();
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
  • ...
678
54 }
executed 678 times by 111 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
678
55 o = other.o;-
56-
57 return
executed 679 times by 112 tests: return *this;
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
  • ...
*this;
executed 679 times by 112 tests: return *this;
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
58}-
59QJsonObject QJsonObject::fromVariantMap(const QVariantMap &map)-
60{-
61 QJsonObject object;-
62 if (map.isEmpty()
map.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
63 return
never executed: return object;
object;
never executed: return object;
0
64-
65 object.detach2(1024);-
66-
67 QVector<QJsonPrivate::offset> offsets;-
68 QJsonPrivate::offset currentOffset;-
69 currentOffset = sizeof(QJsonPrivate::Base);-
70-
71-
72-
73 for (QVariantMap::const_iterator it = map.constBegin(); it != map.constEnd()
it != map.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
74 QString key = it.key();-
75 QJsonValue val = QJsonValue::fromVariant(it.value());-
76-
77 bool latinOrIntValue;-
78 int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);-
79-
80 bool latinKey = QJsonPrivate::useCompressed(key);-
81 int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);-
82 int requiredSize = valueOffset + valueSize;-
83-
84 if (!object.detach2(requiredSize + sizeof(QJsonPrivate::offset))
!object.detach...vate::offset))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
85 return
never executed: return QJsonObject();
QJsonObject();
never executed: return QJsonObject();
0
86-
87 QJsonPrivate::Entry *e = reinterpret_cast<QJsonPrivate::Entry *>(reinterpret_cast<char *>(object.o) + currentOffset);-
88 e->value.type = val.t;-
89 e->value.latinKey = latinKey;-
90 e->value.latinOrIntValue = latinOrIntValue;-
91 e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)object.o + valueOffset);-
92 QJsonPrivate::copyString((char *)(e + 1), key, latinKey);-
93 if (valueSize
valueSizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
94 QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
never executed: QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
0
95-
96 offsets << currentOffset;-
97 currentOffset += requiredSize;-
98 object.o->size = currentOffset;-
99 }
never executed: end of block
0
100-
101-
102 object.o->tableOffset = currentOffset;-
103 if (!object.detach2(sizeof(QJsonPrivate::offset)*offsets.size())
!object.detach...ffsets.size())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
104 return
never executed: return QJsonObject();
QJsonObject();
never executed: return QJsonObject();
0
105 memcpy(object.o->table(), offsets.constData(), offsets.size()*sizeof(uint));-
106 object.o->length = offsets.size();-
107 object.o->size = currentOffset + sizeof(QJsonPrivate::offset)*offsets.size();-
108-
109 return
never executed: return object;
object;
never executed: return object;
0
110}-
111QVariantMap QJsonObject::toVariantMap() const-
112{-
113 QVariantMap map;-
114 if (o
oDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
115 for (uint i = 0; i < o->length
i < o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
116 QJsonPrivate::Entry *e = o->entryAt(i);-
117 map.insert(e->key(), QJsonValue(d, o, e->value).toVariant());-
118 }
never executed: end of block
0
119 }
never executed: end of block
0
120 return
never executed: return map;
map;
never executed: return map;
0
121}-
122QJsonObject QJsonObject::fromVariantHash(const QVariantHash &hash)-
123{-
124-
125-
126 QJsonObject object;-
127 for (QVariantHash::const_iterator it = hash.constBegin(); it != hash.constEnd()
it != hash.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
128 object.insert(it.key(), QJsonValue::fromVariant(it.value()));
never executed: object.insert(it.key(), QJsonValue::fromVariant(it.value()));
0
129 return
never executed: return object;
object;
never executed: return object;
0
130}-
131QVariantHash QJsonObject::toVariantHash() const-
132{-
133 QVariantHash hash;-
134 if (o
oDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
135 hash.reserve(o->length);-
136 for (uint i = 0; i < o->length
i < o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
137 QJsonPrivate::Entry *e = o->entryAt(i);-
138 hash.insert(e->key(), QJsonValue(d, o, e->value).toVariant());-
139 }
never executed: end of block
0
140 }
never executed: end of block
0
141 return
never executed: return hash;
hash;
never executed: return hash;
0
142}-
143-
144-
145-
146-
147-
148-
149QStringList QJsonObject::keys() const-
150{-
151 QStringList keys;-
152 if (o
oDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
153 keys.reserve(o->length);-
154 for (uint i = 0; i < o->length
i < o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
155 QJsonPrivate::Entry *e = o->entryAt(i);-
156 keys.append(e->key());-
157 }
never executed: end of block
0
158 }
never executed: end of block
0
159 return
never executed: return keys;
keys;
never executed: return keys;
0
160}-
161-
162-
163-
164-
165int QJsonObject::size() const-
166{-
167 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qmakelib
)
0-4
168 return
never executed: return 0;
0;
never executed: return 0;
0
169-
170 return
executed 4 times by 1 test: return o->length;
Executed by:
  • tst_qmakelib
o->length;
executed 4 times by 1 test: return o->length;
Executed by:
  • tst_qmakelib
4
171}-
172-
173-
174-
175-
176-
177-
178bool QJsonObject::isEmpty() const-
179{-
180 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
181 return
never executed: return true;
true;
never executed: return true;
0
182-
183 return
never executed: return !o->length;
!o->length;
never executed: return !o->length;
0
184}-
185QJsonValue QJsonObject::value(const QString &key) const-
186{-
187 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 1180 times by 1 test
Evaluated by:
  • tst_QNetworkCookieJar
)
0-1180
188 return
never executed: return QJsonValue(QJsonValue::Undefined);
QJsonValue(QJsonValue::Undefined);
never executed: return QJsonValue(QJsonValue::Undefined);
0
189-
190 bool keyExists;-
191 int i = o->indexOf(key, &keyExists);-
192 if (!keyExists
!keyExistsDescription
TRUEevaluated 155 times by 1 test
Evaluated by:
  • tst_QNetworkCookieJar
FALSEevaluated 1025 times by 1 test
Evaluated by:
  • tst_QNetworkCookieJar
)
155-1025
193 return
executed 155 times by 1 test: return QJsonValue(QJsonValue::Undefined);
Executed by:
  • tst_QNetworkCookieJar
QJsonValue(QJsonValue::Undefined);
executed 155 times by 1 test: return QJsonValue(QJsonValue::Undefined);
Executed by:
  • tst_QNetworkCookieJar
155
194 return
executed 1025 times by 1 test: return QJsonValue(d, o, o->entryAt(i)->value);
Executed by:
  • tst_QNetworkCookieJar
QJsonValue(d, o, o->entryAt(i)->value);
executed 1025 times by 1 test: return QJsonValue(d, o, o->entryAt(i)->value);
Executed by:
  • tst_QNetworkCookieJar
1025
195}-
196-
197-
198-
199-
200-
201QJsonValue QJsonObject::value(QLatin1String key) const-
202{-
203 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 86427 times by 115 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-86427
204 return
never executed: return QJsonValue(QJsonValue::Undefined);
QJsonValue(QJsonValue::Undefined);
never executed: return QJsonValue(QJsonValue::Undefined);
0
205-
206 bool keyExists;-
207 int i = o->indexOf(key, &keyExists);-
208 if (!keyExists
!keyExistsDescription
TRUEevaluated 147 times by 2 tests
Evaluated by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
FALSEevaluated 86280 times by 115 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
  • ...
)
147-86280
209 return
executed 147 times by 2 tests: return QJsonValue(QJsonValue::Undefined);
Executed by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
QJsonValue(QJsonValue::Undefined);
executed 147 times by 2 tests: return QJsonValue(QJsonValue::Undefined);
Executed by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
147
210 return
executed 86280 times by 115 tests: return QJsonValue(d, o, o->entryAt(i)->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
  • ...
QJsonValue(d, o, o->entryAt(i)->value);
executed 86280 times by 115 tests: return QJsonValue(d, o, o->entryAt(i)->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
  • ...
86280
211}-
212QJsonValue QJsonObject::operator [](const QString &key) const-
213{-
214 return
never executed: return value(key);
value(key);
never executed: return value(key);
0
215}-
216QJsonValueRef QJsonObject::operator [](const QString &key)-
217{-
218-
219 bool keyExists = false;-
220 int index = o
oDescription
TRUEnever evaluated
FALSEnever evaluated
? o->indexOf(key, &keyExists) : -1;
0
221 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
222 iterator i = insert(key, QJsonValue());-
223 index = i.i;-
224 }
never executed: end of block
0
225 return
never executed: return QJsonValueRef(this, index);
QJsonValueRef(this, index);
never executed: return QJsonValueRef(this, index);
0
226}-
227-
228-
229-
230-
231-
232QJsonValueRef QJsonObject::operator [](QLatin1String key)-
233{-
234-
235 return
never executed: return operator[](QString(key));
operator[](QString(key));
never executed: return operator[](QString(key));
0
236}-
237QJsonObject::iterator QJsonObject::insert(const QString &key, const QJsonValue &value)-
238{-
239 if (value.t == QJsonValue::Undefined
value.t == QJs...lue::UndefinedDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QMetaType
) {
0-8
240 remove(key);-
241 return
never executed: return end();
end();
never executed: return end();
0
242 }-
243 QJsonValue val = value;-
244-
245 bool latinOrIntValue;-
246 int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);-
247-
248 bool latinKey = QJsonPrivate::useCompressed(key);-
249 int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);-
250 int requiredSize = valueOffset + valueSize;-
251-
252 if (!detach2(requiredSize + sizeof(QJsonPrivate::offset))
!detach2(requi...vate::offset))Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QMetaType
)
0-8
253 return
never executed: return iterator();
iterator();
never executed: return iterator();
0
254-
255 if (!o->length
!o->lengthDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMetaType
)
2-6
256 o->tableOffset = sizeof(QJsonPrivate::Object);
executed 2 times by 1 test: o->tableOffset = sizeof(QJsonPrivate::Object);
Executed by:
  • tst_QMetaType
2
257-
258 bool keyExists = false;-
259 int pos = o->indexOf(key, &keyExists);-
260 if (keyExists
keyExistsDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QMetaType
)
0-8
261 ++
never executed: ++d->compactionCounter;
d->compactionCounter;
never executed: ++d->compactionCounter;
0
262-
263 uint off = o->reserveSpace(requiredSize, pos, 1, keyExists);-
264 if (!off
!offDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QMetaType
)
0-8
265 return
never executed: return end();
end();
never executed: return end();
0
266-
267 QJsonPrivate::Entry *e = o->entryAt(pos);-
268 e->value.type = val.t;-
269 e->value.latinKey = latinKey;-
270 e->value.latinOrIntValue = latinOrIntValue;-
271 e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)o + valueOffset);-
272 QJsonPrivate::copyString((char *)(e + 1), key, latinKey);-
273 if (valueSize
valueSizeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMetaType
)
2-6
274 QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
executed 2 times by 1 test: QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
Executed by:
  • tst_QMetaType
2
275-
276 if (d->compactionCounter > 32u
d->compactionCounter > 32uDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QMetaType
&& d->compactionCounter >= unsigned(o->length) / 2u
d->compactionC...->length) / 2uDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-8
277 compact();
never executed: compact();
0
278-
279 return
executed 8 times by 1 test: return iterator(this, pos);
Executed by:
  • tst_QMetaType
iterator(this, pos);
executed 8 times by 1 test: return iterator(this, pos);
Executed by:
  • tst_QMetaType
8
280}-
281-
282-
283-
284-
285-
286-
287void QJsonObject::remove(const QString &key)-
288{-
289 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
290 return;
never executed: return;
0
291-
292 bool keyExists;-
293 int index = o->indexOf(key, &keyExists);-
294 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
295 return;
never executed: return;
0
296-
297 detach2();-
298 o->removeItems(index, 1);-
299 ++d->compactionCounter;-
300 if (d->compactionCounter > 32u
d->compactionCounter > 32uDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->compactionCounter >= unsigned(o->length) / 2u
d->compactionC...->length) / 2uDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
301 compact();
never executed: compact();
0
302}
never executed: end of block
0
303QJsonValue QJsonObject::take(const QString &key)-
304{-
305 if (!o
!oDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
306 return
never executed: return QJsonValue(QJsonValue::Undefined);
QJsonValue(QJsonValue::Undefined);
never executed: return QJsonValue(QJsonValue::Undefined);
0
307-
308 bool keyExists;-
309 int index = o->indexOf(key, &keyExists);-
310 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
311 return
never executed: return QJsonValue(QJsonValue::Undefined);
QJsonValue(QJsonValue::Undefined);
never executed: return QJsonValue(QJsonValue::Undefined);
0
312-
313 QJsonValue v(d, o, o->entryAt(index)->value);-
314 detach2();-
315 o->removeItems(index, 1);-
316 ++d->compactionCounter;-
317 if (d->compactionCounter > 32u
d->compactionCounter > 32uDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->compactionCounter >= unsigned(o->length) / 2u
d->compactionC...->length) / 2uDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
318 compact();
never executed: compact();
0
319-
320 return
never executed: return v;
v;
never executed: return v;
0
321}-
322-
323-
324-
325-
326-
327-
328bool QJsonObject::contains(const QString &key) const-
329{-
330 if (!o
!oDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
331 return
never executed: return false;
false;
never executed: return false;
0
332-
333 bool keyExists;-
334 o->indexOf(key, &keyExists);-
335 return
never executed: return keyExists;
keyExists;
never executed: return keyExists;
0
336}-
337-
338-
339-
340-
341-
342bool QJsonObject::contains(QLatin1String key) const-
343{-
344 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QOpenGlConfig
)
0-12
345 return
never executed: return false;
false;
never executed: return false;
0
346-
347 bool keyExists;-
348 o->indexOf(key, &keyExists);-
349 return
executed 12 times by 1 test: return keyExists;
Executed by:
  • tst_QOpenGlConfig
keyExists;
executed 12 times by 1 test: return keyExists;
Executed by:
  • tst_QOpenGlConfig
12
350}-
351-
352-
353-
354-
355bool QJsonObject::operator==(const QJsonObject &other) const-
356{-
357 if (o == other.o
o == other.oDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEnever evaluated
)
0-8
358 return
executed 8 times by 1 test: return true;
Executed by:
  • tst_QMetaType
true;
executed 8 times by 1 test: return true;
Executed by:
  • tst_QMetaType
8
359-
360 if (!o
!oDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
361 return
never executed: return !other.o->length;
!other.o->length;
never executed: return !other.o->length;
0
362 if (!other.o
!other.oDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
363 return
never executed: return !o->length;
!o->length;
never executed: return !o->length;
0
364 if (o->length != other.o->length
o->length != other.o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
365 return
never executed: return false;
false;
never executed: return false;
0
366-
367 for (uint i = 0; i < o->length
i < o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
368 QJsonPrivate::Entry *e = o->entryAt(i);-
369 QJsonValue v(d, o, e->value);-
370 if (other.value(e->key()) != v
other.value(e->key()) != vDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
371 return
never executed: return false;
false;
never executed: return false;
0
372 }
never executed: end of block
0
373-
374 return
never executed: return true;
true;
never executed: return true;
0
375}-
376-
377-
378-
379-
380bool QJsonObject::operator!=(const QJsonObject &other) const-
381{-
382 return
never executed: return !(*this == other);
!(*this == other);
never executed: return !(*this == other);
0
383}-
384QJsonObject::iterator QJsonObject::erase(QJsonObject::iterator it)-
385{-
386 ((!(d && d->ref.load() == 1)) ? qt_assert("d && d->ref.load() == 1",__FILE__,627) : qt_noop());-
387 if (it.o != this
it.o != thisDescription
TRUEnever evaluated
FALSEnever evaluated
|| it.i < 0
it.i < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| it.i >= (int)o->length
it.i >= (int)o->lengthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
388 return
never executed: return iterator(this, o->length);
iterator(this, o->length);
never executed: return iterator(this, o->length);
0
389-
390 int index = it.i;-
391-
392 o->removeItems(index, 1);-
393 ++d->compactionCounter;-
394 if (d->compactionCounter > 32u
d->compactionCounter > 32uDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->compactionCounter >= unsigned(o->length) / 2u
d->compactionC...->length) / 2uDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
395 compact();
never executed: compact();
0
396-
397-
398 return
never executed: return it;
it;
never executed: return it;
0
399}-
400QJsonObject::iterator QJsonObject::find(const QString &key)-
401{-
402 bool keyExists = false;-
403 int index = o
oDescription
TRUEnever evaluated
FALSEnever evaluated
? o->indexOf(key, &keyExists) : 0;
0
404 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
405 return
never executed: return end();
end();
never executed: return end();
0
406 detach2();-
407 return
never executed: return iterator(this, index);
iterator(this, index);
never executed: return iterator(this, index);
0
408}-
409-
410-
411-
412-
413-
414QJsonObject::iterator QJsonObject::find(QLatin1String key)-
415{-
416 bool keyExists = false;-
417 int index = o
oDescription
TRUEnever evaluated
FALSEnever evaluated
? o->indexOf(key, &keyExists) : 0;
0
418 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
419 return
never executed: return end();
end();
never executed: return end();
0
420 detach2();-
421 return
never executed: return iterator(this, index);
iterator(this, index);
never executed: return iterator(this, index);
0
422}-
423QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const-
424{-
425 bool keyExists = false;-
426 int index = o
oDescription
TRUEnever evaluated
FALSEnever evaluated
? o->indexOf(key, &keyExists) : 0;
0
427 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
428 return
never executed: return end();
end();
never executed: return end();
0
429 return
never executed: return const_iterator(this, index);
const_iterator(this, index);
never executed: return const_iterator(this, index);
0
430}-
431-
432-
433-
434-
435-
436QJsonObject::const_iterator QJsonObject::constFind(QLatin1String key) const-
437{-
438 bool keyExists = false;-
439 int index = o
oDescription
TRUEnever evaluated
FALSEnever evaluated
? o->indexOf(key, &keyExists) : 0;
0
440 if (!keyExists
!keyExistsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
441 return
never executed: return end();
end();
never executed: return end();
0
442 return
never executed: return const_iterator(this, index);
const_iterator(this, index);
never executed: return const_iterator(this, index);
0
443}-
444void QJsonObject::detach(uint reserve)-
445{-
446 (void)reserve;-
447 ((!(!reserve)) ? qt_assert("!reserve",__FILE__,1196) : qt_noop());-
448 detach2(reserve);-
449}
never executed: end of block
0
450-
451bool QJsonObject::detach2(uint reserve)-
452{-
453 if (!d
!dDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMetaType
) {
2-6
454 if (reserve >= QJsonPrivate::Value::MaxSize
reserve >= QJs...Value::MaxSizeDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QMetaType
) {
0-2
455 QMessageLogger(__FILE__, 1204, __PRETTY_FUNCTION__).warning("QJson: Document too large to store in data structure");-
456 return
never executed: return false;
false;
never executed: return false;
0
457 }-
458 d = new QJsonPrivate::Data(reserve, QJsonValue::Object);-
459 o = static_cast<QJsonPrivate::Object *>(d->header->root());-
460 d->ref.ref();-
461 return
executed 2 times by 1 test: return true;
Executed by:
  • tst_QMetaType
true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_QMetaType
2
462 }-
463 if (reserve == 0
reserve == 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMetaType
&& d->ref.load() == 1
d->ref.load() == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0-6
464 return
never executed: return true;
true;
never executed: return true;
0
465-
466 QJsonPrivate::Data *x = d->clone(o, reserve);-
467 if (!x
!xDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QMetaType
)
0-6
468 return
never executed: return false;
false;
never executed: return false;
0
469 x->ref.ref();-
470 if (!d->ref.deref()
!d->ref.deref()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QMetaType
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMetaType
)
2-4
471 delete d;
executed 2 times by 1 test: delete d;
Executed by:
  • tst_QMetaType
2
472 d = x;-
473 o = static_cast<QJsonPrivate::Object *>(d->header->root());-
474 return
executed 6 times by 1 test: return true;
Executed by:
  • tst_QMetaType
true;
executed 6 times by 1 test: return true;
Executed by:
  • tst_QMetaType
6
475}-
476-
477-
478-
479-
480void QJsonObject::compact()-
481{-
482 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
|| !d->compactionCounter
!d->compactionCounterDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
483 return;
never executed: return;
0
484-
485 detach2();-
486 d->compact();-
487 o = static_cast<QJsonPrivate::Object *>(d->header->root());-
488}
never executed: end of block
0
489-
490-
491-
492-
493QString QJsonObject::keyAt(int i) const-
494{-
495 ((!(o && i >= 0 && i < (int)o->length)) ? qt_assert("o && i >= 0 && i < (int)o->length",__FILE__,1244) : qt_noop());-
496-
497 QJsonPrivate::Entry *e = o->entryAt(i);-
498 return
executed 9 times by 1 test: return e->key();
Executed by:
  • tst_qmakelib
e->key();
executed 9 times by 1 test: return e->key();
Executed by:
  • tst_qmakelib
9
499}-
500-
501-
502-
503-
504QJsonValue QJsonObject::valueAt(int i) const-
505{-
506 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_qmakelib
|| i < 0
i < 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_qmakelib
|| i >= (int)o->length
i >= (int)o->lengthDescription
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_qmakelib
)
0-9
507 return
never executed: return QJsonValue(QJsonValue::Undefined);
QJsonValue(QJsonValue::Undefined);
never executed: return QJsonValue(QJsonValue::Undefined);
0
508-
509 QJsonPrivate::Entry *e = o->entryAt(i);-
510 return
executed 9 times by 1 test: return QJsonValue(d, o, e->value);
Executed by:
  • tst_qmakelib
QJsonValue(d, o, e->value);
executed 9 times by 1 test: return QJsonValue(d, o, e->value);
Executed by:
  • tst_qmakelib
9
511}-
512-
513-
514-
515-
516void QJsonObject::setValueAt(int i, const QJsonValue &val)-
517{-
518 ((!(o && i >= 0 && i < (int)o->length)) ? qt_assert("o && i >= 0 && i < (int)o->length",__FILE__,1267) : qt_noop());-
519-
520 QJsonPrivate::Entry *e = o->entryAt(i);-
521 insert(e->key(), val);-
522}
never executed: end of block
0
523-
524-
525QDebug operator<<(QDebug dbg, const QJsonObject &o)-
526{-
527 QDebugStateSaver saver(dbg);-
528 if (!o.o
!o.oDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
FALSEnever evaluated
) {
0-1
529 dbg << "QJsonObject()";-
530 return
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
dbg;
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
1
531 }-
532 QByteArray json;-
533 QJsonPrivate::Writer::objectToJson(o.o, json, 0, true);-
534 dbg.nospace() << "QJsonObject("-
535 << json.constData()-
536 << ")";-
537 return
never executed: return dbg;
dbg;
never executed: return dbg;
0
538}-
539-
540-
541-
Switch to Source codePreprocessed file

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