Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | typedef qint64 Fixed64; | - |
10 | static inline Fixed64 toFixed(int i) { return (Fixed64)i * 256; } executed: return (Fixed64)i * 256; Execution Count:26764 | 26764 |
11 | static inline int fRound(Fixed64 i) { | - |
12 | return (i % 256 < 128) ? i / 256 : 1 + i / 256; executed: return (i % 256 < 128) ? i / 256 : 1 + i / 256; Execution Count:14496 | 14496 |
13 | } | - |
14 | void qGeomCalc(QVector<QLayoutStruct> &chain, int start, int count, | - |
15 | int pos, int space, int spacer) | - |
16 | { | - |
17 | int cHint = 0; | - |
18 | int cMin = 0; | - |
19 | int cMax = 0; | - |
20 | int sumStretch = 0; | - |
21 | int sumSpacing = 0; | - |
22 | | - |
23 | bool wannaGrow = false; | - |
24 | | - |
25 | | - |
26 | bool allEmptyNonstretch = true; | - |
27 | int pendingSpacing = -1; | - |
28 | int spacerCount = 0; | - |
29 | int i; | - |
30 | | - |
31 | for (i = start; i < start + count; i++) { evaluated: i < start + count yes Evaluation Count:32690 | yes Evaluation Count:11919 |
| 11919-32690 |
32 | QLayoutStruct *data = &chain[i]; | - |
33 | | - |
34 | data->done = false; | - |
35 | cHint += data->smartSizeHint(); | - |
36 | cMin += data->minimumSize; | - |
37 | cMax += data->maximumSize; | - |
38 | sumStretch += data->stretch; | - |
39 | if (!data->empty) { evaluated: !data->empty yes Evaluation Count:24980 | yes Evaluation Count:7710 |
| 7710-24980 |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | if (pendingSpacing >= 0) { evaluated: pendingSpacing >= 0 yes Evaluation Count:13665 | yes Evaluation Count:11315 |
| 11315-13665 |
45 | sumSpacing += pendingSpacing; | - |
46 | ++spacerCount; | - |
47 | } executed: } Execution Count:13665 | 13665 |
48 | pendingSpacing = data->effectiveSpacer(spacer); | - |
49 | } executed: } Execution Count:24980 | 24980 |
50 | wannaGrow = wannaGrow || data->expansive || data->stretch > 0; evaluated: wannaGrow yes Evaluation Count:9327 | yes Evaluation Count:23363 |
evaluated: data->expansive yes Evaluation Count:5747 | yes Evaluation Count:17616 |
evaluated: data->stretch > 0 yes Evaluation Count:225 | yes Evaluation Count:17391 |
| 225-23363 |
51 | allEmptyNonstretch = allEmptyNonstretch && !wannaGrow && data->empty; evaluated: allEmptyNonstretch yes Evaluation Count:15021 | yes Evaluation Count:17669 |
evaluated: !wannaGrow yes Evaluation Count:11118 | yes Evaluation Count:3903 |
evaluated: data->empty yes Evaluation Count:3603 | yes Evaluation Count:7515 |
| 3603-17669 |
52 | } executed: } Execution Count:32690 | 32690 |
53 | | - |
54 | int extraspace = 0; | - |
55 | | - |
56 | if (space < cMin + sumSpacing) { evaluated: space < cMin + sumSpacing yes Evaluation Count:610 | yes Evaluation Count:11309 |
| 610-11309 |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | int minSize = cMin + sumSpacing; | - |
62 | | - |
63 | | - |
64 | if (spacer >= 0) { evaluated: spacer >= 0 yes Evaluation Count:214 | yes Evaluation Count:396 |
| 214-396 |
65 | spacer = minSize > 0 ? spacer * space / minSize : 0; partially evaluated: minSize > 0 yes Evaluation Count:214 | no Evaluation Count:0 |
| 0-214 |
66 | sumSpacing = spacer * spacerCount; | - |
67 | } executed: } Execution Count:214 | 214 |
68 | | - |
69 | QList<int> list; | - |
70 | | - |
71 | for (i = start; i < start + count; i++) evaluated: i < start + count yes Evaluation Count:1935 | yes Evaluation Count:610 |
| 610-1935 |
72 | list << chain.at(i).minimumSize; executed: list << chain.at(i).minimumSize; Execution Count:1935 | 1935 |
73 | | - |
74 | qSort(list); | - |
75 | | - |
76 | int space_left = space - sumSpacing; | - |
77 | | - |
78 | int sum = 0; | - |
79 | int idx = 0; | - |
80 | int space_used=0; | - |
81 | int current = 0; | - |
82 | while (idx < count && space_used < space_left) { evaluated: idx < count yes Evaluation Count:1624 | yes Evaluation Count:218 |
evaluated: space_used < space_left yes Evaluation Count:1232 | yes Evaluation Count:392 |
| 218-1624 |
83 | current = list.at(idx); | - |
84 | space_used = sum + current * (count - idx); | - |
85 | sum += current; | - |
86 | ++idx; | - |
87 | } executed: } Execution Count:1232 | 1232 |
88 | --idx; | - |
89 | int deficit = space_used - space_left; | - |
90 | | - |
91 | int items = count - idx; | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | int deficitPerItem = deficit/items; | - |
98 | int remainder = deficit % items; | - |
99 | int maxval = current - deficitPerItem; | - |
100 | | - |
101 | int rest = 0; | - |
102 | for (i = start; i < start + count; i++) { evaluated: i < start + count yes Evaluation Count:1935 | yes Evaluation Count:610 |
| 610-1935 |
103 | int maxv = maxval; | - |
104 | rest += remainder; | - |
105 | if (rest >= items) { evaluated: rest >= items yes Evaluation Count:242 | yes Evaluation Count:1693 |
| 242-1693 |
106 | maxv--; | - |
107 | rest-=items; | - |
108 | } executed: } Execution Count:242 | 242 |
109 | QLayoutStruct *data = &chain[i]; | - |
110 | data->size = qMin(data->minimumSize, maxv); | - |
111 | data->done = true; | - |
112 | } executed: } Execution Count:1935 | 1935 |
113 | } else if (space < cHint + sumSpacing) { executed: } Execution Count:610 evaluated: space < cHint + sumSpacing yes Evaluation Count:140 | yes Evaluation Count:11169 |
| 140-11169 |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | | - |
119 | | - |
120 | int n = count; | - |
121 | int space_left = space - sumSpacing; | - |
122 | int overdraft = cHint - space_left; | - |
123 | | - |
124 | | - |
125 | for (i = start; i < start + count; i++) { evaluated: i < start + count yes Evaluation Count:491 | yes Evaluation Count:140 |
| 140-491 |
126 | QLayoutStruct *data = &chain[i]; | - |
127 | if (!data->done partially evaluated: !data->done yes Evaluation Count:491 | no Evaluation Count:0 |
| 0-491 |
128 | && data->minimumSize >= data->smartSizeHint()) { evaluated: data->minimumSize >= data->smartSizeHint() yes Evaluation Count:259 | yes Evaluation Count:232 |
| 232-259 |
129 | data->size = data->smartSizeHint(); | - |
130 | data->done = true; | - |
131 | space_left -= data->smartSizeHint(); | - |
132 | | - |
133 | n--; | - |
134 | } executed: } Execution Count:259 | 259 |
135 | } executed: } Execution Count:491 | 491 |
136 | bool finished = n == 0; | - |
137 | while (!finished) { evaluated: !finished yes Evaluation Count:164 | yes Evaluation Count:140 |
| 140-164 |
138 | finished = true; | - |
139 | Fixed64 fp_over = toFixed(overdraft); | - |
140 | Fixed64 fp_w = 0; | - |
141 | | - |
142 | for (i = start; i < start+count; i++) { evaluated: i < start+count yes Evaluation Count:697 | yes Evaluation Count:140 |
| 140-697 |
143 | QLayoutStruct *data = &chain[i]; | - |
144 | if (data->done) evaluated: data->done yes Evaluation Count:416 | yes Evaluation Count:281 |
| 281-416 |
145 | continue; executed: continue; Execution Count:416 | 416 |
146 | | - |
147 | fp_w += fp_over / n; | - |
148 | | - |
149 | | - |
150 | int w = fRound(fp_w); | - |
151 | data->size = data->smartSizeHint() - w; | - |
152 | fp_w -= toFixed(w); | - |
153 | if (data->size < data->minimumSize) { evaluated: data->size < data->minimumSize yes Evaluation Count:24 | yes Evaluation Count:257 |
| 24-257 |
154 | data->done = true; | - |
155 | data->size = data->minimumSize; | - |
156 | finished = false; | - |
157 | overdraft -= data->smartSizeHint() - data->minimumSize; | - |
158 | | - |
159 | n--; | - |
160 | break; executed: break; Execution Count:24 | 24 |
161 | } | - |
162 | } executed: } Execution Count:257 | 257 |
163 | } executed: } Execution Count:164 | 164 |
164 | } else { executed: } Execution Count:140 | 140 |
165 | int n = count; | - |
166 | int space_left = space - sumSpacing; | - |
167 | | - |
168 | for (i = start; i < start + count; i++) { evaluated: i < start + count yes Evaluation Count:30264 | yes Evaluation Count:11169 |
| 11169-30264 |
169 | QLayoutStruct *data = &chain[i]; | - |
170 | if (!data->done partially evaluated: !data->done yes Evaluation Count:30264 | no Evaluation Count:0 |
| 0-30264 |
171 | && (data->maximumSize <= data->smartSizeHint() evaluated: data->maximumSize <= data->smartSizeHint() yes Evaluation Count:12507 | yes Evaluation Count:17757 |
| 12507-17757 |
172 | || (wannaGrow && !data->expansive && data->stretch == 0) evaluated: wannaGrow yes Evaluation Count:10827 | yes Evaluation Count:6930 |
evaluated: !data->expansive yes Evaluation Count:4098 | yes Evaluation Count:6729 |
evaluated: data->stretch == 0 yes Evaluation Count:3873 | yes Evaluation Count:225 |
| 225-10827 |
173 | || (!allEmptyNonstretch && data->empty && evaluated: !allEmptyNonstretch yes Evaluation Count:13510 | yes Evaluation Count:374 |
evaluated: data->empty yes Evaluation Count:1870 | yes Evaluation Count:11640 |
| 374-13510 |
174 | !data->expansive && data->stretch == 0))) { evaluated: !data->expansive yes Evaluation Count:683 | yes Evaluation Count:1187 |
partially evaluated: data->stretch == 0 yes Evaluation Count:683 | no Evaluation Count:0 |
| 0-1187 |
175 | data->size = data->smartSizeHint(); | - |
176 | data->done = true; | - |
177 | space_left -= data->size; | - |
178 | sumStretch -= data->stretch; | - |
179 | n--; | - |
180 | } executed: } Execution Count:17063 | 17063 |
181 | } executed: } Execution Count:30264 | 30264 |
182 | extraspace = space_left; | - |
183 | int surplus, deficit; | - |
184 | do { | - |
185 | surplus = deficit = 0; | - |
186 | Fixed64 fp_space = toFixed(space_left); | - |
187 | Fixed64 fp_w = 0; | - |
188 | for (i = start; i < start + count; i++) { evaluated: i < start + count yes Evaluation Count:32997 | yes Evaluation Count:12104 |
| 12104-32997 |
189 | QLayoutStruct *data = &chain[i]; | - |
190 | if (data->done) evaluated: data->done yes Evaluation Count:18782 | yes Evaluation Count:14215 |
| 14215-18782 |
191 | continue; executed: continue; Execution Count:18782 | 18782 |
192 | extraspace = 0; | - |
193 | if (sumStretch <= 0) evaluated: sumStretch <= 0 yes Evaluation Count:9613 | yes Evaluation Count:4602 |
| 4602-9613 |
194 | fp_w += fp_space / n; executed: fp_w += fp_space / n; Execution Count:9613 | 9613 |
195 | else | - |
196 | fp_w += (fp_space * data->stretch) / sumStretch; executed: fp_w += (fp_space * data->stretch) / sumStretch; Execution Count:4602 | 4602 |
197 | int w = fRound(fp_w); | - |
198 | data->size = w; | - |
199 | fp_w -= toFixed(w); | - |
200 | if (w < data->smartSizeHint()) { evaluated: w < data->smartSizeHint() yes Evaluation Count:782 | yes Evaluation Count:13433 |
| 782-13433 |
201 | deficit += data->smartSizeHint() - w; | - |
202 | } else if (w > data->maximumSize) { executed: } Execution Count:782 evaluated: w > data->maximumSize yes Evaluation Count:308 | yes Evaluation Count:13125 |
| 308-13125 |
203 | surplus += w - data->maximumSize; | - |
204 | } executed: } Execution Count:308 | 308 |
205 | } | - |
206 | if (deficit > 0 && surplus <= deficit) { evaluated: deficit > 0 yes Evaluation Count:627 | yes Evaluation Count:11477 |
partially evaluated: surplus <= deficit yes Evaluation Count:627 | no Evaluation Count:0 |
| 0-11477 |
207 | | - |
208 | for (i = start; i < start+count; i++) { evaluated: i < start+count yes Evaluation Count:2117 | yes Evaluation Count:627 |
| 627-2117 |
209 | QLayoutStruct *data = &chain[i]; | - |
210 | if (!data->done && data->size < data->smartSizeHint()) { evaluated: !data->done yes Evaluation Count:1488 | yes Evaluation Count:629 |
evaluated: data->size < data->smartSizeHint() yes Evaluation Count:782 | yes Evaluation Count:706 |
| 629-1488 |
211 | data->size = data->smartSizeHint(); | - |
212 | data->done = true; | - |
213 | space_left -= data->smartSizeHint(); | - |
214 | sumStretch -= data->stretch; | - |
215 | n--; | - |
216 | } executed: } Execution Count:782 | 782 |
217 | } executed: } Execution Count:2117 | 2117 |
218 | } executed: } Execution Count:627 | 627 |
219 | if (surplus > 0 && surplus >= deficit) { evaluated: surplus > 0 yes Evaluation Count:308 | yes Evaluation Count:11796 |
partially evaluated: surplus >= deficit yes Evaluation Count:308 | no Evaluation Count:0 |
| 0-11796 |
220 | | - |
221 | for (i = start; i < start + count; i++) { evaluated: i < start + count yes Evaluation Count:616 | yes Evaluation Count:308 |
| 308-616 |
222 | QLayoutStruct *data = &chain[i]; | - |
223 | if (!data->done && data->size > data->maximumSize) { partially evaluated: !data->done yes Evaluation Count:616 | no Evaluation Count:0 |
evaluated: data->size > data->maximumSize yes Evaluation Count:308 | yes Evaluation Count:308 |
| 0-616 |
224 | data->size = data->maximumSize; | - |
225 | data->done = true; | - |
226 | space_left -= data->maximumSize; | - |
227 | sumStretch -= data->stretch; | - |
228 | n--; | - |
229 | } executed: } Execution Count:308 | 308 |
230 | } executed: } Execution Count:616 | 616 |
231 | } executed: } Execution Count:308 | 308 |
232 | } while (n > 0 && surplus != deficit); evaluated: n > 0 yes Evaluation Count:10934 | yes Evaluation Count:1170 |
evaluated: surplus != deficit yes Evaluation Count:935 | yes Evaluation Count:9999 |
executed: } Execution Count:12104 | 935-12104 |
233 | if (n == 0) evaluated: n == 0 yes Evaluation Count:1170 | yes Evaluation Count:9999 |
| 1170-9999 |
234 | extraspace = space_left; executed: extraspace = space_left; Execution Count:1170 | 1170 |
235 | } executed: } Execution Count:11169 | 11169 |
236 | | - |
237 | | - |
238 | | - |
239 | | - |
240 | | - |
241 | | - |
242 | | - |
243 | int extra = extraspace / (spacerCount + 2); | - |
244 | int p = pos + extra; | - |
245 | for (i = start; i < start+count; i++) { evaluated: i < start+count yes Evaluation Count:32690 | yes Evaluation Count:11919 |
| 11919-32690 |
246 | QLayoutStruct *data = &chain[i]; | - |
247 | data->pos = p; | - |
248 | p += data->size; | - |
249 | if (!data->empty) evaluated: !data->empty yes Evaluation Count:24980 | yes Evaluation Count:7710 |
| 7710-24980 |
250 | p += data->effectiveSpacer(spacer) + extra; executed: p += data->effectiveSpacer(spacer) + extra; Execution Count:24980 | 24980 |
251 | } executed: } Execution Count:32690 | 32690 |
252 | } executed: } Execution Count:11919 | 11919 |
253 | | - |
254 | __attribute__((visibility("default"))) QSize qSmartMinSize(const QSize &sizeHint, const QSize &minSizeHint, | - |
255 | const QSize &minSize, const QSize &maxSize, | - |
256 | const QSizePolicy &sizePolicy) | - |
257 | { | - |
258 | QSize s(0, 0); | - |
259 | | - |
260 | if (sizePolicy.horizontalPolicy() != QSizePolicy::Ignored) { evaluated: sizePolicy.horizontalPolicy() != QSizePolicy::Ignored yes Evaluation Count:23216 | yes Evaluation Count:250 |
| 250-23216 |
261 | if (sizePolicy.horizontalPolicy() & QSizePolicy::ShrinkFlag) evaluated: sizePolicy.horizontalPolicy() & QSizePolicy::ShrinkFlag yes Evaluation Count:17248 | yes Evaluation Count:5968 |
| 5968-17248 |
262 | s.setWidth(minSizeHint.width()); executed: s.setWidth(minSizeHint.width()); Execution Count:17248 | 17248 |
263 | else | - |
264 | s.setWidth(qMax(sizeHint.width(), minSizeHint.width())); executed: s.setWidth(qMax(sizeHint.width(), minSizeHint.width())); Execution Count:5968 | 5968 |
265 | } | - |
266 | | - |
267 | if (sizePolicy.verticalPolicy() != QSizePolicy::Ignored) { evaluated: sizePolicy.verticalPolicy() != QSizePolicy::Ignored yes Evaluation Count:23450 | yes Evaluation Count:16 |
| 16-23450 |
268 | if (sizePolicy.verticalPolicy() & QSizePolicy::ShrinkFlag) { evaluated: sizePolicy.verticalPolicy() & QSizePolicy::ShrinkFlag yes Evaluation Count:16733 | yes Evaluation Count:6717 |
| 6717-16733 |
269 | s.setHeight(minSizeHint.height()); | - |
270 | } else { executed: } Execution Count:16733 | 16733 |
271 | s.setHeight(qMax(sizeHint.height(), minSizeHint.height())); | - |
272 | } executed: } Execution Count:6717 | 6717 |
273 | } | - |
274 | | - |
275 | s = s.boundedTo(maxSize); | - |
276 | if (minSize.width() > 0) evaluated: minSize.width() > 0 yes Evaluation Count:5456 | yes Evaluation Count:18010 |
| 5456-18010 |
277 | s.setWidth(minSize.width()); executed: s.setWidth(minSize.width()); Execution Count:5456 | 5456 |
278 | if (minSize.height() > 0) evaluated: minSize.height() > 0 yes Evaluation Count:1421 | yes Evaluation Count:22045 |
| 1421-22045 |
279 | s.setHeight(minSize.height()); executed: s.setHeight(minSize.height()); Execution Count:1421 | 1421 |
280 | | - |
281 | return s.expandedTo(QSize(0,0)); executed: return s.expandedTo(QSize(0,0)); Execution Count:23466 | 23466 |
282 | } | - |
283 | | - |
284 | __attribute__((visibility("default"))) QSize qSmartMinSize(const QWidgetItem *i) | - |
285 | { | - |
286 | QWidget *w = ((QWidgetItem *)i)->widget(); | - |
287 | return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), | 55 |
288 | w->minimumSize(), w->maximumSize(), | 55 |
289 | w->sizePolicy()); executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); Execution Count:55 | 55 |
290 | } | - |
291 | | - |
292 | __attribute__((visibility("default"))) QSize qSmartMinSize(const QWidget *w) | - |
293 | { | - |
294 | return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), | 13336 |
295 | w->minimumSize(), w->maximumSize(), | 13336 |
296 | w->sizePolicy()); executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); Execution Count:13336 | 13336 |
297 | } | - |
298 | | - |
299 | __attribute__((visibility("default"))) QSize qSmartMaxSize(const QSize &sizeHint, | - |
300 | const QSize &minSize, const QSize &maxSize, | - |
301 | const QSizePolicy &sizePolicy, Qt::Alignment align) | - |
302 | { | - |
303 | if (align & Qt::AlignHorizontal_Mask && align & Qt::AlignVertical_Mask) evaluated: align & Qt::AlignHorizontal_Mask yes Evaluation Count:1368 | yes Evaluation Count:10633 |
evaluated: align & Qt::AlignVertical_Mask yes Evaluation Count:18 | yes Evaluation Count:1350 |
| 18-10633 |
304 | return QSize(QLAYOUTSIZE_MAX, QLAYOUTSIZE_MAX); executed: return QSize(QLAYOUTSIZE_MAX, QLAYOUTSIZE_MAX); Execution Count:18 | 18 |
305 | QSize s = maxSize; | - |
306 | QSize hint = sizeHint.expandedTo(minSize); | - |
307 | if (s.width() == ((1<<24)-1) && !(align & Qt::AlignHorizontal_Mask)) evaluated: s.width() == ((1<<24)-1) yes Evaluation Count:9395 | yes Evaluation Count:2588 |
evaluated: !(align & Qt::AlignHorizontal_Mask) yes Evaluation Count:9053 | yes Evaluation Count:342 |
| 342-9395 |
308 | if (!(sizePolicy.horizontalPolicy() & QSizePolicy::GrowFlag)) evaluated: !(sizePolicy.horizontalPolicy() & QSizePolicy::GrowFlag) yes Evaluation Count:1717 | yes Evaluation Count:7336 |
| 1717-7336 |
309 | s.setWidth(hint.width()); executed: s.setWidth(hint.width()); Execution Count:1717 | 1717 |
310 | | - |
311 | if (s.height() == ((1<<24)-1) && !(align & Qt::AlignVertical_Mask)) evaluated: s.height() == ((1<<24)-1) yes Evaluation Count:8824 | yes Evaluation Count:3159 |
evaluated: !(align & Qt::AlignVertical_Mask) yes Evaluation Count:8769 | yes Evaluation Count:55 |
| 55-8824 |
312 | if (!(sizePolicy.verticalPolicy() & QSizePolicy::GrowFlag)) evaluated: !(sizePolicy.verticalPolicy() & QSizePolicy::GrowFlag) yes Evaluation Count:4134 | yes Evaluation Count:4635 |
| 4134-4635 |
313 | s.setHeight(hint.height()); executed: s.setHeight(hint.height()); Execution Count:4134 | 4134 |
314 | | - |
315 | if (align & Qt::AlignHorizontal_Mask) evaluated: align & Qt::AlignHorizontal_Mask yes Evaluation Count:1350 | yes Evaluation Count:10633 |
| 1350-10633 |
316 | s.setWidth(QLAYOUTSIZE_MAX); executed: s.setWidth(QLAYOUTSIZE_MAX); Execution Count:1350 | 1350 |
317 | if (align & Qt::AlignVertical_Mask) evaluated: align & Qt::AlignVertical_Mask yes Evaluation Count:55 | yes Evaluation Count:11928 |
| 55-11928 |
318 | s.setHeight(QLAYOUTSIZE_MAX); executed: s.setHeight(QLAYOUTSIZE_MAX); Execution Count:55 | 55 |
319 | return s; executed: return s; Execution Count:11983 | 11983 |
320 | } | - |
321 | | - |
322 | __attribute__((visibility("default"))) QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align) | - |
323 | { | - |
324 | QWidget *w = ((QWidgetItem*)i)->widget(); | - |
325 | | - |
326 | return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), | 56 |
327 | w->sizePolicy(), align); executed: return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), w->sizePolicy(), align); Execution Count:56 | 56 |
328 | } | - |
329 | | - |
330 | __attribute__((visibility("default"))) QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align) | - |
331 | { | - |
332 | return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), | 78 |
333 | w->sizePolicy(), align); executed: return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), w->sizePolicy(), align); Execution Count:78 | 78 |
334 | } | - |
335 | | - |
336 | __attribute__((visibility("default"))) int qSmartSpacing(const QLayout *layout, QStyle::PixelMetric pm) | - |
337 | { | - |
338 | QObject *parent = layout->parent(); | - |
339 | if (!parent) { partially evaluated: !parent no Evaluation Count:0 | yes Evaluation Count:8555 |
| 0-8555 |
340 | return -1; never executed: return -1; | 0 |
341 | } else if (parent->isWidgetType()) { evaluated: parent->isWidgetType() yes Evaluation Count:7876 | yes Evaluation Count:679 |
| 679-7876 |
342 | QWidget *pw = static_cast<QWidget *>(parent); | - |
343 | return pw->style()->pixelMetric(pm, 0, pw); executed: return pw->style()->pixelMetric(pm, 0, pw); Execution Count:7876 | 7876 |
344 | } else { | - |
345 | return static_cast<QLayout *>(parent)->spacing(); executed: return static_cast<QLayout *>(parent)->spacing(); Execution Count:679 | 679 |
346 | } | - |
347 | } | - |
348 | | - |
349 | | - |
350 | | - |
| | |