OpenCoverage

qqmlprofilertypedevent.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qmldebug/qqmlprofilertypedevent.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6QDataStream &operator>>(QDataStream &stream, QQmlProfilerTypedEvent &event)-
7{-
8 qint64 time;-
9 qint32 messageType;-
10 qint32 subtype;-
11-
12 stream >> time >> messageType;-
13-
14 if (messageType < 0
messageType < 0Description
TRUEnever evaluated
FALSEevaluated 1422 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
|| messageType > MaximumMessage
messageType > MaximumMessageDescription
TRUEnever evaluated
FALSEevaluated 1422 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
)
0-1422
15 messageType = MaximumMessage;
never executed: messageType = MaximumMessage;
0
16-
17 RangeType rangeType = MaximumRangeType;-
18 if (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 1388 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
) {
34-1388
19 stream >> subtype;-
20 if (subtype >= 0
subtype >= 0Description
TRUEevaluated 1388 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
&& subtype < MaximumRangeType
subtype < MaximumRangeTypeDescription
TRUEevaluated 1388 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
)
0-1388
21 rangeType = static_cast<RangeType>(subtype);
executed 1388 times by 1 test: rangeType = static_cast<RangeType>(subtype);
Executed by:
  • tst_qqmlprofilerservice
1388
22 }
executed 1388 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
else {
1388
23 subtype = -1;-
24 }
executed 34 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
34
25-
26 event.event.setTimestamp(time > 0 ? time : 0);-
27 event.event.setTypeIndex(-1);-
28 event.serverTypeId = 0;-
29-
30 switch (messageType) {-
31 case
executed 173 times by 1 test: case Event:
Executed by:
  • tst_qqmlprofilerservice
Event:
executed 173 times by 1 test: case Event:
Executed by:
  • tst_qqmlprofilerservice
{
173
32 event.type = QQmlProfilerEventType(-
33 static_cast<Message>(messageType),-
34 MaximumRangeType, subtype);-
35 switch (subtype) {-
36 case
executed 36 times by 1 test: case StartTrace:
Executed by:
  • tst_qqmlprofilerservice
StartTrace:
executed 36 times by 1 test: case StartTrace:
Executed by:
  • tst_qqmlprofilerservice
36
37 case
executed 34 times by 1 test: case EndTrace:
Executed by:
  • tst_qqmlprofilerservice
EndTrace:
executed 34 times by 1 test: case EndTrace:
Executed by:
  • tst_qqmlprofilerservice
{
34
38 QVarLengthArray<qint32> engineIds;-
39 while (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEevaluated 70 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
) {
70
40 qint32 id;-
41 stream >> id;-
42 engineIds << id;-
43 }
executed 70 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
70
44 event.event.setNumbers<QVarLengthArray<qint32>, qint32>(engineIds);-
45 break;
executed 70 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
70
46 }-
47 case
executed 103 times by 1 test: case AnimationFrame:
Executed by:
  • tst_qqmlprofilerservice
AnimationFrame:
executed 103 times by 1 test: case AnimationFrame:
Executed by:
  • tst_qqmlprofilerservice
{
103
48 qint32 frameRate, animationCount;-
49 qint32 threadId;-
50 stream >> frameRate >> animationCount;-
51 if (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
)
0-103
52 stream >> threadId;
executed 103 times by 1 test: stream >> threadId;
Executed by:
  • tst_qqmlprofilerservice
103
53 else-
54 threadId = 0;
never executed: threadId = 0;
0
55-
56 event.event.setNumbers<qint32>({frameRate, animationCount, threadId});-
57 break;
executed 103 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
103
58 }-
59 case
never executed: case Mouse:
Mouse:
never executed: case Mouse:
0
60 case
never executed: case Key:
Key:
never executed: case Key:
0
61 int inputType = (subtype == Key
subtype == KeyDescription
TRUEnever evaluated
FALSEnever evaluated
? InputKeyUnknown : InputMouseUnknown);
0
62 if (!stream.atEnd()
!stream.atEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
63 stream >> inputType;
never executed: stream >> inputType;
0
64 qint32 a = -1;-
65 if (!stream.atEnd()
!stream.atEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
66 stream >> a;
never executed: stream >> a;
0
67 qint32 b = -1;-
68 if (!stream.atEnd()
!stream.atEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
69 stream >> b;
never executed: stream >> b;
0
70-
71 event.event.setNumbers<qint32>({inputType, a, b});-
72 break;
never executed: break;
0
73 }-
74-
75 break;
executed 173 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
173
76 }-
77 case
executed 34 times by 1 test: case Complete:
Executed by:
  • tst_qqmlprofilerservice
Complete:
executed 34 times by 1 test: case Complete:
Executed by:
  • tst_qqmlprofilerservice
{
34
78 event.type = QQmlProfilerEventType(-
79 static_cast<Message>(messageType),-
80 MaximumRangeType, subtype);-
81 break;
executed 34 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
34
82 }-
83 case
never executed: case SceneGraphFrame:
SceneGraphFrame:
never executed: case SceneGraphFrame:
{
0
84 QVarLengthArray<qint64> params;-
85 qint64 param;-
86-
87 while (!stream.atEnd()
!stream.atEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
88 stream >> param;-
89 params.push_back(param);-
90 }
never executed: end of block
0
91-
92 event.type = QQmlProfilerEventType(-
93 static_cast<Message>(messageType),-
94 MaximumRangeType, subtype);-
95 event.event.setNumbers<QVarLengthArray<qint64>, qint64>(params);-
96 break;
never executed: break;
0
97 }-
98 case
executed 8 times by 1 test: case PixmapCacheEvent:
Executed by:
  • tst_qqmlprofilerservice
PixmapCacheEvent:
executed 8 times by 1 test: case PixmapCacheEvent:
Executed by:
  • tst_qqmlprofilerservice
{
8
99 qint32 width = 0, height = 0, refcount = 0;-
100 QString filename;-
101 stream >> filename;-
102 if (subtype == PixmapReferenceCountChanged
subtype == Pix...ceCountChangedDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
|| subtype == PixmapCacheCountChanged
subtype == Pix...heCountChangedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
) {
0-8
103 stream >> refcount;-
104 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
else if (subtype == PixmapSizeKnown
subtype == PixmapSizeKnownDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
) {
2-4
105 stream >> width >> height;-
106 refcount = 1;-
107 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
2
108-
109 event.type = QQmlProfilerEventType(-
110 static_cast<Message>(messageType),-
111 MaximumRangeType, subtype,-
112 QQmlProfilerEventLocation(filename, 0, 0));-
113 event.event.setNumbers<qint32>({width, height, refcount});-
114 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
8
115 }-
116 case
executed 465 times by 1 test: case MemoryAllocation:
Executed by:
  • tst_qqmlprofilerservice
MemoryAllocation:
executed 465 times by 1 test: case MemoryAllocation:
Executed by:
  • tst_qqmlprofilerservice
{
465
117 qint64 delta;-
118 stream >> delta;-
119-
120 event.type = QQmlProfilerEventType(-
121 static_cast<Message>(messageType),-
122 MaximumRangeType, subtype);-
123 event.event.setNumbers<qint64>({delta});-
124 break;
executed 465 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
465
125 }-
126 case
executed 296 times by 1 test: case RangeStart:
Executed by:
  • tst_qqmlprofilerservice
RangeStart:
executed 296 times by 1 test: case RangeStart:
Executed by:
  • tst_qqmlprofilerservice
{
296
127 if (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 296 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
) {
0-296
128 qint64 typeId;-
129 stream >> typeId;-
130 if (stream.status() == QDataStream::Ok
stream.status(...DataStream::OkDescription
TRUEevaluated 296 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
)
0-296
131 event.serverTypeId = typeId;
executed 296 times by 1 test: event.serverTypeId = typeId;
Executed by:
  • tst_qqmlprofilerservice
296
132-
133 }
executed 296 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
296
134-
135 event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1);-
136 event.event.setRangeStage(RangeStart);-
137 break;
executed 296 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
296
138 }-
139 case
executed 64 times by 1 test: case RangeData:
Executed by:
  • tst_qqmlprofilerservice
RangeData:
executed 64 times by 1 test: case RangeData:
Executed by:
  • tst_qqmlprofilerservice
{
64
140 QString data;-
141 stream >> data;-
142-
143 event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1,-
144 QQmlProfilerEventLocation(), data);-
145 event.event.setRangeStage(RangeData);-
146 if (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
)
0-64
147 stream >> event.serverTypeId;
executed 64 times by 1 test: stream >> event.serverTypeId;
Executed by:
  • tst_qqmlprofilerservice
64
148 break;
executed 64 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
64
149 }-
150 case
executed 86 times by 1 test: case RangeLocation:
Executed by:
  • tst_qqmlprofilerservice
RangeLocation:
executed 86 times by 1 test: case RangeLocation:
Executed by:
  • tst_qqmlprofilerservice
{
86
151 QString filename;-
152 qint32 line = 0;-
153 qint32 column = 0;-
154 stream >> filename >> line;-
155-
156 if (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
) {
0-86
157 stream >> column;-
158 if (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
)
0-86
159 stream >> event.serverTypeId;
executed 86 times by 1 test: stream >> event.serverTypeId;
Executed by:
  • tst_qqmlprofilerservice
86
160 }
executed 86 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
86
161-
162 event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1,-
163 QQmlProfilerEventLocation(filename, line, column));-
164 event.event.setRangeStage(RangeLocation);-
165 break;
executed 86 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
86
166 }-
167 case
executed 296 times by 1 test: case RangeEnd:
Executed by:
  • tst_qqmlprofilerservice
RangeEnd:
executed 296 times by 1 test: case RangeEnd:
Executed by:
  • tst_qqmlprofilerservice
{
296
168 event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1);-
169 event.event.setRangeStage(RangeEnd);-
170 break;
executed 296 times by 1 test: break;
Executed by:
  • tst_qqmlprofilerservice
296
171 }-
172 default
never executed: default:
:
never executed: default:
0
173 event.event.setNumbers<char>({});-
174 event.type = QQmlProfilerEventType(-
175 static_cast<Message>(messageType),-
176 MaximumRangeType, subtype);-
177 break;
never executed: break;
0
178 }-
179-
180 return
executed 1422 times by 1 test: return stream;
Executed by:
  • tst_qqmlprofilerservice
stream;
executed 1422 times by 1 test: return stream;
Executed by:
  • tst_qqmlprofilerservice
1422
181}-
182-
183-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0