Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #include "qlayout.h" | - |
41 | #include "private/qlayoutengine_p.h" | - |
42 | | - |
43 | #include "qvector.h" | - |
44 | #include "qwidget.h" | - |
45 | | - |
46 | #include <qvarlengtharray.h> | - |
47 | #include <qdebug.h> | - |
48 | | - |
49 | #include <algorithm> | - |
50 | | - |
51 | QT_BEGIN_NAMESPACE | - |
52 | | - |
53 | | - |
54 | | - |
55 | typedef qint64 Fixed64; | - |
56 | static never executed: return (Fixed64)i * 256; inline Fixed64 toFixed(int i) { return (Fixed64)i * 256; }never executed: return (Fixed64)i * 256; | 0 |
57 | static inline int fRound(Fixed64 i) { | - |
58 | return (i % 256 < 128) ? i / 256 : 1 + i / 256; never executed: return (i % 256 < 128) ? i / 256 : 1 + i / 256; | 0 |
59 | } | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
76 | void qGeomCalc(QVector<QLayoutStruct> &chain, int start, int count, | - |
77 | int pos, int space, int spacer) | - |
78 | { | - |
79 | int cHint = 0; | - |
80 | int cMin = 0; | - |
81 | int cMax = 0; | - |
82 | int sumStretch = 0; | - |
83 | int sumSpacing = 0; | - |
84 | int expandingCount = 0; | - |
85 | | - |
86 | bool allEmptyNonstretch = true; | - |
87 | int pendingSpacing = -1; | - |
88 | int spacerCount = 0; | - |
89 | int i; | - |
90 | | - |
91 | for (i = start; i < start + count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
92 | QLayoutStruct *data = &chain[i]; | - |
93 | | - |
94 | data->done = false; | - |
95 | cHint += data->smartSizeHint(); | - |
96 | cMin += data->minimumSize; | - |
97 | cMax += data->maximumSize; | - |
98 | sumStretch += data->stretch; | - |
99 | if (!data->empty) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | if (pendingSpacing >= 0) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
105 | sumSpacing += pendingSpacing; | - |
106 | ++spacerCount; | - |
107 | } never executed: end of block | 0 |
108 | pendingSpacing = data->effectiveSpacer(spacer); | - |
109 | } never executed: end of block | 0 |
110 | if (data->expansive)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
111 | expandingCount++; never executed: expandingCount++; | 0 |
112 | allEmptyNonstretch = allEmptyNonstretch && data->empty && !data->expansive && data->stretch <= 0;TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
113 | } never executed: end of block | 0 |
114 | | - |
115 | int extraspace = 0; | - |
116 | | - |
117 | if (space < cMin + sumSpacing) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
118 | | - |
119 | | - |
120 | | - |
121 | | - |
122 | int minSize = cMin + sumSpacing; | - |
123 | | - |
124 | | - |
125 | if (spacer >= 0) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
126 | spacer = minSize > 0 ? spacer * space / minSize : 0;TRUE | never evaluated | FALSE | never evaluated |
| 0 |
127 | sumSpacing = spacer * spacerCount; | - |
128 | } never executed: end of block | 0 |
129 | | - |
130 | QVarLengthArray<int, 32> minimumSizes; | - |
131 | minimumSizes.reserve(count); | - |
132 | | - |
133 | for (i = start; i < start + count; i++)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
134 | minimumSizes << chain.at(i).minimumSize; never executed: minimumSizes << chain.at(i).minimumSize; | 0 |
135 | | - |
136 | std::sort(minimumSizes.begin(), minimumSizes.end()); | - |
137 | | - |
138 | int space_left = space - sumSpacing; | - |
139 | | - |
140 | int sum = 0; | - |
141 | int idx = 0; | - |
142 | int space_used=0; | - |
143 | int current = 0; | - |
144 | while (idx < count && space_used < space_left) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
145 | current = minimumSizes.at(idx); | - |
146 | space_used = sum + current * (count - idx); | - |
147 | sum += current; | - |
148 | ++idx; | - |
149 | } never executed: end of block | 0 |
150 | --idx; | - |
151 | int deficit = space_used - space_left; | - |
152 | | - |
153 | int items = count - idx; | - |
154 | | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | int deficitPerItem = deficit/items; | - |
160 | int remainder = deficit % items; | - |
161 | int maxval = current - deficitPerItem; | - |
162 | | - |
163 | int rest = 0; | - |
164 | for (i = start; i < start + count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
165 | int maxv = maxval; | - |
166 | rest += remainder; | - |
167 | if (rest >= items) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
168 | maxv--; | - |
169 | rest-=items; | - |
170 | } never executed: end of block | 0 |
171 | QLayoutStruct *data = &chain[i]; | - |
172 | data->size = qMin(data->minimumSize, maxv); | - |
173 | data->done = true; | - |
174 | } never executed: end of block | 0 |
175 | } else if (space < cHint + sumSpacing) { never executed: end of block TRUE | never evaluated | FALSE | never evaluated |
| 0 |
176 | | - |
177 | | - |
178 | | - |
179 | | - |
180 | | - |
181 | | - |
182 | int n = count; | - |
183 | int space_left = space - sumSpacing; | - |
184 | int overdraft = cHint - space_left; | - |
185 | | - |
186 | | - |
187 | for (i = start; i < start + count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
188 | QLayoutStruct *data = &chain[i]; | - |
189 | if (!data->doneTRUE | never evaluated | FALSE | never evaluated |
| 0 |
190 | && data->minimumSize >= data->smartSizeHint()) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
191 | data->size = data->smartSizeHint(); | - |
192 | data->done = true; | - |
193 | space_left -= data->smartSizeHint(); | - |
194 | | - |
195 | n--; | - |
196 | } never executed: end of block | 0 |
197 | } never executed: end of block | 0 |
198 | bool finished = n == 0; | - |
199 | while (!finished) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
200 | finished = true; | - |
201 | Fixed64 fp_over = toFixed(overdraft); | - |
202 | Fixed64 fp_w = 0; | - |
203 | | - |
204 | for (i = start; i < start+count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
205 | QLayoutStruct *data = &chain[i]; | - |
206 | if (data->done)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
207 | continue; never executed: continue; | 0 |
208 | | - |
209 | fp_w += fp_over / n; | - |
210 | | - |
211 | | - |
212 | int w = fRound(fp_w); | - |
213 | data->size = data->smartSizeHint() - w; | - |
214 | fp_w -= toFixed(w); | - |
215 | if (data->size < data->minimumSize) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
216 | data->done = true; | - |
217 | data->size = data->minimumSize; | - |
218 | finished = false; | - |
219 | overdraft -= data->smartSizeHint() - data->minimumSize; | - |
220 | | - |
221 | n--; | - |
222 | break; never executed: break; | 0 |
223 | } | - |
224 | } never executed: end of block | 0 |
225 | } never executed: end of block | 0 |
226 | } else { never executed: end of block | 0 |
227 | int n = count; | - |
228 | int space_left = space - sumSpacing; | - |
229 | | - |
230 | for (i = start; i < start + count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
231 | QLayoutStruct *data = &chain[i]; | - |
232 | if (!data->doneTRUE | never evaluated | FALSE | never evaluated |
| 0 |
233 | && (data->maximumSize <= data->smartSizeHint()TRUE | never evaluated | FALSE | never evaluated |
| 0 |
234 | || (!allEmptyNonstretch && data->empty &&TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
235 | !data->expansive && data->stretch == 0))) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
236 | data->size = data->smartSizeHint(); | - |
237 | data->done = true; | - |
238 | space_left -= data->size; | - |
239 | sumStretch -= data->stretch; | - |
240 | if (data->expansive)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
241 | expandingCount--; never executed: expandingCount--; | 0 |
242 | n--; | - |
243 | } never executed: end of block | 0 |
244 | } never executed: end of block | 0 |
245 | extraspace = space_left; | - |
246 | | - |
247 | | - |
248 | | - |
249 | | - |
250 | | - |
251 | | - |
252 | | - |
253 | | - |
254 | | - |
255 | | - |
256 | | - |
257 | int surplus, deficit; | - |
258 | do { | - |
259 | surplus = deficit = 0; | - |
260 | Fixed64 fp_space = toFixed(space_left); | - |
261 | Fixed64 fp_w = 0; | - |
262 | for (i = start; i < start + count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
263 | QLayoutStruct *data = &chain[i]; | - |
264 | if (data->done)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
265 | continue; never executed: continue; | 0 |
266 | extraspace = 0; | - |
267 | if (sumStretch > 0) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
268 | fp_w += (fp_space * data->stretch) / sumStretch; | - |
269 | } else if (expandingCount > 0) { never executed: end of block TRUE | never evaluated | FALSE | never evaluated |
| 0 |
270 | fp_w += (fp_space * (data->expansive ? 1 : 0)) / expandingCount; | - |
271 | } else { never executed: end of block | 0 |
272 | fp_w += fp_space * 1 / n; | - |
273 | } never executed: end of block | 0 |
274 | int w = fRound(fp_w); | - |
275 | data->size = w; | - |
276 | fp_w -= toFixed(w); | - |
277 | if (w < data->smartSizeHint()) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
278 | deficit += data->smartSizeHint() - w; | - |
279 | } else if (w > data->maximumSize) { never executed: end of block TRUE | never evaluated | FALSE | never evaluated |
| 0 |
280 | surplus += w - data->maximumSize; | - |
281 | } never executed: end of block | 0 |
282 | } never executed: end of block | 0 |
283 | if (deficit > 0 && surplus <= deficit) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
284 | | - |
285 | for (i = start; i < start+count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
286 | QLayoutStruct *data = &chain[i]; | - |
287 | if (!data->done && data->size < data->smartSizeHint()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
288 | data->size = data->smartSizeHint(); | - |
289 | data->done = true; | - |
290 | space_left -= data->smartSizeHint(); | - |
291 | sumStretch -= data->stretch; | - |
292 | if (data->expansive)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
293 | expandingCount--; never executed: expandingCount--; | 0 |
294 | n--; | - |
295 | } never executed: end of block | 0 |
296 | } never executed: end of block | 0 |
297 | } never executed: end of block | 0 |
298 | if (surplus > 0 && surplus >= deficit) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
299 | | - |
300 | for (i = start; i < start + count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
301 | QLayoutStruct *data = &chain[i]; | - |
302 | if (!data->done && data->size > data->maximumSize) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
303 | data->size = data->maximumSize; | - |
304 | data->done = true; | - |
305 | space_left -= data->maximumSize; | - |
306 | sumStretch -= data->stretch; | - |
307 | if (data->expansive)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
308 | expandingCount--; never executed: expandingCount--; | 0 |
309 | n--; | - |
310 | } never executed: end of block | 0 |
311 | } never executed: end of block | 0 |
312 | } never executed: end of block | 0 |
313 | } while (n > 0 && surplus != deficit); never executed: end of block TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
314 | if (n == 0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
315 | extraspace = space_left; never executed: extraspace = space_left; | 0 |
316 | } never executed: end of block | 0 |
317 | | - |
318 | | - |
319 | | - |
320 | | - |
321 | | - |
322 | | - |
323 | | - |
324 | int extra = extraspace / (spacerCount + 2); | - |
325 | int p = pos + extra; | - |
326 | for (i = start; i < start+count; i++) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
327 | QLayoutStruct *data = &chain[i]; | - |
328 | data->pos = p; | - |
329 | p += data->size; | - |
330 | if (!data->empty)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
331 | p += data->effectiveSpacer(spacer) + extra; never executed: p += data->effectiveSpacer(spacer) + extra; | 0 |
332 | } never executed: end of block | 0 |
333 | | - |
334 | #ifdef QLAYOUT_EXTRA_DEBUG | - |
335 | qDebug() << "qGeomCalc" << "start" << start << "count" << count << "pos" << pos | - |
336 | << "space" << space << "spacer" << spacer; | - |
337 | for (i = start; i < start + count; ++i) { | - |
338 | qDebug() << i << ':' << chain[i].minimumSize << chain[i].smartSizeHint() | - |
339 | << chain[i].maximumSize << "stretch" << chain[i].stretch | - |
340 | << "empty" << chain[i].empty << "expansive" << chain[i].expansive | - |
341 | << "spacing" << chain[i].spacing; | - |
342 | qDebug() << "result pos" << chain[i].pos << "size" << chain[i].size; | - |
343 | } | - |
344 | #endif | - |
345 | } never executed: end of block | 0 |
346 | | - |
347 | Q_WIDGETS_EXPORT QSize qSmartMinSize(const QSize &sizeHint, const QSize &minSizeHint, | - |
348 | const QSize &minSize, const QSize &maxSize, | - |
349 | const QSizePolicy &sizePolicy) | - |
350 | { | - |
351 | QSize s(0, 0); | - |
352 | | - |
353 | if (sizePolicy.horizontalPolicy() != QSizePolicy::Ignored) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
354 | if (sizePolicy.horizontalPolicy() & QSizePolicy::ShrinkFlag)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
355 | s.setWidth(minSizeHint.width()); never executed: s.setWidth(minSizeHint.width()); | 0 |
356 | else | - |
357 | s.setWidth(qMax(sizeHint.width(), minSizeHint.width())); never executed: s.setWidth(qMax(sizeHint.width(), minSizeHint.width())); | 0 |
358 | } | - |
359 | | - |
360 | if (sizePolicy.verticalPolicy() != QSizePolicy::Ignored) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
361 | if (sizePolicy.verticalPolicy() & QSizePolicy::ShrinkFlag) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
362 | s.setHeight(minSizeHint.height()); | - |
363 | } else { never executed: end of block | 0 |
364 | s.setHeight(qMax(sizeHint.height(), minSizeHint.height())); | - |
365 | } never executed: end of block | 0 |
366 | } | - |
367 | | - |
368 | s = s.boundedTo(maxSize); | - |
369 | if (minSize.width() > 0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
370 | s.setWidth(minSize.width()); never executed: s.setWidth(minSize.width()); | 0 |
371 | if (minSize.height() > 0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
372 | s.setHeight(minSize.height()); never executed: s.setHeight(minSize.height()); | 0 |
373 | | - |
374 | return s.expandedTo(QSize(0,0)); never executed: return s.expandedTo(QSize(0,0)); | 0 |
375 | } | - |
376 | | - |
377 | Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidgetItem *i) | - |
378 | { | - |
379 | QWidget *w = const_cast<QWidgetItem *>(i)->widget(); | - |
380 | return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), never executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); | 0 |
381 | w->minimumSize(), w->maximumSize(), never executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); | 0 |
382 | w->sizePolicy()); never executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); | 0 |
383 | } | - |
384 | | - |
385 | Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidget *w) | - |
386 | { | - |
387 | return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), never executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); | 0 |
388 | w->minimumSize(), w->maximumSize(), never executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); | 0 |
389 | w->sizePolicy()); never executed: return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(), w->minimumSize(), w->maximumSize(), w->sizePolicy()); | 0 |
390 | } | - |
391 | | - |
392 | Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QSize &sizeHint, | - |
393 | const QSize &minSize, const QSize &maxSize, | - |
394 | const QSizePolicy &sizePolicy, Qt::Alignment align) | - |
395 | { | - |
396 | if (align & Qt::AlignHorizontal_Mask && align & Qt::AlignVertical_Mask)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
397 | return QSize(QLAYOUTSIZE_MAX, QLAYOUTSIZE_MAX); never executed: return QSize(QLAYOUTSIZE_MAX, QLAYOUTSIZE_MAX); | 0 |
398 | QSize s = maxSize; | - |
399 | QSize hint = sizeHint.expandedTo(minSize); | - |
400 | if (s.width() == QWIDGETSIZE_MAX && !(align & Qt::AlignHorizontal_Mask))TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
401 | if (!(sizePolicy.horizontalPolicy() & QSizePolicy::GrowFlag))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
402 | s.setWidth(hint.width()); never executed: s.setWidth(hint.width()); | 0 |
403 | | - |
404 | if (s.height() == QWIDGETSIZE_MAX && !(align & Qt::AlignVertical_Mask))TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
405 | if (!(sizePolicy.verticalPolicy() & QSizePolicy::GrowFlag))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
406 | s.setHeight(hint.height()); never executed: s.setHeight(hint.height()); | 0 |
407 | | - |
408 | if (align & Qt::AlignHorizontal_Mask)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
409 | s.setWidth(QLAYOUTSIZE_MAX); never executed: s.setWidth(QLAYOUTSIZE_MAX); | 0 |
410 | if (align & Qt::AlignVertical_Mask)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
411 | s.setHeight(QLAYOUTSIZE_MAX); never executed: s.setHeight(QLAYOUTSIZE_MAX); | 0 |
412 | return s; never executed: return s; | 0 |
413 | } | - |
414 | | - |
415 | Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align) | - |
416 | { | - |
417 | QWidget *w = const_cast<QWidgetItem*>(i)->widget(); | - |
418 | | - |
419 | return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), never executed: return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), w->sizePolicy(), align); | 0 |
420 | w->sizePolicy(), align); never executed: return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), w->sizePolicy(), align); | 0 |
421 | } | - |
422 | | - |
423 | Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align) | - |
424 | { | - |
425 | return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), never executed: return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), w->sizePolicy(), align); | 0 |
426 | w->sizePolicy(), align); never executed: return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(), w->sizePolicy(), align); | 0 |
427 | } | - |
428 | | - |
429 | Q_WIDGETS_EXPORT int qSmartSpacing(const QLayout *layout, QStyle::PixelMetric pm) | - |
430 | { | - |
431 | QObject *parent = layout->parent(); | - |
432 | if (!parent) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
433 | return -1; never executed: return -1; | 0 |
434 | } else if (parent->isWidgetType()) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
435 | QWidget *pw = static_cast<QWidget *>(parent); | - |
436 | return pw->style()->pixelMetric(pm, 0, pw); never executed: return pw->style()->pixelMetric(pm, 0, pw); | 0 |
437 | } else { | - |
438 | return static_cast<QLayout *>(parent)->spacing(); never executed: return static_cast<QLayout *>(parent)->spacing(); | 0 |
439 | } | - |
440 | } | - |
441 | | - |
442 | QT_END_NAMESPACE | - |
| | |