Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qmldebug/qqmlprofilertypedevent.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | QDataStream &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
| 0-1422 | ||||||||||||
15 | messageType = MaximumMessage; never executed: messageType = MaximumMessage; | 0 | ||||||||||||
16 | - | |||||||||||||
17 | RangeType rangeType = MaximumRangeType; | - | ||||||||||||
18 | if (!stream.atEnd()
| 34-1388 | ||||||||||||
19 | stream >> subtype; | - | ||||||||||||
20 | if (subtype >= 0
| 0-1388 | ||||||||||||
21 | rangeType = static_cast<RangeType>(subtype); executed 1388 times by 1 test: rangeType = static_cast<RangeType>(subtype); Executed by:
| 1388 | ||||||||||||
22 | } executed 1388 times by 1 test: else {end of block Executed by:
| 1388 | ||||||||||||
23 | subtype = -1; | - | ||||||||||||
24 | } executed 34 times by 1 test: end of block Executed by:
| 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: Event:case Event: Executed by:
executed 173 times by 1 test: {case Event: Executed by:
| 173 | ||||||||||||
32 | event.type = QQmlProfilerEventType( | - | ||||||||||||
33 | static_cast<Message>(messageType), | - | ||||||||||||
34 | MaximumRangeType, subtype); | - | ||||||||||||
35 | switch (subtype) { | - | ||||||||||||
36 | case executed 36 times by 1 test: StartTrace:case StartTrace: Executed by:
executed 36 times by 1 test: case StartTrace: Executed by:
| 36 | ||||||||||||
37 | case executed 34 times by 1 test: EndTrace:case EndTrace: Executed by:
executed 34 times by 1 test: {case EndTrace: Executed by:
| 34 | ||||||||||||
38 | QVarLengthArray<qint32> engineIds; | - | ||||||||||||
39 | while (!stream.atEnd()
| 70 | ||||||||||||
40 | qint32 id; | - | ||||||||||||
41 | stream >> id; | - | ||||||||||||
42 | engineIds << id; | - | ||||||||||||
43 | } executed 70 times by 1 test: end of block Executed by:
| 70 | ||||||||||||
44 | event.event.setNumbers<QVarLengthArray<qint32>, qint32>(engineIds); | - | ||||||||||||
45 | break; executed 70 times by 1 test: break; Executed by:
| 70 | ||||||||||||
46 | } | - | ||||||||||||
47 | case executed 103 times by 1 test: AnimationFrame:case AnimationFrame: Executed by:
executed 103 times by 1 test: {case AnimationFrame: Executed by:
| 103 | ||||||||||||
48 | qint32 frameRate, animationCount; | - | ||||||||||||
49 | qint32 threadId; | - | ||||||||||||
50 | stream >> frameRate >> animationCount; | - | ||||||||||||
51 | if (!stream.atEnd()
| 0-103 | ||||||||||||
52 | stream >> threadId; executed 103 times by 1 test: stream >> threadId; Executed by:
| 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:
| 103 | ||||||||||||
58 | } | - | ||||||||||||
59 | case never executed: Mouse:case Mouse: never executed: case Mouse: | 0 | ||||||||||||
60 | case never executed: Key:case Key: never executed: case Key: | 0 | ||||||||||||
61 | int inputType = (subtype == Key
| 0 | ||||||||||||
62 | if (!stream.atEnd()
| 0 | ||||||||||||
63 | stream >> inputType; never executed: stream >> inputType; | 0 | ||||||||||||
64 | qint32 a = -1; | - | ||||||||||||
65 | if (!stream.atEnd()
| 0 | ||||||||||||
66 | stream >> a; never executed: stream >> a; | 0 | ||||||||||||
67 | qint32 b = -1; | - | ||||||||||||
68 | if (!stream.atEnd()
| 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:
| 173 | ||||||||||||
76 | } | - | ||||||||||||
77 | case executed 34 times by 1 test: Complete:case Complete: Executed by:
executed 34 times by 1 test: {case Complete: Executed by:
| 34 | ||||||||||||
78 | event.type = QQmlProfilerEventType( | - | ||||||||||||
79 | static_cast<Message>(messageType), | - | ||||||||||||
80 | MaximumRangeType, subtype); | - | ||||||||||||
81 | break; executed 34 times by 1 test: break; Executed by:
| 34 | ||||||||||||
82 | } | - | ||||||||||||
83 | case never executed: SceneGraphFrame:case SceneGraphFrame: never executed: {case SceneGraphFrame: | 0 | ||||||||||||
84 | QVarLengthArray<qint64> params; | - | ||||||||||||
85 | qint64 param; | - | ||||||||||||
86 | - | |||||||||||||
87 | while (!stream.atEnd()
| 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: PixmapCacheEvent:case PixmapCacheEvent: Executed by:
executed 8 times by 1 test: {case PixmapCacheEvent: Executed by:
| 8 | ||||||||||||
99 | qint32 width = 0, height = 0, refcount = 0; | - | ||||||||||||
100 | QString filename; | - | ||||||||||||
101 | stream >> filename; | - | ||||||||||||
102 | if (subtype == PixmapReferenceCountChanged
| 0-8 | ||||||||||||
103 | stream >> refcount; | - | ||||||||||||
104 | } executed 2 times by 1 test: else if (subtype == PixmapSizeKnownend of block Executed by:
| 2-4 | ||||||||||||
105 | stream >> width >> height; | - | ||||||||||||
106 | refcount = 1; | - | ||||||||||||
107 | } executed 2 times by 1 test: end of block Executed by:
| 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:
| 8 | ||||||||||||
115 | } | - | ||||||||||||
116 | case executed 465 times by 1 test: MemoryAllocation:case MemoryAllocation: Executed by:
executed 465 times by 1 test: {case MemoryAllocation: Executed by:
| 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:
| 465 | ||||||||||||
125 | } | - | ||||||||||||
126 | case executed 296 times by 1 test: RangeStart:case RangeStart: Executed by:
executed 296 times by 1 test: {case RangeStart: Executed by:
| 296 | ||||||||||||
127 | if (!stream.atEnd()
| 0-296 | ||||||||||||
128 | qint64 typeId; | - | ||||||||||||
129 | stream >> typeId; | - | ||||||||||||
130 | if (stream.status() == QDataStream::Ok
| 0-296 | ||||||||||||
131 | event.serverTypeId = typeId; executed 296 times by 1 test: event.serverTypeId = typeId; Executed by:
| 296 | ||||||||||||
132 | - | |||||||||||||
133 | } executed 296 times by 1 test: end of block Executed by:
| 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:
| 296 | ||||||||||||
138 | } | - | ||||||||||||
139 | case executed 64 times by 1 test: RangeData:case RangeData: Executed by:
executed 64 times by 1 test: {case RangeData: Executed by:
| 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()
| 0-64 | ||||||||||||
147 | stream >> event.serverTypeId; executed 64 times by 1 test: stream >> event.serverTypeId; Executed by:
| 64 | ||||||||||||
148 | break; executed 64 times by 1 test: break; Executed by:
| 64 | ||||||||||||
149 | } | - | ||||||||||||
150 | case executed 86 times by 1 test: RangeLocation:case RangeLocation: Executed by:
executed 86 times by 1 test: {case RangeLocation: Executed by:
| 86 | ||||||||||||
151 | QString filename; | - | ||||||||||||
152 | qint32 line = 0; | - | ||||||||||||
153 | qint32 column = 0; | - | ||||||||||||
154 | stream >> filename >> line; | - | ||||||||||||
155 | - | |||||||||||||
156 | if (!stream.atEnd()
| 0-86 | ||||||||||||
157 | stream >> column; | - | ||||||||||||
158 | if (!stream.atEnd()
| 0-86 | ||||||||||||
159 | stream >> event.serverTypeId; executed 86 times by 1 test: stream >> event.serverTypeId; Executed by:
| 86 | ||||||||||||
160 | } executed 86 times by 1 test: end of block Executed by:
| 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:
| 86 | ||||||||||||
166 | } | - | ||||||||||||
167 | case executed 296 times by 1 test: RangeEnd:case RangeEnd: Executed by:
executed 296 times by 1 test: {case RangeEnd: Executed by:
| 296 | ||||||||||||
168 | event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1); | - | ||||||||||||
169 | event.event.setRangeStage(RangeEnd); | - | ||||||||||||
170 | break; executed 296 times by 1 test: break; Executed by:
| 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: stream;return stream; Executed by:
executed 1422 times by 1 test: return stream; Executed by:
| 1422 | ||||||||||||
181 | } | - | ||||||||||||
182 | - | |||||||||||||
183 | - | |||||||||||||
Switch to Source code | Preprocessed file |