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 680 times by 112 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 680 times by 112 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
  • ...
680
22 b = v.toBoolean();-
23 break;
executed 680 times by 112 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
  • ...
680
24 case
executed 1634 times by 114 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 1634 times by 114 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
  • ...
1634
25 dbl = v.toDouble(base);-
26 break;
executed 1634 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
  • ...
1634
27 case
executed 69773 times by 115 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 69773 times by 115 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
  • ...
{
69773
28 QString s = v.toString(base);-
29 stringData = s.data_ptr();-
30 stringData->ref.ref();-
31 break;
executed 69773 times by 115 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
  • ...
69773
32 }-
33 case
executed 42000 times by 114 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 42000 times by 114 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
  • ...
42000
34 case
executed 42069 times by 115 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 42069 times by 115 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
  • ...
42069
35 d = data;-
36 this->base = v.base(base);-
37 break;
executed 84069 times by 115 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
  • ...
84069
38 }-
39 if (d
dDescription
TRUEevaluated 84069 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
  • ...
FALSEevaluated 72088 times by 117 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
)
72088-84069
40 d->ref.ref();
executed 84069 times by 115 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
  • ...
84069
41}
executed 156157 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
  • ...
156157
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 69823 times by 117 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
FALSEevaluated 86866 times by 119 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 69823 times by 117 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
FALSEnever evaluated
&& !stringData->ref.deref()
!stringData->ref.deref()Description
TRUEevaluated 1826 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 67997 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
  • ...
)
0-86866
137 free(stringData);
executed 1826 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
  • ...
1826
138-
139 if (d
dDescription
TRUEevaluated 84174 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
  • ...
FALSEevaluated 72515 times by 119 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 84174 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-84174
140 delete d;
never executed: delete d;
0
141}
executed 156689 times by 119 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
  • ...
156689
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() ? 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 ?
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 ?
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 682 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_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
)
0-682
248 return
never executed: return defaultValue;
defaultValue;
never executed: return defaultValue;
0
249 return
executed 682 times by 113 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 682 times by 113 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
  • ...
682
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 1640 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
  • ...
)
2-1640
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 1640 times by 115 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 1640 times by 115 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
  • ...
1640
275}-
276-
277-
278-
279-
280-
281-
282QString QJsonValue::toString(const QString &defaultValue) const-
283{-
284 if (t != String
t != StringDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
285 return
never executed: return defaultValue;
defaultValue;
never executed: return defaultValue;
0
286 stringData->ref.ref();-
287 QStringDataPtr holder = { stringData };-
288 return
never executed: return QString(holder);
QString(holder);
never executed: return QString(holder);
0
289}-
290QString QJsonValue::toString() const-
291{-
292 if (t != String
t != StringDescription
TRUEevaluated 157 times by 3 tests
Evaluated by:
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkCookieJar
FALSEevaluated 69808 times by 117 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
)
157-69808
293 return
executed 157 times by 3 tests: return QString();
Executed by:
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkCookieJar
QString();
executed 157 times by 3 tests: return QString();
Executed by:
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QNetworkCookieJar
157
294 stringData->ref.ref();-
295 QStringDataPtr holder = { stringData };-
296 return
executed 69808 times by 117 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 69808 times by 117 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
  • ...
69808
297}-
298-
299-
300-
301-
302-
303-
304QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const-
305{-
306 if (!d
!dDescription
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_QFactoryLoader
  • tst_QOpenGlConfig
FALSEevaluated 42000 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_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
|| t != Array
t != ArrayDescription
TRUEnever evaluated
FALSEevaluated 42000 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_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
)
0-42000
307 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
308-
309 return
executed 42000 times by 114 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 42000 times by 114 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
  • ...
42000
310}-
311QJsonArray QJsonValue::toArray() const-
312{-
313 return
executed 42042 times by 115 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 42042 times by 115 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
  • ...
42042
314}-
315-
316-
317-
318-
319-
320-
321QJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const-
322{-
323 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 42019 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
  • ...
|| t != Object
t != ObjectDescription
TRUEnever evaluated
FALSEevaluated 42019 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-42019
324 return
never executed: return defaultValue;
defaultValue;
never executed: return defaultValue;
0
325-
326 return
executed 42019 times by 115 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 42019 times by 115 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
  • ...
42019
327}-
328QJsonObject QJsonValue::toObject() const-
329{-
330 return
executed 42019 times by 115 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 42019 times by 115 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
  • ...
42019
331}-
332-
333-
334-
335-
336bool QJsonValue::operator==(const QJsonValue &other) const-
337{-
338 if (t != other.t
t != other.tDescription
TRUEnever evaluated
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QGuiApplication
  • tst_QMetaType
)
0-34
339 return
never executed: return false;
false;
never executed: return false;
0
340-
341 switch (t) {-
342 case
never executed: case Undefined:
Undefined:
never executed: case Undefined:
0
343 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
344 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QMetaType
4
345 case
never executed: case Bool:
Bool:
never executed: case Bool:
0
346 return
never executed: return b == other.b;
b == other.b;
never executed: return b == other.b;
0
347 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
348 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
349 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
350 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
351 case
never executed: case Array:
Array:
never executed: case Array:
0
352 if (base == other.base
base == other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
353 return
never executed: return true;
true;
never executed: return true;
0
354 if (!base
!baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
355 return
never executed: return !other.base->length;
!other.base->length;
never executed: return !other.base->length;
0
356 if (!other.base
!other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
357 return
never executed: return !base->length;
!base->length;
never executed: return !base->length;
0
358 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
359 == 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
360 case
never executed: case Object:
Object:
never executed: case Object:
0
361 if (base == other.base
base == other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
362 return
never executed: return true;
true;
never executed: return true;
0
363 if (!base
!baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
364 return
never executed: return !other.base->length;
!other.base->length;
never executed: return !other.base->length;
0
365 if (!other.base
!other.baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
366 return
never executed: return !base->length;
!base->length;
never executed: return !base->length;
0
367 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
368 == 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
369 }-
370 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
371}-
372-
373-
374-
375-
376bool QJsonValue::operator!=(const QJsonValue &other) const-
377{-
378 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
379}-
380-
381-
382-
383-
384void QJsonValue::detach()-
385{-
386 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
387 return;
never executed: return;
0
388-
389 QJsonPrivate::Data *x = d->clone(base);-
390 x->ref.ref();-
391 if (!d->ref.deref()
!d->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
392 delete d;
never executed: delete d;
0
393 d = x;-
394 base = static_cast<QJsonPrivate::Object *>(d->header->root());-
395}
never executed: end of block
0
396QJsonValueRef &QJsonValueRef::operator =(const QJsonValue &val)-
397{-
398 if (is_object
is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
399 o->setValueAt(index, val);
never executed: o->setValueAt(index, val);
0
400 else-
401 a->replace(index, val);
never executed: a->replace(index, val);
0
402-
403 return
never executed: return *this;
*this;
never executed: return *this;
0
404}-
405-
406QJsonValueRef &QJsonValueRef::operator =(const QJsonValueRef &ref)-
407{-
408 if (is_object
is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
409 o->setValueAt(index, ref);
never executed: o->setValueAt(index, ref);
0
410 else-
411 a->replace(index, ref);
never executed: a->replace(index, ref);
0
412-
413 return
never executed: return *this;
*this;
never executed: return *this;
0
414}-
415-
416QVariant QJsonValueRef::toVariant() const-
417{-
418 return
never executed: return toValue().toVariant();
toValue().toVariant();
never executed: return toValue().toVariant();
0
419}-
420-
421QJsonArray QJsonValueRef::toArray() const-
422{-
423 return
never executed: return toValue().toArray();
toValue().toArray();
never executed: return toValue().toArray();
0
424}-
425-
426QJsonObject QJsonValueRef::toObject() const-
427{-
428 return
never executed: return toValue().toObject();
toValue().toObject();
never executed: return toValue().toObject();
0
429}-
430-
431QJsonValue QJsonValueRef::toValue() const-
432{-
433 if (!is_object
!is_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
434 return
never executed: return a->at(index);
a->at(index);
never executed: return a->at(index);
0
435 return
never executed: return o->valueAt(index);
o->valueAt(index);
never executed: return o->valueAt(index);
0
436}-
437-
438-
439QDebug operator<<(QDebug dbg, const QJsonValue &o)-
440{-
441 QDebugStateSaver saver(dbg);-
442 switch (o.t) {-
443 case
never executed: case QJsonValue::Undefined:
QJsonValue::Undefined:
never executed: case QJsonValue::Undefined:
0
444 dbg << "QJsonValue(undefined)";-
445 break;
never executed: break;
0
446 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
447 dbg << "QJsonValue(null)";-
448 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QVariant
1
449 case
never executed: case QJsonValue::Bool:
QJsonValue::Bool:
never executed: case QJsonValue::Bool:
0
450 dbg.nospace() << "QJsonValue(bool, " << o.toBool() << ')';-
451 break;
never executed: break;
0
452 case
never executed: case QJsonValue::Double:
QJsonValue::Double:
never executed: case QJsonValue::Double:
0
453 dbg.nospace() << "QJsonValue(double, " << o.toDouble() << ')';-
454 break;
never executed: break;
0
455 case
never executed: case QJsonValue::String:
QJsonValue::String:
never executed: case QJsonValue::String:
0
456 dbg.nospace() << "QJsonValue(string, " << o.toString() << ')';-
457 break;
never executed: break;
0
458 case
never executed: case QJsonValue::Array:
QJsonValue::Array:
never executed: case QJsonValue::Array:
0
459 dbg.nospace() << "QJsonValue(array, ";-
460 dbg << o.toArray();-
461 dbg << ')';-
462 break;
never executed: break;
0
463 case
never executed: case QJsonValue::Object:
QJsonValue::Object:
never executed: case QJsonValue::Object:
0
464 dbg.nospace() << "QJsonValue(object, ";-
465 dbg << o.toObject();-
466 dbg << ')';-
467 break;
never executed: break;
0
468 }-
469 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
470}-
471-
472-
473-
Switch to Source codePreprocessed file

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