qjsonvalue.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/json/qjsonvalue.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QJsonValue::QJsonValue(Type type)-
5 : ui(0), d(0), t(type)-
6{-
7}
executed 323 times by 7 tests: end of block
Executed by:
  • tst_QFactoryLoader
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QOpenGlConfig
  • tst_QVariant
323
8-
9-
10-
11-
12QJsonValue::QJsonValue(QJsonPrivate::Data *data, QJsonPrivate::Base *base, const QJsonPrivate::Value &v)-
13 : d(0)-
14{-
15 t = (Type)(uint)v.type;-
16 switch (t) {-
17 case
never executed: case Undefined:
Undefined:
never executed: case Undefined:
0
18 case
executed 1 time by 1 test: case Null:
Executed by:
  • tst_qmakelib
Null:
executed 1 time by 1 test: case Null:
Executed by:
  • tst_qmakelib
1
19 dbl = 0;-
20 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_qmakelib
1
21 case
executed 655 times by 111 tests: case 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
  • ...
Bool:
executed 655 times by 111 tests: case 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
  • ...
655
22 b = v.toBoolean();-
23 break;
executed 655 times by 111 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
655
24 case
executed 1577 times by 113 tests: case 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
  • ...
Double:
executed 1577 times by 113 tests: case 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
  • ...
1577
25 dbl = v.toDouble(base);-
26 break;
executed 1577 times by 113 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
1577
27 case
executed 69681 times by 114 tests: case 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
  • ...
String:
executed 69681 times by 114 tests: case 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
  • ...
{
69681
28 QString s = v.toString(base);-
29 stringData = s.data_ptr();-
30 stringData->ref.ref();-
31 break;
executed 69681 times by 114 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
69681
32 }-
33 case
executed 41984 times by 113 tests: case 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
  • ...
Array:
executed 41984 times by 113 tests: case 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
  • ...
41984
34 case
executed 42053 times by 114 tests: case 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
  • ...
Object:
executed 42053 times by 114 tests: case 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
  • ...
42053
35 d = data;-
36 this->base = v.base(base);-
37 break;
executed 84037 times by 114 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
84037
38 }-
39 if (d
dDescription
TRUEevaluated 84037 times by 114 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 71914 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
  • ...
)
71914-84037
40 d->ref.ref();
executed 84037 times by 114 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
  • ...
84037
41}
executed 155951 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
  • ...
155951
42-
43-
44-
45-
46QJsonValue::QJsonValue(bool b)-
47 : d(0), t(Bool)-
48{-
49 this->b = b;-
50}
executed 7 times by 2 tests: end of block
Executed by:
  • tst_QMetaType
  • tst_QVariant
7
51-
52-
53-
54-
55QJsonValue::QJsonValue(double n)-
56 : d(0), t(Double)-
57{-
58 this->dbl = n;-
59}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_QMetaType
  • tst_QVariant
8
60-
61-
62-
63-
64-
65QJsonValue::QJsonValue(int n)-
66 : d(0), t(Double)-
67{-
68 this->dbl = n;-
69}
executed 5 times by 1 test: end of block
Executed by:
  • tst_QVariant
5
70-
71-
72-
73-
74-
75-
76-
77QJsonValue::QJsonValue(qint64 n)-
78 : d(0), t(Double)-
79{-
80 this->dbl = double(n);-
81}
never executed: end of block
0
82-
83-
84-
85-
86QJsonValue::QJsonValue(const QString &s)-
87 : d(0), t(String)-
88{-
89 stringDataFromQStringHelper(s);-
90}
executed 3 times by 1 test: end of block
Executed by:
  • tst_QVariant
3
91void QJsonValue::stringDataFromQStringHelper(const QString &string)-
92{-
93 stringData = *(QStringData **)(&string);-
94 stringData->ref.ref();-
95}
executed 33 times by 3 tests: end of block
Executed by:
  • tst_QGuiApplication
  • tst_QMetaType
  • tst_QVariant
33
96-
97-
98-
99-
100QJsonValue::QJsonValue(QLatin1String s)-
101 : d(0), t(String)-
102{-
103-
104 QString str(s);-
105 stringDataFromQStringHelper(str);-
106}
executed 30 times by 2 tests: end of block
Executed by:
  • tst_QGuiApplication
  • tst_QMetaType
30
107-
108-
109-
110-
111QJsonValue::QJsonValue(const QJsonArray &a)-
112 : d(a.d), t(Array)-
113{-
114 base = a.a;-
115 if (d
dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
116 d->ref.ref();
never executed: d->ref.ref();
0
117}
never executed: end of block
0
118-
119-
120-
121-
122QJsonValue::QJsonValue(const QJsonObject &o)-
123 : d(o.d), t(Object)-
124{-
125 base = o.o;-
126 if (d
dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
127 d->ref.ref();
never executed: d->ref.ref();
0
128}
never executed: end of block
0
129-
130-
131-
132-
133-
134QJsonValue::~QJsonValue()-
135{-
136 if (t == String
t == StringDescription
TRUEevaluated 69731 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 86752 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
  • ...
&& stringData
stringDataDescription
TRUEevaluated 69731 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
&& !stringData->ref.deref()
!stringData->ref.deref()Description
TRUEevaluated 1901 times by 40 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QApplication
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QOpenGlConfig
  • tst_QPrintDevice
  • tst_QPrinter
  • tst_QPrinterInfo
  • tst_QSql
  • ...
FALSEevaluated 67830 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-86752
137 free(stringData);
executed 1901 times by 40 tests: free(stringData);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QApplication
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QOpenGlConfig
  • tst_QPrintDevice
  • tst_QPrinter
  • tst_QPrinterInfo
  • tst_QSql
  • ...
1901
138-
139 if (d
dDescription
TRUEevaluated 84142 times by 114 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 72341 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
  • ...
&& !d->ref.deref()
!d->ref.deref()Description
TRUEnever evaluated
FALSEevaluated 84142 times by 114 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-84142
140 delete d;
never executed: delete d;
0
141}
executed 156483 times by 118 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
  • ...
156483
142-
143-
144-
145-
146QJsonValue::QJsonValue(const QJsonValue &other)-
147{-
148 t = other.t;-
149 d = other.d;-
150 ui = other.ui;-
151 if (d
dDescription
TRUEevaluated 105 times by 1 test
Evaluated by:
  • tst_QOpenGlConfig
FALSEevaluated 51 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QVariant
)
51-105
152 d->ref.ref();
executed 105 times by 1 test: d->ref.ref();
Executed by:
  • tst_QOpenGlConfig
105
153-
154 if (t == String
t == StringDescription
TRUEevaluated 17 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QVariant
FALSEevaluated 139 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QVariant
&& stringData
stringDataDescription
TRUEevaluated 17 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QVariant
FALSEnever evaluated
)
0-139
155 stringData->ref.ref();
executed 17 times by 3 tests: stringData->ref.ref();
Executed by:
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QVariant
17
156}
executed 156 times by 3 tests: end of block
Executed by:
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QVariant
156
157-
158-
159-
160-
161QJsonValue &QJsonValue::operator =(const QJsonValue &other)-
162{-
163 QJsonValue copy(other);-
164-
165 qSwap(dbl, copy.dbl);-
166 qSwap(d, copy.d);-
167 qSwap(t, copy.t);-
168 return
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QVariant
*this;
executed 1 time by 1 test: return *this;
Executed by:
  • tst_QVariant
1
169}-
170QJsonValue QJsonValue::fromVariant(const QVariant &variant)-
171{-
172 switch (variant.userType()) {-
173 case
never executed: case QVariant::Bool:
QVariant::Bool:
never executed: case QVariant::Bool:
0
174 return
never executed: return QJsonValue(variant.toBool());
QJsonValue(variant.toBool());
never executed: return QJsonValue(variant.toBool());
0
175 case
never executed: case QVariant::Int:
QVariant::Int:
never executed: case QVariant::Int:
0
176 case
never executed: case QMetaType::Float:
QMetaType::Float:
never executed: case QMetaType::Float:
0
177 case
never executed: case QVariant::Double:
QVariant::Double:
never executed: case QVariant::Double:
0
178 case
never executed: case QVariant::LongLong:
QVariant::LongLong:
never executed: case QVariant::LongLong:
0
179 case
never executed: case QVariant::ULongLong:
QVariant::ULongLong:
never executed: case QVariant::ULongLong:
0
180 case
never executed: case QVariant::UInt:
QVariant::UInt:
never executed: case QVariant::UInt:
0
181 return
never executed: return QJsonValue(variant.toDouble());
QJsonValue(variant.toDouble());
never executed: return QJsonValue(variant.toDouble());
0
182 case
never executed: case QVariant::String:
QVariant::String:
never executed: case QVariant::String:
0
183 return
never executed: return QJsonValue(variant.toString());
QJsonValue(variant.toString());
never executed: return QJsonValue(variant.toString());
0
184 case
never executed: case QVariant::StringList:
QVariant::StringList:
never executed: case QVariant::StringList:
0
185 return
never executed: return QJsonValue(QJsonArray::fromStringList(variant.toStringList()));
QJsonValue(QJsonArray::fromStringList(variant.toStringList()));
never executed: return QJsonValue(QJsonArray::fromStringList(variant.toStringList()));
0
186 case
never executed: case QVariant::List:
QVariant::List:
never executed: case QVariant::List:
0
187 return
never executed: return QJsonValue(QJsonArray::fromVariantList(variant.toList()));
QJsonValue(QJsonArray::fromVariantList(variant.toList()));
never executed: return QJsonValue(QJsonArray::fromVariantList(variant.toList()));
0
188 case
never executed: case QVariant::Map:
QVariant::Map:
never executed: case QVariant::Map:
0
189 return
never executed: return QJsonValue(QJsonObject::fromVariantMap(variant.toMap()));
QJsonValue(QJsonObject::fromVariantMap(variant.toMap()));
never executed: return QJsonValue(QJsonObject::fromVariantMap(variant.toMap()));
0
190 case
never executed: case QVariant::Hash:
QVariant::Hash:
never executed: case QVariant::Hash:
0
191 return
never executed: return QJsonValue(QJsonObject::fromVariantHash(variant.toHash()));
QJsonValue(QJsonObject::fromVariantHash(variant.toHash()));
never executed: return QJsonValue(QJsonObject::fromVariantHash(variant.toHash()));
0
192-
193 case
never executed: case QMetaType::QJsonValue:
QMetaType::QJsonValue:
never executed: case QMetaType::QJsonValue:
0
194 return
never executed: return variant.toJsonValue();
variant.toJsonValue();
never executed: return variant.toJsonValue();
0
195 case
never executed: case QMetaType::QJsonObject:
QMetaType::QJsonObject:
never executed: case QMetaType::QJsonObject:
0
196 return
never executed: return variant.toJsonObject();
variant.toJsonObject();
never executed: return variant.toJsonObject();
0
197 case
never executed: case QMetaType::QJsonArray:
QMetaType::QJsonArray:
never executed: case QMetaType::QJsonArray:
0
198 return
never executed: return variant.toJsonArray();
variant.toJsonArray();
never executed: return variant.toJsonArray();
0
199 case
never executed: case QMetaType::QJsonDocument:
QMetaType::QJsonDocument:
never executed: case QMetaType::QJsonDocument:
{
0
200 QJsonDocument doc = variant.toJsonDocument();-
201 return
never executed: return doc.isArray() ? QJsonValue(doc.array()) : QJsonValue(doc.object());
doc.isArray()
doc.isArray()Description
TRUEnever evaluated
FALSEnever evaluated
? QJsonValue(doc.array()) : QJsonValue(doc.object());
never executed: return doc.isArray() ? QJsonValue(doc.array()) : QJsonValue(doc.object());
0
202 }-
203-
204 default
never executed: default:
:
never executed: default:
0
205 break;
never executed: break;
0
206 }-
207 QString string = variant.toString();-
208 if (string.isEmpty()
string.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
209 return
never executed: return QJsonValue();
QJsonValue();
never executed: return QJsonValue();
0
210 return
never executed: return QJsonValue(string);
QJsonValue(string);
never executed: return QJsonValue(string);
0
211}-
212QVariant QJsonValue::toVariant() const-
213{-
214 switch (t) {-
215 case
never executed: case Bool:
Bool:
never executed: case Bool:
0
216 return
never executed: return b;
b;
never executed: return b;
0
217 case
never executed: case Double:
Double:
never executed: case Double:
0
218 return
never executed: return dbl;
dbl;
never executed: return dbl;
0
219 case
never executed: case String:
String:
never executed: case String:
0
220 return
never executed: return toString();
toString();
never executed: return toString();
0
221 case
never executed: case Array:
Array:
never executed: case Array:
0
222 return
never executed: return d ? QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() : QVariantList();
d
dDescription
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d ? QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() : QVariantList();
0
223 QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() :
never executed: return d ? QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() : QVariantList();
0
224 QVariantList();
never executed: return d ? QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() : QVariantList();
0
225 case
never executed: case Object:
Object:
never executed: case Object:
0
226 return
never executed: return d ? QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() : QVariantMap();
d
dDescription
TRUEnever evaluated
FALSEnever evaluated
?
never executed: return d ? QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() : QVariantMap();
0
227 QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() :
never executed: return d ? QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() : QVariantMap();
0
228 QVariantMap();
never executed: return d ? QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() : QVariantMap();
0
229 case
never executed: case Null:
Null:
never executed: case Null:
0
230 case
never executed: case Undefined:
Undefined:
never executed: case Undefined:
0
231 break;
never executed: break;
0
232 }-
233 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
234}-
235QJsonValue::Type QJsonValue::type() const-
236{-
237 return
executed 272 times by 3 tests: return t;
Executed by:
  • tst_QOpenGlConfig
  • tst_QVariant
  • tst_qmakelib
t;
executed 272 times by 3 tests: return t;
Executed by:
  • tst_QOpenGlConfig
  • tst_QVariant
  • tst_qmakelib
272
238}-
239-
240-
241-
242-
243-
244-
245bool QJsonValue::toBool(bool defaultValue) const-
246{-
247 if (t != Bool
t != BoolDescription
TRUEnever evaluated
FALSEevaluated 657 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_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
)
0-657
248 return
never executed: return defaultValue;
defaultValue;
never executed: return defaultValue;
0
249 return
executed 657 times by 112 tests: return b;
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
  • ...
b;
executed 657 times by 112 tests: return b;
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
  • ...
657
250}-
251-
252-
253-
254-
255-
256-
257-
258int QJsonValue::toInt(int defaultValue) const-
259{-
260 if (t == Double
t == DoubleDescription
TRUEnever evaluated
FALSEnever evaluated
&& int(dbl) == dbl
int(dbl) == dblDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
261 return
never executed: return int(dbl);
int(dbl);
never executed: return int(dbl);
0
262 return
never executed: return defaultValue;
defaultValue;
never executed: return defaultValue;
0
263}-
264-
265-
266-
267-
268-
269-
270double QJsonValue::toDouble(double defaultValue) const-
271{-
272 if (t != Double
t != DoubleDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QVariant
FALSEevaluated 1583 times by 114 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
  • ...
)
2-1583
273 return
executed 2 times by 1 test: return defaultValue;
Executed by:
  • tst_QVariant
defaultValue;
executed 2 times by 1 test: return defaultValue;
Executed by:
  • tst_QVariant
2
274 return
executed 1583 times by 114 tests: return dbl;
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
  • ...
dbl;
executed 1583 times by 114 tests: return dbl;
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
  • ...
1583
275}-
276-
277-
278-
279-
280-
281-
282QString QJsonValue::toString(const QString &defaultValue) const-
283{-
284 if (t != String
t != StringDescription
TRUEevaluated 157 times by 3 tests
Evaluated by:
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkCookieJar
FALSEevaluated 69716 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
  • ...
)
157-69716
285 return
executed 157 times by 3 tests: return defaultValue;
Executed by:
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkCookieJar
defaultValue;
executed 157 times by 3 tests: return defaultValue;
Executed by:
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkCookieJar
157
286 stringData->ref.ref();-
287 QStringDataPtr holder = { stringData };-
288 return
executed 69716 times by 116 tests: return QString(holder);
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
  • ...
QString(holder);
executed 69716 times by 116 tests: return QString(holder);
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
  • ...
69716
289}-
290-
291-
292-
293-
294-
295-
296QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const-
297{-
298 if (!d
!dDescription
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
FALSEevaluated 41984 times by 113 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
  • ...
|| t != Array
t != ArrayDescription
TRUEnever evaluated
FALSEevaluated 41984 times by 113 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-41984
299 return
executed 42 times by 2 tests: return defaultValue;
Executed by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
defaultValue;
executed 42 times by 2 tests: return defaultValue;
Executed by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
42
300-
301 return
executed 41984 times by 113 tests: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base));
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
  • ...
QJsonArray(d, static_cast<QJsonPrivate::Array *>(base));
executed 41984 times by 113 tests: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base));
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
  • ...
41984
302}-
303QJsonArray QJsonValue::toArray() const-
304{-
305 return
executed 42026 times by 114 tests: return toArray(QJsonArray());
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
  • ...
toArray(QJsonArray());
executed 42026 times by 114 tests: return toArray(QJsonArray());
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
  • ...
42026
306}-
307-
308-
309-
310-
311-
312-
313QJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const-
314{-
315 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 42003 times by 114 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
  • ...
|| t != Object
t != ObjectDescription
TRUEnever evaluated
FALSEevaluated 42003 times by 114 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-42003
316 return
never executed: return defaultValue;
defaultValue;
never executed: return defaultValue;
0
317-
318 return
executed 42003 times by 114 tests: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base));
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
  • ...
QJsonObject(d, static_cast<QJsonPrivate::Object *>(base));
executed 42003 times by 114 tests: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base));
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
  • ...
42003
319}-
320QJsonObject QJsonValue::toObject() const-
321{-
322 return
executed 42003 times by 114 tests: return toObject(QJsonObject());
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
  • ...
toObject(QJsonObject());
executed 42003 times by 114 tests: return toObject(QJsonObject());
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
  • ...
42003
323}-
324-
325-
326-
327-
328bool QJsonValue::operator==(const QJsonValue &other) const-
329{-
330 if (t != other.t
t != other.tDescription
TRUEnever evaluated
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QGuiApplication
  • tst_QMetaType
)
0-34
331 return
never executed: return false;
false;
never executed: return false;
0
332-
333 switch (t) {-
334 case
never executed: case Undefined:
Undefined:
never executed: case Undefined:
0
335 case
executed 4 times by 1 test: case Null:
Executed by:
  • tst_QMetaType
Null:
executed 4 times by 1 test: case Null:
Executed by:
  • tst_QMetaType
4
336 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QMetaType
4
337 case
never executed: case Bool:
Bool:
never executed: case Bool:
0
338 return
never executed: return b == other.b;
b == other.b;
never executed: return b == other.b;
0
339 case
executed 4 times by 1 test: case Double:
Executed by:
  • tst_QMetaType
Double:
executed 4 times by 1 test: case Double:
Executed by:
  • tst_QMetaType
4
340 return
executed 4 times by 1 test: return dbl == other.dbl;
Executed by:
  • tst_QMetaType
dbl == other.dbl;
executed 4 times by 1 test: return dbl == other.dbl;
Executed by:
  • tst_QMetaType
4
341 case
executed 26 times by 1 test: case String:
Executed by:
  • tst_QGuiApplication
String:
executed 26 times by 1 test: case String:
Executed by:
  • tst_QGuiApplication
26
342 return
executed 26 times by 1 test: return toString() == other.toString();
Executed by:
  • tst_QGuiApplication
toString() == other.toString();
executed 26 times by 1 test: return toString() == other.toString();
Executed by:
  • tst_QGuiApplication
26
343 case
never executed: case Array:
Array:
never executed: case Array:
0
344 if (base == other.base
base == other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
345 return
never executed: return true;
true;
never executed: return true;
0
346 if (!base
!baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
347 return
never executed: return !other.base->length;
!other.base->length;
never executed: return !other.base->length;
0
348 if (!other.base
!other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
349 return
never executed: return !base->length;
!base->length;
never executed: return !base->length;
0
350 return
never executed: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)) == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.base));
QJsonArray(d, static_cast<QJsonPrivate::Array *>(base))
never executed: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)) == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.base));
0
351 == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.base));
never executed: return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)) == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.base));
0
352 case
never executed: case Object:
Object:
never executed: case Object:
0
353 if (base == other.base
base == other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
354 return
never executed: return true;
true;
never executed: return true;
0
355 if (!base
!baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
356 return
never executed: return !other.base->length;
!other.base->length;
never executed: return !other.base->length;
0
357 if (!other.base
!other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
358 return
never executed: return !base->length;
!base->length;
never executed: return !base->length;
0
359 return
never executed: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)) == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));
QJsonObject(d, static_cast<QJsonPrivate::Object *>(base))
never executed: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)) == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));
0
360 == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));
never executed: return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)) == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));
0
361 }-
362 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_QMetaType
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_QMetaType
4
363}-
364-
365-
366-
367-
368bool QJsonValue::operator!=(const QJsonValue &other) const-
369{-
370 return
executed 26 times by 1 test: return !(*this == other);
Executed by:
  • tst_QGuiApplication
!(*this == other);
executed 26 times by 1 test: return !(*this == other);
Executed by:
  • tst_QGuiApplication
26
371}-
372-
373-
374-
375-
376void QJsonValue::detach()-
377{-
378 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
379 return;
never executed: return;
0
380-
381 QJsonPrivate::Data *x = d->clone(base);-
382 x->ref.ref();-
383 if (!d->ref.deref()
!d->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
384 delete d;
never executed: delete d;
0
385 d = x;-
386 base = static_cast<QJsonPrivate::Object *>(d->header->root());-
387}
never executed: end of block
0
388QJsonValueRef &QJsonValueRef::operator =(const QJsonValue &val)-
389{-
390 if (is_object
is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
391 o->setValueAt(index, val);
never executed: o->setValueAt(index, val);
0
392 else-
393 a->replace(index, val);
never executed: a->replace(index, val);
0
394-
395 return
never executed: return *this;
*this;
never executed: return *this;
0
396}-
397-
398QJsonValueRef &QJsonValueRef::operator =(const QJsonValueRef &ref)-
399{-
400 if (is_object
is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
401 o->setValueAt(index, ref);
never executed: o->setValueAt(index, ref);
0
402 else-
403 a->replace(index, ref);
never executed: a->replace(index, ref);
0
404-
405 return
never executed: return *this;
*this;
never executed: return *this;
0
406}-
407-
408QVariant QJsonValueRef::toVariant() const-
409{-
410 return
never executed: return toValue().toVariant();
toValue().toVariant();
never executed: return toValue().toVariant();
0
411}-
412-
413QJsonArray QJsonValueRef::toArray() const-
414{-
415 return
never executed: return toValue().toArray();
toValue().toArray();
never executed: return toValue().toArray();
0
416}-
417-
418QJsonObject QJsonValueRef::toObject() const-
419{-
420 return
never executed: return toValue().toObject();
toValue().toObject();
never executed: return toValue().toObject();
0
421}-
422-
423QJsonValue QJsonValueRef::toValue() const-
424{-
425 if (!is_object
!is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
426 return
never executed: return a->at(index);
a->at(index);
never executed: return a->at(index);
0
427 return
never executed: return o->valueAt(index);
o->valueAt(index);
never executed: return o->valueAt(index);
0
428}-
429-
430-
431QDebug operator<<(QDebug dbg, const QJsonValue &o)-
432{-
433 QDebugStateSaver saver(dbg);-
434 switch (o.t) {-
435 case
never executed: case QJsonValue::Undefined:
QJsonValue::Undefined:
never executed: case QJsonValue::Undefined:
0
436 dbg << "QJsonValue(undefined)";-
437 break;
never executed: break;
0
438 case
executed 1 time by 1 test: case QJsonValue::Null:
Executed by:
  • tst_QVariant
QJsonValue::Null:
executed 1 time by 1 test: case QJsonValue::Null:
Executed by:
  • tst_QVariant
1
439 dbg << "QJsonValue(null)";-
440 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QVariant
1
441 case
never executed: case QJsonValue::Bool:
QJsonValue::Bool:
never executed: case QJsonValue::Bool:
0
442 dbg.nospace() << "QJsonValue(bool, " << o.toBool() << ')';-
443 break;
never executed: break;
0
444 case
never executed: case QJsonValue::Double:
QJsonValue::Double:
never executed: case QJsonValue::Double:
0
445 dbg.nospace() << "QJsonValue(double, " << o.toDouble() << ')';-
446 break;
never executed: break;
0
447 case
never executed: case QJsonValue::String:
QJsonValue::String:
never executed: case QJsonValue::String:
0
448 dbg.nospace() << "QJsonValue(string, " << o.toString() << ')';-
449 break;
never executed: break;
0
450 case
never executed: case QJsonValue::Array:
QJsonValue::Array:
never executed: case QJsonValue::Array:
0
451 dbg.nospace() << "QJsonValue(array, ";-
452 dbg << o.toArray();-
453 dbg << ')';-
454 break;
never executed: break;
0
455 case
never executed: case QJsonValue::Object:
QJsonValue::Object:
never executed: case QJsonValue::Object:
0
456 dbg.nospace() << "QJsonValue(object, ";-
457 dbg << o.toObject();-
458 dbg << ')';-
459 break;
never executed: break;
0
460 }-
461 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
462}-
463-
464-
465-
Switch to Source codePreprocessed file

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