qstylesheetstyle.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstylesheetstyle.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8using namespace QCss;-
9-
10-
11class QStyleSheetStylePrivate : public QWindowsStylePrivate-
12{-
13 inline QStyleSheetStyle* q_func() { return static_cast<QStyleSheetStyle *>(q_ptr); } inline const QStyleSheetStyle* q_func() const { return static_cast<const QStyleSheetStyle *>(q_ptr); } friend class QStyleSheetStyle;-
14public:-
15 QStyleSheetStylePrivate() { }-
16};-
17-
18-
19static QStyleSheetStyleCaches *styleSheetCaches = 0;-
20static const QStyleSheetStyle *globalStyleSheetStyle = 0;-
21class QStyleSheetStyleRecursionGuard-
22{-
23 public:-
24 QStyleSheetStyleRecursionGuard(const QStyleSheetStyle *that)-
25 : guarded(globalStyleSheetStyle == 0)-
26 {-
27 if (guarded
guardedDescription
TRUEnever evaluated
FALSEnever evaluated
) globalStyleSheetStyle = that;
never executed: globalStyleSheetStyle = that;
0
28 }
never executed: end of block
0
29 ~QStyleSheetStyleRecursionGuard() { if (guarded
guardedDescription
TRUEnever evaluated
FALSEnever evaluated
) globalStyleSheetStyle = 0;
never executed: globalStyleSheetStyle = 0;
}
never executed: end of block
0
30 bool guarded;-
31};-
32-
33-
34-
35-
36-
37-
38enum PseudoElement {-
39 PseudoElement_None,-
40 PseudoElement_DownArrow,-
41 PseudoElement_UpArrow,-
42 PseudoElement_LeftArrow,-
43 PseudoElement_RightArrow,-
44 PseudoElement_Indicator,-
45 PseudoElement_ExclusiveIndicator,-
46 PseudoElement_PushButtonMenuIndicator,-
47 PseudoElement_ComboBoxDropDown,-
48 PseudoElement_ComboBoxArrow,-
49 PseudoElement_Item,-
50 PseudoElement_SpinBoxUpButton,-
51 PseudoElement_SpinBoxUpArrow,-
52 PseudoElement_SpinBoxDownButton,-
53 PseudoElement_SpinBoxDownArrow,-
54 PseudoElement_GroupBoxTitle,-
55 PseudoElement_GroupBoxIndicator,-
56 PseudoElement_ToolButtonMenu,-
57 PseudoElement_ToolButtonMenuArrow,-
58 PseudoElement_ToolButtonDownArrow,-
59 PseudoElement_ToolBoxTab,-
60 PseudoElement_ScrollBarSlider,-
61 PseudoElement_ScrollBarAddPage,-
62 PseudoElement_ScrollBarSubPage,-
63 PseudoElement_ScrollBarAddLine,-
64 PseudoElement_ScrollBarSubLine,-
65 PseudoElement_ScrollBarFirst,-
66 PseudoElement_ScrollBarLast,-
67 PseudoElement_ScrollBarUpArrow,-
68 PseudoElement_ScrollBarDownArrow,-
69 PseudoElement_ScrollBarLeftArrow,-
70 PseudoElement_ScrollBarRightArrow,-
71 PseudoElement_SplitterHandle,-
72 PseudoElement_ToolBarHandle,-
73 PseudoElement_ToolBarSeparator,-
74 PseudoElement_MenuScroller,-
75 PseudoElement_MenuTearoff,-
76 PseudoElement_MenuCheckMark,-
77 PseudoElement_MenuSeparator,-
78 PseudoElement_MenuIcon,-
79 PseudoElement_MenuRightArrow,-
80 PseudoElement_TreeViewBranch,-
81 PseudoElement_HeaderViewSection,-
82 PseudoElement_HeaderViewUpArrow,-
83 PseudoElement_HeaderViewDownArrow,-
84 PseudoElement_ProgressBarChunk,-
85 PseudoElement_TabBarTab,-
86 PseudoElement_TabBarScroller,-
87 PseudoElement_TabBarTear,-
88 PseudoElement_SliderGroove,-
89 PseudoElement_SliderHandle,-
90 PseudoElement_SliderAddPage,-
91 PseudoElement_SliderSubPage,-
92 PseudoElement_SliderTickmark,-
93 PseudoElement_TabWidgetPane,-
94 PseudoElement_TabWidgetTabBar,-
95 PseudoElement_TabWidgetLeftCorner,-
96 PseudoElement_TabWidgetRightCorner,-
97 PseudoElement_DockWidgetTitle,-
98 PseudoElement_DockWidgetCloseButton,-
99 PseudoElement_DockWidgetFloatButton,-
100 PseudoElement_DockWidgetSeparator,-
101 PseudoElement_MdiCloseButton,-
102 PseudoElement_MdiMinButton,-
103 PseudoElement_MdiNormalButton,-
104 PseudoElement_TitleBar,-
105 PseudoElement_TitleBarCloseButton,-
106 PseudoElement_TitleBarMinButton,-
107 PseudoElement_TitleBarMaxButton,-
108 PseudoElement_TitleBarShadeButton,-
109 PseudoElement_TitleBarUnshadeButton,-
110 PseudoElement_TitleBarNormalButton,-
111 PseudoElement_TitleBarContextHelpButton,-
112 PseudoElement_TitleBarSysMenu,-
113 PseudoElement_ViewItem,-
114 PseudoElement_ViewItemIcon,-
115 PseudoElement_ViewItemText,-
116 PseudoElement_ViewItemIndicator,-
117 PseudoElement_ScrollAreaCorner,-
118 PseudoElement_TabBarTabCloseButton,-
119 NumPseudoElements-
120};-
121-
122struct PseudoElementInfo {-
123 QStyle::SubControl subControl;-
124 const char name[19];-
125};-
126-
127static const PseudoElementInfo knownPseudoElements[NumPseudoElements] = {-
128 { QStyle::SC_None, "" },-
129 { QStyle::SC_None, "down-arrow" },-
130 { QStyle::SC_None, "up-arrow" },-
131 { QStyle::SC_None, "left-arrow" },-
132 { QStyle::SC_None, "right-arrow" },-
133 { QStyle::SC_None, "indicator" },-
134 { QStyle::SC_None, "indicator" },-
135 { QStyle::SC_None, "menu-indicator" },-
136 { QStyle::SC_ComboBoxArrow, "drop-down" },-
137 { QStyle::SC_ComboBoxArrow, "down-arrow" },-
138 { QStyle::SC_None, "item" },-
139 { QStyle::SC_SpinBoxUp, "up-button" },-
140 { QStyle::SC_SpinBoxUp, "up-arrow" },-
141 { QStyle::SC_SpinBoxDown, "down-button" },-
142 { QStyle::SC_SpinBoxDown, "down-arrow" },-
143 { QStyle::SC_GroupBoxLabel, "title" },-
144 { QStyle::SC_GroupBoxCheckBox, "indicator" },-
145 { QStyle::SC_ToolButtonMenu, "menu-button" },-
146 { QStyle::SC_ToolButtonMenu, "menu-arrow" },-
147 { QStyle::SC_None, "menu-indicator" },-
148 { QStyle::SC_None, "tab" },-
149 { QStyle::SC_ScrollBarSlider, "handle" },-
150 { QStyle::SC_ScrollBarAddPage, "add-page" },-
151 { QStyle::SC_ScrollBarSubPage, "sub-page" },-
152 { QStyle::SC_ScrollBarAddLine, "add-line" },-
153 { QStyle::SC_ScrollBarSubLine, "sub-line" },-
154 { QStyle::SC_ScrollBarFirst, "first" },-
155 { QStyle::SC_ScrollBarLast, "last" },-
156 { QStyle::SC_ScrollBarSubLine, "up-arrow" },-
157 { QStyle::SC_ScrollBarAddLine, "down-arrow" },-
158 { QStyle::SC_ScrollBarSubLine, "left-arrow" },-
159 { QStyle::SC_ScrollBarAddLine, "right-arrow" },-
160 { QStyle::SC_None, "handle" },-
161 { QStyle::SC_None, "handle" },-
162 { QStyle::SC_None, "separator" },-
163 { QStyle::SC_None, "scroller" },-
164 { QStyle::SC_None, "tearoff" },-
165 { QStyle::SC_None, "indicator" },-
166 { QStyle::SC_None, "separator" },-
167 { QStyle::SC_None, "icon" },-
168 { QStyle::SC_None, "right-arrow" },-
169 { QStyle::SC_None, "branch" },-
170 { QStyle::SC_None, "section" },-
171 { QStyle::SC_None, "down-arrow" },-
172 { QStyle::SC_None, "up-arrow" },-
173 { QStyle::SC_None, "chunk" },-
174 { QStyle::SC_None, "tab" },-
175 { QStyle::SC_None, "scroller" },-
176 { QStyle::SC_None, "tear" },-
177 { QStyle::SC_SliderGroove, "groove" },-
178 { QStyle::SC_SliderHandle, "handle" },-
179 { QStyle::SC_None, "add-page" },-
180 { QStyle::SC_None, "sub-page"},-
181 { QStyle::SC_SliderTickmarks, "tick-mark" },-
182 { QStyle::SC_None, "pane" },-
183 { QStyle::SC_None, "tab-bar" },-
184 { QStyle::SC_None, "left-corner" },-
185 { QStyle::SC_None, "right-corner" },-
186 { QStyle::SC_None, "title" },-
187 { QStyle::SC_None, "close-button" },-
188 { QStyle::SC_None, "float-button" },-
189 { QStyle::SC_None, "separator" },-
190 { QStyle::SC_MdiCloseButton, "close-button" },-
191 { QStyle::SC_MdiMinButton, "minimize-button" },-
192 { QStyle::SC_MdiNormalButton, "normal-button" },-
193 { QStyle::SC_TitleBarLabel, "title" },-
194 { QStyle::SC_TitleBarCloseButton, "close-button" },-
195 { QStyle::SC_TitleBarMinButton, "minimize-button" },-
196 { QStyle::SC_TitleBarMaxButton, "maximize-button" },-
197 { QStyle::SC_TitleBarShadeButton, "shade-button" },-
198 { QStyle::SC_TitleBarUnshadeButton, "unshade-button" },-
199 { QStyle::SC_TitleBarNormalButton, "normal-button" },-
200 { QStyle::SC_TitleBarContextHelpButton, "contexthelp-button" },-
201 { QStyle::SC_TitleBarSysMenu, "sys-menu" },-
202 { QStyle::SC_None, "item" },-
203 { QStyle::SC_None, "icon" },-
204 { QStyle::SC_None, "text" },-
205 { QStyle::SC_None, "indicator" },-
206 { QStyle::SC_None, "corner" },-
207 { QStyle::SC_None, "close-button" },-
208};-
209-
210-
211struct QStyleSheetBorderImageData : public QSharedData-
212{-
213 QStyleSheetBorderImageData()-
214 : horizStretch(QCss::TileMode_Unknown), vertStretch(QCss::TileMode_Unknown)-
215 {-
216 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
217 cuts[i] = -1;
never executed: cuts[i] = -1;
0
218 }
never executed: end of block
0
219 int cuts[4];-
220 QPixmap pixmap;-
221 QImage image;-
222 QCss::TileMode horizStretch, vertStretch;-
223};-
224-
225struct QStyleSheetBackgroundData : public QSharedData-
226{-
227 QStyleSheetBackgroundData(const QBrush& b, const QPixmap& p, QCss::Repeat r,-
228 Qt::Alignment a, QCss::Origin o, Attachment t, QCss::Origin c)-
229 : brush(b), pixmap(p), repeat(r), position(a), origin(o), attachment(t), clip(c) { }
never executed: end of block
0
230-
231 bool isTransparent() const {-
232 if (brush.style() != Qt::NoBrush
brush.style() != Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
233 return
never executed: return !brush.isOpaque();
!brush.isOpaque();
never executed: return !brush.isOpaque();
0
234 return
never executed: return pixmap.isNull() ? false : pixmap.hasAlpha();
pixmap.isNull() ? false : pixmap.hasAlpha();
never executed: return pixmap.isNull() ? false : pixmap.hasAlpha();
0
235 }-
236 QBrush brush;-
237 QPixmap pixmap;-
238 QCss::Repeat repeat;-
239 Qt::Alignment position;-
240 QCss::Origin origin;-
241 QCss::Attachment attachment;-
242 QCss::Origin clip;-
243};-
244-
245struct QStyleSheetBorderData : public QSharedData-
246{-
247 QStyleSheetBorderData() : bi(0)-
248 {-
249 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
250 borders[i] = 0;-
251 styles[i] = QCss::BorderStyle_None;-
252 }
never executed: end of block
0
253 }
never executed: end of block
0
254-
255 QStyleSheetBorderData(int *b, QBrush *c, QCss::BorderStyle *s, QSize *r) : bi(0)-
256 {-
257 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
258 borders[i] = b[i];-
259 styles[i] = s[i];-
260 colors[i] = c[i];-
261 radii[i] = r[i];-
262 }
never executed: end of block
0
263 }
never executed: end of block
0
264-
265 int borders[4];-
266 QBrush colors[4];-
267 QCss::BorderStyle styles[4];-
268 QSize radii[4];-
269-
270 const QStyleSheetBorderImageData *borderImage() const-
271 { return
never executed: return bi;
bi;
never executed: return bi;
}
0
272 bool hasBorderImage() const { return
never executed: return bi!=0;
bi!=0;
never executed: return bi!=0;
}
0
273-
274 QSharedDataPointer<QStyleSheetBorderImageData> bi;-
275-
276 bool isOpaque() const-
277 {-
278 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
279 if (styles[i] == QCss::BorderStyle_Native
styles[i] == Q...erStyle_NativeDescription
TRUEnever evaluated
FALSEnever evaluated
|| styles[i] == QCss::BorderStyle_None
styles[i] == Q...rderStyle_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
280 continue;
never executed: continue;
0
281 if (styles[i] >= QCss::BorderStyle_Dotted
styles[i] >= Q...erStyle_DottedDescription
TRUEnever evaluated
FALSEnever evaluated
&& styles[i] <= QCss::BorderStyle_DotDotDash
styles[i] <= Q...yle_DotDotDashDescription
TRUEnever evaluated
FALSEnever evaluated
0
282 && styles[i] != BorderStyle_Solid
styles[i] != BorderStyle_SolidDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
283 return
never executed: return false;
false;
never executed: return false;
0
284 if (!colors[i].isOpaque()
!colors[i].isOpaque()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
285 return
never executed: return false;
false;
never executed: return false;
0
286 if (!radii[i].isEmpty()
!radii[i].isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
287 return
never executed: return false;
false;
never executed: return false;
0
288 }
never executed: end of block
0
289 if (bi != 0
bi != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& bi->pixmap.hasAlpha()
bi->pixmap.hasAlpha()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
290 return
never executed: return false;
false;
never executed: return false;
0
291 return
never executed: return true;
true;
never executed: return true;
0
292 }-
293};-
294-
295-
296struct QStyleSheetOutlineData : public QStyleSheetBorderData-
297{-
298 QStyleSheetOutlineData()-
299 {-
300 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
301 offsets[i] = 0;-
302 }
never executed: end of block
0
303 }
never executed: end of block
0
304-
305 QStyleSheetOutlineData(int *b, QBrush *c, QCss::BorderStyle *s, QSize *r, int *o)-
306 : QStyleSheetBorderData(b, c, s, r)-
307 {-
308 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
309 offsets[i] = o[i];-
310 }
never executed: end of block
0
311 }
never executed: end of block
0
312-
313 int offsets[4];-
314};-
315-
316struct QStyleSheetBoxData : public QSharedData-
317{-
318 QStyleSheetBoxData(int *m, int *p, int s) : spacing(s)-
319 {-
320 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
321 margins[i] = m[i];-
322 paddings[i] = p[i];-
323 }
never executed: end of block
0
324 }
never executed: end of block
0
325-
326 int margins[4];-
327 int paddings[4];-
328-
329 int spacing;-
330};-
331-
332struct QStyleSheetPaletteData : public QSharedData-
333{-
334 QStyleSheetPaletteData(const QBrush &fg, const QBrush &sfg, const QBrush &sbg,-
335 const QBrush &abg)-
336 : foreground(fg), selectionForeground(sfg), selectionBackground(sbg),-
337 alternateBackground(abg) { }
never executed: end of block
0
338-
339 QBrush foreground;-
340 QBrush selectionForeground;-
341 QBrush selectionBackground;-
342 QBrush alternateBackground;-
343};-
344-
345struct QStyleSheetGeometryData : public QSharedData-
346{-
347 QStyleSheetGeometryData(int w, int h, int minw, int minh, int maxw, int maxh)-
348 : minWidth(minw), minHeight(minh), width(w), height(h), maxWidth(maxw), maxHeight(maxh) { }
never executed: end of block
0
349-
350 int minWidth, minHeight, width, height, maxWidth, maxHeight;-
351};-
352-
353struct QStyleSheetPositionData : public QSharedData-
354{-
355 QStyleSheetPositionData(int l, int t, int r, int b, Origin o, Qt::Alignment p, QCss::PositionMode m, Qt::Alignment a = 0)-
356 : left(l), top(t), bottom(b), right(r), origin(o), position(p), mode(m), textAlignment(a) { }
never executed: end of block
0
357-
358 int left, top, bottom, right;-
359 Origin origin;-
360 Qt::Alignment position;-
361 QCss::PositionMode mode;-
362 Qt::Alignment textAlignment;-
363};-
364-
365struct QStyleSheetImageData : public QSharedData-
366{-
367 QStyleSheetImageData(const QIcon &i, Qt::Alignment a, const QSize &sz)-
368 : icon(i), alignment(a), size(sz) { }
never executed: end of block
0
369-
370 QIcon icon;-
371 Qt::Alignment alignment;-
372 QSize size;-
373};-
374-
375class QRenderRule-
376{-
377public:-
378 QRenderRule() : features(0), hasFont(false), pal(0), b(0), bg(0), bd(0), ou(0), geo(0), p(0), img(0), clipset(0) { }
never executed: end of block
0
379 QRenderRule(const QVector<QCss::Declaration> &, const QObject *);-
380-
381 QRect borderRect(const QRect &r) const;-
382 QRect outlineRect(const QRect &r) const;-
383 QRect paddingRect(const QRect &r) const;-
384 QRect contentsRect(const QRect &r) const;-
385-
386 enum { Margin = 1, Border = 2, Padding = 4, All=Margin|Border|Padding };-
387 QRect boxRect(const QRect &r, int flags = All) const;-
388 QSize boxSize(const QSize &s, int flags = All) const;-
389 QRect originRect(const QRect &rect, Origin origin) const;-
390-
391 QPainterPath borderClip(QRect rect);-
392 void drawBorder(QPainter *, const QRect&);-
393 void drawOutline(QPainter *, const QRect&);-
394 void drawBorderImage(QPainter *, const QRect&);-
395 void drawBackground(QPainter *, const QRect&, const QPoint& = QPoint(0, 0));-
396 void drawBackgroundImage(QPainter *, const QRect&, QPoint = QPoint(0, 0));-
397 void drawFrame(QPainter *, const QRect&);-
398 void drawImage(QPainter *p, const QRect &rect);-
399 void drawRule(QPainter *, const QRect&);-
400 void configurePalette(QPalette *, QPalette::ColorGroup, const QWidget *, bool);-
401 void configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette::ColorRole br);-
402-
403 const QStyleSheetPaletteData *palette() const { return
never executed: return pal;
pal;
never executed: return pal;
}
0
404 const QStyleSheetBoxData *box() const { return
never executed: return b;
b;
never executed: return b;
}
0
405 const QStyleSheetBackgroundData *background() const { return
never executed: return bg;
bg;
never executed: return bg;
}
0
406 const QStyleSheetBorderData *border() const { return
never executed: return bd;
bd;
never executed: return bd;
}
0
407 const QStyleSheetOutlineData *outline() const { return
never executed: return ou;
ou;
never executed: return ou;
}
0
408 const QStyleSheetGeometryData *geometry() const { return
never executed: return geo;
geo;
never executed: return geo;
}
0
409 const QStyleSheetPositionData *position() const { return
never executed: return p;
p;
never executed: return p;
}
0
410-
411 bool hasPalette() const { return
never executed: return pal != 0;
pal != 0;
never executed: return pal != 0;
}
0
412 bool hasBackground() const { return
never executed: return bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush);
bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush);
never executed: return bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush);
}
0
413 bool hasGradientBackground() const { return
never executed: return bg && bg->brush.style() >= Qt::LinearGradientPattern && bg->brush.style() <= Qt::ConicalGradientPattern;
bg && bg->brush.style() >= Qt::LinearGradientPattern
never executed: return bg && bg->brush.style() >= Qt::LinearGradientPattern && bg->brush.style() <= Qt::ConicalGradientPattern;
0
414 && bg->brush.style() <= Qt::ConicalGradientPattern;
never executed: return bg && bg->brush.style() >= Qt::LinearGradientPattern && bg->brush.style() <= Qt::ConicalGradientPattern;
}
0
415-
416 bool hasNativeBorder() const {-
417 return
never executed: return bd == 0 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native);
bd == 0
never executed: return bd == 0 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native);
0
418 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native);
never executed: return bd == 0 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native);
0
419 }-
420-
421 bool hasNativeOutline() const {-
422 return
never executed: return (ou == 0 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native));
(ou == 0
never executed: return (ou == 0 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native));
0
423 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native));
never executed: return (ou == 0 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native));
0
424 }-
425-
426 bool baseStyleCanDraw() const {-
427 if (!hasBackground()
!hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
|| (background()->brush.style() == Qt::NoBrush
background()->...== Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
&& bg->pixmap.isNull()
bg->pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
428 return
never executed: return true;
true;
never executed: return true;
0
429 if (bg
bgDescription
TRUEnever evaluated
FALSEnever evaluated
&& !bg->pixmap.isNull()
!bg->pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
430 return
never executed: return false;
false;
never executed: return false;
0
431 if (hasGradientBackground()
hasGradientBackground()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
432 return
never executed: return features & StyleFeature_BackgroundGradient;
features & StyleFeature_BackgroundGradient;
never executed: return features & StyleFeature_BackgroundGradient;
0
433 return
never executed: return features & StyleFeature_BackgroundColor;
features & StyleFeature_BackgroundColor;
never executed: return features & StyleFeature_BackgroundColor;
0
434 }-
435-
436 bool hasBox() const { return
never executed: return b != 0;
b != 0;
never executed: return b != 0;
}
0
437 bool hasBorder() const { return
never executed: return bd != 0;
bd != 0;
never executed: return bd != 0;
}
0
438 bool hasOutline() const { return
never executed: return ou != 0;
ou != 0;
never executed: return ou != 0;
}
0
439 bool hasPosition() const { return
never executed: return p != 0;
p != 0;
never executed: return p != 0;
}
0
440 bool hasGeometry() const { return
never executed: return geo != 0;
geo != 0;
never executed: return geo != 0;
}
0
441 bool hasDrawable() const { return
never executed: return !hasNativeBorder() || hasBackground() || hasImage();
!hasNativeBorder() || hasBackground() || hasImage();
never executed: return !hasNativeBorder() || hasBackground() || hasImage();
}
0
442 bool hasImage() const { return
never executed: return img != 0;
img != 0;
never executed: return img != 0;
}
0
443-
444 QSize minimumContentsSize() const-
445 { return
never executed: return geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0);
geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0);
never executed: return geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0);
}
0
446 QSize minimumSize() const-
447 { return
never executed: return boxSize(minimumContentsSize());
boxSize(minimumContentsSize());
never executed: return boxSize(minimumContentsSize());
}
0
448-
449 QSize contentsSize() const-
450 { return
never executed: return geo ? QSize(geo->width, geo->height) : ((img && img->size.isValid()) ? img->size : QSize());
geo ? QSize(geo->width, geo->height)
never executed: return geo ? QSize(geo->width, geo->height) : ((img && img->size.isValid()) ? img->size : QSize());
0
451 : ((img && img->size.isValid()) ? img->size : QSize());
never executed: return geo ? QSize(geo->width, geo->height) : ((img && img->size.isValid()) ? img->size : QSize());
}
0
452 QSize contentsSize(const QSize &sz) const-
453 {-
454 QSize csz = contentsSize();-
455 if (csz.width() == -1
csz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
) csz.setWidth(sz.width());
never executed: csz.setWidth(sz.width());
0
456 if (csz.height() == -1
csz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
) csz.setHeight(sz.height());
never executed: csz.setHeight(sz.height());
0
457 return
never executed: return csz;
csz;
never executed: return csz;
0
458 }-
459 bool hasContentsSize() const-
460 { return
never executed: return (geo && (geo->width != -1 || geo->height != -1)) || (img && img->size.isValid());
(geo && (geo->width != -1 || geo->height != -1)) || (img && img->size.isValid());
never executed: return (geo && (geo->width != -1 || geo->height != -1)) || (img && img->size.isValid());
}
0
461-
462 QSize size() const { return
never executed: return boxSize(contentsSize());
boxSize(contentsSize());
never executed: return boxSize(contentsSize());
}
0
463 QSize size(const QSize &sz) const { return
never executed: return boxSize(contentsSize(sz));
boxSize(contentsSize(sz));
never executed: return boxSize(contentsSize(sz));
}
0
464 QSize adjustSize(const QSize &sz)-
465 {-
466 if (!geo
!geoDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
467 return
never executed: return sz;
sz;
never executed: return sz;
0
468 QSize csz = contentsSize();-
469 if (csz.width() == -1
csz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
) csz.setWidth(sz.width());
never executed: csz.setWidth(sz.width());
0
470 if (csz.height() == -1
csz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
) csz.setHeight(sz.height());
never executed: csz.setHeight(sz.height());
0
471 if (geo->maxWidth != -1
geo->maxWidth != -1Description
TRUEnever evaluated
FALSEnever evaluated
&& csz.width() > geo->maxWidth
csz.width() > geo->maxWidthDescription
TRUEnever evaluated
FALSEnever evaluated
) csz.setWidth(geo->maxWidth);
never executed: csz.setWidth(geo->maxWidth);
0
472 if (geo->maxHeight != -1
geo->maxHeight != -1Description
TRUEnever evaluated
FALSEnever evaluated
&& csz.height() > geo->maxHeight
csz.height() > geo->maxHeightDescription
TRUEnever evaluated
FALSEnever evaluated
) csz.setHeight(geo->maxHeight);
never executed: csz.setHeight(geo->maxHeight);
0
473 csz=csz.expandedTo(QSize(geo->minWidth, geo->minHeight));-
474 return
never executed: return csz;
csz;
never executed: return csz;
0
475 }-
476-
477 bool hasStyleHint(const QString &sh) const { return
never executed: return styleHints.contains(sh);
styleHints.contains(sh);
never executed: return styleHints.contains(sh);
}
0
478 QVariant styleHint(const QString &sh) const { return
never executed: return styleHints.value(sh);
styleHints.value(sh);
never executed: return styleHints.value(sh);
}
0
479-
480 void fixupBorder(int);-
481-
482-
483 void setClip(QPainter *p, const QRect &rect);-
484 void unsetClip(QPainter *);-
485-
486public:-
487 int features;-
488 QBrush defaultBackground;-
489 QFont font;-
490 bool hasFont;-
491-
492 QHash<QString, QVariant> styleHints;-
493-
494 QSharedDataPointer<QStyleSheetPaletteData> pal;-
495 QSharedDataPointer<QStyleSheetBoxData> b;-
496 QSharedDataPointer<QStyleSheetBackgroundData> bg;-
497 QSharedDataPointer<QStyleSheetBorderData> bd;-
498 QSharedDataPointer<QStyleSheetOutlineData> ou;-
499 QSharedDataPointer<QStyleSheetGeometryData> geo;-
500 QSharedDataPointer<QStyleSheetPositionData> p;-
501 QSharedDataPointer<QStyleSheetImageData> img;-
502-
503 int clipset;-
504 QPainterPath clipPath;-
505};-
506template<> class QTypeInfo<QRenderRule > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_MOVABLE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QRenderRule)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QRenderRule >::value, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QRenderRule) }; static inline const char *name() { return "QRenderRule"; } };-
507-
508-
509static const char knownStyleHints[][45] = {-
510 "activate-on-singleclick",-
511 "alignment",-
512 "arrow-keys-navigate-into-children",-
513 "backward-icon",-
514 "button-layout",-
515 "cd-icon",-
516 "combobox-list-mousetracking",-
517 "combobox-popup",-
518 "computer-icon",-
519 "desktop-icon",-
520 "dialog-apply-icon",-
521 "dialog-cancel-icon",-
522 "dialog-close-icon",-
523 "dialog-discard-icon",-
524 "dialog-help-icon",-
525 "dialog-no-icon",-
526 "dialog-ok-icon",-
527 "dialog-open-icon",-
528 "dialog-reset-icon",-
529 "dialog-save-icon",-
530 "dialog-yes-icon",-
531 "dialogbuttonbox-buttons-have-icons",-
532 "directory-closed-icon",-
533 "directory-icon",-
534 "directory-link-icon",-
535 "directory-open-icon",-
536 "dither-disable-text",-
537 "dockwidget-close-icon",-
538 "downarrow-icon",-
539 "dvd-icon",-
540 "etch-disabled-text",-
541 "file-icon",-
542 "file-link-icon",-
543 "filedialog-backward-icon",-
544 "filedialog-contentsview-icon",-
545 "filedialog-detailedview-icon",-
546 "filedialog-end-icon",-
547 "filedialog-infoview-icon",-
548 "filedialog-listview-icon",-
549 "filedialog-new-directory-icon",-
550 "filedialog-parent-directory-icon",-
551 "filedialog-start-icon",-
552 "floppy-icon",-
553 "forward-icon",-
554 "gridline-color",-
555 "harddisk-icon",-
556 "home-icon",-
557 "icon-size",-
558 "leftarrow-icon",-
559 "lineedit-password-character",-
560 "lineedit-password-mask-delay",-
561 "mdi-fill-space-on-maximize",-
562 "menu-scrollable",-
563 "menubar-altkey-navigation",-
564 "menubar-separator",-
565 "messagebox-critical-icon",-
566 "messagebox-information-icon",-
567 "messagebox-question-icon",-
568 "messagebox-text-interaction-flags",-
569 "messagebox-warning-icon",-
570 "mouse-tracking",-
571 "network-icon",-
572 "opacity",-
573 "paint-alternating-row-colors-for-empty-area",-
574 "rightarrow-icon",-
575 "scrollbar-contextmenu",-
576 "scrollbar-leftclick-absolute-position",-
577 "scrollbar-middleclick-absolute-position",-
578 "scrollbar-roll-between-buttons",-
579 "scrollbar-scroll-when-pointer-leaves-control",-
580 "scrollview-frame-around-contents",-
581 "show-decoration-selected",-
582 "spinbox-click-autorepeat-rate",-
583 "spincontrol-disable-on-bounds",-
584 "tabbar-elide-mode",-
585 "tabbar-prefer-no-arrows",-
586 "titlebar-close-icon",-
587 "titlebar-contexthelp-icon",-
588 "titlebar-maximize-icon",-
589 "titlebar-menu-icon",-
590 "titlebar-minimize-icon",-
591 "titlebar-normal-icon",-
592 "titlebar-shade-icon",-
593 "titlebar-unshade-icon",-
594 "toolbutton-popup-delay",-
595 "trash-icon",-
596 "uparrow-icon"-
597};-
598-
599static const int numKnownStyleHints = sizeof(knownStyleHints)/sizeof(knownStyleHints[0]);-
600-
601static QList<QVariant> subControlLayout(const QString& layout)-
602{-
603 QList<QVariant> buttons;-
604 for (int i = 0; i < layout.count()
i < layout.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
605 int button = layout[i].toLatin1();-
606 switch (button) {-
607 case
never executed: case 'm':
'm':
never executed: case 'm':
0
608 buttons.append(PseudoElement_MdiMinButton);-
609 buttons.append(PseudoElement_TitleBarMinButton);-
610 break;
never executed: break;
0
611 case
never executed: case 'M':
'M':
never executed: case 'M':
0
612 buttons.append(PseudoElement_TitleBarMaxButton);-
613 break;
never executed: break;
0
614 case
never executed: case 'X':
'X':
never executed: case 'X':
0
615 buttons.append(PseudoElement_MdiCloseButton);-
616 buttons.append(PseudoElement_TitleBarCloseButton);-
617 break;
never executed: break;
0
618 case
never executed: case 'N':
'N':
never executed: case 'N':
0
619 buttons.append(PseudoElement_MdiNormalButton);-
620 buttons.append(PseudoElement_TitleBarNormalButton);-
621 break;
never executed: break;
0
622 case
never executed: case 'I':
'I':
never executed: case 'I':
0
623 buttons.append(PseudoElement_TitleBarSysMenu);-
624 break;
never executed: break;
0
625 case
never executed: case 'T':
'T':
never executed: case 'T':
0
626 buttons.append(PseudoElement_TitleBar);-
627 break;
never executed: break;
0
628 case
never executed: case 'H':
'H':
never executed: case 'H':
0
629 buttons.append(PseudoElement_TitleBarContextHelpButton);-
630 break;
never executed: break;
0
631 case
never executed: case 'S':
'S':
never executed: case 'S':
0
632 buttons.append(PseudoElement_TitleBarShadeButton);-
633 break;
never executed: break;
0
634 default
never executed: default:
:
never executed: default:
0
635 buttons.append(button);-
636 break;
never executed: break;
0
637 }-
638 }-
639 return
never executed: return buttons;
buttons;
never executed: return buttons;
0
640}-
641-
642namespace {-
643 struct ButtonInfo {-
644 QRenderRule rule;-
645 int element;-
646 int offset;-
647 int where;-
648 int width;-
649 };-
650}-
651template <> class QTypeInfo<ButtonInfo> : public QTypeInfoMerger<ButtonInfo, QRenderRule, int> {};-
652-
653QHash<QStyle::SubControl, QRect> QStyleSheetStyle::titleBarLayout(const QWidget *w, const QStyleOptionTitleBar *tb) const-
654{-
655 QHash<QStyle::SubControl, QRect> layoutRects;-
656 const bool isMinimized = tb->titleBarState & Qt::WindowMinimized;-
657 const bool isMaximized = tb->titleBarState & Qt::WindowMaximized;-
658 QRenderRule subRule = renderRule(w, tb);-
659 QRect cr = subRule.contentsRect(tb->rect);-
660 QList<QVariant> layout = subRule.styleHint(QLatin1String("button-layout")).toList();-
661 if (layout.isEmpty()
layout.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
662 layout = subControlLayout(QLatin1String("I(T)HSmMX"));
never executed: layout = subControlLayout(QLatin1String("I(T)HSmMX"));
0
663-
664 int offsets[3] = { 0, 0, 0 };-
665 enum Where { Left, Right, Center, NoWhere } where = Left;-
666 QVector<ButtonInfo> infos;-
667 const int numLayouts = layout.size();-
668 infos.reserve(numLayouts);-
669 for (int i = 0; i < numLayouts
i < numLayoutsDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
670 const int element = layout[i].toInt();-
671 if (element == '('
element == '('Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
672 where = Center;-
673 }
never executed: end of block
else if (element == ')'
element == ')'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
674 where = Right;-
675 }
never executed: end of block
else {
0
676 ButtonInfo info;-
677 info.element = element;-
678 switch (element) {-
679 case
never executed: case PseudoElement_TitleBar:
PseudoElement_TitleBar:
never executed: case PseudoElement_TitleBar:
0
680 if (!(tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint))
!(tb->titleBar...stemMenuHint))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
681 continue;
never executed: continue;
0
682 break;
never executed: break;
0
683 case
never executed: case PseudoElement_TitleBarContextHelpButton:
PseudoElement_TitleBarContextHelpButton:
never executed: case PseudoElement_TitleBarContextHelpButton:
0
684 if (!(tb->titleBarFlags & Qt::WindowContextHelpButtonHint)
!(tb->titleBar...elpButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
685 continue;
never executed: continue;
0
686 break;
never executed: break;
0
687 case
never executed: case PseudoElement_TitleBarMinButton:
PseudoElement_TitleBarMinButton:
never executed: case PseudoElement_TitleBarMinButton:
0
688 if (!(tb->titleBarFlags & Qt::WindowMinimizeButtonHint)
!(tb->titleBar...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
689 continue;
never executed: continue;
0
690 if (isMinimized
isMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
691 info.element = PseudoElement_TitleBarNormalButton;
never executed: info.element = PseudoElement_TitleBarNormalButton;
0
692 break;
never executed: break;
0
693 case
never executed: case PseudoElement_TitleBarMaxButton:
PseudoElement_TitleBarMaxButton:
never executed: case PseudoElement_TitleBarMaxButton:
0
694 if (!(tb->titleBarFlags & Qt::WindowMaximizeButtonHint)
!(tb->titleBar...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
695 continue;
never executed: continue;
0
696 if (isMaximized
isMaximizedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
697 info.element = PseudoElement_TitleBarNormalButton;
never executed: info.element = PseudoElement_TitleBarNormalButton;
0
698 break;
never executed: break;
0
699 case
never executed: case PseudoElement_TitleBarShadeButton:
PseudoElement_TitleBarShadeButton:
never executed: case PseudoElement_TitleBarShadeButton:
0
700 if (!(tb->titleBarFlags & Qt::WindowShadeButtonHint)
!(tb->titleBar...adeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
701 continue;
never executed: continue;
0
702 if (isMinimized
isMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
703 info.element = PseudoElement_TitleBarUnshadeButton;
never executed: info.element = PseudoElement_TitleBarUnshadeButton;
0
704 break;
never executed: break;
0
705 case
never executed: case PseudoElement_TitleBarCloseButton:
PseudoElement_TitleBarCloseButton:
never executed: case PseudoElement_TitleBarCloseButton:
0
706 case
never executed: case PseudoElement_TitleBarSysMenu:
PseudoElement_TitleBarSysMenu:
never executed: case PseudoElement_TitleBarSysMenu:
0
707 if (!(tb->titleBarFlags & Qt::WindowSystemMenuHint)
!(tb->titleBar...ystemMenuHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
708 continue;
never executed: continue;
0
709 break;
never executed: break;
0
710 default
never executed: default:
:
never executed: default:
0
711 continue;
never executed: continue;
0
712 }-
713 if (info.element == PseudoElement_TitleBar
info.element =...ement_TitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
714 info.width = tb->fontMetrics.width(tb->text) + 6;-
715 subRule.geo = new QStyleSheetGeometryData(info.width, tb->fontMetrics.height(), -1, -1, -1, -1);-
716 }
never executed: end of block
else {
0
717 subRule = renderRule(w, tb, info.element);-
718 info.width = subRule.size().width();-
719 }
never executed: end of block
0
720 info.rule = subRule;-
721 info.offset = offsets[where];-
722 info.where = where;-
723 infos.append(std::move(info));-
724-
725 offsets[where] += info.width;-
726 }
never executed: end of block
0
727 }-
728-
729 for (int i = 0; i < infos.size()
i < infos.size()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
730 const ButtonInfo &info = infos[i];-
731 QRect lr = cr;-
732 switch (info.where) {-
733 case
never executed: case Center:
Center:
never executed: case Center:
{
0
734 lr.setLeft(cr.left() + offsets[Left]);-
735 lr.setRight(cr.right() - offsets[Right]);-
736 QRect r(0, 0, offsets[Center], lr.height());-
737 r.moveCenter(lr.center());-
738 r.setLeft(r.left()+info.offset);-
739 r.setWidth(info.width);-
740 lr = r;-
741 break;
never executed: break;
}
0
742 case
never executed: case Left:
Left:
never executed: case Left:
0
743 lr.translate(info.offset, 0);-
744 lr.setWidth(info.width);-
745 break;
never executed: break;
0
746 case
never executed: case Right:
Right:
never executed: case Right:
0
747 lr.moveLeft(cr.right() + 1 - offsets[Right] + info.offset);-
748 lr.setWidth(info.width);-
749 break;
never executed: break;
0
750 default
never executed: default:
:
never executed: default:
0
751 break;
never executed: break;
0
752 }-
753 QStyle::SubControl control = knownPseudoElements[info.element].subControl;-
754 layoutRects[control] = positionRect(w, info.rule, info.element, lr, tb->direction);-
755 }
never executed: end of block
0
756-
757 return
never executed: return layoutRects;
layoutRects;
never executed: return layoutRects;
0
758}-
759-
760static QStyle::StandardPixmap subControlIcon(int pe)-
761{-
762 switch (pe) {-
763 case
never executed: case PseudoElement_MdiCloseButton:
PseudoElement_MdiCloseButton:
never executed: case PseudoElement_MdiCloseButton:
return
never executed: return QStyle::SP_TitleBarCloseButton;
QStyle::SP_TitleBarCloseButton;
never executed: return QStyle::SP_TitleBarCloseButton;
0
764 case
never executed: case PseudoElement_MdiMinButton:
PseudoElement_MdiMinButton:
never executed: case PseudoElement_MdiMinButton:
return
never executed: return QStyle::SP_TitleBarMinButton;
QStyle::SP_TitleBarMinButton;
never executed: return QStyle::SP_TitleBarMinButton;
0
765 case
never executed: case PseudoElement_MdiNormalButton:
PseudoElement_MdiNormalButton:
never executed: case PseudoElement_MdiNormalButton:
return
never executed: return QStyle::SP_TitleBarNormalButton;
QStyle::SP_TitleBarNormalButton;
never executed: return QStyle::SP_TitleBarNormalButton;
0
766 case
never executed: case PseudoElement_TitleBarCloseButton:
PseudoElement_TitleBarCloseButton:
never executed: case PseudoElement_TitleBarCloseButton:
return
never executed: return QStyle::SP_TitleBarCloseButton;
QStyle::SP_TitleBarCloseButton;
never executed: return QStyle::SP_TitleBarCloseButton;
0
767 case
never executed: case PseudoElement_TitleBarMinButton:
PseudoElement_TitleBarMinButton:
never executed: case PseudoElement_TitleBarMinButton:
return
never executed: return QStyle::SP_TitleBarMinButton;
QStyle::SP_TitleBarMinButton;
never executed: return QStyle::SP_TitleBarMinButton;
0
768 case
never executed: case PseudoElement_TitleBarMaxButton:
PseudoElement_TitleBarMaxButton:
never executed: case PseudoElement_TitleBarMaxButton:
return
never executed: return QStyle::SP_TitleBarMaxButton;
QStyle::SP_TitleBarMaxButton;
never executed: return QStyle::SP_TitleBarMaxButton;
0
769 case
never executed: case PseudoElement_TitleBarShadeButton:
PseudoElement_TitleBarShadeButton:
never executed: case PseudoElement_TitleBarShadeButton:
return
never executed: return QStyle::SP_TitleBarShadeButton;
QStyle::SP_TitleBarShadeButton;
never executed: return QStyle::SP_TitleBarShadeButton;
0
770 case
never executed: case PseudoElement_TitleBarUnshadeButton:
PseudoElement_TitleBarUnshadeButton:
never executed: case PseudoElement_TitleBarUnshadeButton:
return
never executed: return QStyle::SP_TitleBarUnshadeButton;
QStyle::SP_TitleBarUnshadeButton;
never executed: return QStyle::SP_TitleBarUnshadeButton;
0
771 case
never executed: case PseudoElement_TitleBarNormalButton:
PseudoElement_TitleBarNormalButton:
never executed: case PseudoElement_TitleBarNormalButton:
return
never executed: return QStyle::SP_TitleBarNormalButton;
QStyle::SP_TitleBarNormalButton;
never executed: return QStyle::SP_TitleBarNormalButton;
0
772 case
never executed: case PseudoElement_TitleBarContextHelpButton:
PseudoElement_TitleBarContextHelpButton:
never executed: case PseudoElement_TitleBarContextHelpButton:
return
never executed: return QStyle::SP_TitleBarContextHelpButton;
QStyle::SP_TitleBarContextHelpButton;
never executed: return QStyle::SP_TitleBarContextHelpButton;
0
773 default
never executed: default:
:
never executed: default:
break;
never executed: break;
0
774 }-
775 return
never executed: return QStyle::SP_CustomBase;
QStyle::SP_CustomBase;
never executed: return QStyle::SP_CustomBase;
0
776}-
777-
778QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject *object)-
779: features(0), hasFont(false), pal(0), b(0), bg(0), bd(0), ou(0), geo(0), p(0), img(0), clipset(0)-
780{-
781 QPalette palette = QApplication::palette();-
782 ValueExtractor v(declarations, palette);-
783 features = v.extractStyleFeatures();-
784-
785 int w = -1, h = -1, minw = -1, minh = -1, maxw = -1, maxh = -1;-
786 if (v.extractGeometry(&w, &h, &minw, &minh, &maxw, &maxh)
v.extractGeome... &maxw, &maxh)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
787 geo = new QStyleSheetGeometryData(w, h, minw, minh, maxw, maxh);
never executed: geo = new QStyleSheetGeometryData(w, h, minw, minh, maxw, maxh);
0
788-
789 int left = 0, top = 0, right = 0, bottom = 0;-
790 Origin origin = Origin_Unknown;-
791 Qt::Alignment position = 0;-
792 QCss::PositionMode mode = PositionMode_Unknown;-
793 Qt::Alignment textAlignment = 0;-
794 if (v.extractPosition(&left, &top, &right, &bottom, &origin, &position, &mode, &textAlignment)
v.extractPosit...textAlignment)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
795 p = new QStyleSheetPositionData(left, top, right, bottom, origin, position, mode, textAlignment);
never executed: p = new QStyleSheetPositionData(left, top, right, bottom, origin, position, mode, textAlignment);
0
796-
797 int margins[4], paddings[4], spacing = -1;-
798 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
799 margins[i] = paddings[i] = 0;
never executed: margins[i] = paddings[i] = 0;
0
800 if (v.extractBox(margins, paddings, &spacing)
v.extractBox(m...ngs, &spacing)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
801 b = new QStyleSheetBoxData(margins, paddings, spacing);
never executed: b = new QStyleSheetBoxData(margins, paddings, spacing);
0
802-
803 int borders[4];-
804 QBrush colors[4];-
805 QCss::BorderStyle styles[4];-
806 QSize radii[4];-
807 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
808 borders[i] = 0;-
809 styles[i] = BorderStyle_None;-
810 }
never executed: end of block
0
811 if (v.extractBorder(borders, colors, styles, radii)
v.extractBorde...styles, radii)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
812 bd = new QStyleSheetBorderData(borders, colors, styles, radii);
never executed: bd = new QStyleSheetBorderData(borders, colors, styles, radii);
0
813-
814 int offsets[4];-
815 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
816 borders[i] = offsets[i] = 0;-
817 styles[i] = BorderStyle_None;-
818 }
never executed: end of block
0
819 if (v.extractOutline(borders, colors, styles, radii, offsets)
v.extractOutli...adii, offsets)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
820 ou = new QStyleSheetOutlineData(borders, colors, styles, radii, offsets);
never executed: ou = new QStyleSheetOutlineData(borders, colors, styles, radii, offsets);
0
821-
822 QBrush brush;-
823 QString uri;-
824 Repeat repeat = Repeat_XY;-
825 Qt::Alignment alignment = Qt::AlignTop | Qt::AlignLeft;-
826 Attachment attachment = Attachment_Scroll;-
827 origin = Origin_Padding;-
828 Origin clip = Origin_Border;-
829 if (v.extractBackground(&brush, &uri, &repeat, &alignment, &origin, &attachment, &clip)
v.extractBackg...chment, &clip)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
830 bg = new QStyleSheetBackgroundData(brush, QPixmap(uri), repeat, alignment, origin, attachment, clip);
never executed: bg = new QStyleSheetBackgroundData(brush, QPixmap(uri), repeat, alignment, origin, attachment, clip);
0
831-
832 QBrush sfg, fg;-
833 QBrush sbg, abg;-
834 if (v.extractPalette(&fg, &sfg, &sbg, &abg)
v.extractPalet...g, &sbg, &abg)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
835 pal = new QStyleSheetPaletteData(fg, sfg, sbg, abg);
never executed: pal = new QStyleSheetPaletteData(fg, sfg, sbg, abg);
0
836-
837 QIcon icon;-
838 alignment = Qt::AlignCenter;-
839 QSize size;-
840 if (v.extractImage(&icon, &alignment, &size)
v.extractImage...gnment, &size)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
841 img = new QStyleSheetImageData(icon, alignment, size);
never executed: img = new QStyleSheetImageData(icon, alignment, size);
0
842-
843 int adj = -255;-
844 hasFont = v.extractFont(&font, &adj);-
845-
846-
847 if (object
objectDescription
TRUEnever evaluated
FALSEnever evaluated
&& qstrcmp(object->metaObject()->className(), "QTipLabel") == 0
qstrcmp(object...ipLabel") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
848 palette = QToolTip::palette();
never executed: palette = QToolTip::palette();
0
849-
850-
851 for (int i = 0; i < declarations.count()
i < declarations.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
852 const Declaration& decl = declarations.at(i);-
853 if (decl.d->propertyId == BorderImage
decl.d->proper...== BorderImageDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
854 QString uri;-
855 QCss::TileMode horizStretch, vertStretch;-
856 int cuts[4];-
857-
858 decl.borderImageValue(&uri, cuts, &horizStretch, &vertStretch);-
859 if (uri.isEmpty()
uri.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| uri == QLatin1String("none")
uri == QLatin1String("none")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
860 if (bd
bdDescription
TRUEnever evaluated
FALSEnever evaluated
&& bd->bi
bd->biDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
861 bd->bi->pixmap = QPixmap();
never executed: bd->bi->pixmap = QPixmap();
0
862 }
never executed: end of block
else {
0
863 if (!bd
!bdDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
864 bd = new QStyleSheetBorderData;
never executed: bd = new QStyleSheetBorderData;
0
865 if (!bd->bi
!bd->biDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
866 bd->bi = new QStyleSheetBorderImageData;
never executed: bd->bi = new QStyleSheetBorderImageData;
0
867-
868 QStyleSheetBorderImageData *bi = bd->bi;-
869 bi->pixmap = QPixmap(uri);-
870 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
871 bi->cuts[i] = cuts[i];
never executed: bi->cuts[i] = cuts[i];
0
872 bi->horizStretch = horizStretch;-
873 bi->vertStretch = vertStretch;-
874 }
never executed: end of block
0
875 } else if (decl.d->propertyId == QtBackgroundRole
decl.d->proper...BackgroundRoleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
876 if (bg
bgDescription
TRUEnever evaluated
FALSEnever evaluated
&& bg->brush.style() != Qt::NoBrush
bg->brush.styl...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
877 continue;
never executed: continue;
0
878 int role = decl.d->values.at(0).variant.toInt();-
879 if (role >= Value_FirstColorRole
role >= Value_FirstColorRoleDescription
TRUEnever evaluated
FALSEnever evaluated
&& role <= Value_LastColorRole
role <= Value_LastColorRoleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
880 defaultBackground = palette.color((QPalette::ColorRole)(role-Value_FirstColorRole));
never executed: defaultBackground = palette.color((QPalette::ColorRole)(role-Value_FirstColorRole));
0
881 }
never executed: end of block
else if (decl.d->property.startsWith(QLatin1String("qproperty-"), Qt::CaseInsensitive)
decl.d->proper...seInsensitive)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
882-
883 }
never executed: end of block
else if (decl.d->propertyId == UnknownProperty
decl.d->proper...nknownPropertyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
884 bool knownStyleHint = false;-
885 for (int i = 0; i < numKnownStyleHints
i < numKnownStyleHintsDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
886 QLatin1String styleHint(knownStyleHints[i]);-
887 if (decl.d->property.compare(styleHint) == 0
decl.d->proper...tyleHint) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
888 QString hintName = QString(styleHint);-
889 QVariant hintValue;-
890 if (hintName.endsWith(QLatin1String("alignment"))
hintName.endsW...("alignment"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
891 hintValue = (int) decl.alignmentValue();-
892 }
never executed: end of block
else if (hintName.endsWith(QLatin1String("color"))
hintName.endsW...ring("color"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
893 hintValue = (int) decl.colorValue().rgba();-
894 }
never executed: end of block
else if (hintName.endsWith(QLatin1String("size"))
hintName.endsW...tring("size"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
895 hintValue = decl.sizeValue();-
896 }
never executed: end of block
else if (hintName.endsWith(QLatin1String("icon"))
hintName.endsW...tring("icon"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
897 hintValue = decl.iconValue();-
898 }
never executed: end of block
else if (hintName == QLatin1String("button-layout")
hintName == QL...utton-layout")Description
TRUEnever evaluated
FALSEnever evaluated
0
899 && decl.d->values.count() != 0
decl.d->values.count() != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& decl.d->values.at(0).type == Value::String
decl.d->values... Value::StringDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
900 hintValue = subControlLayout(decl.d->values.at(0).variant.toString());-
901 }
never executed: end of block
else {
0
902 int integer;-
903 decl.intValue(&integer);-
904 hintValue = integer;-
905 }
never executed: end of block
0
906 styleHints[decl.d->property] = hintValue;-
907 knownStyleHint = true;-
908 break;
never executed: break;
0
909 }-
910 }
never executed: end of block
0
911 if (!knownStyleHint
!knownStyleHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
912 QMessageLogger(__FILE__, 1001, __PRETTY_FUNCTION__).debug("Unknown property %s", QString(decl.d->property).toLocal8Bit().constData());
never executed: QMessageLogger(__FILE__, 1001, __PRETTY_FUNCTION__).debug("Unknown property %s", QString(decl.d->property).toLocal8Bit().constData());
0
913 }
never executed: end of block
0
914 }
never executed: end of block
0
915-
916 if (hasBorder()
hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
917 if (const
const QWidget ...get *>(object)Description
TRUEnever evaluated
FALSEnever evaluated
QWidget *widget = qobject_cast<const QWidget *>(object)
const QWidget ...get *>(object)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
918 QStyleSheetStyle *style = const_cast<QStyleSheetStyle *>(globalStyleSheetStyle);-
919 if (!style
!styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
920 style = qobject_cast<QStyleSheetStyle *>(widget->style());
never executed: style = qobject_cast<QStyleSheetStyle *>(widget->style());
0
921 if (style
styleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
922 fixupBorder(style->nativeFrameWidth(widget));
never executed: fixupBorder(style->nativeFrameWidth(widget));
0
923 }
never executed: end of block
0
924 if (border()->hasBorderImage()
border()->hasBorderImage()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
925 defaultBackground = QBrush();
never executed: defaultBackground = QBrush();
0
926 }
never executed: end of block
0
927}
never executed: end of block
0
928-
929QRect QRenderRule::borderRect(const QRect& r) const-
930{-
931 if (!hasBox()
!hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
932 return
never executed: return r;
r;
never executed: return r;
0
933 const int* m = box()->margins;-
934 return
never executed: return r.adjusted(m[LeftEdge], m[TopEdge], -m[RightEdge], -m[BottomEdge]);
r.adjusted(m[LeftEdge], m[TopEdge], -m[RightEdge], -m[BottomEdge]);
never executed: return r.adjusted(m[LeftEdge], m[TopEdge], -m[RightEdge], -m[BottomEdge]);
0
935}-
936-
937QRect QRenderRule::outlineRect(const QRect& r) const-
938{-
939 QRect br = borderRect(r);-
940 if (!hasOutline()
!hasOutline()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
941 return
never executed: return br;
br;
never executed: return br;
0
942 const int *b = outline()->borders;-
943 return
never executed: return r.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);
r.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);
never executed: return r.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);
0
944}-
945-
946QRect QRenderRule::paddingRect(const QRect& r) const-
947{-
948 QRect br = borderRect(r);-
949 if (!hasBorder()
!hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
950 return
never executed: return br;
br;
never executed: return br;
0
951 const int *b = border()->borders;-
952 return
never executed: return br.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);
br.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);
never executed: return br.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);
0
953}-
954-
955QRect QRenderRule::contentsRect(const QRect& r) const-
956{-
957 QRect pr = paddingRect(r);-
958 if (!hasBox()
!hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
959 return
never executed: return pr;
pr;
never executed: return pr;
0
960 const int *p = box()->paddings;-
961 return
never executed: return pr.adjusted(p[LeftEdge], p[TopEdge], -p[RightEdge], -p[BottomEdge]);
pr.adjusted(p[LeftEdge], p[TopEdge], -p[RightEdge], -p[BottomEdge]);
never executed: return pr.adjusted(p[LeftEdge], p[TopEdge], -p[RightEdge], -p[BottomEdge]);
0
962}-
963-
964QRect QRenderRule::boxRect(const QRect& cr, int flags) const-
965{-
966 QRect r = cr;-
967 if (hasBox()
hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
968 if (flags & Margin
flags & MarginDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
969 const int *m = box()->margins;-
970 r.adjust(-m[LeftEdge], -m[TopEdge], m[RightEdge], m[BottomEdge]);-
971 }
never executed: end of block
0
972 if (flags & Padding
flags & PaddingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
973 const int *p = box()->paddings;-
974 r.adjust(-p[LeftEdge], -p[TopEdge], p[RightEdge], p[BottomEdge]);-
975 }
never executed: end of block
0
976 }
never executed: end of block
0
977 if (hasBorder()
hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(flags & Border)Description
TRUEnever evaluated
FALSEnever evaluated
flags & Border)
(flags & Border)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
978 const int *b = border()->borders;-
979 r.adjust(-b[LeftEdge], -b[TopEdge], b[RightEdge], b[BottomEdge]);-
980 }
never executed: end of block
0
981 return
never executed: return r;
r;
never executed: return r;
0
982}-
983-
984QSize QRenderRule::boxSize(const QSize &cs, int flags) const-
985{-
986 QSize bs = boxRect(QRect(QPoint(0, 0), cs), flags).size();-
987 if (cs.width() < 0
cs.width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) bs.setWidth(-1);
never executed: bs.setWidth(-1);
0
988 if (cs.height() < 0
cs.height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) bs.setHeight(-1);
never executed: bs.setHeight(-1);
0
989 return
never executed: return bs;
bs;
never executed: return bs;
0
990}-
991-
992void QRenderRule::fixupBorder(int nativeWidth)-
993{-
994 if (bd == 0
bd == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
995 return;
never executed: return;
0
996-
997 if (!bd->hasBorderImage()
!bd->hasBorderImage()Description
TRUEnever evaluated
FALSEnever evaluated
|| bd->bi->pixmap.isNull()
bd->bi->pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
998 bd->bi = 0;-
999-
1000 QBrush color = pal
palDescription
TRUEnever evaluated
FALSEnever evaluated
? pal->foreground : QBrush();
0
1001 const bool hasRadius = bd->radii[0].isValid()
bd->radii[0].isValid()Description
TRUEnever evaluated
FALSEnever evaluated
|| bd->radii[1].isValid()
bd->radii[1].isValid()Description
TRUEnever evaluated
FALSEnever evaluated
0
1002 || bd->radii[2].isValid()
bd->radii[2].isValid()Description
TRUEnever evaluated
FALSEnever evaluated
|| bd->radii[3].isValid()
bd->radii[3].isValid()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
1003 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
1004 if ((
(bd->styles[i]...rStyle_Native)Description
TRUEnever evaluated
FALSEnever evaluated
bd->styles[i] == BorderStyle_Native)
(bd->styles[i]...rStyle_Native)Description
TRUEnever evaluated
FALSEnever evaluated
&& hasRadius
hasRadiusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1005 bd->styles[i] = BorderStyle_None;
never executed: bd->styles[i] = BorderStyle_None;
0
1006-
1007 switch (bd->styles[i]) {-
1008 case
never executed: case BorderStyle_None:
BorderStyle_None:
never executed: case BorderStyle_None:
0
1009-
1010 bd->colors[i] = QBrush();-
1011 bd->borders[i] = 0;-
1012 break;
never executed: break;
0
1013 case
never executed: case BorderStyle_Native:
BorderStyle_Native:
never executed: case BorderStyle_Native:
0
1014 if (bd->borders[i] == 0
bd->borders[i] == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1015 bd->borders[i] = nativeWidth;
never executed: bd->borders[i] = nativeWidth;
0
1016-
1017 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
1018 if (bd->colors[i].style() == Qt::NoBrush
bd->colors[i]....== Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1019 bd->colors[i] = color;
never executed: bd->colors[i] = color;
0
1020 break;
never executed: break;
0
1021 }-
1022 }-
1023-
1024 return;
never executed: return;
0
1025 }-
1026-
1027-
1028 QStyleSheetBorderImageData *bi = bd->bi;-
1029 if (bi->cuts[0] == -1
bi->cuts[0] == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1030 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
1031 bi->cuts[i] = int(border()->borders[i]);
never executed: bi->cuts[i] = int(border()->borders[i]);
0
1032 }
never executed: end of block
0
1033}
never executed: end of block
0
1034-
1035void QRenderRule::drawBorderImage(QPainter *p, const QRect& rect)-
1036{-
1037 setClip(p, rect);-
1038 static const Qt::TileRule tileMode2TileRule[] = {-
1039 Qt::StretchTile, Qt::RoundTile, Qt::StretchTile, Qt::RepeatTile, Qt::StretchTile };-
1040-
1041 const QStyleSheetBorderImageData *borderImageData = border()->borderImage();-
1042 const int *targetBorders = border()->borders;-
1043 const int *sourceBorders = borderImageData->cuts;-
1044 QMargins sourceMargins(sourceBorders[LeftEdge], sourceBorders[TopEdge],-
1045 sourceBorders[RightEdge], sourceBorders[BottomEdge]);-
1046 QMargins targetMargins(targetBorders[LeftEdge], targetBorders[TopEdge],-
1047 targetBorders[RightEdge], targetBorders[BottomEdge]);-
1048-
1049 bool wasSmoothPixmapTransform = p->renderHints() & QPainter::SmoothPixmapTransform;-
1050 p->setRenderHint(QPainter::SmoothPixmapTransform);-
1051 qDrawBorderPixmap(p, rect, targetMargins, borderImageData->pixmap,-
1052 QRect(QPoint(), borderImageData->pixmap.size()), sourceMargins,-
1053 QTileRules(tileMode2TileRule[borderImageData->horizStretch], tileMode2TileRule[borderImageData->vertStretch]));-
1054 p->setRenderHint(QPainter::SmoothPixmapTransform, wasSmoothPixmapTransform);-
1055 unsetClip(p);-
1056}
never executed: end of block
0
1057-
1058QRect QRenderRule::originRect(const QRect &rect, Origin origin) const-
1059{-
1060 switch (origin) {-
1061 case
never executed: case Origin_Padding:
Origin_Padding:
never executed: case Origin_Padding:
0
1062 return
never executed: return paddingRect(rect);
paddingRect(rect);
never executed: return paddingRect(rect);
0
1063 case
never executed: case Origin_Border:
Origin_Border:
never executed: case Origin_Border:
0
1064 return
never executed: return borderRect(rect);
borderRect(rect);
never executed: return borderRect(rect);
0
1065 case
never executed: case Origin_Content:
Origin_Content:
never executed: case Origin_Content:
0
1066 return
never executed: return contentsRect(rect);
contentsRect(rect);
never executed: return contentsRect(rect);
0
1067 case
never executed: case Origin_Margin:
Origin_Margin:
never executed: case Origin_Margin:
0
1068 default
never executed: default:
:
never executed: default:
0
1069 return
never executed: return rect;
rect;
never executed: return rect;
0
1070 }-
1071}-
1072-
1073void QRenderRule::drawBackgroundImage(QPainter *p, const QRect &rect, QPoint off)-
1074{-
1075 if (!hasBackground()
!hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1076 return;
never executed: return;
0
1077-
1078 const QPixmap& bgp = background()->pixmap;-
1079 if (bgp.isNull()
bgp.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1080 return;
never executed: return;
0
1081-
1082 setClip(p, borderRect(rect));-
1083-
1084 if (background()->origin != background()->clip
background()->...ground()->clipDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1085 p->save();-
1086 p->setClipRect(originRect(rect, background()->clip), Qt::IntersectClip);-
1087 }
never executed: end of block
0
1088-
1089 if (background()->attachment == Attachment_Fixed
background()->...tachment_FixedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1090 off = QPoint(0, 0);
never executed: off = QPoint(0, 0);
0
1091-
1092 QRect r = originRect(rect, background()->origin);-
1093 QRect aligned = QStyle::alignedRect(Qt::LeftToRight, background()->position, bgp.size(), r);-
1094 QRect inter = aligned.translated(-off).intersected(r);-
1095-
1096 switch (background()->repeat) {-
1097 case
never executed: case Repeat_Y:
Repeat_Y:
never executed: case Repeat_Y:
0
1098 p->drawTiledPixmap(inter.x(), r.y(), inter.width(), r.height(), bgp,-
1099 inter.x() - aligned.x() + off.x(),-
1100 bgp.height() - int(aligned.y() - r.y()) % bgp.height() + off.y());-
1101 break;
never executed: break;
0
1102 case
never executed: case Repeat_X:
Repeat_X:
never executed: case Repeat_X:
0
1103 p->drawTiledPixmap(r.x(), inter.y(), r.width(), inter.height(), bgp,-
1104 bgp.width() - int(aligned.x() - r.x())%bgp.width() + off.x(),-
1105 inter.y() - aligned.y() + off.y());-
1106 break;
never executed: break;
0
1107 case
never executed: case Repeat_XY:
Repeat_XY:
never executed: case Repeat_XY:
0
1108 p->drawTiledPixmap(r, bgp,-
1109 QPoint(bgp.width() - int(aligned.x() - r.x())% bgp.width() + off.x(),-
1110 bgp.height() - int(aligned.y() - r.y())%bgp.height() + off.y()));-
1111 break;
never executed: break;
0
1112 case
never executed: case Repeat_None:
Repeat_None:
never executed: case Repeat_None:
0
1113 default
never executed: default:
:
never executed: default:
0
1114 p->drawPixmap(inter.x(), inter.y(), bgp, inter.x() - aligned.x() + off.x(),-
1115 inter.y() - aligned.y() + off.y(), inter.width(), inter.height());-
1116 break;
never executed: break;
0
1117 }-
1118-
1119-
1120 if (background()->origin != background()->clip
background()->...ground()->clipDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1121 p->restore();
never executed: p->restore();
0
1122-
1123 unsetClip(p);-
1124}
never executed: end of block
0
1125-
1126void QRenderRule::drawOutline(QPainter *p, const QRect &rect)-
1127{-
1128 if (!hasOutline()
!hasOutline()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1129 return;
never executed: return;
0
1130-
1131 bool wasAntialiased = p->renderHints() & QPainter::Antialiasing;-
1132 p->setRenderHint(QPainter::Antialiasing);-
1133 qDrawBorder(p, rect, ou->styles, ou->borders, ou->colors, ou->radii);-
1134 p->setRenderHint(QPainter::Antialiasing, wasAntialiased);-
1135}
never executed: end of block
0
1136-
1137void QRenderRule::drawBorder(QPainter *p, const QRect& rect)-
1138{-
1139 if (!hasBorder()
!hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1140 return;
never executed: return;
0
1141-
1142 if (border()->hasBorderImage()
border()->hasBorderImage()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1143 drawBorderImage(p, rect);-
1144 return;
never executed: return;
0
1145 }-
1146-
1147 bool wasAntialiased = p->renderHints() & QPainter::Antialiasing;-
1148 p->setRenderHint(QPainter::Antialiasing);-
1149 qDrawBorder(p, rect, bd->styles, bd->borders, bd->colors, bd->radii);-
1150 p->setRenderHint(QPainter::Antialiasing, wasAntialiased);-
1151}
never executed: end of block
0
1152-
1153QPainterPath QRenderRule::borderClip(QRect r)-
1154{-
1155 if (!hasBorder()
!hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1156 return
never executed: return QPainterPath();
QPainterPath();
never executed: return QPainterPath();
0
1157-
1158 QSize tlr, trr, blr, brr;-
1159 qNormalizeRadii(r, bd->radii, &tlr, &trr, &blr, &brr);-
1160 if (tlr.isNull()
tlr.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& trr.isNull()
trr.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& blr.isNull()
blr.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& brr.isNull()
brr.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1161 return
never executed: return QPainterPath();
QPainterPath();
never executed: return QPainterPath();
0
1162-
1163 const QRectF rect(r);-
1164 const int *borders = border()->borders;-
1165 QPainterPath path;-
1166 qreal curY = rect.y() + borders[TopEdge]/2.0;-
1167 path.moveTo(rect.x() + tlr.width(), curY);-
1168 path.lineTo(rect.right() - trr.width(), curY);-
1169 qreal curX = rect.right() - borders[RightEdge]/2.0;-
1170 path.arcTo(curX - 2*trr.width() + borders[RightEdge], curY,-
1171 trr.width()*2 - borders[RightEdge], trr.height()*2 - borders[TopEdge], 90, -90);-
1172-
1173 path.lineTo(curX, rect.bottom() - brr.height());-
1174 curY = rect.bottom() - borders[BottomEdge]/2.0;-
1175 path.arcTo(curX - 2*brr.width() + borders[RightEdge], curY - 2*brr.height() + borders[BottomEdge],-
1176 brr.width()*2 - borders[RightEdge], brr.height()*2 - borders[BottomEdge], 0, -90);-
1177-
1178 path.lineTo(rect.x() + blr.width(), curY);-
1179 curX = rect.left() + borders[LeftEdge]/2.0;-
1180 path.arcTo(curX, rect.bottom() - 2*blr.height() + borders[BottomEdge]/2,-
1181 blr.width()*2 - borders[LeftEdge], blr.height()*2 - borders[BottomEdge], 270, -90);-
1182-
1183 path.lineTo(curX, rect.top() + tlr.height());-
1184 path.arcTo(curX, rect.top() + borders[TopEdge]/2,-
1185 tlr.width()*2 - borders[LeftEdge], tlr.height()*2 - borders[TopEdge], 180, -90);-
1186-
1187 path.closeSubpath();-
1188 return
never executed: return path;
path;
never executed: return path;
0
1189}-
1190-
1191-
1192-
1193-
1194void QRenderRule::setClip(QPainter *p, const QRect &rect)-
1195{-
1196 if (clipset++
clipset++Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1197 return;
never executed: return;
0
1198 clipPath = borderClip(rect);-
1199 if (!clipPath.isEmpty()
!clipPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1200 p->save();-
1201 p->setClipPath(clipPath, Qt::IntersectClip);-
1202 }
never executed: end of block
0
1203}
never executed: end of block
0
1204-
1205void QRenderRule::unsetClip(QPainter *p)-
1206{-
1207 if (--
--clipsetDescription
TRUEnever evaluated
FALSEnever evaluated
clipset
--clipsetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1208 return;
never executed: return;
0
1209 if (!clipPath.isEmpty()
!clipPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1210 p->restore();
never executed: p->restore();
0
1211}
never executed: end of block
0
1212-
1213void QRenderRule::drawBackground(QPainter *p, const QRect& rect, const QPoint& off)-
1214{-
1215 QBrush brush = hasBackground()
hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
? background()->brush : QBrush();
0
1216 if (brush.style() == Qt::NoBrush
brush.style() == Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1217 brush = defaultBackground;
never executed: brush = defaultBackground;
0
1218-
1219 if (brush.style() != Qt::NoBrush
brush.style() != Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1220 Origin origin = hasBackground()
hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
? background()->clip : Origin_Border;
0
1221-
1222 const QPainterPath &borderPath = borderClip(originRect(rect, origin));-
1223 if (!borderPath.isEmpty()
!borderPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1224-
1225 bool wasAntialiased = p->renderHints() & QPainter::Antialiasing;-
1226 p->setRenderHint(QPainter::Antialiasing);-
1227 p->fillPath(borderPath, brush);-
1228 p->setRenderHint(QPainter::Antialiasing, wasAntialiased);-
1229 }
never executed: end of block
else {
0
1230 p->fillRect(originRect(rect, origin), brush);-
1231 }
never executed: end of block
0
1232 }-
1233-
1234 drawBackgroundImage(p, rect, off);-
1235}
never executed: end of block
0
1236-
1237void QRenderRule::drawFrame(QPainter *p, const QRect& rect)-
1238{-
1239 drawBackground(p, rect);-
1240 if (hasBorder()
hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1241 drawBorder(p, borderRect(rect));
never executed: drawBorder(p, borderRect(rect));
0
1242}
never executed: end of block
0
1243-
1244void QRenderRule::drawImage(QPainter *p, const QRect &rect)-
1245{-
1246 if (!hasImage()
!hasImage()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1247 return;
never executed: return;
0
1248 img->icon.paint(p, rect, img->alignment);-
1249}
never executed: end of block
0
1250-
1251void QRenderRule::drawRule(QPainter *p, const QRect& rect)-
1252{-
1253 drawFrame(p, rect);-
1254 drawImage(p, contentsRect(rect));-
1255}
never executed: end of block
0
1256-
1257-
1258void QRenderRule::configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette::ColorRole br)-
1259{-
1260 if (bg
bgDescription
TRUEnever evaluated
FALSEnever evaluated
&& bg->brush.style() != Qt::NoBrush
bg->brush.styl...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1261 if (br != QPalette::NoRole
br != QPalette::NoRoleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1262 p->setBrush(br, bg->brush);
never executed: p->setBrush(br, bg->brush);
0
1263 p->setBrush(QPalette::Window, bg->brush);-
1264 if (bg->brush.style() == Qt::SolidPattern
bg->brush.styl...::SolidPatternDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1265 p->setBrush(QPalette::Light, bg->brush.color().lighter(115));-
1266 p->setBrush(QPalette::Midlight, bg->brush.color().lighter(107));-
1267 p->setBrush(QPalette::Dark, bg->brush.color().darker(150));-
1268 p->setBrush(QPalette::Shadow, bg->brush.color().darker(300));-
1269 }
never executed: end of block
0
1270 }
never executed: end of block
0
1271-
1272 if (!hasPalette()
!hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1273 return;
never executed: return;
0
1274-
1275 if (pal->foreground.style() != Qt::NoBrush
pal->foregroun...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1276 if (fr != QPalette::NoRole
fr != QPalette::NoRoleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1277 p->setBrush(fr, pal->foreground);
never executed: p->setBrush(fr, pal->foreground);
0
1278 p->setBrush(QPalette::WindowText, pal->foreground);-
1279 p->setBrush(QPalette::Text, pal->foreground);-
1280 }
never executed: end of block
0
1281 if (pal->selectionBackground.style() != Qt::NoBrush
pal->selection...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1282 p->setBrush(QPalette::Highlight, pal->selectionBackground);
never executed: p->setBrush(QPalette::Highlight, pal->selectionBackground);
0
1283 if (pal->selectionForeground.style() != Qt::NoBrush
pal->selection...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1284 p->setBrush(QPalette::HighlightedText, pal->selectionForeground);
never executed: p->setBrush(QPalette::HighlightedText, pal->selectionForeground);
0
1285 if (pal->alternateBackground.style() != Qt::NoBrush
pal->alternate...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1286 p->setBrush(QPalette::AlternateBase, pal->alternateBackground);
never executed: p->setBrush(QPalette::AlternateBase, pal->alternateBackground);
0
1287}
never executed: end of block
0
1288-
1289void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const QWidget *w, bool embedded)-
1290{-
1291 if (bg
bgDescription
TRUEnever evaluated
FALSEnever evaluated
&& bg->brush.style() != Qt::NoBrush
bg->brush.styl...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1292 p->setBrush(cg, QPalette::Base, bg->brush);-
1293 p->setBrush(cg, QPalette::Button, bg->brush);-
1294 p->setBrush(cg, w->backgroundRole(), bg->brush);-
1295 p->setBrush(cg, QPalette::Window, bg->brush);-
1296 }
never executed: end of block
0
1297-
1298 if (embedded
embeddedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1299-
1300-
1301 if ((hasBackground()
hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
&& background()->isTransparent()
background()->isTransparent()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1302 || (hasBorder()
hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
&& border()->hasBorderImage()
border()->hasBorderImage()Description
TRUEnever evaluated
FALSEnever evaluated
&& !border()->borderImage()->pixmap.isNull()
!border()->bor...ixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
1303 p->setBrush(cg, w->backgroundRole(), Qt::NoBrush);
never executed: p->setBrush(cg, w->backgroundRole(), Qt::NoBrush);
0
1304 }
never executed: end of block
0
1305-
1306 if (!hasPalette()
!hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1307 return;
never executed: return;
0
1308-
1309 if (pal->foreground.style() != Qt::NoBrush
pal->foregroun...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1310 p->setBrush(cg, QPalette::ButtonText, pal->foreground);-
1311 p->setBrush(cg, w->foregroundRole(), pal->foreground);-
1312 p->setBrush(cg, QPalette::WindowText, pal->foreground);-
1313 p->setBrush(cg, QPalette::Text, pal->foreground);-
1314 }
never executed: end of block
0
1315 if (pal->selectionBackground.style() != Qt::NoBrush
pal->selection...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1316 p->setBrush(cg, QPalette::Highlight, pal->selectionBackground);
never executed: p->setBrush(cg, QPalette::Highlight, pal->selectionBackground);
0
1317 if (pal->selectionForeground.style() != Qt::NoBrush
pal->selection...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1318 p->setBrush(cg, QPalette::HighlightedText, pal->selectionForeground);
never executed: p->setBrush(cg, QPalette::HighlightedText, pal->selectionForeground);
0
1319 if (pal->alternateBackground.style() != Qt::NoBrush
pal->alternate...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1320 p->setBrush(cg, QPalette::AlternateBase, pal->alternateBackground);
never executed: p->setBrush(cg, QPalette::AlternateBase, pal->alternateBackground);
0
1321}
never executed: end of block
0
1322-
1323-
1324-
1325-
1326-
1327static inline QObject *parentObject(const QObject *obj)-
1328{-
1329 if (qobject_cast<const QLabel *>(obj)
qobject_cast<c...QLabel *>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
&& qstrcmp(obj->metaObject()->className(), "QTipLabel") == 0
qstrcmp(obj->m...ipLabel") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1330 QObject *p = qvariant_cast<QObject *>(obj->property("_q_stylesheet_parent"));-
1331 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1332 return
never executed: return p;
p;
never executed: return p;
0
1333 }
never executed: end of block
0
1334 return
never executed: return obj->parent();
obj->parent();
never executed: return obj->parent();
0
1335}-
1336-
1337class QStyleSheetStyleSelector : public StyleSelector-
1338{-
1339public:-
1340 QStyleSheetStyleSelector() { }-
1341-
1342 QStringList nodeNames(NodePtr node) const override-
1343 {-
1344 if (isNullNode(node)
isNullNode(node)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1345 return
never executed: return QStringList();
QStringList();
never executed: return QStringList();
0
1346 const QMetaObject *metaObject = (static_cast<QObject *>(node.ptr))->metaObject();-
1347-
1348 if (qstrcmp(metaObject->className(), "QTipLabel") == 0
qstrcmp(metaOb...ipLabel") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1349 return
never executed: return QStringList(QLatin1String("QToolTip"));
QStringList(QLatin1String("QToolTip"));
never executed: return QStringList(QLatin1String("QToolTip"));
0
1350-
1351 QStringList result;-
1352 do {-
1353 result += QString::fromLatin1(metaObject->className()).replace(QLatin1Char(':'), QLatin1Char('-'));-
1354 metaObject = metaObject->superClass();-
1355 }
never executed: end of block
while (metaObject != 0
metaObject != 0Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1356 return
never executed: return result;
result;
never executed: return result;
0
1357 }-
1358 QString attribute(NodePtr node, const QString& name) const override-
1359 {-
1360 if (isNullNode(node)
isNullNode(node)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1361 return
never executed: return QString();
QString();
never executed: return QString();
0
1362-
1363 QHash<QString, QString> &cache = m_attributeCache[(static_cast<QObject *>(node.ptr))];-
1364 QHash<QString, QString>::const_iterator cacheIt = cache.constFind(name);-
1365 if (cacheIt != cache.constEnd()
cacheIt != cache.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1366 return
never executed: return cacheIt.value();
cacheIt.value();
never executed: return cacheIt.value();
0
1367-
1368 QObject *obj = (static_cast<QObject *>(node.ptr));-
1369 QVariant value = obj->property(name.toLatin1());-
1370 if (!value.isValid()
!value.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1371 if (name == QLatin1String("class")
name == QLatin1String("class")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1372 QString className = QString::fromLatin1(obj->metaObject()->className());-
1373 if (className.contains(QLatin1Char(':'))
className.cont...tin1Char(':'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1374 className.replace(QLatin1Char(':'), QLatin1Char('-'));
never executed: className.replace(QLatin1Char(':'), QLatin1Char('-'));
0
1375 cache[name] = className;-
1376 return
never executed: return className;
className;
never executed: return className;
0
1377 } else if (name == QLatin1String("style")
name == QLatin1String("style")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1378 QWidget *w = qobject_cast<QWidget *>(obj);-
1379 QStyleSheetStyle *proxy = w
wDescription
TRUEnever evaluated
FALSEnever evaluated
? qobject_cast<QStyleSheetStyle *>(w->style()) : 0;
0
1380 if (proxy
proxyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1381 QString styleName = QString::fromLatin1(proxy->baseStyle()->metaObject()->className());-
1382 cache[name] = styleName;-
1383 return
never executed: return styleName;
styleName;
never executed: return styleName;
0
1384 }-
1385 }
never executed: end of block
0
1386 }
never executed: end of block
0
1387 QString valueStr;-
1388 if(value.type() == QVariant::StringList
value.type() =...nt::StringListDescription
TRUEnever evaluated
FALSEnever evaluated
|| value.type() == QVariant::List
value.type() == QVariant::ListDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1389 valueStr = value.toStringList().join(QLatin1Char(' '));
never executed: valueStr = value.toStringList().join(QLatin1Char(' '));
0
1390 else-
1391 valueStr = value.toString();
never executed: valueStr = value.toString();
0
1392 cache[name] = valueStr;-
1393 return
never executed: return valueStr;
valueStr;
never executed: return valueStr;
0
1394 }-
1395 bool nodeNameEquals(NodePtr node, const QString& nodeName) const override-
1396 {-
1397 if (isNullNode(node)
isNullNode(node)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1398 return
never executed: return false;
false;
never executed: return false;
0
1399 const QMetaObject *metaObject = (static_cast<QObject *>(node.ptr))->metaObject();-
1400-
1401 if (qstrcmp(metaObject->className(), "QTipLabel") == 0
qstrcmp(metaOb...ipLabel") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1402 return
never executed: return nodeName == QLatin1String("QToolTip");
nodeName == QLatin1String("QToolTip");
never executed: return nodeName == QLatin1String("QToolTip");
0
1403-
1404 do {-
1405 const ushort *uc = (const ushort *)nodeName.constData();-
1406 const ushort *e = uc + nodeName.length();-
1407 const uchar *c = (const uchar *)metaObject->className();-
1408 while (*
*cDescription
TRUEnever evaluated
FALSEnever evaluated
c
*cDescription
TRUEnever evaluated
FALSEnever evaluated
&& uc != e
uc != eDescription
TRUEnever evaluated
FALSEnever evaluated
&& (*
*uc == *cDescription
TRUEnever evaluated
FALSEnever evaluated
uc == *c
*uc == *cDescription
TRUEnever evaluated
FALSEnever evaluated
|| (*
*c == ':'Description
TRUEnever evaluated
FALSEnever evaluated
c == ':'
*c == ':'Description
TRUEnever evaluated
FALSEnever evaluated
&& *
*uc == '-'Description
TRUEnever evaluated
FALSEnever evaluated
uc == '-'
*uc == '-'Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
1409 ++uc;-
1410 ++c;-
1411 }
never executed: end of block
0
1412 if (uc == e
uc == eDescription
TRUEnever evaluated
FALSEnever evaluated
&& !*c
!*cDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1413 return
never executed: return true;
true;
never executed: return true;
0
1414 metaObject = metaObject->superClass();-
1415 }
never executed: end of block
while (metaObject != 0
metaObject != 0Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1416 return
never executed: return false;
false;
never executed: return false;
0
1417 }-
1418 bool hasAttributes(NodePtr) const override-
1419 { return
never executed: return true;
true;
never executed: return true;
}
0
1420 QStringList nodeIds(NodePtr node) const override-
1421 { return
never executed: return isNullNode(node) ? QStringList() : QStringList((static_cast<QObject *>(node.ptr))->objectName());
isNullNode(node) ? QStringList() : QStringList((static_cast<QObject *>(node.ptr))->objectName());
never executed: return isNullNode(node) ? QStringList() : QStringList((static_cast<QObject *>(node.ptr))->objectName());
}
0
1422 bool isNullNode(NodePtr node) const override-
1423 { return
never executed: return node.ptr == 0;
node.ptr == 0;
never executed: return node.ptr == 0;
}
0
1424 NodePtr parentNode(NodePtr node) const override-
1425 { NodePtr n; n.ptr = isNullNode(node)
isNullNode(node)Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : parentObject((static_cast<QObject *>(node.ptr))); return
never executed: return n;
n;
never executed: return n;
}
0
1426 NodePtr previousSiblingNode(NodePtr) const override-
1427 { NodePtr n; n.ptr = 0; return
never executed: return n;
n;
never executed: return n;
}
0
1428 NodePtr duplicateNode(NodePtr node) const override-
1429 { return
never executed: return node;
node;
never executed: return node;
}
0
1430 void freeNode(NodePtr) const override-
1431 { }-
1432-
1433private:-
1434 mutable QHash<const QObject *, QHash<QString, QString> > m_attributeCache;-
1435};-
1436-
1437QVector<QCss::StyleRule> QStyleSheetStyle::styleRules(const QObject *obj) const-
1438{-
1439 QHash<const QObject *, QVector<StyleRule> >::const_iterator cacheIt = styleSheetCaches->styleRulesCache.constFind(obj);-
1440 if (cacheIt != styleSheetCaches->styleRulesCache.constEnd()
cacheIt != sty...che.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1441 return
never executed: return cacheIt.value();
cacheIt.value();
never executed: return cacheIt.value();
0
1442-
1443 if (!initObject(obj)
!initObject(obj)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1444 return
never executed: return QVector<StyleRule>();
QVector<StyleRule>();
never executed: return QVector<StyleRule>();
0
1445 }-
1446-
1447 QStyleSheetStyleSelector styleSelector;-
1448-
1449 StyleSheet defaultSs;-
1450 QHash<const void *, StyleSheet>::const_iterator defaultCacheIt = styleSheetCaches->styleSheetCache.constFind(baseStyle());-
1451 if (defaultCacheIt == styleSheetCaches->styleSheetCache.constEnd()
defaultCacheIt...che.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1452 defaultSs = getDefaultStyleSheet();-
1453 QStyle *bs = baseStyle();-
1454 styleSheetCaches->styleSheetCache.insert(bs, defaultSs);-
1455 QObject::connect(bs, qFlagLocation("2""destroyed(QObject*)" "\0" __FILE__ ":" "1544"), styleSheetCaches, qFlagLocation("1""styleDestroyed(QObject*)" "\0" __FILE__ ":" "1544"), Qt::UniqueConnection);-
1456 }
never executed: end of block
else {
0
1457 defaultSs = defaultCacheIt.value();-
1458 }
never executed: end of block
0
1459 styleSelector.styleSheets += defaultSs;-
1460-
1461 if (!(static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet().isEmpty()
!(static_cast<...et().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1462 StyleSheet appSs;-
1463 QHash<const void *, StyleSheet>::const_iterator appCacheIt = styleSheetCaches->styleSheetCache.constFind((static_cast<QApplication *>(QCoreApplication::instance())));-
1464 if (appCacheIt == styleSheetCaches->styleSheetCache.constEnd()
appCacheIt == ...che.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1465 QString ss = (static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet();-
1466 if (ss.startsWith(QLatin1String("file:///"))
ss.startsWith(...g("file:///"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1467 ss.remove(0, 8);
never executed: ss.remove(0, 8);
0
1468 parser.init(ss, (static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet() != ss);-
1469 if (__builtin_expect(!!(!parser.parse(&appSs)), false)
__builtin_expe...ppSs)), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1470 QMessageLogger(__FILE__, 1559, __PRETTY_FUNCTION__).warning("Could not parse application stylesheet");
never executed: QMessageLogger(__FILE__, 1559, __PRETTY_FUNCTION__).warning("Could not parse application stylesheet");
0
1471 appSs.origin = StyleSheetOrigin_Inline;-
1472 appSs.depth = 1;-
1473 styleSheetCaches->styleSheetCache.insert((static_cast<QApplication *>(QCoreApplication::instance())), appSs);-
1474 }
never executed: end of block
else {
0
1475 appSs = appCacheIt.value();-
1476 }
never executed: end of block
0
1477 styleSelector.styleSheets += appSs;-
1478 }
never executed: end of block
0
1479-
1480 QVector<QCss::StyleSheet> objectSs;-
1481 for (const QObject *o = obj; o
oDescription
TRUEnever evaluated
FALSEnever evaluated
; o = parentObject(o)) {
0
1482 QString styleSheet = o->property("styleSheet").toString();-
1483 if (styleSheet.isEmpty()
styleSheet.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1484 continue;
never executed: continue;
0
1485 StyleSheet ss;-
1486 QHash<const void *, StyleSheet>::const_iterator objCacheIt = styleSheetCaches->styleSheetCache.constFind(o);-
1487 if (objCacheIt == styleSheetCaches->styleSheetCache.constEnd()
objCacheIt == ...che.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1488 parser.init(styleSheet);-
1489 if (!parser.parse(&ss)
!parser.parse(&ss)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1490 parser.init(QLatin1String("* {") + styleSheet + QLatin1Char('}'));-
1491 if (__builtin_expect(!!(!parser.parse(&ss)), false)
__builtin_expe...(&ss)), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1492 QMessageLogger(__FILE__, 1581, __PRETTY_FUNCTION__).warning("Could not parse stylesheet of object %p", o);
never executed: QMessageLogger(__FILE__, 1581, __PRETTY_FUNCTION__).warning("Could not parse stylesheet of object %p", o);
0
1493 }
never executed: end of block
0
1494 ss.origin = StyleSheetOrigin_Inline;-
1495 styleSheetCaches->styleSheetCache.insert(o, ss);-
1496 }
never executed: end of block
else {
0
1497 ss = objCacheIt.value();-
1498 }
never executed: end of block
0
1499 objectSs.append(ss);-
1500 }
never executed: end of block
0
1501-
1502 for (int i = 0; i < objectSs.count()
i < objectSs.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
1503 objectSs[i].depth = objectSs.count() - i + 2;
never executed: objectSs[i].depth = objectSs.count() - i + 2;
0
1504-
1505 styleSelector.styleSheets += objectSs;-
1506-
1507 StyleSelector::NodePtr n;-
1508 n.ptr = const_cast<QObject *>(obj);-
1509 QVector<QCss::StyleRule> rules = styleSelector.styleRulesForNode(n);-
1510 styleSheetCaches->styleRulesCache.insert(obj, rules);-
1511 return
never executed: return rules;
rules;
never executed: return rules;
0
1512}-
1513-
1514-
1515-
1516static QVector<Declaration> declarations(const QVector<StyleRule> &styleRules, const QString &part, quint64 pseudoClass = PseudoClass_Unspecified)-
1517{-
1518 QVector<Declaration> decls;-
1519 for (int i = 0; i < styleRules.count()
i < styleRules.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
1520 const Selector& selector = styleRules.at(i).selectors.at(0);-
1521-
1522-
1523 if (part.compare(selector.pseudoElement(), Qt::CaseInsensitive) != 0
part.compare(s...ensitive) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1524 continue;
never executed: continue;
0
1525 quint64 negated = 0;-
1526 quint64 cssClass = selector.pseudoClass(&negated);-
1527 if ((
(pseudoClass =...eudoClass_Any)Description
TRUEnever evaluated
FALSEnever evaluated
pseudoClass == PseudoClass_Any)
(pseudoClass =...eudoClass_Any)Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(cssClass == P...s_Unspecified)Description
TRUEnever evaluated
FALSEnever evaluated
cssClass == PseudoClass_Unspecified)
(cssClass == P...s_Unspecified)Description
TRUEnever evaluated
FALSEnever evaluated
0
1528 || ((((
(((cssClass & ... == cssClass))Description
TRUEnever evaluated
FALSEnever evaluated
cssClass & pseudoClass) == cssClass))
(((cssClass & ... == cssClass))Description
TRUEnever evaluated
FALSEnever evaluated
&& ((
((negated & pseudoClass) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
negated & pseudoClass) == 0)
((negated & pseudoClass) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
))
0
1529 decls += styleRules.at(i).declarations;
never executed: decls += styleRules.at(i).declarations;
0
1530 }
never executed: end of block
0
1531 return
never executed: return decls;
decls;
never executed: return decls;
0
1532}-
1533-
1534int QStyleSheetStyle::nativeFrameWidth(const QWidget *w)-
1535{-
1536 QStyle *base = baseStyle();-
1537-
1538-
1539 if (qobject_cast<const QAbstractSpinBox *>(w)
qobject_cast<c...tSpinBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1540 return
never executed: return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);
base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);
never executed: return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);
0
1541-
1542-
1543-
1544 if (qobject_cast<const QComboBox *>(w)
qobject_cast<c...ComboBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1545 return
never executed: return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);
base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);
never executed: return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);
0
1546-
1547-
1548-
1549 if (qobject_cast<const QMenu *>(w)
qobject_cast<const QMenu *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1550 return
never executed: return base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w);
base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w);
never executed: return base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w);
0
1551-
1552-
1553-
1554 if (qobject_cast<const QMenuBar *>(w)
qobject_cast<c...QMenuBar *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1555 return
never executed: return base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w);
base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w);
never executed: return base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w);
0
1556-
1557-
1558 if (const
const QFrame *...t QFrame *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
QFrame *frame = qobject_cast<const QFrame *>(w)
const QFrame *...t QFrame *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1559 if (frame->frameShape() == QFrame::NoFrame
frame->frameSh...Frame::NoFrameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1560 return
never executed: return 0;
0;
never executed: return 0;
0
1561 }
never executed: end of block
0
1562-
1563-
1564 if (qstrcmp(w->metaObject()->className(), "QTipLabel") == 0
qstrcmp(w->met...ipLabel") == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1565 return
never executed: return base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w);
base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w);
never executed: return base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w);
0
1566-
1567 return
never executed: return base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w);
base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w);
never executed: return base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w);
0
1568}-
1569-
1570static quint64 pseudoClass(QStyle::State state)-
1571{-
1572 quint64 pc = 0;-
1573 if (state & QStyle::State_Enabled
state & QStyle::State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1574 pc |= PseudoClass_Enabled;-
1575 if (state & QStyle::State_MouseOver
state & QStyle...tate_MouseOverDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1576 pc |= PseudoClass_Hover;
never executed: pc |= PseudoClass_Hover;
0
1577 }
never executed: end of block
else {
0
1578 pc |= PseudoClass_Disabled;-
1579 }
never executed: end of block
0
1580 if (state & QStyle::State_Active
state & QStyle::State_ActiveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1581 pc |= PseudoClass_Active;
never executed: pc |= PseudoClass_Active;
0
1582 if (state & QStyle::State_Window
state & QStyle::State_WindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1583 pc |= PseudoClass_Window;
never executed: pc |= PseudoClass_Window;
0
1584 if (state & QStyle::State_Sunken
state & QStyle::State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1585 pc |= PseudoClass_Pressed;
never executed: pc |= PseudoClass_Pressed;
0
1586 if (state & QStyle::State_HasFocus
state & QStyle::State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1587 pc |= PseudoClass_Focus;
never executed: pc |= PseudoClass_Focus;
0
1588 if (state & QStyle::State_On
state & QStyle::State_OnDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1589 pc |= (PseudoClass_On | PseudoClass_Checked);
never executed: pc |= (PseudoClass_On | PseudoClass_Checked);
0
1590 if (state & QStyle::State_Off
state & QStyle::State_OffDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1591 pc |= (PseudoClass_Off | PseudoClass_Unchecked);
never executed: pc |= (PseudoClass_Off | PseudoClass_Unchecked);
0
1592 if (state & QStyle::State_NoChange
state & QStyle::State_NoChangeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1593 pc |= PseudoClass_Indeterminate;
never executed: pc |= PseudoClass_Indeterminate;
0
1594 if (state & QStyle::State_Selected
state & QStyle::State_SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1595 pc |= PseudoClass_Selected;
never executed: pc |= PseudoClass_Selected;
0
1596 if (state & QStyle::State_Horizontal
state & QStyle...ate_HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1597 pc |= PseudoClass_Horizontal;
never executed: pc |= PseudoClass_Horizontal;
0
1598 else-
1599 pc |= PseudoClass_Vertical;
never executed: pc |= PseudoClass_Vertical;
0
1600 if (state & (QStyle::State_Open | QStyle::State_On | QStyle::State_Sunken)
state & (QStyl...:State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1601 pc |= PseudoClass_Open;
never executed: pc |= PseudoClass_Open;
0
1602 else-
1603 pc |= PseudoClass_Closed;
never executed: pc |= PseudoClass_Closed;
0
1604 if (state & QStyle::State_Children
state & QStyle::State_ChildrenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1605 pc |= PseudoClass_Children;
never executed: pc |= PseudoClass_Children;
0
1606 if (state & QStyle::State_Sibling
state & QStyle::State_SiblingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1607 pc |= PseudoClass_Sibling;
never executed: pc |= PseudoClass_Sibling;
0
1608 if (state & QStyle::State_ReadOnly
state & QStyle::State_ReadOnlyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1609 pc |= PseudoClass_ReadOnly;
never executed: pc |= PseudoClass_ReadOnly;
0
1610 if (state & QStyle::State_Item
state & QStyle::State_ItemDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1611 pc |= PseudoClass_Item;
never executed: pc |= PseudoClass_Item;
0
1612-
1613-
1614-
1615-
1616 return
never executed: return pc;
pc;
never executed: return pc;
0
1617}-
1618-
1619static void qt_check_if_internal_object(const QObject **obj, int *element)-
1620{-
1621-
1622-
1623-
1624-
1625 if (*
*objDescription
TRUEnever evaluated
FALSEnever evaluated
obj
*objDescription
TRUEnever evaluated
FALSEnever evaluated
&& qstrcmp((*obj)->metaObject()->className(), "QDockWidgetTitleButton") == 0
qstrcmp((*obj)...eButton") == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1626 if ((*
(*obj)->object..._closebutton")Description
TRUEnever evaluated
FALSEnever evaluated
obj)->objectName() == QLatin1String("qt_dockwidget_closebutton")
(*obj)->object..._closebutton")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1627 *element = PseudoElement_DockWidgetCloseButton;-
1628 }
never executed: end of block
else if ((*
(*obj)->object..._floatbutton")Description
TRUEnever evaluated
FALSEnever evaluated
obj)->objectName() == QLatin1String("qt_dockwidget_floatbutton")
(*obj)->object..._floatbutton")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1629 *element = PseudoElement_DockWidgetFloatButton;-
1630 }
never executed: end of block
0
1631 *obj = (*obj)->parent();-
1632 }
never executed: end of block
0
1633-
1634}
never executed: end of block
0
1635-
1636QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, int element, quint64 state) const-
1637{-
1638 qt_check_if_internal_object(&obj, &element);-
1639 QHash<quint64, QRenderRule> &cache = styleSheetCaches->renderRulesCache[obj][element];-
1640 QHash<quint64, QRenderRule>::const_iterator cacheIt = cache.constFind(state);-
1641 if (cacheIt != cache.constEnd()
cacheIt != cache.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1642 return
never executed: return cacheIt.value();
cacheIt.value();
never executed: return cacheIt.value();
0
1643-
1644 if (!initObject(obj)
!initObject(obj)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1645 return
never executed: return QRenderRule();
QRenderRule();
never executed: return QRenderRule();
0
1646-
1647 quint64 stateMask = 0;-
1648 const QVector<StyleRule> rules = styleRules(obj);-
1649 for (int i = 0; i < rules.count()
i < rules.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
1650 const Selector& selector = rules.at(i).selectors.at(0);-
1651 quint64 negated = 0;-
1652 stateMask |= selector.pseudoClass(&negated);-
1653 stateMask |= negated;-
1654 }
never executed: end of block
0
1655-
1656 cacheIt = cache.constFind(state & stateMask);-
1657 if (cacheIt != cache.constEnd()
cacheIt != cache.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1658 const QRenderRule &newRule = cacheIt.value();-
1659 cache[state] = newRule;-
1660 return
never executed: return newRule;
newRule;
never executed: return newRule;
0
1661 }-
1662-
1663-
1664 const QString part = QLatin1String(knownPseudoElements[element].name);-
1665 QVector<Declaration> decls = declarations(rules, part, state);-
1666 QRenderRule newRule(decls, obj);-
1667 cache[state] = newRule;-
1668 if ((
(state & stateMask) != stateDescription
TRUEnever evaluated
FALSEnever evaluated
state & stateMask) != state
(state & stateMask) != stateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1669 cache[state&stateMask] = newRule;
never executed: cache[state&stateMask] = newRule;
0
1670 return
never executed: return newRule;
newRule;
never executed: return newRule;
0
1671}-
1672-
1673QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption *opt, int pseudoElement) const-
1674{-
1675 quint64 extraClass = 0;-
1676 QStyle::State state = opt
optDescription
TRUEnever evaluated
FALSEnever evaluated
? opt->state : QStyle::State(QStyle::State_None);
0
1677-
1678 if (const
const QStyleOp...omplex *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComplex *complex = qstyleoption_cast<const QStyleOptionComplex *>(opt)
const QStyleOp...omplex *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1679 if (pseudoElement != PseudoElement_None
pseudoElement ...doElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1680-
1681 QStyle::SubControl subControl = knownPseudoElements[pseudoElement].subControl;-
1682-
1683 if (!(complex->activeSubControls & subControl)
!(complex->act... & subControl)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1684 state &= (QStyle::State_Enabled | QStyle::State_Horizontal | QStyle::State_HasFocus);
never executed: state &= (QStyle::State_Enabled | QStyle::State_Horizontal | QStyle::State_HasFocus);
0
1685 }
never executed: end of block
0
1686-
1687 switch (pseudoElement) {-
1688 case
never executed: case PseudoElement_ComboBoxDropDown:
PseudoElement_ComboBoxDropDown:
never executed: case PseudoElement_ComboBoxDropDown:
0
1689 case
never executed: case PseudoElement_ComboBoxArrow:
PseudoElement_ComboBoxArrow:
never executed: case PseudoElement_ComboBoxArrow:
0
1690 state |= (complex->state & (QStyle::State_On|QStyle::State_ReadOnly));-
1691 break;
never executed: break;
0
1692 case
never executed: case PseudoElement_SpinBoxUpButton:
PseudoElement_SpinBoxUpButton:
never executed: case PseudoElement_SpinBoxUpButton:
0
1693 case
never executed: case PseudoElement_SpinBoxDownButton:
PseudoElement_SpinBoxDownButton:
never executed: case PseudoElement_SpinBoxDownButton:
0
1694 case
never executed: case PseudoElement_SpinBoxUpArrow:
PseudoElement_SpinBoxUpArrow:
never executed: case PseudoElement_SpinBoxUpArrow:
0
1695 case
never executed: case PseudoElement_SpinBoxDownArrow:
PseudoElement_SpinBoxDownArrow:
never executed: case PseudoElement_SpinBoxDownArrow:
0
1696-
1697 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1698 bool on = false;-
1699 bool up = pseudoElement == PseudoElement_SpinBoxUpButton
pseudoElement ...pinBoxUpButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
1700 || pseudoElement == PseudoElement_SpinBoxUpArrow
pseudoElement ...SpinBoxUpArrowDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
1701 if ((
(sb->stepEnabl...StepUpEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)
(sb->stepEnabl...StepUpEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
&& up
upDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1702 on = true;
never executed: on = true;
0
1703 else if ((
(sb->stepEnabl...epDownEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)
(sb->stepEnabl...epDownEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
&& !up
!upDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1704 on = true;
never executed: on = true;
0
1705 state |= (on
onDescription
TRUEnever evaluated
FALSEnever evaluated
? QStyle::State_On : QStyle::State_Off);
0
1706 }
never executed: end of block
0
1707-
1708 break;
never executed: break;
0
1709 case
never executed: case PseudoElement_GroupBoxTitle:
PseudoElement_GroupBoxTitle:
never executed: case PseudoElement_GroupBoxTitle:
0
1710 state |= (complex->state & (QStyle::State_MouseOver | QStyle::State_Sunken));-
1711 break;
never executed: break;
0
1712 case
never executed: case PseudoElement_ToolButtonMenu:
PseudoElement_ToolButtonMenu:
never executed: case PseudoElement_ToolButtonMenu:
0
1713 case
never executed: case PseudoElement_ToolButtonMenuArrow:
PseudoElement_ToolButtonMenuArrow:
never executed: case PseudoElement_ToolButtonMenuArrow:
0
1714 case
never executed: case PseudoElement_ToolButtonDownArrow:
PseudoElement_ToolButtonDownArrow:
never executed: case PseudoElement_ToolButtonDownArrow:
0
1715 state |= complex->state & QStyle::State_MouseOver;-
1716 if (complex->state & QStyle::State_Sunken
complex->state...::State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
1717 complex->activeSubControls & QStyle::SC_ToolButtonMenu
complex->activ...ToolButtonMenuDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1718 state |= QStyle::State_Sunken;
never executed: state |= QStyle::State_Sunken;
0
1719 break;
never executed: break;
0
1720 case
never executed: case PseudoElement_SliderGroove:
PseudoElement_SliderGroove:
never executed: case PseudoElement_SliderGroove:
0
1721 state |= complex->state & QStyle::State_MouseOver;-
1722 break;
never executed: break;
0
1723 default
never executed: default:
:
never executed: default:
0
1724 break;
never executed: break;
0
1725 }-
1726-
1727 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1728-
1729-
1730 if (pseudoElement == PseudoElement_None
pseudoElement ...doElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
0
1731 && (
(complex->acti...oBoxEditField)Description
TRUEnever evaluated
FALSEnever evaluated
complex->activeSubControls & QStyle::SC_ComboBoxEditField)
(complex->acti...oBoxEditField)Description
TRUEnever evaluated
FALSEnever evaluated
0
1732 && (
(!(state & QSt...te_MouseOver))Description
TRUEnever evaluated
FALSEnever evaluated
!(state & QStyle::State_MouseOver))
(!(state & QSt...te_MouseOver))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1733 state |= QStyle::State_Sunken;-
1734 }
never executed: end of block
0
1735-
1736 if (!combo->frame
!combo->frameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1737 extraClass |= PseudoClass_Frameless;
never executed: extraClass |= PseudoClass_Frameless;
0
1738 if (!combo->editable
!combo->editableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1739 extraClass |= PseudoClass_ReadOnly;
never executed: extraClass |= PseudoClass_ReadOnly;
0
1740 else-
1741 extraClass |= PseudoClass_Editable;
never executed: extraClass |= PseudoClass_Editable;
0
1742-
1743 } else if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *spin = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1744 if (!spin->frame
!spin->frameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1745 extraClass |= PseudoClass_Frameless;
never executed: extraClass |= PseudoClass_Frameless;
0
1746-
1747 }
never executed: end of block
else if (const
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionGroupBox *gb = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1748 if (gb->features & QStyleOptionFrame::Flat
gb->features &...ionFrame::FlatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1749 extraClass |= PseudoClass_Flat;
never executed: extraClass |= PseudoClass_Flat;
0
1750 if (gb->lineWidth == 0
gb->lineWidth == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1751 extraClass |= PseudoClass_Frameless;
never executed: extraClass |= PseudoClass_Frameless;
0
1752 }
never executed: end of block
else if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1753 if (tb->titleBarState & Qt::WindowMinimized
tb->titleBarSt...indowMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1754 extraClass |= PseudoClass_Minimized;-
1755 }
never executed: end of block
0
1756 else if (tb->titleBarState & Qt::WindowMaximized
tb->titleBarSt...indowMaximizedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1757 extraClass |= PseudoClass_Maximized;
never executed: extraClass |= PseudoClass_Maximized;
0
1758 }
never executed: end of block
0
1759 }
never executed: end of block
else {
0
1760-
1761 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1762 if (mi->menuItemType == QStyleOptionMenuItem::DefaultItem
mi->menuItemTy...m::DefaultItemDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1763 extraClass |= PseudoClass_Default;
never executed: extraClass |= PseudoClass_Default;
0
1764 if (mi->checkType == QStyleOptionMenuItem::Exclusive
mi->checkType ...tem::ExclusiveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1765 extraClass |= PseudoClass_Exclusive;
never executed: extraClass |= PseudoClass_Exclusive;
0
1766 else if (mi->checkType == QStyleOptionMenuItem::NonExclusive
mi->checkType ...::NonExclusiveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1767 extraClass |= PseudoClass_NonExclusive;
never executed: extraClass |= PseudoClass_NonExclusive;
0
1768 if (mi->checkType != QStyleOptionMenuItem::NotCheckable
mi->checkType ...::NotCheckableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1769 extraClass |= (
(mi->checked)Description
TRUEnever evaluated
FALSEnever evaluated
mi->checked)
(mi->checked)Description
TRUEnever evaluated
FALSEnever evaluated
? (PseudoClass_On|PseudoClass_Checked)
never executed: extraClass |= (mi->checked) ? (PseudoClass_On|PseudoClass_Checked) : (PseudoClass_Off|PseudoClass_Unchecked);
0
1770 : (PseudoClass_Off|PseudoClass_Unchecked);
never executed: extraClass |= (mi->checked) ? (PseudoClass_On|PseudoClass_Checked) : (PseudoClass_Off|PseudoClass_Unchecked);
0
1771 }
never executed: end of block
else if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1772 if (hdr->position == QStyleOptionHeader::OnlyOneSection
hdr->position ...OnlyOneSectionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1773 extraClass |= PseudoClass_OnlyOne;
never executed: extraClass |= PseudoClass_OnlyOne;
0
1774 else if (hdr->position == QStyleOptionHeader::Beginning
hdr->position ...der::BeginningDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1775 extraClass |= PseudoClass_First;
never executed: extraClass |= PseudoClass_First;
0
1776 else if (hdr->position == QStyleOptionHeader::End
hdr->position ...ionHeader::EndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1777 extraClass |= PseudoClass_Last;
never executed: extraClass |= PseudoClass_Last;
0
1778 else if (hdr->position == QStyleOptionHeader::Middle
hdr->position ...Header::MiddleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1779 extraClass |= PseudoClass_Middle;
never executed: extraClass |= PseudoClass_Middle;
0
1780-
1781 if (hdr->selectedPosition == QStyleOptionHeader::NextAndPreviousAreSelected
hdr->selectedP...ousAreSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1782 extraClass |= (PseudoClass_NextSelected | PseudoClass_PreviousSelected);
never executed: extraClass |= (PseudoClass_NextSelected | PseudoClass_PreviousSelected);
0
1783 else if (hdr->selectedPosition == QStyleOptionHeader::NextIsSelected
hdr->selectedP...NextIsSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1784 extraClass |= PseudoClass_NextSelected;
never executed: extraClass |= PseudoClass_NextSelected;
0
1785 else if (hdr->selectedPosition == QStyleOptionHeader::PreviousIsSelected
hdr->selectedP...iousIsSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1786 extraClass |= PseudoClass_PreviousSelected;
never executed: extraClass |= PseudoClass_PreviousSelected;
0
1787-
1788 }
never executed: end of block
else if (const
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabWidgetFrame *tab = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1789 switch (tab->shape) {-
1790 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
1791 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
1792 extraClass |= PseudoClass_Top;-
1793 break;
never executed: break;
0
1794 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
1795 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
1796 extraClass |= PseudoClass_Bottom;-
1797 break;
never executed: break;
0
1798 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
1799 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
1800 extraClass |= PseudoClass_Left;-
1801 break;
never executed: break;
0
1802 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
1803 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
1804 extraClass |= PseudoClass_Right;-
1805 break;
never executed: break;
0
1806 default
never executed: default:
:
never executed: default:
0
1807 break;
never executed: break;
0
1808 }-
1809-
1810-
1811 } else if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1812 if (tab->position == QStyleOptionTab::OnlyOneTab
tab->position ...ab::OnlyOneTabDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1813 extraClass |= PseudoClass_OnlyOne;
never executed: extraClass |= PseudoClass_OnlyOne;
0
1814 else if (tab->position == QStyleOptionTab::Beginning
tab->position ...Tab::BeginningDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1815 extraClass |= PseudoClass_First;
never executed: extraClass |= PseudoClass_First;
0
1816 else if (tab->position == QStyleOptionTab::End
tab->position ...OptionTab::EndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1817 extraClass |= PseudoClass_Last;
never executed: extraClass |= PseudoClass_Last;
0
1818 else if (tab->position == QStyleOptionTab::Middle
tab->position ...ionTab::MiddleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1819 extraClass |= PseudoClass_Middle;
never executed: extraClass |= PseudoClass_Middle;
0
1820-
1821 if (tab->selectedPosition == QStyleOptionTab::NextIsSelected
tab->selectedP...NextIsSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1822 extraClass |= PseudoClass_NextSelected;
never executed: extraClass |= PseudoClass_NextSelected;
0
1823 else if (tab->selectedPosition == QStyleOptionTab::PreviousIsSelected
tab->selectedP...iousIsSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1824 extraClass |= PseudoClass_PreviousSelected;
never executed: extraClass |= PseudoClass_PreviousSelected;
0
1825-
1826 switch (tab->shape) {-
1827 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
1828 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
1829 extraClass |= PseudoClass_Top;-
1830 break;
never executed: break;
0
1831 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
1832 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
1833 extraClass |= PseudoClass_Bottom;-
1834 break;
never executed: break;
0
1835 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
1836 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
1837 extraClass |= PseudoClass_Left;-
1838 break;
never executed: break;
0
1839 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
1840 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
1841 extraClass |= PseudoClass_Right;-
1842 break;
never executed: break;
0
1843 default
never executed: default:
:
never executed: default:
0
1844 break;
never executed: break;
0
1845 }-
1846-
1847 } else if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1848 if (btn->features & QStyleOptionButton::Flat
btn->features ...onButton::FlatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1849 extraClass |= PseudoClass_Flat;
never executed: extraClass |= PseudoClass_Flat;
0
1850 if (btn->features & QStyleOptionButton::DefaultButton
btn->features ...:DefaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1851 extraClass |= PseudoClass_Default;
never executed: extraClass |= PseudoClass_Default;
0
1852 }
never executed: end of block
else if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frm = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1853 if (frm->lineWidth == 0
frm->lineWidth == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1854 extraClass |= PseudoClass_Frameless;
never executed: extraClass |= PseudoClass_Frameless;
0
1855 if (frm->features & QStyleOptionFrame::Flat
frm->features ...ionFrame::FlatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1856 extraClass |= PseudoClass_Flat;
never executed: extraClass |= PseudoClass_Flat;
0
1857 }
never executed: end of block
0
1858-
1859 else if (const
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBar *tb = qstyleoption_cast<const QStyleOptionToolBar *>(opt)
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1860 if (tb->toolBarArea == Qt::LeftToolBarArea
tb->toolBarAre...eftToolBarAreaDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1861 extraClass |= PseudoClass_Left;
never executed: extraClass |= PseudoClass_Left;
0
1862 else if (tb->toolBarArea == Qt::RightToolBarArea
tb->toolBarAre...ghtToolBarAreaDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1863 extraClass |= PseudoClass_Right;
never executed: extraClass |= PseudoClass_Right;
0
1864 else if (tb->toolBarArea == Qt::TopToolBarArea
tb->toolBarAre...TopToolBarAreaDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1865 extraClass |= PseudoClass_Top;
never executed: extraClass |= PseudoClass_Top;
0
1866 else if (tb->toolBarArea == Qt::BottomToolBarArea
tb->toolBarAre...tomToolBarAreaDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1867 extraClass |= PseudoClass_Bottom;
never executed: extraClass |= PseudoClass_Bottom;
0
1868-
1869 if (tb->positionWithinLine == QStyleOptionToolBar::Beginning
tb->positionWi...Bar::BeginningDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1870 extraClass |= PseudoClass_First;
never executed: extraClass |= PseudoClass_First;
0
1871 else if (tb->positionWithinLine == QStyleOptionToolBar::Middle
tb->positionWi...oolBar::MiddleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1872 extraClass |= PseudoClass_Middle;
never executed: extraClass |= PseudoClass_Middle;
0
1873 else if (tb->positionWithinLine == QStyleOptionToolBar::End
tb->positionWi...onToolBar::EndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1874 extraClass |= PseudoClass_Last;
never executed: extraClass |= PseudoClass_Last;
0
1875 else if (tb->positionWithinLine == QStyleOptionToolBar::OnlyOne
tb->positionWi...olBar::OnlyOneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1876 extraClass |= PseudoClass_OnlyOne;
never executed: extraClass |= PseudoClass_OnlyOne;
0
1877 }
never executed: end of block
0
1878-
1879-
1880 else if (const
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1881 if (tb->position == QStyleOptionToolBox::OnlyOneTab
tb->position =...ox::OnlyOneTabDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1882 extraClass |= PseudoClass_OnlyOne;
never executed: extraClass |= PseudoClass_OnlyOne;
0
1883 else if (tb->position == QStyleOptionToolBox::Beginning
tb->position =...Box::BeginningDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1884 extraClass |= PseudoClass_First;
never executed: extraClass |= PseudoClass_First;
0
1885 else if (tb->position == QStyleOptionToolBox::End
tb->position =...onToolBox::EndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1886 extraClass |= PseudoClass_Last;
never executed: extraClass |= PseudoClass_Last;
0
1887 else if (tb->position == QStyleOptionToolBox::Middle
tb->position =...oolBox::MiddleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1888 extraClass |= PseudoClass_Middle;
never executed: extraClass |= PseudoClass_Middle;
0
1889-
1890 if (tb->selectedPosition == QStyleOptionToolBox::NextIsSelected
tb->selectedPo...NextIsSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1891 extraClass |= PseudoClass_NextSelected;
never executed: extraClass |= PseudoClass_NextSelected;
0
1892 else if (tb->selectedPosition == QStyleOptionToolBox::PreviousIsSelected
tb->selectedPo...iousIsSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1893 extraClass |= PseudoClass_PreviousSelected;
never executed: extraClass |= PseudoClass_PreviousSelected;
0
1894 }
never executed: end of block
0
1895-
1896-
1897 else if (const
const QStyleOp...Widget *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionDockWidget *dw = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)
const QStyleOp...Widget *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1898 if (dw->verticalTitleBar
dw->verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1899 extraClass |= PseudoClass_Vertical;
never executed: extraClass |= PseudoClass_Vertical;
0
1900 else-
1901 extraClass |= PseudoClass_Horizontal;
never executed: extraClass |= PseudoClass_Horizontal;
0
1902 if (dw->closable
dw->closableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1903 extraClass |= PseudoClass_Closable;
never executed: extraClass |= PseudoClass_Closable;
0
1904 if (dw->floatable
dw->floatableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1905 extraClass |= PseudoClass_Floatable;
never executed: extraClass |= PseudoClass_Floatable;
0
1906 if (dw->movable
dw->movableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1907 extraClass |= PseudoClass_Movable;
never executed: extraClass |= PseudoClass_Movable;
0
1908 }
never executed: end of block
0
1909-
1910-
1911 else if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1912 if (vopt->features & QStyleOptionViewItem::Alternate
vopt->features...tem::AlternateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1913 extraClass |= PseudoClass_Alternate;
never executed: extraClass |= PseudoClass_Alternate;
0
1914 if (vopt->viewItemPosition == QStyleOptionViewItem::OnlyOne
vopt->viewItem...wItem::OnlyOneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1915 extraClass |= PseudoClass_OnlyOne;
never executed: extraClass |= PseudoClass_OnlyOne;
0
1916 else if (vopt->viewItemPosition == QStyleOptionViewItem::Beginning
vopt->viewItem...tem::BeginningDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1917 extraClass |= PseudoClass_First;
never executed: extraClass |= PseudoClass_First;
0
1918 else if (vopt->viewItemPosition == QStyleOptionViewItem::End
vopt->viewItem...nViewItem::EndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1919 extraClass |= PseudoClass_Last;
never executed: extraClass |= PseudoClass_Last;
0
1920 else if (vopt->viewItemPosition == QStyleOptionViewItem::Middle
vopt->viewItem...ewItem::MiddleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1921 extraClass |= PseudoClass_Middle;
never executed: extraClass |= PseudoClass_Middle;
0
1922-
1923 }
never executed: end of block
0
1924-
1925-
1926-
1927 if (const
const QLineEdi...neEdit *>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
QLineEdit *lineEdit = qobject_cast<const QLineEdit *>(obj)
const QLineEdi...neEdit *>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1928 state &= ~QStyle::State_Sunken;-
1929 if (lineEdit->hasFrame()
lineEdit->hasFrame()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1930 extraClass &= ~PseudoClass_Frameless;-
1931 }
never executed: end of block
else {
0
1932 extraClass |= PseudoClass_Frameless;-
1933 }
never executed: end of block
0
1934 } else-
1935-
1936 if (const
const QFrame *...QFrame *>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
QFrame *frm = qobject_cast<const QFrame *>(obj)
const QFrame *...QFrame *>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1937 if (frm->lineWidth() == 0
frm->lineWidth() == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1938 extraClass |= PseudoClass_Frameless;
never executed: extraClass |= PseudoClass_Frameless;
0
1939 }
never executed: end of block
0
1940 }
never executed: end of block
0
1941-
1942 return
never executed: return renderRule(obj, pseudoElement, pseudoClass(state) | extraClass);
renderRule(obj, pseudoElement, pseudoClass(state) | extraClass);
never executed: return renderRule(obj, pseudoElement, pseudoClass(state) | extraClass);
0
1943}-
1944-
1945bool QStyleSheetStyle::hasStyleRule(const QObject *obj, int part) const-
1946{-
1947 QHash<int, bool> &cache = styleSheetCaches->hasStyleRuleCache[obj];-
1948 QHash<int, bool>::const_iterator cacheIt = cache.constFind(part);-
1949 if (cacheIt != cache.constEnd()
cacheIt != cache.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1950 return
never executed: return cacheIt.value();
cacheIt.value();
never executed: return cacheIt.value();
0
1951-
1952 if (!initObject(obj)
!initObject(obj)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1953 return
never executed: return false;
false;
never executed: return false;
0
1954-
1955-
1956 const QVector<StyleRule> &rules = styleRules(obj);-
1957 if (part == PseudoElement_None
part == PseudoElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1958 bool result = obj
objDescription
TRUEnever evaluated
FALSEnever evaluated
&& !rules.isEmpty()
!rules.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
1959 cache[part] = result;-
1960 return
never executed: return result;
result;
never executed: return result;
0
1961 }-
1962-
1963 QString pseudoElement = QLatin1String(knownPseudoElements[part].name);-
1964 for (int i = 0; i < rules.count()
i < rules.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
1965 const Selector& selector = rules.at(i).selectors.at(0);-
1966 if (pseudoElement.compare(selector.pseudoElement(), Qt::CaseInsensitive) == 0
pseudoElement....ensitive) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1967 cache[part] = true;-
1968 return
never executed: return true;
true;
never executed: return true;
0
1969 }-
1970 }
never executed: end of block
0
1971-
1972 cache[part] = false;-
1973 return
never executed: return false;
false;
never executed: return false;
0
1974}-
1975-
1976static Origin defaultOrigin(int pe)-
1977{-
1978 switch (pe) {-
1979 case
never executed: case PseudoElement_ScrollBarAddPage:
PseudoElement_ScrollBarAddPage:
never executed: case PseudoElement_ScrollBarAddPage:
0
1980 case
never executed: case PseudoElement_ScrollBarSubPage:
PseudoElement_ScrollBarSubPage:
never executed: case PseudoElement_ScrollBarSubPage:
0
1981 case
never executed: case PseudoElement_ScrollBarAddLine:
PseudoElement_ScrollBarAddLine:
never executed: case PseudoElement_ScrollBarAddLine:
0
1982 case
never executed: case PseudoElement_ScrollBarSubLine:
PseudoElement_ScrollBarSubLine:
never executed: case PseudoElement_ScrollBarSubLine:
0
1983 case
never executed: case PseudoElement_ScrollBarFirst:
PseudoElement_ScrollBarFirst:
never executed: case PseudoElement_ScrollBarFirst:
0
1984 case
never executed: case PseudoElement_ScrollBarLast:
PseudoElement_ScrollBarLast:
never executed: case PseudoElement_ScrollBarLast:
0
1985 case
never executed: case PseudoElement_GroupBoxTitle:
PseudoElement_GroupBoxTitle:
never executed: case PseudoElement_GroupBoxTitle:
0
1986 case
never executed: case PseudoElement_GroupBoxIndicator:
PseudoElement_GroupBoxIndicator:
never executed: case PseudoElement_GroupBoxIndicator:
0
1987 case
never executed: case PseudoElement_ToolButtonMenu:
PseudoElement_ToolButtonMenu:
never executed: case PseudoElement_ToolButtonMenu:
0
1988 case
never executed: case PseudoElement_SliderAddPage:
PseudoElement_SliderAddPage:
never executed: case PseudoElement_SliderAddPage:
0
1989 case
never executed: case PseudoElement_SliderSubPage:
PseudoElement_SliderSubPage:
never executed: case PseudoElement_SliderSubPage:
0
1990 return
never executed: return Origin_Border;
Origin_Border;
never executed: return Origin_Border;
0
1991-
1992 case
never executed: case PseudoElement_SpinBoxUpButton:
PseudoElement_SpinBoxUpButton:
never executed: case PseudoElement_SpinBoxUpButton:
0
1993 case
never executed: case PseudoElement_SpinBoxDownButton:
PseudoElement_SpinBoxDownButton:
never executed: case PseudoElement_SpinBoxDownButton:
0
1994 case
never executed: case PseudoElement_PushButtonMenuIndicator:
PseudoElement_PushButtonMenuIndicator:
never executed: case PseudoElement_PushButtonMenuIndicator:
0
1995 case
never executed: case PseudoElement_ComboBoxDropDown:
PseudoElement_ComboBoxDropDown:
never executed: case PseudoElement_ComboBoxDropDown:
0
1996 case
never executed: case PseudoElement_ToolButtonDownArrow:
PseudoElement_ToolButtonDownArrow:
never executed: case PseudoElement_ToolButtonDownArrow:
0
1997 case
never executed: case PseudoElement_MenuCheckMark:
PseudoElement_MenuCheckMark:
never executed: case PseudoElement_MenuCheckMark:
0
1998 case
never executed: case PseudoElement_MenuIcon:
PseudoElement_MenuIcon:
never executed: case PseudoElement_MenuIcon:
0
1999 case
never executed: case PseudoElement_MenuRightArrow:
PseudoElement_MenuRightArrow:
never executed: case PseudoElement_MenuRightArrow:
0
2000 return
never executed: return Origin_Padding;
Origin_Padding;
never executed: return Origin_Padding;
0
2001-
2002 case
never executed: case PseudoElement_Indicator:
PseudoElement_Indicator:
never executed: case PseudoElement_Indicator:
0
2003 case
never executed: case PseudoElement_ExclusiveIndicator:
PseudoElement_ExclusiveIndicator:
never executed: case PseudoElement_ExclusiveIndicator:
0
2004 case
never executed: case PseudoElement_ComboBoxArrow:
PseudoElement_ComboBoxArrow:
never executed: case PseudoElement_ComboBoxArrow:
0
2005 case
never executed: case PseudoElement_ScrollBarSlider:
PseudoElement_ScrollBarSlider:
never executed: case PseudoElement_ScrollBarSlider:
0
2006 case
never executed: case PseudoElement_ScrollBarUpArrow:
PseudoElement_ScrollBarUpArrow:
never executed: case PseudoElement_ScrollBarUpArrow:
0
2007 case
never executed: case PseudoElement_ScrollBarDownArrow:
PseudoElement_ScrollBarDownArrow:
never executed: case PseudoElement_ScrollBarDownArrow:
0
2008 case
never executed: case PseudoElement_ScrollBarLeftArrow:
PseudoElement_ScrollBarLeftArrow:
never executed: case PseudoElement_ScrollBarLeftArrow:
0
2009 case
never executed: case PseudoElement_ScrollBarRightArrow:
PseudoElement_ScrollBarRightArrow:
never executed: case PseudoElement_ScrollBarRightArrow:
0
2010 case
never executed: case PseudoElement_SpinBoxUpArrow:
PseudoElement_SpinBoxUpArrow:
never executed: case PseudoElement_SpinBoxUpArrow:
0
2011 case
never executed: case PseudoElement_SpinBoxDownArrow:
PseudoElement_SpinBoxDownArrow:
never executed: case PseudoElement_SpinBoxDownArrow:
0
2012 case
never executed: case PseudoElement_ToolButtonMenuArrow:
PseudoElement_ToolButtonMenuArrow:
never executed: case PseudoElement_ToolButtonMenuArrow:
0
2013 case
never executed: case PseudoElement_HeaderViewUpArrow:
PseudoElement_HeaderViewUpArrow:
never executed: case PseudoElement_HeaderViewUpArrow:
0
2014 case
never executed: case PseudoElement_HeaderViewDownArrow:
PseudoElement_HeaderViewDownArrow:
never executed: case PseudoElement_HeaderViewDownArrow:
0
2015 case
never executed: case PseudoElement_SliderGroove:
PseudoElement_SliderGroove:
never executed: case PseudoElement_SliderGroove:
0
2016 case
never executed: case PseudoElement_SliderHandle:
PseudoElement_SliderHandle:
never executed: case PseudoElement_SliderHandle:
0
2017 return
never executed: return Origin_Content;
Origin_Content;
never executed: return Origin_Content;
0
2018-
2019 default
never executed: default:
:
never executed: default:
0
2020 return
never executed: return Origin_Margin;
Origin_Margin;
never executed: return Origin_Margin;
0
2021 }-
2022}-
2023-
2024static Qt::Alignment defaultPosition(int pe)-
2025{-
2026 switch (pe) {-
2027 case
never executed: case PseudoElement_Indicator:
PseudoElement_Indicator:
never executed: case PseudoElement_Indicator:
0
2028 case
never executed: case PseudoElement_ExclusiveIndicator:
PseudoElement_ExclusiveIndicator:
never executed: case PseudoElement_ExclusiveIndicator:
0
2029 case
never executed: case PseudoElement_MenuCheckMark:
PseudoElement_MenuCheckMark:
never executed: case PseudoElement_MenuCheckMark:
0
2030 case
never executed: case PseudoElement_MenuIcon:
PseudoElement_MenuIcon:
never executed: case PseudoElement_MenuIcon:
0
2031 return
never executed: return Qt::AlignLeft | Qt::AlignVCenter;
Qt::AlignLeft | Qt::AlignVCenter;
never executed: return Qt::AlignLeft | Qt::AlignVCenter;
0
2032-
2033 case
never executed: case PseudoElement_ScrollBarAddLine:
PseudoElement_ScrollBarAddLine:
never executed: case PseudoElement_ScrollBarAddLine:
0
2034 case
never executed: case PseudoElement_ScrollBarLast:
PseudoElement_ScrollBarLast:
never executed: case PseudoElement_ScrollBarLast:
0
2035 case
never executed: case PseudoElement_SpinBoxDownButton:
PseudoElement_SpinBoxDownButton:
never executed: case PseudoElement_SpinBoxDownButton:
0
2036 case
never executed: case PseudoElement_PushButtonMenuIndicator:
PseudoElement_PushButtonMenuIndicator:
never executed: case PseudoElement_PushButtonMenuIndicator:
0
2037 case
never executed: case PseudoElement_ToolButtonDownArrow:
PseudoElement_ToolButtonDownArrow:
never executed: case PseudoElement_ToolButtonDownArrow:
0
2038 return
never executed: return Qt::AlignRight | Qt::AlignBottom;
Qt::AlignRight | Qt::AlignBottom;
never executed: return Qt::AlignRight | Qt::AlignBottom;
0
2039-
2040 case
never executed: case PseudoElement_ScrollBarSubLine:
PseudoElement_ScrollBarSubLine:
never executed: case PseudoElement_ScrollBarSubLine:
0
2041 case
never executed: case PseudoElement_ScrollBarFirst:
PseudoElement_ScrollBarFirst:
never executed: case PseudoElement_ScrollBarFirst:
0
2042 case
never executed: case PseudoElement_SpinBoxUpButton:
PseudoElement_SpinBoxUpButton:
never executed: case PseudoElement_SpinBoxUpButton:
0
2043 case
never executed: case PseudoElement_ComboBoxDropDown:
PseudoElement_ComboBoxDropDown:
never executed: case PseudoElement_ComboBoxDropDown:
0
2044 case
never executed: case PseudoElement_ToolButtonMenu:
PseudoElement_ToolButtonMenu:
never executed: case PseudoElement_ToolButtonMenu:
0
2045 case
never executed: case PseudoElement_DockWidgetCloseButton:
PseudoElement_DockWidgetCloseButton:
never executed: case PseudoElement_DockWidgetCloseButton:
0
2046 case
never executed: case PseudoElement_DockWidgetFloatButton:
PseudoElement_DockWidgetFloatButton:
never executed: case PseudoElement_DockWidgetFloatButton:
0
2047 return
never executed: return Qt::AlignRight | Qt::AlignTop;
Qt::AlignRight | Qt::AlignTop;
never executed: return Qt::AlignRight | Qt::AlignTop;
0
2048-
2049 case
never executed: case PseudoElement_ScrollBarUpArrow:
PseudoElement_ScrollBarUpArrow:
never executed: case PseudoElement_ScrollBarUpArrow:
0
2050 case
never executed: case PseudoElement_ScrollBarDownArrow:
PseudoElement_ScrollBarDownArrow:
never executed: case PseudoElement_ScrollBarDownArrow:
0
2051 case
never executed: case PseudoElement_ScrollBarLeftArrow:
PseudoElement_ScrollBarLeftArrow:
never executed: case PseudoElement_ScrollBarLeftArrow:
0
2052 case
never executed: case PseudoElement_ScrollBarRightArrow:
PseudoElement_ScrollBarRightArrow:
never executed: case PseudoElement_ScrollBarRightArrow:
0
2053 case
never executed: case PseudoElement_SpinBoxUpArrow:
PseudoElement_SpinBoxUpArrow:
never executed: case PseudoElement_SpinBoxUpArrow:
0
2054 case
never executed: case PseudoElement_SpinBoxDownArrow:
PseudoElement_SpinBoxDownArrow:
never executed: case PseudoElement_SpinBoxDownArrow:
0
2055 case
never executed: case PseudoElement_ComboBoxArrow:
PseudoElement_ComboBoxArrow:
never executed: case PseudoElement_ComboBoxArrow:
0
2056 case
never executed: case PseudoElement_DownArrow:
PseudoElement_DownArrow:
never executed: case PseudoElement_DownArrow:
0
2057 case
never executed: case PseudoElement_ToolButtonMenuArrow:
PseudoElement_ToolButtonMenuArrow:
never executed: case PseudoElement_ToolButtonMenuArrow:
0
2058 case
never executed: case PseudoElement_SliderGroove:
PseudoElement_SliderGroove:
never executed: case PseudoElement_SliderGroove:
0
2059 return
never executed: return Qt::AlignCenter;
Qt::AlignCenter;
never executed: return Qt::AlignCenter;
0
2060-
2061 case
never executed: case PseudoElement_GroupBoxTitle:
PseudoElement_GroupBoxTitle:
never executed: case PseudoElement_GroupBoxTitle:
0
2062 case
never executed: case PseudoElement_GroupBoxIndicator:
PseudoElement_GroupBoxIndicator:
never executed: case PseudoElement_GroupBoxIndicator:
0
2063 return
never executed: return Qt::AlignLeft | Qt::AlignTop;
Qt::AlignLeft | Qt::AlignTop;
never executed: return Qt::AlignLeft | Qt::AlignTop;
0
2064-
2065 case
never executed: case PseudoElement_HeaderViewUpArrow:
PseudoElement_HeaderViewUpArrow:
never executed: case PseudoElement_HeaderViewUpArrow:
0
2066 case
never executed: case PseudoElement_HeaderViewDownArrow:
PseudoElement_HeaderViewDownArrow:
never executed: case PseudoElement_HeaderViewDownArrow:
0
2067 case
never executed: case PseudoElement_MenuRightArrow:
PseudoElement_MenuRightArrow:
never executed: case PseudoElement_MenuRightArrow:
0
2068 return
never executed: return Qt::AlignRight | Qt::AlignVCenter;
Qt::AlignRight | Qt::AlignVCenter;
never executed: return Qt::AlignRight | Qt::AlignVCenter;
0
2069-
2070 default
never executed: default:
:
never executed: default:
0
2071 return
never executed: return 0;
0;
never executed: return 0;
0
2072 }-
2073}-
2074-
2075QSize QStyleSheetStyle::defaultSize(const QWidget *w, QSize sz, const QRect& rect, int pe) const-
2076{-
2077 QStyle *base = baseStyle();-
2078-
2079 switch (pe) {-
2080 case
never executed: case PseudoElement_Indicator:
PseudoElement_Indicator:
never executed: case PseudoElement_Indicator:
0
2081 case
never executed: case PseudoElement_MenuCheckMark:
PseudoElement_MenuCheckMark:
never executed: case PseudoElement_MenuCheckMark:
0
2082 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2083 sz.setWidth(base->pixelMetric(PM_IndicatorWidth, 0, w));
never executed: sz.setWidth(base->pixelMetric(PM_IndicatorWidth, 0, w));
0
2084 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2085 sz.setHeight(base->pixelMetric(PM_IndicatorHeight, 0, w));
never executed: sz.setHeight(base->pixelMetric(PM_IndicatorHeight, 0, w));
0
2086 break;
never executed: break;
0
2087-
2088 case
never executed: case PseudoElement_ExclusiveIndicator:
PseudoElement_ExclusiveIndicator:
never executed: case PseudoElement_ExclusiveIndicator:
0
2089 case
never executed: case PseudoElement_GroupBoxIndicator:
PseudoElement_GroupBoxIndicator:
never executed: case PseudoElement_GroupBoxIndicator:
0
2090 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2091 sz.setWidth(base->pixelMetric(PM_ExclusiveIndicatorWidth, 0, w));
never executed: sz.setWidth(base->pixelMetric(PM_ExclusiveIndicatorWidth, 0, w));
0
2092 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2093 sz.setHeight(base->pixelMetric(PM_ExclusiveIndicatorHeight, 0, w));
never executed: sz.setHeight(base->pixelMetric(PM_ExclusiveIndicatorHeight, 0, w));
0
2094 break;
never executed: break;
0
2095-
2096 case
never executed: case PseudoElement_PushButtonMenuIndicator:
PseudoElement_PushButtonMenuIndicator:
never executed: case PseudoElement_PushButtonMenuIndicator:
{
0
2097 int pm = base->pixelMetric(PM_MenuButtonIndicator, 0, w);-
2098 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2099 sz.setWidth(pm);
never executed: sz.setWidth(pm);
0
2100 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2101 sz.setHeight(pm);
never executed: sz.setHeight(pm);
0
2102 }-
2103 break;
never executed: break;
0
2104-
2105 case
never executed: case PseudoElement_ComboBoxDropDown:
PseudoElement_ComboBoxDropDown:
never executed: case PseudoElement_ComboBoxDropDown:
0
2106 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2107 sz.setWidth(16);
never executed: sz.setWidth(16);
0
2108 break;
never executed: break;
0
2109-
2110 case
never executed: case PseudoElement_ComboBoxArrow:
PseudoElement_ComboBoxArrow:
never executed: case PseudoElement_ComboBoxArrow:
0
2111 case
never executed: case PseudoElement_DownArrow:
PseudoElement_DownArrow:
never executed: case PseudoElement_DownArrow:
0
2112 case
never executed: case PseudoElement_ToolButtonMenuArrow:
PseudoElement_ToolButtonMenuArrow:
never executed: case PseudoElement_ToolButtonMenuArrow:
0
2113 case
never executed: case PseudoElement_ToolButtonDownArrow:
PseudoElement_ToolButtonDownArrow:
never executed: case PseudoElement_ToolButtonDownArrow:
0
2114 case
never executed: case PseudoElement_MenuRightArrow:
PseudoElement_MenuRightArrow:
never executed: case PseudoElement_MenuRightArrow:
0
2115 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2116 sz.setWidth(13);
never executed: sz.setWidth(13);
0
2117 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2118 sz.setHeight(13);
never executed: sz.setHeight(13);
0
2119 break;
never executed: break;
0
2120-
2121 case
never executed: case PseudoElement_SpinBoxUpButton:
PseudoElement_SpinBoxUpButton:
never executed: case PseudoElement_SpinBoxUpButton:
0
2122 case
never executed: case PseudoElement_SpinBoxDownButton:
PseudoElement_SpinBoxDownButton:
never executed: case PseudoElement_SpinBoxDownButton:
0
2123 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2124 sz.setWidth(16);
never executed: sz.setWidth(16);
0
2125 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2126 sz.setHeight(rect.height()/2);
never executed: sz.setHeight(rect.height()/2);
0
2127 break;
never executed: break;
0
2128-
2129 case
never executed: case PseudoElement_ToolButtonMenu:
PseudoElement_ToolButtonMenu:
never executed: case PseudoElement_ToolButtonMenu:
0
2130 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2131 sz.setWidth(base->pixelMetric(PM_MenuButtonIndicator, 0, w));
never executed: sz.setWidth(base->pixelMetric(PM_MenuButtonIndicator, 0, w));
0
2132 break;
never executed: break;
0
2133-
2134 case
never executed: case PseudoElement_HeaderViewUpArrow:
PseudoElement_HeaderViewUpArrow:
never executed: case PseudoElement_HeaderViewUpArrow:
0
2135 case
never executed: case PseudoElement_HeaderViewDownArrow:
PseudoElement_HeaderViewDownArrow:
never executed: case PseudoElement_HeaderViewDownArrow:
{
0
2136 int pm = base->pixelMetric(PM_HeaderMargin, 0, w);-
2137 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2138 sz.setWidth(pm);
never executed: sz.setWidth(pm);
0
2139 if (sz.height() == 1
sz.height() == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2140 sz.setHeight(pm);
never executed: sz.setHeight(pm);
0
2141 break;
never executed: break;
0
2142 }-
2143-
2144 case
never executed: case PseudoElement_ScrollBarFirst:
PseudoElement_ScrollBarFirst:
never executed: case PseudoElement_ScrollBarFirst:
0
2145 case
never executed: case PseudoElement_ScrollBarLast:
PseudoElement_ScrollBarLast:
never executed: case PseudoElement_ScrollBarLast:
0
2146 case
never executed: case PseudoElement_ScrollBarAddLine:
PseudoElement_ScrollBarAddLine:
never executed: case PseudoElement_ScrollBarAddLine:
0
2147 case
never executed: case PseudoElement_ScrollBarSubLine:
PseudoElement_ScrollBarSubLine:
never executed: case PseudoElement_ScrollBarSubLine:
0
2148 case
never executed: case PseudoElement_ScrollBarSlider:
PseudoElement_ScrollBarSlider:
never executed: case PseudoElement_ScrollBarSlider:
{
0
2149 int pm = pixelMetric(QStyle::PM_ScrollBarExtent, 0, w);-
2150 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2151 sz.setWidth(pm);
never executed: sz.setWidth(pm);
0
2152 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2153 sz.setHeight(pm);
never executed: sz.setHeight(pm);
0
2154 break;
never executed: break;
0
2155 }-
2156-
2157 case
never executed: case PseudoElement_DockWidgetCloseButton:
PseudoElement_DockWidgetCloseButton:
never executed: case PseudoElement_DockWidgetCloseButton:
0
2158 case
never executed: case PseudoElement_DockWidgetFloatButton:
PseudoElement_DockWidgetFloatButton:
never executed: case PseudoElement_DockWidgetFloatButton:
{
0
2159 int iconSize = pixelMetric(PM_SmallIconSize, 0, w);-
2160 return
never executed: return QSize(iconSize, iconSize);
QSize(iconSize, iconSize);
never executed: return QSize(iconSize, iconSize);
0
2161 }-
2162-
2163 default
never executed: default:
:
never executed: default:
0
2164 break;
never executed: break;
0
2165 }-
2166-
2167-
2168 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2169 sz.setHeight(rect.height());
never executed: sz.setHeight(rect.height());
0
2170 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2171 sz.setWidth(rect.width());
never executed: sz.setWidth(rect.width());
0
2172-
2173 return
never executed: return sz;
sz;
never executed: return sz;
0
2174}-
2175-
2176static PositionMode defaultPositionMode(int pe)-
2177{-
2178 switch (pe) {-
2179 case
never executed: case PseudoElement_ScrollBarFirst:
PseudoElement_ScrollBarFirst:
never executed: case PseudoElement_ScrollBarFirst:
0
2180 case
never executed: case PseudoElement_ScrollBarLast:
PseudoElement_ScrollBarLast:
never executed: case PseudoElement_ScrollBarLast:
0
2181 case
never executed: case PseudoElement_ScrollBarAddLine:
PseudoElement_ScrollBarAddLine:
never executed: case PseudoElement_ScrollBarAddLine:
0
2182 case
never executed: case PseudoElement_ScrollBarSubLine:
PseudoElement_ScrollBarSubLine:
never executed: case PseudoElement_ScrollBarSubLine:
0
2183 case
never executed: case PseudoElement_ScrollBarAddPage:
PseudoElement_ScrollBarAddPage:
never executed: case PseudoElement_ScrollBarAddPage:
0
2184 case
never executed: case PseudoElement_ScrollBarSubPage:
PseudoElement_ScrollBarSubPage:
never executed: case PseudoElement_ScrollBarSubPage:
0
2185 case
never executed: case PseudoElement_ScrollBarSlider:
PseudoElement_ScrollBarSlider:
never executed: case PseudoElement_ScrollBarSlider:
0
2186 case
never executed: case PseudoElement_SliderGroove:
PseudoElement_SliderGroove:
never executed: case PseudoElement_SliderGroove:
0
2187 case
never executed: case PseudoElement_SliderHandle:
PseudoElement_SliderHandle:
never executed: case PseudoElement_SliderHandle:
0
2188 case
never executed: case PseudoElement_TabWidgetPane:
PseudoElement_TabWidgetPane:
never executed: case PseudoElement_TabWidgetPane:
0
2189 return
never executed: return PositionMode_Absolute;
PositionMode_Absolute;
never executed: return PositionMode_Absolute;
0
2190 default
never executed: default:
:
never executed: default:
0
2191 return
never executed: return PositionMode_Static;
PositionMode_Static;
never executed: return PositionMode_Static;
0
2192 }-
2193}-
2194-
2195QRect QStyleSheetStyle::positionRect(const QWidget *w, const QRenderRule &rule2, int pe,-
2196 const QRect &originRect, Qt::LayoutDirection dir) const-
2197{-
2198 const QStyleSheetPositionData *p = rule2.position();-
2199 PositionMode mode = (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->mode != PositionMode_Unknown
p->mode != Pos...onMode_UnknownDescription
TRUEnever evaluated
FALSEnever evaluated
) ? p->mode : defaultPositionMode(pe);
0
2200 Qt::Alignment position = (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->position != 0
p->position != 0Description
TRUEnever evaluated
FALSEnever evaluated
) ? p->position : defaultPosition(pe);
0
2201 QRect r;-
2202-
2203 if (mode != PositionMode_Absolute
mode != PositionMode_AbsoluteDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2204 QSize sz = defaultSize(w, rule2.size(), originRect, pe);-
2205 sz = sz.expandedTo(rule2.minimumContentsSize());-
2206 r = QStyle::alignedRect(dir, position, sz, originRect);-
2207 if (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2208 int left = p->left
p->leftDescription
TRUEnever evaluated
FALSEnever evaluated
? p->left : -p->right;
0
2209 int top = p->top
p->topDescription
TRUEnever evaluated
FALSEnever evaluated
? p->top : -p->bottom;
0
2210 r.translate(dir == Qt::LeftToRight ? left : -left, top);-
2211 }
never executed: end of block
0
2212 }
never executed: end of block
else {
0
2213 r = p
pDescription
TRUEnever evaluated
FALSEnever evaluated
? originRect.adjusted(dir == Qt::LeftToRight ? p->left : p->right, p->top,
0
2214 dir == Qt::LeftToRight ? -p->right : -p->left, -p->bottom)-
2215 : originRect;-
2216 if (rule2.hasContentsSize()
rule2.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2217 QSize sz = rule2.size().expandedTo(rule2.minimumContentsSize());-
2218 if (sz.width() == -1
sz.width() == -1Description
TRUEnever evaluated
FALSEnever evaluated
) sz.setWidth(r.width());
never executed: sz.setWidth(r.width());
0
2219 if (sz.height() == -1
sz.height() == -1Description
TRUEnever evaluated
FALSEnever evaluated
) sz.setHeight(r.height());
never executed: sz.setHeight(r.height());
0
2220 r = QStyle::alignedRect(dir, position, sz, r);-
2221 }
never executed: end of block
0
2222 }
never executed: end of block
0
2223 return
never executed: return r;
r;
never executed: return r;
0
2224}-
2225-
2226QRect QStyleSheetStyle::positionRect(const QWidget *w, const QRenderRule& rule1, const QRenderRule& rule2, int pe,-
2227 const QRect& rect, Qt::LayoutDirection dir) const-
2228{-
2229 const QStyleSheetPositionData *p = rule2.position();-
2230 Origin origin = (p
pDescription
TRUEnever evaluated
FALSEnever evaluated
&& p->origin != Origin_Unknown
p->origin != Origin_UnknownDescription
TRUEnever evaluated
FALSEnever evaluated
) ? p->origin : defaultOrigin(pe);
0
2231 QRect originRect = rule1.originRect(rect, origin);-
2232 return
never executed: return positionRect(w, rule2, pe, originRect, dir);
positionRect(w, rule2, pe, originRect, dir);
never executed: return positionRect(w, rule2, pe, originRect, dir);
0
2233}-
2234-
2235-
2236-
2237-
2238-
2239-
2240static QWidget *embeddedWidget(QWidget *w)-
2241{-
2242-
2243 if (QComboBox *cmb = qobject_cast<QComboBox *>(w)
QComboBox *cmb...ComboBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2244 if (cmb->isEditable()
cmb->isEditable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2245 return
never executed: return cmb->lineEdit();
cmb->lineEdit();
never executed: return cmb->lineEdit();
0
2246 else-
2247 return
never executed: return cmb;
cmb;
never executed: return cmb;
0
2248 }-
2249-
2250-
2251-
2252 if (QAbstractSpinBox *sb = qobject_cast<QAbstractSpinBox *>(w)
QAbstractSpinB...tSpinBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2253 return
never executed: return sb->findChild<QLineEdit *>();
sb->findChild<QLineEdit *>();
never executed: return sb->findChild<QLineEdit *>();
0
2254-
2255-
2256-
2257 if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)
QAbstractScrol...rollArea *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2258 return
never executed: return sa->viewport();
sa->viewport();
never executed: return sa->viewport();
0
2259-
2260-
2261 return
never executed: return w;
w;
never executed: return w;
0
2262}-
2263static QWidget *containerWidget(const QWidget *w)-
2264{-
2265-
2266 if (qobject_cast<const QLineEdit *>(w)
qobject_cast<c...LineEdit *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2267-
2268-
2269 if (qobject_cast<const QComboBox *>(w->parentWidget())
qobject_cast<c...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2270 return
never executed: return w->parentWidget();
w->parentWidget();
never executed: return w->parentWidget();
0
2271-
2272-
2273 if (qobject_cast<const QAbstractSpinBox *>(w->parentWidget())
qobject_cast<c...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2274 return
never executed: return w->parentWidget();
w->parentWidget();
never executed: return w->parentWidget();
0
2275-
2276 }
never executed: end of block
0
2277-
2278-
2279-
2280 if (const
const QAbstrac...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
QAbstractScrollArea *sa = qobject_cast<const QAbstractScrollArea *>(w->parentWidget())
const QAbstrac...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2281 if (sa->viewport() == w
sa->viewport() == wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2282 return
never executed: return w->parentWidget();
w->parentWidget();
never executed: return w->parentWidget();
0
2283 }
never executed: end of block
0
2284-
2285-
2286 return
never executed: return const_cast<QWidget *>(w);
const_cast<QWidget *>(w);
never executed: return const_cast<QWidget *>(w);
0
2287}-
2288-
2289-
2290-
2291-
2292static bool unstylable(const QWidget *w)-
2293{-
2294 if (w->windowType() == Qt::Desktop
w->windowType() == Qt::DesktopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2295 return
never executed: return true;
true;
never executed: return true;
0
2296-
2297 if (!w->styleSheet().isEmpty()
!w->styleSheet().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2298 return
never executed: return false;
false;
never executed: return false;
0
2299-
2300 if (containerWidget(w) != w
containerWidget(w) != wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2301 return
never executed: return true;
true;
never executed: return true;
0
2302-
2303-
2304-
2305 else if (qobject_cast<const QFrame *>(w)
qobject_cast<c...t QFrame *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2306 if (0-
2307-
2308 || qobject_cast<const QComboBox *>(w->parentWidget())
qobject_cast<c...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
0
2309-
2310 )-
2311 return
never executed: return true;
true;
never executed: return true;
0
2312 }
never executed: end of block
0
2313-
2314-
2315-
2316 if (w->metaObject() == &QWidget::staticMetaObject
w->metaObject(...aticMetaObjectDescription
TRUEnever evaluated
FALSEnever evaluated
0
2317 && qobject_cast<const QTabBar*>(w->parentWidget())
qobject_cast<c...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2318 return
never executed: return true;
true;
never executed: return true;
0
2319-
2320-
2321 return
never executed: return false;
false;
never executed: return false;
0
2322}-
2323-
2324static quint64 extendedPseudoClass(const QWidget *w)-
2325{-
2326 quint64 pc = w->isWindow()
w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
? quint64(PseudoClass_Window) : 0;
0
2327 if (const
const QAbstrac...ctSlider *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
QAbstractSlider *slider = qobject_cast<const QAbstractSlider *>(w)
const QAbstrac...ctSlider *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2328 pc |= ((
(slider->orien... Qt::Vertical)Description
TRUEnever evaluated
FALSEnever evaluated
slider->orientation() == Qt::Vertical)
(slider->orien... Qt::Vertical)Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoClass_Vertical : PseudoClass_Horizontal);
0
2329 }
never executed: end of block
else
0
2330-
2331 if (const
const QComboBo...ComboBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
QComboBox *combo = qobject_cast<const QComboBox *>(w)
const QComboBo...ComboBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2332 if (combo->isEditable()
combo->isEditable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2333 pc |= (combo->isEditable()
combo->isEditable()Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoClass_Editable : PseudoClass_ReadOnly);
never executed: pc |= (combo->isEditable() ? PseudoClass_Editable : PseudoClass_ReadOnly);
0
2334 }
never executed: end of block
else
0
2335-
2336-
2337 if (const
const QLineEdi...LineEdit *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
QLineEdit *edit = qobject_cast<const QLineEdit *>(w)
const QLineEdi...LineEdit *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2338 pc |= (edit->isReadOnly()
edit->isReadOnly()Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoClass_ReadOnly : PseudoClass_Editable);
0
2339 }
never executed: end of block
else
0
2340-
2341 { }
never executed: end of block
0
2342 return
never executed: return pc;
pc;
never executed: return pc;
0
2343}-
2344-
2345-
2346-
2347-
2348-
2349-
2350-
2351void QStyleSheetStyle::setGeometry(QWidget *w)-
2352{-
2353 QRenderRule rule = renderRule(w, PseudoElement_None, PseudoClass_Enabled | extendedPseudoClass(w));-
2354 const QStyleSheetGeometryData *geo = rule.geometry();-
2355 if (w->property("_q_stylesheet_minw").toBool()
w->property("_...inw").toBool()Description
TRUEnever evaluated
FALSEnever evaluated
0
2356 && ((!rule.hasGeometry()
!rule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| geo->minWidth == -1
geo->minWidth == -1Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
2357 w->setMinimumWidth(0);-
2358 w->setProperty("_q_stylesheet_minw", QVariant());-
2359 }
never executed: end of block
0
2360 if (w->property("_q_stylesheet_minh").toBool()
w->property("_...inh").toBool()Description
TRUEnever evaluated
FALSEnever evaluated
0
2361 && ((!rule.hasGeometry()
!rule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| geo->minHeight == -1
geo->minHeight == -1Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
2362 w->setMinimumHeight(0);-
2363 w->setProperty("_q_stylesheet_minh", QVariant());-
2364 }
never executed: end of block
0
2365 if (w->property("_q_stylesheet_maxw").toBool()
w->property("_...axw").toBool()Description
TRUEnever evaluated
FALSEnever evaluated
0
2366 && ((!rule.hasGeometry()
!rule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| geo->maxWidth == -1
geo->maxWidth == -1Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
2367 w->setMaximumWidth(((1<<24)-1));-
2368 w->setProperty("_q_stylesheet_maxw", QVariant());-
2369 }
never executed: end of block
0
2370 if (w->property("_q_stylesheet_maxh").toBool()
w->property("_...axh").toBool()Description
TRUEnever evaluated
FALSEnever evaluated
0
2371 && ((!rule.hasGeometry()
!rule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| geo->maxHeight == -1
geo->maxHeight == -1Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
2372 w->setMaximumHeight(((1<<24)-1));-
2373 w->setProperty("_q_stylesheet_maxh", QVariant());-
2374 }
never executed: end of block
0
2375-
2376-
2377 if (rule.hasGeometry()
rule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2378 if (geo->minWidth != -1
geo->minWidth != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2379 w->setProperty("_q_stylesheet_minw", true);-
2380 w->setMinimumWidth(rule.boxSize(QSize(qMax(geo->width, geo->minWidth), 0)).width());-
2381 }
never executed: end of block
0
2382 if (geo->minHeight != -1
geo->minHeight != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2383 w->setProperty("_q_stylesheet_minh", true);-
2384 w->setMinimumHeight(rule.boxSize(QSize(0, qMax(geo->height, geo->minHeight))).height());-
2385 }
never executed: end of block
0
2386 if (geo->maxWidth != -1
geo->maxWidth != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2387 w->setProperty("_q_stylesheet_maxw", true);-
2388 w->setMaximumWidth(rule.boxSize(QSize(qMin(geo->width == -1 ? ((1<<24)-1) : geo->width,-
2389 geo->maxWidth == -1 ? ((1<<24)-1) : geo->maxWidth), 0)).width());-
2390 }
never executed: end of block
0
2391 if (geo->maxHeight != -1
geo->maxHeight != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2392 w->setProperty("_q_stylesheet_maxh", true);-
2393 w->setMaximumHeight(rule.boxSize(QSize(0, qMin(geo->height == -1 ? ((1<<24)-1) : geo->height,-
2394 geo->maxHeight == -1 ? ((1<<24)-1) : geo->maxHeight))).height());-
2395 }
never executed: end of block
0
2396 }
never executed: end of block
0
2397}
never executed: end of block
0
2398-
2399void QStyleSheetStyle::setProperties(QWidget *w)-
2400{-
2401-
2402-
2403-
2404-
2405 const QVector<Declaration> decls = declarations(styleRules(w), QString());-
2406 QVector<int> finals;-
2407-
2408 {-
2409-
2410 QSet<const QString> propertySet;-
2411 for (int i = decls.count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
2412 const QString property = decls.at(i).d->property;-
2413 if (!property.startsWith(QLatin1String("qproperty-"), Qt::CaseInsensitive)
!property.star...seInsensitive)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2414 continue;
never executed: continue;
0
2415 if (!propertySet.contains(property)
!propertySet.c...ains(property)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2416 propertySet.insert(property);-
2417 finals.append(i);-
2418 }
never executed: end of block
0
2419 }
never executed: end of block
0
2420 }-
2421-
2422 for (int i = finals.count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
2423 const Declaration &decl = decls.at(finals[i]);-
2424 QString property = decl.d->property;-
2425 property.remove(0, 10);-
2426-
2427 const QMetaObject *metaObject = w->metaObject();-
2428 int index = metaObject->indexOfProperty(property.toLatin1());-
2429 if (__builtin_expect(!!(index == -1), false)
__builtin_expe...== -1), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2430 QMessageLogger(__FILE__, 2527, __PRETTY_FUNCTION__).warning() << w << " does not have a property named " << property;-
2431 continue;
never executed: continue;
0
2432 }-
2433 const QMetaProperty metaProperty = metaObject->property(index);-
2434 if (__builtin_expect(!!(!metaProperty.isWritable() || !metaProperty.isDesignable()), false)
__builtin_expe...ble()), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2435 QMessageLogger(__FILE__, 2532, __PRETTY_FUNCTION__).warning() << w << " cannot design property named " << property;-
2436 continue;
never executed: continue;
0
2437 }-
2438-
2439 QVariant v;-
2440 const QVariant value = w->property(property.toLatin1());-
2441 switch (value.type()) {-
2442 case
never executed: case QVariant::Icon:
QVariant::Icon:
never executed: case QVariant::Icon:
v = decl.iconValue(); break;
never executed: break;
0
2443 case
never executed: case QVariant::Image:
QVariant::Image:
never executed: case QVariant::Image:
v = QImage(decl.uriValue()); break;
never executed: break;
0
2444 case
never executed: case QVariant::Pixmap:
QVariant::Pixmap:
never executed: case QVariant::Pixmap:
v = QPixmap(decl.uriValue()); break;
never executed: break;
0
2445 case
never executed: case QVariant::Rect:
QVariant::Rect:
never executed: case QVariant::Rect:
v = decl.rectValue(); break;
never executed: break;
0
2446 case
never executed: case QVariant::Size:
QVariant::Size:
never executed: case QVariant::Size:
v = decl.sizeValue(); break;
never executed: break;
0
2447 case
never executed: case QVariant::Color:
QVariant::Color:
never executed: case QVariant::Color:
v = decl.colorValue(); break;
never executed: break;
0
2448 case
never executed: case QVariant::Brush:
QVariant::Brush:
never executed: case QVariant::Brush:
v = decl.brushValue(); break;
never executed: break;
0
2449-
2450 case
never executed: case QVariant::KeySequence:
QVariant::KeySequence:
never executed: case QVariant::KeySequence:
v = QKeySequence(decl.d->values.at(0).variant.toString()); break;
never executed: break;
0
2451-
2452 default
never executed: default:
:
never executed: default:
v = decl.d->values.at(0).variant; break;
never executed: break;
0
2453 }-
2454-
2455 w->setProperty(property.toLatin1(), v);-
2456 }
never executed: end of block
0
2457}
never executed: end of block
0
2458-
2459void QStyleSheetStyle::setPalette(QWidget *w)-
2460{-
2461 struct RuleRoleMap {-
2462 int state;-
2463 QPalette::ColorGroup group;-
2464 } map[3] = {-
2465 { int(PseudoClass_Active | PseudoClass_Enabled), QPalette::Active },-
2466 { PseudoClass_Disabled, QPalette::Disabled },-
2467 { PseudoClass_Enabled, QPalette::Inactive }-
2468 };-
2469-
2470 const bool useStyleSheetPropagationInWidgetStyles =-
2471 QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles);-
2472-
2473 QPalette p;-
2474 if (!useStyleSheetPropagationInWidgetStyles
!useStyleSheet...InWidgetStylesDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2475 p = w->palette();
never executed: p = w->palette();
0
2476-
2477 QWidget *ew = embeddedWidget(w);-
2478-
2479 for (int i = 0; i < 3
i < 3Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
2480 QRenderRule rule = renderRule(w, PseudoElement_None, map[i].state | extendedPseudoClass(w));-
2481 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2482 if (!w->property("_q_styleSheetWidgetFont").isValid()
!w->property("...nt").isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2483 saveWidgetFont(w, w->font());-
2484 }
never executed: end of block
0
2485 updateStyleSheetFont(w);-
2486 if (ew != w
ew != wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2487 updateStyleSheetFont(ew);
never executed: updateStyleSheetFont(ew);
0
2488 }
never executed: end of block
0
2489-
2490 rule.configurePalette(&p, map[i].group, ew, ew != w);-
2491 }
never executed: end of block
0
2492-
2493 if (!useStyleSheetPropagationInWidgetStyles
!useStyleSheet...InWidgetStylesDescription
TRUEnever evaluated
FALSEnever evaluated
|| p.resolve() != 0
p.resolve() != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2494 QPalette wp = w->palette();-
2495 styleSheetCaches->customPaletteWidgets.insert(w, qMakePair(wp, p.resolve()));-
2496-
2497 if (useStyleSheetPropagationInWidgetStyles
useStyleSheetP...InWidgetStylesDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2498 p = p.resolve(wp);-
2499 p.resolve(p.resolve() | wp.resolve());-
2500 }
never executed: end of block
0
2501-
2502 w->setPalette(p);-
2503 if (ew != w
ew != wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2504 ew->setPalette(p);
never executed: ew->setPalette(p);
0
2505 }
never executed: end of block
0
2506}
never executed: end of block
0
2507-
2508void QStyleSheetStyle::unsetPalette(QWidget *w)-
2509{-
2510 const bool useStyleSheetPropagationInWidgetStyles =-
2511 QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles);-
2512-
2513 if (styleSheetCaches->customPaletteWidgets.contains(w)
styleSheetCach...ts.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2514 QPair<QPalette, uint> p = styleSheetCaches->customPaletteWidgets.value(w);-
2515 styleSheetCaches->customPaletteWidgets.remove(w);-
2516-
2517 QPalette original = p.first;-
2518-
2519 if (useStyleSheetPropagationInWidgetStyles
useStyleSheetP...InWidgetStylesDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2520 original.resolve(original.resolve() & p.second);-
2521-
2522 QPalette wp = w->palette();-
2523 wp.resolve(wp.resolve() & ~p.second);-
2524 wp.resolve(original);-
2525 wp.resolve(wp.resolve() | original.resolve());-
2526 original = wp;-
2527 }
never executed: end of block
0
2528-
2529 w->setPalette(original);-
2530 QWidget *ew = embeddedWidget(w);-
2531 if (ew != w
ew != wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2532 ew->setPalette(original);
never executed: ew->setPalette(original);
0
2533 }
never executed: end of block
0
2534-
2535 if (useStyleSheetPropagationInWidgetStyles
useStyleSheetP...InWidgetStylesDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2536 unsetStyleSheetFont(w);-
2537 QWidget *ew = embeddedWidget(w);-
2538 if (ew != w
ew != wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2539 unsetStyleSheetFont(ew);
never executed: unsetStyleSheetFont(ew);
0
2540 }
never executed: end of block
else {
0
2541 QVariant oldFont = w->property("_q_styleSheetWidgetFont");-
2542 if (oldFont.isValid()
oldFont.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2543 w->setFont(qvariant_cast<QFont>(oldFont));-
2544 }
never executed: end of block
0
2545 }
never executed: end of block
0
2546-
2547 if (styleSheetCaches->autoFillDisabledWidgets.contains(w)
styleSheetCach...ts.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2548 embeddedWidget(w)->setAutoFillBackground(true);-
2549 styleSheetCaches->autoFillDisabledWidgets.remove(w);-
2550 }
never executed: end of block
0
2551}
never executed: end of block
0
2552-
2553void QStyleSheetStyle::unsetStyleSheetFont(QWidget *w) const-
2554{-
2555 if (styleSheetCaches->customFontWidgets.contains(w)
styleSheetCach...ts.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2556 QPair<QFont, uint> f = styleSheetCaches->customFontWidgets.value(w);-
2557 styleSheetCaches->customFontWidgets.remove(w);-
2558-
2559 QFont original = f.first;-
2560 original.resolve(original.resolve() & f.second);-
2561-
2562 QFont font = w->font();-
2563 font.resolve(font.resolve() & ~f.second);-
2564 font.resolve(original);-
2565 font.resolve(font.resolve() | original.resolve());-
2566-
2567 w->setFont(font);-
2568 }
never executed: end of block
0
2569}
never executed: end of block
0
2570-
2571static void updateObjects(const QList<const QObject *>& objects)-
2572{-
2573 if (!styleSheetCaches->styleRulesCache.isEmpty()
!styleSheetCac...ache.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| !styleSheetCaches->hasStyleRuleCache.isEmpty()
!styleSheetCac...ache.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| !styleSheetCaches->renderRulesCache.isEmpty()
!styleSheetCac...ache.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2574 for (int i = 0; i < objects.size()
i < objects.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
2575 const QObject *object = objects.at(i);-
2576 styleSheetCaches->styleRulesCache.remove(object);-
2577 styleSheetCaches->hasStyleRuleCache.remove(object);-
2578 styleSheetCaches->renderRulesCache.remove(object);-
2579 }
never executed: end of block
0
2580 }
never executed: end of block
0
2581-
2582 QWidgetList widgets;-
2583 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(objects)>::type> _container_((objects)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QObject *object = *_container_.i; _container_.control; _container_.control = 0) {-
2584 if (QWidget *w = qobject_cast<QWidget*>(const_cast<QObject*>(object))
QWidget *w = q...ect*>(object))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2585 widgets << w;
never executed: widgets << w;
0
2586 }
never executed: end of block
0
2587-
2588 QEvent event(QEvent::StyleChange);-
2589 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(widgets)>::type> _container_((widgets)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QWidget *widget = *_container_.i; _container_.control; _container_.control = 0) {-
2590 widget->style()->polish(widget);-
2591 QApplication::sendEvent(widget, &event);-
2592 }
never executed: end of block
0
2593}
never executed: end of block
0
2594-
2595-
2596-
2597int QStyleSheetStyle::numinstances = 0;-
2598-
2599QStyleSheetStyle::QStyleSheetStyle(QStyle *base)-
2600 : QWindowsStyle(*new QStyleSheetStylePrivate), base(base), refcount(1)-
2601{-
2602 ++numinstances;-
2603 if (numinstances == 1
numinstances == 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2604 styleSheetCaches = new QStyleSheetStyleCaches;-
2605 }
never executed: end of block
0
2606}
never executed: end of block
0
2607-
2608QStyleSheetStyle::~QStyleSheetStyle()-
2609{-
2610 --numinstances;-
2611 if (numinstances == 0
numinstances == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2612 delete styleSheetCaches;-
2613 }
never executed: end of block
0
2614}
never executed: end of block
0
2615QStyle *QStyleSheetStyle::baseStyle() const-
2616{-
2617 if (base
baseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2618 return
never executed: return base;
base;
never executed: return base;
0
2619 if (QStyleSheetStyle *me = qobject_cast<QStyleSheetStyle *>(QApplication::style())
QStyleSheetSty...tion::style())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2620 return
never executed: return me->base;
me->base;
never executed: return me->base;
0
2621 return
never executed: return QApplication::style();
QApplication::style();
never executed: return QApplication::style();
0
2622}-
2623-
2624void QStyleSheetStyleCaches::objectDestroyed(QObject *o)-
2625{-
2626 styleRulesCache.remove(o);-
2627 hasStyleRuleCache.remove(o);-
2628 renderRulesCache.remove(o);-
2629 customPaletteWidgets.remove((const QWidget *)o);-
2630 customFontWidgets.remove(static_cast<QWidget *>(o));-
2631 styleSheetCache.remove(o);-
2632 autoFillDisabledWidgets.remove((const QWidget *)o);-
2633}
never executed: end of block
0
2634-
2635void QStyleSheetStyleCaches::styleDestroyed(QObject *o)-
2636{-
2637 styleSheetCache.remove(o);-
2638}
never executed: end of block
0
2639-
2640-
2641-
2642-
2643-
2644bool QStyleSheetStyle::initObject(const QObject *obj) const-
2645{-
2646 if (!obj
!objDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2647 return
never executed: return false;
false;
never executed: return false;
0
2648 if (const
const QWidget ...QWidget*>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
QWidget *w = qobject_cast<const QWidget*>(obj)
const QWidget ...QWidget*>(obj)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2649 if (w->testAttribute(Qt::WA_StyleSheet)
w->testAttribu...WA_StyleSheet)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2650 return
never executed: return true;
true;
never executed: return true;
0
2651 if (unstylable(w)
unstylable(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2652 return
never executed: return false;
false;
never executed: return false;
0
2653 const_cast<QWidget *>(w)->setAttribute(Qt::WA_StyleSheet, true);-
2654 }
never executed: end of block
0
2655-
2656 QObject::connect(obj, qFlagLocation("2""destroyed(QObject*)" "\0" __FILE__ ":" "2753"), styleSheetCaches, qFlagLocation("1""objectDestroyed(QObject*)" "\0" __FILE__ ":" "2753"), Qt::UniqueConnection);-
2657 return
never executed: return true;
true;
never executed: return true;
0
2658}-
2659-
2660void QStyleSheetStyle::polish(QWidget *w)-
2661{-
2662 baseStyle()->polish(w);-
2663 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return;
never executed: return;
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
2664-
2665 if (!initObject(w)
!initObject(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2666 return;
never executed: return;
0
2667-
2668 if (styleSheetCaches->styleRulesCache.contains(w)
styleSheetCach...he.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2669-
2670-
2671 styleSheetCaches->styleRulesCache.remove(w);-
2672 styleSheetCaches->hasStyleRuleCache.remove(w);-
2673 styleSheetCaches->renderRulesCache.remove(w);-
2674 styleSheetCaches->styleSheetCache.remove(w);-
2675 }
never executed: end of block
0
2676 setGeometry(w);-
2677 setProperties(w);-
2678 unsetPalette(w);-
2679 setPalette(w);-
2680-
2681-
2682 QVector<StyleRule> rules = styleRules(w);-
2683 for (int i = 0; i < rules.count()
i < rules.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
2684 const Selector& selector = rules.at(i).selectors.at(0);-
2685 quint64 negated = 0;-
2686 quint64 cssClass = selector.pseudoClass(&negated);-
2687 if ( cssClass & PseudoClass_Hover
cssClass & PseudoClass_HoverDescription
TRUEnever evaluated
FALSEnever evaluated
|| negated & PseudoClass_Hover
negated & PseudoClass_HoverDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2688 w->setAttribute(Qt::WA_Hover);-
2689 embeddedWidget(w)->setAttribute(Qt::WA_Hover);-
2690 }
never executed: end of block
0
2691 }
never executed: end of block
0
2692-
2693-
2694-
2695 if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)
QAbstractScrol...rollArea *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2696 QRenderRule rule = renderRule(sa, PseudoElement_None, PseudoClass_Enabled);-
2697 if ((rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.border()->hasBorderImage()
rule.border()-...sBorderImage()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2698 || (rule.hasBackground()
rule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
&& !rule.background()->pixmap.isNull()
!rule.backgrou...ixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
2699 QObject::connect(sa->horizontalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2796"),-
2700 sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2797"), Qt::UniqueConnection);-
2701 QObject::connect(sa->verticalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2798"),-
2702 sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2799"), Qt::UniqueConnection);-
2703 }
never executed: end of block
0
2704 }
never executed: end of block
0
2705-
2706-
2707 QRenderRule rule = renderRule(w, PseudoElement_None, PseudoClass_Any);-
2708 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2709 if (w->metaObject() == &QWidget::staticMetaObject
w->metaObject(...aticMetaObjectDescription
TRUEnever evaluated
FALSEnever evaluated
0
2710-
2711 || qobject_cast<QHeaderView *>(w)
qobject_cast<QHeaderView *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
0
2712-
2713-
2714 || qobject_cast<QTabBar *>(w)
qobject_cast<QTabBar *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
0
2715-
2716-
2717 || qobject_cast<QFrame *>(w)
qobject_cast<QFrame *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
0
2718-
2719-
2720 || qobject_cast<QMainWindow *>(w)
qobject_cast<QMainWindow *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
0
2721-
2722-
2723 || qobject_cast<QMdiSubWindow *>(w)
qobject_cast<Q...ubWindow *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
0
2724-
2725-
2726 || qobject_cast<QMenuBar *>(w)
qobject_cast<QMenuBar *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
0
2727-
2728 || qobject_cast<QDialog *>(w)
qobject_cast<QDialog *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2729 w->setAttribute(Qt::WA_StyledBackground, true);-
2730 }
never executed: end of block
0
2731 QWidget *ew = embeddedWidget(w);-
2732 if (ew->autoFillBackground()
ew->autoFillBackground()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2733 ew->setAutoFillBackground(false);-
2734 styleSheetCaches->autoFillDisabledWidgets.insert(w);-
2735 if (ew != w
ew != wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2736-
2737 ew->setAttribute(Qt::WA_StyledBackground, true);-
2738 }
never executed: end of block
0
2739 }
never executed: end of block
0
2740 if (!rule.hasBackground()
!rule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.background()->isTransparent()
rule.backgroun...sTransparent()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
0
2741 || (!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
&& !rule.border()->isOpaque()
!rule.border()->isOpaque()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
2742 w->setAttribute(Qt::WA_OpaquePaintEvent, false);
never executed: w->setAttribute(Qt::WA_OpaquePaintEvent, false);
0
2743 }
never executed: end of block
0
2744}
never executed: end of block
0
2745-
2746void QStyleSheetStyle::polish(QApplication *app)-
2747{-
2748 baseStyle()->polish(app);-
2749}
never executed: end of block
0
2750-
2751void QStyleSheetStyle::polish(QPalette &pal)-
2752{-
2753 baseStyle()->polish(pal);-
2754}
never executed: end of block
0
2755-
2756void QStyleSheetStyle::repolish(QWidget *w)-
2757{-
2758 QList<const QObject *> children = w->findChildren<const QObject *>(QString());-
2759 children.append(w);-
2760 styleSheetCaches->styleSheetCache.remove(w);-
2761 updateObjects(children);-
2762}
never executed: end of block
0
2763-
2764void QStyleSheetStyle::repolish(QApplication *app)-
2765{-
2766 (void)app;;-
2767 const QList<const QObject*> allObjects = styleSheetCaches->styleRulesCache.keys();-
2768 styleSheetCaches->styleSheetCache.remove((static_cast<QApplication *>(QCoreApplication::instance())));-
2769 styleSheetCaches->styleRulesCache.clear();-
2770 styleSheetCaches->hasStyleRuleCache.clear();-
2771 styleSheetCaches->renderRulesCache.clear();-
2772 updateObjects(allObjects);-
2773}
never executed: end of block
0
2774-
2775void QStyleSheetStyle::unpolish(QWidget *w)-
2776{-
2777 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
|| !w->testAttribute(Qt::WA_StyleSheet)
!w->testAttrib...WA_StyleSheet)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2778 baseStyle()->unpolish(w);-
2779 return;
never executed: return;
0
2780 }-
2781-
2782 styleSheetCaches->styleRulesCache.remove(w);-
2783 styleSheetCaches->hasStyleRuleCache.remove(w);-
2784 styleSheetCaches->renderRulesCache.remove(w);-
2785 styleSheetCaches->styleSheetCache.remove(w);-
2786 unsetPalette(w);-
2787 w->setProperty("_q_stylesheet_minw", QVariant());-
2788 w->setProperty("_q_stylesheet_minh", QVariant());-
2789 w->setProperty("_q_stylesheet_maxw", QVariant());-
2790 w->setProperty("_q_stylesheet_maxh", QVariant());-
2791 w->setAttribute(Qt::WA_StyleSheet, false);-
2792 QObject::disconnect(w, 0, this, 0);-
2793-
2794 if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)
QAbstractScrol...rollArea *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2795 QObject::disconnect(sa->horizontalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2892"),-
2796 sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2893"));-
2797 QObject::disconnect(sa->verticalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2894"),-
2798 sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2895"));-
2799 }
never executed: end of block
0
2800-
2801 baseStyle()->unpolish(w);-
2802}
never executed: end of block
0
2803-
2804void QStyleSheetStyle::unpolish(QApplication *app)-
2805{-
2806 baseStyle()->unpolish(app);-
2807 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return;
never executed: return;
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
2808 styleSheetCaches->styleRulesCache.clear();-
2809 styleSheetCaches->hasStyleRuleCache.clear();-
2810 styleSheetCaches->renderRulesCache.clear();-
2811 styleSheetCaches->styleSheetCache.remove((static_cast<QApplication *>(QCoreApplication::instance())));-
2812}
never executed: end of block
0
2813-
2814-
2815inline static bool verticalTabs(QTabBar::Shape shape)-
2816{-
2817 return
never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast;
shape == QTabBar::RoundedWest
never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast;
0
2818 || shape == QTabBar::RoundedEast
never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast;
0
2819 || shape == QTabBar::TriangularWest
never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast;
0
2820 || shape == QTabBar::TriangularEast;
never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast;
0
2821}-
2822-
2823-
2824void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,-
2825 const QWidget *w) const-
2826{-
2827 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { baseStyle()->drawComplexControl(cc, opt, p, w); return;
never executed: return;
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
2828-
2829 QRenderRule rule = renderRule(w, opt);-
2830-
2831 switch (cc) {-
2832 case
never executed: case CC_ComboBox:
CC_ComboBox:
never executed: case CC_ComboBox:
0
2833 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2834 QStyleOptionComboBox cmbOpt(*cmb);-
2835 cmbOpt.rect = rule.borderRect(opt->rect);-
2836 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2837 rule.drawBackgroundImage(p, cmbOpt.rect);-
2838 rule.configurePalette(&cmbOpt.palette, QPalette::ButtonText, QPalette::Button);-
2839 bool customDropDown = (
(opt->subContr...ComboBoxArrow)Description
TRUEnever evaluated
FALSEnever evaluated
opt->subControls & QStyle::SC_ComboBoxArrow)
(opt->subContr...ComboBoxArrow)Description
TRUEnever evaluated
FALSEnever evaluated
0
2840 && (hasStyleRule(w, PseudoElement_ComboBoxDropDown)
hasStyleRule(w...boBoxDropDown)Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_ComboBoxArrow)
hasStyleRule(w...ComboBoxArrow)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
2841 if (customDropDown
customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2842 cmbOpt.subControls &= ~QStyle::SC_ComboBoxArrow;
never executed: cmbOpt.subControls &= ~QStyle::SC_ComboBoxArrow;
0
2843 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2844 baseStyle()->drawComplexControl(cc, &cmbOpt, p, w);-
2845 }
never executed: end of block
else {
0
2846 QWindowsStyle::drawComplexControl(cc, &cmbOpt, p, w);-
2847 }
never executed: end of block
0
2848 if (!customDropDown
!customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2849 return;
never executed: return;
0
2850 }
never executed: end of block
else {
0
2851 rule.drawRule(p, opt->rect);-
2852 }
never executed: end of block
0
2853-
2854 if (opt->subControls & QStyle::SC_ComboBoxArrow
opt->subContro..._ComboBoxArrowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2855 QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown);-
2856 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2857 QRect r = subControlRect(CC_ComboBox, opt, SC_ComboBoxArrow, w);-
2858 subRule.drawRule(p, r);-
2859 QRenderRule subRule2 = renderRule(w, opt, PseudoElement_ComboBoxArrow);-
2860 r = positionRect(w, subRule, subRule2, PseudoElement_ComboBoxArrow, r, opt->direction);-
2861 subRule2.drawRule(p, r);-
2862 }
never executed: end of block
else {
0
2863 cmbOpt.subControls = QStyle::SC_ComboBoxArrow;-
2864 QWindowsStyle::drawComplexControl(cc, &cmbOpt, p, w);-
2865 }
never executed: end of block
0
2866 }-
2867-
2868 return;
never executed: return;
0
2869 }-
2870 break;
never executed: break;
0
2871-
2872-
2873 case
never executed: case CC_SpinBox:
CC_SpinBox:
never executed: case CC_SpinBox:
0
2874 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *spin = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2875 QStyleOptionSpinBox spinOpt(*spin);-
2876 rule.configurePalette(&spinOpt.palette, QPalette::ButtonText, QPalette::Button);-
2877 rule.configurePalette(&spinOpt.palette, QPalette::Text, QPalette::Base);-
2878 spinOpt.rect = rule.borderRect(opt->rect);-
2879 bool customUp = true, customDown = true;-
2880 QRenderRule upRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);-
2881 QRenderRule downRule = renderRule(w, opt, PseudoElement_SpinBoxDownButton);-
2882 bool upRuleMatch = upRule.hasGeometry()
upRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| upRule.hasPosition()
upRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2883 bool downRuleMatch = downRule.hasGeometry()
downRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| downRule.hasPosition()
downRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2884 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
&& !upRuleMatch
!upRuleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
&& !downRuleMatch
!downRuleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2885 rule.drawBackgroundImage(p, spinOpt.rect);-
2886 customUp = (
(opt->subContr...:SC_SpinBoxUp)Description
TRUEnever evaluated
FALSEnever evaluated
opt->subControls & QStyle::SC_SpinBoxUp)
(opt->subContr...:SC_SpinBoxUp)Description
TRUEnever evaluated
FALSEnever evaluated
0
2887 && (hasStyleRule(w, PseudoElement_SpinBoxUpButton)
hasStyleRule(w...inBoxUpButton)Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_UpArrow)
hasStyleRule(w...ement_UpArrow)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
2888 if (customUp
customUpDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2889 spinOpt.subControls &= ~QStyle::SC_SpinBoxUp;
never executed: spinOpt.subControls &= ~QStyle::SC_SpinBoxUp;
0
2890 customDown = (
(opt->subContr...C_SpinBoxDown)Description
TRUEnever evaluated
FALSEnever evaluated
opt->subControls & QStyle::SC_SpinBoxDown)
(opt->subContr...C_SpinBoxDown)Description
TRUEnever evaluated
FALSEnever evaluated
0
2891 && (hasStyleRule(w, PseudoElement_SpinBoxDownButton)
hasStyleRule(w...BoxDownButton)Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_DownArrow)
hasStyleRule(w...ent_DownArrow)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
2892 if (customDown
customDownDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2893 spinOpt.subControls &= ~QStyle::SC_SpinBoxDown;
never executed: spinOpt.subControls &= ~QStyle::SC_SpinBoxDown;
0
2894 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2895 baseStyle()->drawComplexControl(cc, &spinOpt, p, w);-
2896 }
never executed: end of block
else {
0
2897 QWindowsStyle::drawComplexControl(cc, &spinOpt, p, w);-
2898 }
never executed: end of block
0
2899 if (!customUp
!customUpDescription
TRUEnever evaluated
FALSEnever evaluated
&& !customDown
!customDownDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2900 return;
never executed: return;
0
2901 }
never executed: end of block
else {
0
2902 rule.drawRule(p, opt->rect);-
2903 }
never executed: end of block
0
2904-
2905 if ((
(opt->subContr...:SC_SpinBoxUp)Description
TRUEnever evaluated
FALSEnever evaluated
opt->subControls & QStyle::SC_SpinBoxUp)
(opt->subContr...:SC_SpinBoxUp)Description
TRUEnever evaluated
FALSEnever evaluated
&& customUp
customUpDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2906 QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);-
2907 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2908 QRect r = subControlRect(CC_SpinBox, opt, SC_SpinBoxUp, w);-
2909 subRule.drawRule(p, r);-
2910 QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SpinBoxUpArrow);-
2911 r = positionRect(w, subRule, subRule2, PseudoElement_SpinBoxUpArrow, r, opt->direction);-
2912 subRule2.drawRule(p, r);-
2913 }
never executed: end of block
else {
0
2914 spinOpt.subControls = QStyle::SC_SpinBoxUp;-
2915 QWindowsStyle::drawComplexControl(cc, &spinOpt, p, w);-
2916 }
never executed: end of block
0
2917 }-
2918-
2919 if ((
(opt->subContr...C_SpinBoxDown)Description
TRUEnever evaluated
FALSEnever evaluated
opt->subControls & QStyle::SC_SpinBoxDown)
(opt->subContr...C_SpinBoxDown)Description
TRUEnever evaluated
FALSEnever evaluated
&& customDown
customDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2920 QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxDownButton);-
2921 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2922 QRect r = subControlRect(CC_SpinBox, opt, SC_SpinBoxDown, w);-
2923 subRule.drawRule(p, r);-
2924 QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SpinBoxDownArrow);-
2925 r = positionRect(w, subRule, subRule2, PseudoElement_SpinBoxDownArrow, r, opt->direction);-
2926 subRule2.drawRule(p, r);-
2927 }
never executed: end of block
else {
0
2928 spinOpt.subControls = QStyle::SC_SpinBoxDown;-
2929 QWindowsStyle::drawComplexControl(cc, &spinOpt, p, w);-
2930 }
never executed: end of block
0
2931 }-
2932 return;
never executed: return;
0
2933 }-
2934 break;
never executed: break;
0
2935-
2936-
2937 case
never executed: case CC_GroupBox:
CC_GroupBox:
never executed: case CC_GroupBox:
0
2938 if (const
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionGroupBox *gb = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2939-
2940 QRect labelRect, checkBoxRect, titleRect, frameRect;-
2941 bool hasTitle = (
(gb->subContro...upBoxCheckBox)Description
TRUEnever evaluated
FALSEnever evaluated
gb->subControls & QStyle::SC_GroupBoxCheckBox)
(gb->subContro...upBoxCheckBox)Description
TRUEnever evaluated
FALSEnever evaluated
|| !gb->text.isEmpty()
!gb->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2942-
2943 if (!rule.hasDrawable()
!rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& (!hasTitle
!hasTitleDescription
TRUEnever evaluated
FALSEnever evaluated
|| !hasStyleRule(w, PseudoElement_GroupBoxTitle)
!hasStyleRule(...GroupBoxTitle)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2944 && !hasStyleRule(w, PseudoElement_Indicator)
!hasStyleRule(...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
&& !rule.hasBox()
!rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& !rule.hasFont
!rule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
&& !rule.hasPalette()
!rule.hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2945-
2946 break;
never executed: break;
0
2947 }-
2948 rule.drawBackground(p, opt->rect);-
2949-
2950 QRenderRule titleRule = renderRule(w, opt, PseudoElement_GroupBoxTitle);-
2951 bool clipSet = false;-
2952-
2953 if (hasTitle
hasTitleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2954 labelRect = subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, w);-
2955-
2956 labelRect.setSize(labelRect.size().expandedTo(ParentStyle::subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, w).size()));-
2957 if (gb->subControls & QStyle::SC_GroupBoxCheckBox
gb->subControl...oupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2958 checkBoxRect = subControlRect(CC_GroupBox, opt, SC_GroupBoxCheckBox, w);-
2959 titleRect = titleRule.boxRect(checkBoxRect.united(labelRect));-
2960 }
never executed: end of block
else {
0
2961 titleRect = titleRule.boxRect(labelRect);-
2962 }
never executed: end of block
0
2963 if (!titleRule.hasBackground()
!titleRule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
|| !titleRule.background()->isTransparent()
!titleRule.bac...sTransparent()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2964 clipSet = true;-
2965 p->save();-
2966 p->setClipRegion(QRegion(opt->rect) - titleRect);-
2967 }
never executed: end of block
0
2968 }
never executed: end of block
0
2969-
2970 frameRect = subControlRect(CC_GroupBox, opt, SC_GroupBoxFrame, w);-
2971 QStyleOptionFrame frame;-
2972 frame.QStyleOption::operator=(*gb);-
2973 frame.features = gb->features;-
2974 frame.lineWidth = gb->lineWidth;-
2975 frame.midLineWidth = gb->midLineWidth;-
2976 frame.rect = frameRect;-
2977 drawPrimitive(PE_FrameGroupBox, &frame, p, w);-
2978-
2979 if (clipSet
clipSetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2980 p->restore();
never executed: p->restore();
0
2981-
2982-
2983 if (hasTitle
hasTitleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2984 titleRule.drawRule(p, titleRect);
never executed: titleRule.drawRule(p, titleRect);
0
2985-
2986-
2987 if (gb->subControls & QStyle::SC_GroupBoxCheckBox
gb->subControl...oupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2988 QStyleOptionButton box;-
2989 box.QStyleOption::operator=(*gb);-
2990 box.rect = checkBoxRect;-
2991 drawPrimitive(PE_IndicatorCheckBox, &box, p, w);-
2992 }
never executed: end of block
0
2993-
2994-
2995 if (!gb->text.isEmpty()
!gb->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2996 int alignment = int(Qt::AlignCenter | Qt::TextShowMnemonic);-
2997 if (!styleHint(QStyle::SH_UnderlineShortcut, opt, w)
!styleHint(QSt...rtcut, opt, w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2998 alignment |= Qt::TextHideMnemonic;-
2999 }
never executed: end of block
0
3000-
3001 QPalette pal = gb->palette;-
3002 if (gb->textColor.isValid()
gb->textColor.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3003 pal.setColor(QPalette::WindowText, gb->textColor);
never executed: pal.setColor(QPalette::WindowText, gb->textColor);
0
3004 titleRule.configurePalette(&pal, QPalette::WindowText, QPalette::Window);-
3005 drawItemText(p, labelRect, alignment, pal, gb->state & State_Enabled,-
3006 gb->text, QPalette::WindowText);-
3007-
3008 if (gb->state & State_HasFocus
gb->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3009 QStyleOptionFocusRect fropt;-
3010 fropt.QStyleOption::operator=(*gb);-
3011 fropt.rect = labelRect;-
3012 drawPrimitive(PE_FrameFocusRect, &fropt, p, w);-
3013 }
never executed: end of block
0
3014 }
never executed: end of block
0
3015-
3016 return;
never executed: return;
0
3017 }-
3018 break;
never executed: break;
0
3019-
3020 case
never executed: case CC_ToolButton:
CC_ToolButton:
never executed: case CC_ToolButton:
0
3021 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *tool = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3022 QStyleOptionToolButton toolOpt(*tool);-
3023 rule.configurePalette(&toolOpt.palette, QPalette::ButtonText, QPalette::Button);-
3024 toolOpt.font = rule.font.resolve(toolOpt.font);-
3025 toolOpt.rect = rule.borderRect(opt->rect);-
3026 bool customArrow = (tool->features & (QStyleOptionToolButton::HasMenu | QStyleOptionToolButton::MenuButtonPopup));-
3027 bool customDropDown = tool->features & QStyleOptionToolButton::MenuButtonPopup;-
3028 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3029 if (tool->subControls & SC_ToolButton
tool->subContr... SC_ToolButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3030-
3031-
3032-
3033 State bflags = tool->state & ~State_Sunken;-
3034 if (bflags & State_AutoRaise
bflags & State_AutoRaiseDescription
TRUEnever evaluated
FALSEnever evaluated
&& (!(bflags & State_MouseOver)
!(bflags & State_MouseOver)Description
TRUEnever evaluated
FALSEnever evaluated
|| !(bflags & State_Enabled)
!(bflags & State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
))
0
3035 bflags &= ~State_Raised;
never executed: bflags &= ~State_Raised;
0
3036 if (tool->state & State_Sunken
tool->state & State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
&& tool->activeSubControls & SC_ToolButton
tool->activeSu... SC_ToolButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3037 bflags |= State_Sunken;
never executed: bflags |= State_Sunken;
0
3038 if (!(bflags & (State_Sunken | State_On | State_Raised))
!(bflags & (St...State_Raised))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3039 rule.drawBackground(p, toolOpt.rect);
never executed: rule.drawBackground(p, toolOpt.rect);
0
3040 }
never executed: end of block
0
3041 customArrow = customArrow
customArrowDescription
TRUEnever evaluated
FALSEnever evaluated
&& hasStyleRule(w, PseudoElement_ToolButtonDownArrow)
hasStyleRule(w...ttonDownArrow)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3042 if (customArrow
customArrowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3043 toolOpt.features &= ~QStyleOptionToolButton::HasMenu;
never executed: toolOpt.features &= ~QStyleOptionToolButton::HasMenu;
0
3044 customDropDown = customDropDown
customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
&& hasStyleRule(w, PseudoElement_ToolButtonMenu)
hasStyleRule(w...oolButtonMenu)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3045 if (customDropDown
customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3046 toolOpt.subControls &= ~QStyle::SC_ToolButtonMenu;
never executed: toolOpt.subControls &= ~QStyle::SC_ToolButtonMenu;
0
3047-
3048 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
&& !(tool->features & QStyleOptionToolButton::Arrow)
!(tool->featur...Button::Arrow)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3049 baseStyle()->drawComplexControl(cc, &toolOpt, p, w);-
3050 }
never executed: end of block
else {
0
3051 QWindowsStyle::drawComplexControl(cc, &toolOpt, p, w);-
3052 }
never executed: end of block
0
3053-
3054 if (!customArrow
!customArrowDescription
TRUEnever evaluated
FALSEnever evaluated
&& !customDropDown
!customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3055 return;
never executed: return;
0
3056 }
never executed: end of block
else {
0
3057 rule.drawRule(p, opt->rect);-
3058 toolOpt.rect = rule.contentsRect(opt->rect);-
3059 if (rule.hasFont
rule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3060 toolOpt.font = rule.font;
never executed: toolOpt.font = rule.font;
0
3061 drawControl(CE_ToolButtonLabel, &toolOpt, p, w);-
3062 }
never executed: end of block
0
3063-
3064 QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolButtonMenu);-
3065 QRect r = subControlRect(CC_ToolButton, opt, QStyle::SC_ToolButtonMenu, w);-
3066 if (customDropDown
customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3067 if (opt->subControls & QStyle::SC_ToolButtonMenu
opt->subContro...ToolButtonMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3068 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3069 subRule.drawRule(p, r);-
3070 }
never executed: end of block
else {
0
3071 toolOpt.rect = r;-
3072 baseStyle()->drawPrimitive(PE_IndicatorButtonDropDown, &toolOpt, p, w);-
3073 }
never executed: end of block
0
3074 }-
3075 }
never executed: end of block
0
3076-
3077 if (customArrow
customArrowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3078 QRenderRule subRule2 = customDropDown
customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
? renderRule(w, opt, PseudoElement_ToolButtonMenuArrow)
0
3079 : renderRule(w, opt, PseudoElement_ToolButtonDownArrow);-
3080 QRect r2 = customDropDown
customDropDownDescription
TRUEnever evaluated
FALSEnever evaluated
0
3081 ? positionRect(w, subRule, subRule2, PseudoElement_ToolButtonMenuArrow, r, opt->direction)-
3082 : positionRect(w, rule, subRule2, PseudoElement_ToolButtonDownArrow, opt->rect, opt->direction);-
3083 if (subRule2.hasDrawable()
subRule2.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3084 subRule2.drawRule(p, r2);-
3085 }
never executed: end of block
else {
0
3086 toolOpt.rect = r2;-
3087 baseStyle()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &toolOpt, p, w);-
3088 }
never executed: end of block
0
3089 }-
3090-
3091 return;
never executed: return;
0
3092 }-
3093 break;
never executed: break;
0
3094-
3095-
3096 case
never executed: case CC_ScrollBar:
CC_ScrollBar:
never executed: case CC_ScrollBar:
0
3097 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3098 QStyleOptionSlider sbOpt(*sb);-
3099 if (!rule.hasDrawable()
!rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3100 sbOpt.rect = rule.borderRect(opt->rect);-
3101 rule.drawBackgroundImage(p, opt->rect);-
3102 baseStyle()->drawComplexControl(cc, &sbOpt, p, w);-
3103 }
never executed: end of block
else {
0
3104 rule.drawRule(p, opt->rect);-
3105 QWindowsStyle::drawComplexControl(cc, opt, p, w);-
3106 }
never executed: end of block
0
3107 return;
never executed: return;
0
3108 }-
3109 break;
never executed: break;
0
3110-
3111-
3112-
3113 case
never executed: case CC_Slider:
CC_Slider:
never executed: case CC_Slider:
0
3114 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3115 rule.drawRule(p, opt->rect);-
3116-
3117 QRenderRule grooveSubRule = renderRule(w, opt, PseudoElement_SliderGroove);-
3118 QRenderRule handleSubRule = renderRule(w, opt, PseudoElement_SliderHandle);-
3119 if (!grooveSubRule.hasDrawable()
!grooveSubRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3120 QStyleOptionSlider slOpt(*slider);-
3121 bool handleHasRule = handleSubRule.hasDrawable();-
3122-
3123 if (handleHasRule
handleHasRuleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3124 slOpt.subControls &= ~SC_SliderHandle;
never executed: slOpt.subControls &= ~SC_SliderHandle;
0
3125 baseStyle()->drawComplexControl(cc, &slOpt, p, w);-
3126 if (!handleHasRule
!handleHasRuleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3127 return;
never executed: return;
0
3128 }
never executed: end of block
0
3129-
3130 QRect gr = subControlRect(cc, opt, SC_SliderGroove, w);-
3131 if (slider->subControls & SC_SliderGroove
slider->subCon...C_SliderGrooveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3132 grooveSubRule.drawRule(p, gr);-
3133 }
never executed: end of block
0
3134-
3135 if (slider->subControls & SC_SliderHandle
slider->subCon...C_SliderHandleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3136 QRect hr = subControlRect(cc, opt, SC_SliderHandle, w);-
3137-
3138 QRenderRule subRule1 = renderRule(w, opt, PseudoElement_SliderSubPage);-
3139 if (subRule1.hasDrawable()
subRule1.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3140 QRect r(gr.topLeft(),-
3141 slider->orientation == Qt::Horizontal-
3142 ? QPoint(hr.x()+hr.width()/2, gr.y()+gr.height() - 1)-
3143 : QPoint(gr.x()+gr.width() - 1, hr.y()+hr.height()/2));-
3144 subRule1.drawRule(p, r);-
3145 }
never executed: end of block
0
3146-
3147 QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SliderAddPage);-
3148 if (subRule2.hasDrawable()
subRule2.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3149 QRect r(slider->orientation == Qt::Horizontal-
3150 ? QPoint(hr.x()+hr.width()/2+1, gr.y())-
3151 : QPoint(gr.x(), hr.y()+hr.height()/2+1),-
3152 gr.bottomRight());-
3153 subRule2.drawRule(p, r);-
3154 }
never executed: end of block
0
3155-
3156 handleSubRule.drawRule(p, handleSubRule.boxRect(hr, Margin));-
3157 }
never executed: end of block
0
3158-
3159 if (slider->subControls & SC_SliderTickmarks
slider->subCon...liderTickmarksDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3160-
3161 }
never executed: end of block
0
3162-
3163 return;
never executed: return;
0
3164 }-
3165 break;
never executed: break;
0
3166-
3167-
3168 case
never executed: case CC_MdiControls:
CC_MdiControls:
never executed: case CC_MdiControls:
0
3169 if (hasStyleRule(w, PseudoElement_MdiCloseButton)
hasStyleRule(w...diCloseButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
3170 || hasStyleRule(w, PseudoElement_MdiNormalButton)
hasStyleRule(w...iNormalButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
3171 || hasStyleRule(w, PseudoElement_MdiMinButton)
hasStyleRule(w..._MdiMinButton)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3172 QList<QVariant> layout = rule.styleHint(QLatin1String("button-layout")).toList();-
3173 if (layout.isEmpty()
layout.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3174 layout = subControlLayout(QLatin1String("mNX"));
never executed: layout = subControlLayout(QLatin1String("mNX"));
0
3175-
3176 QStyleOptionComplex optCopy(*opt);-
3177 optCopy.subControls = 0;-
3178 for (int i = 0; i < layout.count()
i < layout.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
3179 int layoutButton = layout[i].toInt();-
3180 if (layoutButton < PseudoElement_MdiCloseButton
layoutButton <...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
3181 || layoutButton > PseudoElement_MdiNormalButton
layoutButton >...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3182 continue;
never executed: continue;
0
3183 QStyle::SubControl control = knownPseudoElements[layoutButton].subControl;-
3184 if (!(opt->subControls & control)
!(opt->subControls & control)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3185 continue;
never executed: continue;
0
3186 QRenderRule subRule = renderRule(w, opt, layoutButton);-
3187 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3188 QRect rect = subRule.boxRect(subControlRect(CC_MdiControls, opt, control, w), Margin);-
3189 subRule.drawRule(p, rect);-
3190 QIcon icon = standardIcon(subControlIcon(layoutButton), opt);-
3191 icon.paint(p, subRule.contentsRect(rect), Qt::AlignCenter);-
3192 }
never executed: end of block
else {
0
3193 optCopy.subControls |= control;-
3194 }
never executed: end of block
0
3195 }-
3196-
3197 if (optCopy.subControls
optCopy.subControlsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3198 baseStyle()->drawComplexControl(CC_MdiControls, &optCopy, p, w);
never executed: baseStyle()->drawComplexControl(CC_MdiControls, &optCopy, p, w);
0
3199 return;
never executed: return;
0
3200 }-
3201 break;
never executed: break;
0
3202-
3203 case
never executed: case CC_TitleBar:
CC_TitleBar:
never executed: case CC_TitleBar:
0
3204 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3205 QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar);-
3206 if (!subRule.hasDrawable()
!subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !subRule.hasBox()
!subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& !subRule.hasBorder()
!subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3207 break;
never executed: break;
0
3208 subRule.drawRule(p, opt->rect);-
3209 QHash<QStyle::SubControl, QRect> layout = titleBarLayout(w, tb);-
3210-
3211 QRect ir;-
3212 ir = layout[SC_TitleBarLabel];-
3213 if (ir.isValid()
ir.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3214 if (subRule.hasPalette()
subRule.hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3215 p->setPen(subRule.palette()->foreground.color());
never executed: p->setPen(subRule.palette()->foreground.color());
0
3216 p->fillRect(ir, Qt::white);-
3217 p->drawText(ir.x(), ir.y(), ir.width(), ir.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text);-
3218 }
never executed: end of block
0
3219-
3220 QPixmap pm;-
3221-
3222 ir = layout[SC_TitleBarSysMenu];-
3223 if (ir.isValid()
ir.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3224 QRenderRule subSubRule = renderRule(w, opt, PseudoElement_TitleBarSysMenu);-
3225 subSubRule.drawRule(p, ir);-
3226 ir = subSubRule.contentsRect(ir);-
3227 if (!tb->icon.isNull()
!tb->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3228 tb->icon.paint(p, ir);-
3229 }
never executed: end of block
else {
0
3230 int iconSize = pixelMetric(PM_SmallIconSize, tb, w);-
3231 pm = standardIcon(SP_TitleBarMenuButton, 0, w).pixmap(iconSize, iconSize);-
3232 drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3233 }
never executed: end of block
0
3234 }-
3235-
3236 ir = layout[SC_TitleBarCloseButton];-
3237 if (ir.isValid()
ir.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3238 QRenderRule subSubRule = renderRule(w, opt, PseudoElement_TitleBarCloseButton);-
3239 subSubRule.drawRule(p, ir);-
3240-
3241 QSize sz = subSubRule.contentsRect(ir).size();-
3242 if ((
(tb->titleBarF...k) == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool
(tb->titleBarF...k) == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3243 pm = standardIcon(SP_DockWidgetCloseButton, 0, w).pixmap(sz);
never executed: pm = standardIcon(SP_DockWidgetCloseButton, 0, w).pixmap(sz);
0
3244 else-
3245 pm = standardIcon(SP_TitleBarCloseButton, 0, w).pixmap(sz);
never executed: pm = standardIcon(SP_TitleBarCloseButton, 0, w).pixmap(sz);
0
3246 drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3247 }
never executed: end of block
0
3248-
3249 int pes[] = {-
3250 PseudoElement_TitleBarMaxButton,-
3251 PseudoElement_TitleBarMinButton,-
3252 PseudoElement_TitleBarNormalButton,-
3253 PseudoElement_TitleBarShadeButton,-
3254 PseudoElement_TitleBarUnshadeButton,-
3255 PseudoElement_TitleBarContextHelpButton-
3256 };-
3257-
3258 for (unsigned int i = 0; i < sizeof(pes)/sizeof(int)
i < sizeof(pes)/sizeof(int)Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
3259 int pe = pes[i];-
3260 QStyle::SubControl sc = knownPseudoElements[pe].subControl;-
3261 ir = layout[sc];-
3262 if (!ir.isValid()
!ir.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3263 continue;
never executed: continue;
0
3264 QRenderRule subSubRule = renderRule(w, opt, pe);-
3265 subSubRule.drawRule(p, ir);-
3266 pm = standardIcon(subControlIcon(pe), 0, w).pixmap(subSubRule.contentsRect(ir).size());-
3267 drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3268 }
never executed: end of block
0
3269-
3270 return;
never executed: return;
0
3271 }-
3272 break;
never executed: break;
0
3273-
3274-
3275 default
never executed: default:
:
never executed: default:
0
3276 break;
never executed: break;
0
3277 }-
3278-
3279 baseStyle()->drawComplexControl(cc, opt, p, w);-
3280}
never executed: end of block
0
3281-
3282void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p,-
3283 const QWidget *w) const-
3284{-
3285 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { baseStyle()->drawControl(ce, opt, p, w); return;
never executed: return;
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
3286-
3287 QRenderRule rule = renderRule(w, opt);-
3288 int pe1 = PseudoElement_None, pe2 = PseudoElement_None;-
3289 bool fallback = false;-
3290-
3291 switch (ce) {-
3292 case
never executed: case CE_ToolButtonLabel:
CE_ToolButtonLabel:
never executed: case CE_ToolButtonLabel:
0
3293 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *btn = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3294 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| btn->features & QStyleOptionToolButton::Arrow
btn->features ...lButton::ArrowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3295 QCommonStyle::drawControl(ce, opt, p, w);-
3296 }
never executed: end of block
else {
0
3297 QStyleOptionToolButton butOpt(*btn);-
3298 rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button);-
3299 baseStyle()->drawControl(ce, &butOpt, p, w);-
3300 }
never executed: end of block
0
3301 return;
never executed: return;
0
3302 }-
3303 break;
never executed: break;
0
3304-
3305 case
never executed: case CE_FocusFrame:
CE_FocusFrame:
never executed: case CE_FocusFrame:
0
3306 if (!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3307 rule.drawBorder(p, opt->rect);-
3308 return;
never executed: return;
0
3309 }-
3310 break;
never executed: break;
0
3311-
3312 case
never executed: case CE_PushButton:
CE_PushButton:
never executed: case CE_PushButton:
0
3313 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3314 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasPosition()
rule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasPalette()
rule.hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
||
0
3315 ((
(btn->features...tton::HasMenu)Description
TRUEnever evaluated
FALSEnever evaluated
btn->features & QStyleOptionButton::HasMenu)
(btn->features...tton::HasMenu)Description
TRUEnever evaluated
FALSEnever evaluated
&& hasStyleRule(w, PseudoElement_PushButtonMenuIndicator)
hasStyleRule(w...MenuIndicator)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
3316 ParentStyle::drawControl(ce, opt, p, w);-
3317 return;
never executed: return;
0
3318 }-
3319 }
never executed: end of block
0
3320 break;
never executed: break;
0
3321 case
never executed: case CE_PushButtonBevel:
CE_PushButtonBevel:
never executed: case CE_PushButtonBevel:
0
3322 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3323 QStyleOptionButton btnOpt(*btn);-
3324 btnOpt.rect = rule.borderRect(opt->rect);-
3325 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3326 rule.drawBackgroundImage(p, btnOpt.rect);-
3327 rule.configurePalette(&btnOpt.palette, QPalette::ButtonText, QPalette::Button);-
3328 bool customMenu = (btn->features & QStyleOptionButton::HasMenu
btn->features ...utton::HasMenuDescription
TRUEnever evaluated
FALSEnever evaluated
0
3329 && hasStyleRule(w, PseudoElement_PushButtonMenuIndicator)
hasStyleRule(w...MenuIndicator)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
3330 if (customMenu
customMenuDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3331 btnOpt.features &= ~QStyleOptionButton::HasMenu;
never executed: btnOpt.features &= ~QStyleOptionButton::HasMenu;
0
3332 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3333 baseStyle()->drawControl(ce, &btnOpt, p, w);-
3334 }
never executed: end of block
else {
0
3335 QWindowsStyle::drawControl(ce, &btnOpt, p, w);-
3336 }
never executed: end of block
0
3337 if (!customMenu
!customMenuDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3338 return;
never executed: return;
0
3339 }
never executed: end of block
else {
0
3340 rule.drawRule(p, opt->rect);-
3341 }
never executed: end of block
0
3342-
3343 if (btn->features & QStyleOptionButton::HasMenu
btn->features ...utton::HasMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3344 QRenderRule subRule = renderRule(w, opt, PseudoElement_PushButtonMenuIndicator);-
3345 QRect ir = positionRect(w, rule, subRule, PseudoElement_PushButtonMenuIndicator, opt->rect, opt->direction);-
3346 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3347 subRule.drawRule(p, ir);-
3348 }
never executed: end of block
else {
0
3349 btnOpt.rect = ir;-
3350 baseStyle()->drawPrimitive(PE_IndicatorArrowDown, &btnOpt, p, w);-
3351 }
never executed: end of block
0
3352 }-
3353 }
never executed: end of block
0
3354 return;
never executed: return;
0
3355-
3356 case
never executed: case CE_PushButtonLabel:
CE_PushButtonLabel:
never executed: case CE_PushButtonLabel:
0
3357 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3358 QStyleOptionButton butOpt(*button);-
3359 rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button);-
3360-
3361 const QFont oldFont = p->font();-
3362 if (rule.hasFont
rule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3363 p->setFont(rule.font);
never executed: p->setFont(rule.font);
0
3364-
3365 if (rule.hasPosition()
rule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.position()->textAlignment != 0
rule.position(...Alignment != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3366 Qt::Alignment textAlignment = rule.position()->textAlignment;-
3367 QRect textRect = button->rect;-
3368 uint tf = Qt::TextShowMnemonic;-
3369 const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft;-
3370 tf |= (
(textAlignment...icalAlignMask)Description
TRUEnever evaluated
FALSEnever evaluated
textAlignment & verticalAlignMask)
(textAlignment...icalAlignMask)Description
TRUEnever evaluated
FALSEnever evaluated
? (textAlignment & verticalAlignMask) : Qt::AlignVCenter;
0
3371 if (!styleHint(SH_UnderlineShortcut, button, w)
!styleHint(SH_...ut, button, w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3372 tf |= Qt::TextHideMnemonic;
never executed: tf |= Qt::TextHideMnemonic;
0
3373 if (!button->icon.isNull()
!button->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3374-
3375 QRect iconRect;-
3376 QIcon::Mode mode = button->state & State_Enabled
button->state & State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::Normal : QIcon::Disabled;
0
3377 if (mode == QIcon::Normal
mode == QIcon::NormalDescription
TRUEnever evaluated
FALSEnever evaluated
&& button->state & State_HasFocus
button->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3378 mode = QIcon::Active;
never executed: mode = QIcon::Active;
0
3379 QIcon::State state = QIcon::Off;-
3380 if (button->state & State_On
button->state & State_OnDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3381 state = QIcon::On;
never executed: state = QIcon::On;
0
3382-
3383 QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state);-
3384 int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio();-
3385 int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio();-
3386 int labelWidth = pixmapWidth;-
3387 int labelHeight = pixmapHeight;-
3388 int iconSpacing = 4;-
3389 int textWidth = button->fontMetrics.boundingRect(opt->rect, tf, button->text).width();-
3390 if (!button->text.isEmpty()
!button->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3391 labelWidth += (textWidth + iconSpacing);
never executed: labelWidth += (textWidth + iconSpacing);
0
3392-
3393-
3394 if (textAlignment & Qt::AlignLeft
textAlignment & Qt::AlignLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3395 iconRect = QRect(textRect.x(), textRect.y() + (textRect.height() - labelHeight) / 2,-
3396 pixmapWidth, pixmapHeight);-
3397 }
never executed: end of block
else if (textAlignment & Qt::AlignHCenter
textAlignment ...::AlignHCenterDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3398 iconRect = QRect(textRect.x() + (textRect.width() - labelWidth) / 2,-
3399 textRect.y() + (textRect.height() - labelHeight) / 2,-
3400 pixmapWidth, pixmapHeight);-
3401 }
never executed: end of block
else {
0
3402 iconRect = QRect(textRect.x() + textRect.width() - labelWidth,-
3403 textRect.y() + (textRect.height() - labelHeight) / 2,-
3404 pixmapWidth, pixmapHeight);-
3405 }
never executed: end of block
0
3406-
3407 iconRect = visualRect(button->direction, textRect, iconRect);-
3408-
3409 tf |= Qt::AlignLeft;-
3410-
3411 if (button->direction == Qt::RightToLeft
button->direct...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3412 textRect.setRight(iconRect.left() - iconSpacing);
never executed: textRect.setRight(iconRect.left() - iconSpacing);
0
3413 else-
3414 textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing);
never executed: textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing);
0
3415-
3416 if (button->state & (State_On | State_Sunken)
button->state ... State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3417 iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w),
never executed: iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w));
0
3418 pixelMetric(PM_ButtonShiftVertical, opt, w));
never executed: iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w));
0
3419 p->drawPixmap(iconRect, pixmap);-
3420 }
never executed: end of block
else {
0
3421 tf |= textAlignment;-
3422 }
never executed: end of block
0
3423 if (button->state & (State_On | State_Sunken)
button->state ... State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3424 textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w),
never executed: textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w));
0
3425 pixelMetric(PM_ButtonShiftVertical, opt, w));
never executed: textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w));
0
3426-
3427 if (button->features & QStyleOptionButton::HasMenu
button->featur...utton::HasMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3428 int indicatorSize = pixelMetric(PM_MenuButtonIndicator, button, w);-
3429 if (button->direction == Qt::LeftToRight
button->direct...t::LeftToRightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3430 textRect = textRect.adjusted(0, 0, -indicatorSize, 0);
never executed: textRect = textRect.adjusted(0, 0, -indicatorSize, 0);
0
3431 else-
3432 textRect = textRect.adjusted(indicatorSize, 0, 0, 0);
never executed: textRect = textRect.adjusted(indicatorSize, 0, 0, 0);
0
3433 }-
3434 drawItemText(p, textRect, tf, butOpt.palette, (button->state & State_Enabled),-
3435 button->text, QPalette::ButtonText);-
3436 }
never executed: end of block
else {
0
3437 ParentStyle::drawControl(ce, &butOpt, p, w);-
3438 }
never executed: end of block
0
3439-
3440 if (rule.hasFont
rule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3441 p->setFont(oldFont);
never executed: p->setFont(oldFont);
0
3442 }
never executed: end of block
0
3443 return;
never executed: return;
0
3444-
3445 case
never executed: case CE_RadioButton:
CE_RadioButton:
never executed: case CE_RadioButton:
0
3446 case
never executed: case CE_CheckBox:
CE_CheckBox:
never executed: case CE_CheckBox:
0
3447 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_Indicator)
hasStyleRule(w...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3448 rule.drawRule(p, opt->rect);-
3449 ParentStyle::drawControl(ce, opt, p, w);-
3450 return;
never executed: return;
0
3451 } else if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3452 QStyleOptionButton butOpt(*btn);-
3453 rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button);-
3454 baseStyle()->drawControl(ce, &butOpt, p, w);-
3455 return;
never executed: return;
0
3456 }-
3457 break;
never executed: break;
0
3458 case
never executed: case CE_RadioButtonLabel:
CE_RadioButtonLabel:
never executed: case CE_RadioButtonLabel:
0
3459 case
never executed: case CE_CheckBoxLabel:
CE_CheckBoxLabel:
never executed: case CE_CheckBoxLabel:
0
3460 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3461 QStyleOptionButton butOpt(*btn);-
3462 rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button);-
3463 ParentStyle::drawControl(ce, &butOpt, p, w);-
3464 }
never executed: end of block
0
3465 return;
never executed: return;
0
3466-
3467 case
never executed: case CE_Splitter:
CE_Splitter:
never executed: case CE_Splitter:
0
3468 pe1 = PseudoElement_SplitterHandle;-
3469 break;
never executed: break;
0
3470-
3471 case
never executed: case CE_ToolBar:
CE_ToolBar:
never executed: case CE_ToolBar:
0
3472 if (rule.hasBackground()
rule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3473 rule.drawBackground(p, opt->rect);-
3474 }
never executed: end of block
0
3475 if (rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3476 rule.drawBorder(p, rule.borderRect(opt->rect));-
3477 }
never executed: end of block
else {
0
3478-
3479 if (const
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBar *tb = qstyleoption_cast<const QStyleOptionToolBar *>(opt)
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3480 QStyleOptionToolBar newTb(*tb);-
3481 newTb.rect = rule.borderRect(opt->rect);-
3482 baseStyle()->drawControl(ce, &newTb, p, w);-
3483 }
never executed: end of block
0
3484-
3485 }
never executed: end of block
0
3486 return;
never executed: return;
0
3487-
3488 case
never executed: case CE_MenuEmptyArea:
CE_MenuEmptyArea:
never executed: case CE_MenuEmptyArea:
0
3489 case
never executed: case CE_MenuBarEmptyArea:
CE_MenuBarEmptyArea:
never executed: case CE_MenuBarEmptyArea:
0
3490 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3491-
3492 return;
never executed: return;
0
3493 }-
3494 break;
never executed: break;
0
3495-
3496 case
never executed: case CE_MenuTearoff:
CE_MenuTearoff:
never executed: case CE_MenuTearoff:
0
3497 case
never executed: case CE_MenuScroller:
CE_MenuScroller:
never executed: case CE_MenuScroller:
0
3498 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *m = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3499 QStyleOptionMenuItem mi(*m);-
3500 int pe = ce == CE_MenuTearoff
ce == CE_MenuTearoffDescription
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_MenuTearoff : PseudoElement_MenuScroller;
0
3501 QRenderRule subRule = renderRule(w, opt, pe);-
3502 mi.rect = subRule.contentsRect(opt->rect);-
3503 rule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button);-
3504 subRule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button);-
3505-
3506 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3507 subRule.drawRule(p, opt->rect);-
3508 }
never executed: end of block
else {
0
3509 baseStyle()->drawControl(ce, &mi, p, w);-
3510 }
never executed: end of block
0
3511 }-
3512 return;
never executed: return;
0
3513-
3514 case
never executed: case CE_MenuItem:
CE_MenuItem:
never executed: case CE_MenuItem:
0
3515 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *m = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3516 QStyleOptionMenuItem mi(*m);-
3517-
3518 int pseudo = (
(mi.menuItemTy...em::Separator)Description
TRUEnever evaluated
FALSEnever evaluated
mi.menuItemType == QStyleOptionMenuItem::Separator)
(mi.menuItemTy...em::Separator)Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_MenuSeparator : PseudoElement_Item;
0
3519 QRenderRule subRule = renderRule(w, opt, pseudo);-
3520 mi.rect = subRule.contentsRect(opt->rect);-
3521 rule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button);-
3522 rule.configurePalette(&mi.palette, QPalette::HighlightedText, QPalette::Highlight);-
3523 subRule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button);-
3524 subRule.configurePalette(&mi.palette, QPalette::HighlightedText, QPalette::Highlight);-
3525 QFont oldFont = p->font();-
3526 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3527 p->setFont(subRule.font.resolve(p->font()));
never executed: p->setFont(subRule.font.resolve(p->font()));
0
3528-
3529-
3530-
3531 QRenderRule allRules = renderRule(w, PseudoElement_Item, PseudoClass_Any);-
3532-
3533 if ((
(pseudo == Pse...MenuSeparator)Description
TRUEnever evaluated
FALSEnever evaluated
pseudo == PseudoElement_MenuSeparator)
(pseudo == Pse...MenuSeparator)Description
TRUEnever evaluated
FALSEnever evaluated
&& subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3534 subRule.drawRule(p, opt->rect);-
3535 }
never executed: end of block
else if ((
(pseudo == PseudoElement_Item)Description
TRUEnever evaluated
FALSEnever evaluated
pseudo == PseudoElement_Item)
(pseudo == PseudoElement_Item)Description
TRUEnever evaluated
FALSEnever evaluated
0
3536 && (allRules.hasBox()
allRules.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| allRules.hasBorder()
allRules.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
0
3537 || (allRules.background()
allRules.background()Description
TRUEnever evaluated
FALSEnever evaluated
&& !allRules.background()->pixmap.isNull()
!allRules.back...ixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
))) {
0
3538 subRule.drawRule(p, opt->rect);-
3539 if (subRule.hasBackground()
subRule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3540 mi.palette.setBrush(QPalette::Highlight, Qt::NoBrush);-
3541 mi.palette.setBrush(QPalette::Button, Qt::NoBrush);-
3542 }
never executed: end of block
else {
0
3543 mi.palette.setBrush(QPalette::Highlight, mi.palette.brush(QPalette::Button));-
3544 }
never executed: end of block
0
3545 mi.palette.setBrush(QPalette::HighlightedText, mi.palette.brush(QPalette::ButtonText));-
3546-
3547 bool checkable = mi.checkType != QStyleOptionMenuItem::NotCheckable;-
3548 bool checked = checkable
checkableDescription
TRUEnever evaluated
FALSEnever evaluated
? mi.checked : false;
0
3549-
3550 bool dis = !(opt->state & QStyle::State_Enabled),-
3551 act = opt->state & QStyle::State_Selected;-
3552-
3553 if (!mi.icon.isNull()
!mi.icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3554 QIcon::Mode mode = dis
disDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::Disabled : QIcon::Normal;
0
3555 if (act
actDescription
TRUEnever evaluated
FALSEnever evaluated
&& !dis
!disDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3556 mode = QIcon::Active;
never executed: mode = QIcon::Active;
0
3557 QPixmap pixmap;-
3558 if (checked
checkedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3559 pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On);
never executed: pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On);
0
3560 else-
3561 pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
never executed: pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
0
3562 const int pixw = pixmap.width() / pixmap.devicePixelRatio();-
3563 const int pixh = pixmap.height() / pixmap.devicePixelRatio();-
3564 QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon);-
3565 if (!iconRule.hasGeometry()
!iconRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3566 iconRule.geo = new QStyleSheetGeometryData(pixw, pixh, pixw, pixh, -1, -1);-
3567 }
never executed: end of block
else {
0
3568 iconRule.geo->width = pixw;-
3569 iconRule.geo->height = pixh;-
3570 }
never executed: end of block
0
3571 QRect iconRect = positionRect(w, subRule, iconRule, PseudoElement_MenuIcon, opt->rect, opt->direction);-
3572 iconRule.drawRule(p, iconRect);-
3573 QRect pmr(0, 0, pixw, pixh);-
3574 pmr.moveCenter(iconRect.center());-
3575 p->drawPixmap(pmr.topLeft(), pixmap);-
3576 }
never executed: end of block
else if (checkable
checkableDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3577 QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);-
3578 if (subSubRule.hasDrawable()
subSubRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| checked
checkedDescription
TRUEnever evaluated
FALSEnever evaluated
)
{
0
3579 QStyleOptionMenuItem newMi = mi;-
3580 newMi.rect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);-
3581 drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w);-
3582 }
never executed: end of block
0
3583 }
never executed: end of block
0
3584-
3585 QRect textRect = subRule.contentsRect(opt->rect);-
3586 textRect.setWidth(textRect.width() - mi.tabWidth);-
3587 QStringRef s(&mi.text);-
3588 p->setPen(mi.palette.buttonText().color());-
3589 if (!s.isEmpty()
!s.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3590 int text_flags = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine;-
3591 if (!styleHint(SH_UnderlineShortcut, &mi, w)
!styleHint(SH_...rtcut, &mi, w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3592 text_flags |= Qt::TextHideMnemonic;
never executed: text_flags |= Qt::TextHideMnemonic;
0
3593 int t = s.indexOf(QLatin1Char('\t'));-
3594 if (t >= 0
t >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3595 QRect vShortcutRect = visualRect(opt->direction, mi.rect,-
3596 QRect(textRect.topRight(), QPoint(mi.rect.right(), textRect.bottom())));-
3597 p->drawText(vShortcutRect, text_flags, s.mid(t + 1).toString());-
3598 s = s.left(t);-
3599 }
never executed: end of block
0
3600 p->drawText(textRect, text_flags, s.left(t).toString());-
3601 }
never executed: end of block
0
3602-
3603 if (mi.menuItemType == QStyleOptionMenuItem::SubMenu
mi.menuItemTyp...uItem::SubMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3604 PrimitiveElement arrow = (
(opt->directio...::RightToLeft)Description
TRUEnever evaluated
FALSEnever evaluated
opt->direction == Qt::RightToLeft)
(opt->directio...::RightToLeft)Description
TRUEnever evaluated
FALSEnever evaluated
? PE_IndicatorArrowLeft : PE_IndicatorArrowRight;
0
3605 QRenderRule subRule2 = renderRule(w, opt, PseudoElement_MenuRightArrow);-
3606 mi.rect = positionRect(w, subRule, subRule2, PseudoElement_MenuRightArrow, opt->rect, mi.direction);-
3607 drawPrimitive(arrow, &mi, p, w);-
3608 }
never executed: end of block
0
3609 }
never executed: end of block
else if (hasStyleRule(w, PseudoElement_MenuCheckMark)
hasStyleRule(w...MenuCheckMark)Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_MenuRightArrow)
hasStyleRule(w...enuRightArrow)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3610 QWindowsStyle::drawControl(ce, &mi, p, w);-
3611 if (mi.checkType != QStyleOptionMenuItem::NotCheckable
mi.checkType !...::NotCheckableDescription
TRUEnever evaluated
FALSEnever evaluated
&& !mi.checked
!mi.checkedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3612-
3613-
3614 int checkcol = qMax<int>(mi.maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth);-
3615 QRect vCheckRect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x(), mi.rect.y(), checkcol, mi.rect.height()));-
3616 if (mi.state.testFlag(State_Enabled)
mi.state.testF...State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
&& mi.state.testFlag(State_Selected)
mi.state.testF...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3617 qDrawShadePanel(p, vCheckRect, mi.palette, true, 1, &mi.palette.brush(QPalette::Button));-
3618 }
never executed: end of block
else {
0
3619 QBrush fill(mi.palette.light().color(), Qt::Dense4Pattern);-
3620 qDrawShadePanel(p, vCheckRect, mi.palette, true, 1, &fill);-
3621 }
never executed: end of block
0
3622 QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);-
3623 if (subSubRule.hasDrawable()
subSubRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3624 QStyleOptionMenuItem newMi(mi);-
3625 newMi.rect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x() + QWindowsStylePrivate::windowsItemFrame,-
3626 mi.rect.y() + QWindowsStylePrivate::windowsItemFrame,-
3627 checkcol - 2 * QWindowsStylePrivate::windowsItemFrame,-
3628 mi.rect.height() - 2 * QWindowsStylePrivate::windowsItemFrame));-
3629 drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w);-
3630 }
never executed: end of block
0
3631 }
never executed: end of block
0
3632 }
never executed: end of block
else {
0
3633 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !subRule.hasDrawable()
!subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !(opt->state & QStyle::State_Selected)
!(opt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3634 mi.palette.setColor(QPalette::Window, Qt::transparent);-
3635 mi.palette.setColor(QPalette::Button, Qt::transparent);-
3636 }
never executed: end of block
0
3637 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
&& subRule.baseStyleCanDraw()
subRule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3638 baseStyle()->drawControl(ce, &mi, p, w);-
3639 }
never executed: end of block
else {
0
3640 ParentStyle::drawControl(ce, &mi, p, w);-
3641 }
never executed: end of block
0
3642 }-
3643-
3644 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3645 p->setFont(oldFont);
never executed: p->setFont(oldFont);
0
3646-
3647 return;
never executed: return;
0
3648 }-
3649 return;
never executed: return;
0
3650-
3651 case
never executed: case CE_MenuBarItem:
CE_MenuBarItem:
never executed: case CE_MenuBarItem:
0
3652 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *m = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3653 QStyleOptionMenuItem mi(*m);-
3654 QRenderRule subRule = renderRule(w, opt, PseudoElement_Item);-
3655 mi.rect = subRule.contentsRect(opt->rect);-
3656 rule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button);-
3657 subRule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button);-
3658-
3659 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3660 subRule.drawRule(p, opt->rect);-
3661 QCommonStyle::drawControl(ce, &mi, p, w);-
3662 }
never executed: end of block
else {
0
3663 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !(opt->state & QStyle::State_Selected)
!(opt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3664-
3665 mi.palette.setColor(QPalette::Window, Qt::transparent);-
3666 mi.palette.setColor(QPalette::Button, Qt::transparent);-
3667 }
never executed: end of block
0
3668 baseStyle()->drawControl(ce, &mi, p, w);-
3669 }
never executed: end of block
0
3670 }-
3671 return;
never executed: return;
0
3672-
3673-
3674 case
never executed: case CE_ComboBoxLabel:
CE_ComboBoxLabel:
never executed: case CE_ComboBoxLabel:
0
3675 if (!rule.hasBox()
!rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3676 break;
never executed: break;
0
3677 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3678 QRect editRect = subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, w);-
3679 p->save();-
3680 p->setClipRect(editRect);-
3681 if (!cb->currentIcon.isNull()
!cb->currentIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3682 int spacing = rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
? rule.box()->spacing : -1;
0
3683 if (spacing == -1
spacing == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3684 spacing = 6;
never executed: spacing = 6;
0
3685 QIcon::Mode mode = cb->state & State_Enabled
cb->state & State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::Normal : QIcon::Disabled;
0
3686 QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode);-
3687 QRect iconRect(editRect);-
3688 iconRect.setWidth(cb->iconSize.width());-
3689 iconRect = alignedRect(cb->direction,-
3690 Qt::AlignLeft | Qt::AlignVCenter,-
3691 iconRect.size(), editRect);-
3692 drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap);-
3693-
3694 if (cb->direction == Qt::RightToLeft
cb->direction ...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3695 editRect.translate(-spacing - cb->iconSize.width(), 0);
never executed: editRect.translate(-spacing - cb->iconSize.width(), 0);
0
3696 else-
3697 editRect.translate(cb->iconSize.width() + spacing, 0);
never executed: editRect.translate(cb->iconSize.width() + spacing, 0);
0
3698 }-
3699 if (!cb->currentText.isEmpty()
!cb->currentText.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& !cb->editable
!cb->editableDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3700 QPalette styledPalette(cb->palette);-
3701 rule.configurePalette(&styledPalette, QPalette::Text, QPalette::Base);-
3702 drawItemText(p, editRect.adjusted(0, 0, 0, 0), Qt::AlignLeft | Qt::AlignVCenter, styledPalette,-
3703 cb->state & State_Enabled, cb->currentText, QPalette::Text);-
3704 }
never executed: end of block
0
3705 p->restore();-
3706 return;
never executed: return;
0
3707 }-
3708 break;
never executed: break;
0
3709-
3710-
3711 case
never executed: case CE_Header:
CE_Header:
never executed: case CE_Header:
0
3712 if (hasStyleRule(w, PseudoElement_HeaderViewUpArrow)
hasStyleRule(w...erViewUpArrow)Description
TRUEnever evaluated
FALSEnever evaluated
0
3713 || hasStyleRule(w, PseudoElement_HeaderViewDownArrow)
hasStyleRule(w...ViewDownArrow)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3714 ParentStyle::drawControl(ce, opt, p, w);-
3715 return;
never executed: return;
0
3716 }-
3717 if(hasStyleRule(w, PseudoElement_HeaderViewSection)
hasStyleRule(w...erViewSection)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3718 QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);-
3719 if (!subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.baseStyleCanDraw()
!subRule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
0
3720 || subRule.hasBackground()
subRule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasPalette()
subRule.hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3721 ParentStyle::drawControl(ce, opt, p, w);-
3722 return;
never executed: return;
0
3723 }-
3724 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3725 const QFont oldFont = p->font();-
3726 p->setFont(subRule.font.resolve(p->font()));-
3727 baseStyle()->drawControl(ce, opt, p, w);-
3728 p->setFont(oldFont);-
3729 return;
never executed: return;
0
3730 }-
3731 }
never executed: end of block
0
3732 break;
never executed: break;
0
3733 case
never executed: case CE_HeaderSection:
CE_HeaderSection:
never executed: case CE_HeaderSection:
0
3734 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3735 QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);-
3736 if (subRule.hasNativeBorder()
subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3737 QStyleOptionHeader hdr(*header);-
3738 subRule.configurePalette(&hdr.palette, QPalette::ButtonText, QPalette::Button);-
3739-
3740 if (subRule.baseStyleCanDraw()
subRule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3741 baseStyle()->drawControl(CE_HeaderSection, &hdr, p, w);-
3742 }
never executed: end of block
else {
0
3743 QWindowsStyle::drawControl(CE_HeaderSection, &hdr, p, w);-
3744 }
never executed: end of block
0
3745 } else {-
3746 subRule.drawRule(p, opt->rect);-
3747 }
never executed: end of block
0
3748 return;
never executed: return;
0
3749 }-
3750 break;
never executed: break;
0
3751-
3752 case
never executed: case CE_HeaderLabel:
CE_HeaderLabel:
never executed: case CE_HeaderLabel:
0
3753 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3754 QStyleOptionHeader hdr(*header);-
3755 QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);-
3756 subRule.configurePalette(&hdr.palette, QPalette::ButtonText, QPalette::Button);-
3757 QFont oldFont = p->font();-
3758 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3759 p->setFont(subRule.font.resolve(p->font()));
never executed: p->setFont(subRule.font.resolve(p->font()));
0
3760 baseStyle()->drawControl(ce, &hdr, p, w);-
3761 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3762 p->setFont(oldFont);
never executed: p->setFont(oldFont);
0
3763 return;
never executed: return;
0
3764 }-
3765 break;
never executed: break;
0
3766-
3767 case
never executed: case CE_HeaderEmptyArea:
CE_HeaderEmptyArea:
never executed: case CE_HeaderEmptyArea:
0
3768 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3769 return;
never executed: return;
0
3770 }-
3771 break;
never executed: break;
0
3772-
3773 case
never executed: case CE_ProgressBar:
CE_ProgressBar:
never executed: case CE_ProgressBar:
0
3774 QWindowsStyle::drawControl(ce, opt, p, w);-
3775 return;
never executed: return;
0
3776-
3777 case
never executed: case CE_ProgressBarGroove:
CE_ProgressBarGroove:
never executed: case CE_ProgressBarGroove:
0
3778 if (!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3779 rule.drawRule(p, rule.boxRect(opt->rect, Margin));-
3780 return;
never executed: return;
0
3781 }-
3782 break;
never executed: break;
0
3783-
3784 case
never executed: case CE_ProgressBarContents:
CE_ProgressBarContents:
never executed: case CE_ProgressBarContents:
{
0
3785 QRenderRule subRule = renderRule(w, opt, PseudoElement_ProgressBarChunk);-
3786 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3787 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3788 p->save();-
3789 p->setClipRect(pb->rect);-
3790-
3791 qint64 minimum = qint64(pb->minimum);-
3792 qint64 maximum = qint64(pb->maximum);-
3793 qint64 progress = qint64(pb->progress);-
3794 bool vertical = (pb->orientation == Qt::Vertical);-
3795 bool inverted = pb->invertedAppearance;-
3796-
3797 QTransform m;-
3798 QRect rect = pb->rect;-
3799 if (vertical
verticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3800 rect = QRect(rect.y(), rect.x(), rect.height(), rect.width());-
3801 m.rotate(90);-
3802 m.translate(0, -(rect.height() + rect.y()*2));-
3803 }
never executed: end of block
0
3804-
3805 bool reverse = ((!vertical
!verticalDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(pb->direction...::RightToLeft)Description
TRUEnever evaluated
FALSEnever evaluated
pb->direction == Qt::RightToLeft)
(pb->direction...::RightToLeft)Description
TRUEnever evaluated
FALSEnever evaluated
) || vertical
verticalDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
3806 if (inverted
invertedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3807 reverse = !reverse;
never executed: reverse = !reverse;
0
3808 const bool indeterminate = pb->minimum == pb->maximum;-
3809 qreal fillRatio = indeterminate
indeterminateDescription
TRUEnever evaluated
FALSEnever evaluated
? 0.50 : qreal(progress - minimum)/(maximum - minimum);
0
3810 int fillWidth = int(rect.width() * fillRatio);-
3811 int chunkWidth = fillWidth;-
3812 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3813 QSize sz = subRule.size();-
3814 chunkWidth = (
(opt->state & ...te_Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & QStyle::State_Horizontal)
(opt->state & ...te_Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
? sz.width() : sz.height();
0
3815 }
never executed: end of block
0
3816-
3817 QRect r = rect;-
3818 const QWindowsStylePrivate * const d = d_func();-
3819 if (pb->minimum == 0
pb->minimum == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& pb->maximum == 0
pb->maximum == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3820 int chunkCount = fillWidth/chunkWidth;-
3821 int offset = 0;-
3822 if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject))
QProgressStyle...>styleObject))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3823 offset = animation->animationStep() * 8 % rect.width();
never executed: offset = animation->animationStep() * 8 % rect.width();
0
3824 else-
3825 d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
never executed: d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
0
3826 int x = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? r.left() + r.width() - offset - chunkWidth : r.x() + offset;
0
3827 while (chunkCount > 0
chunkCount > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3828 r.setRect(x, rect.y(), chunkWidth, rect.height());-
3829 r = m.mapRect(QRectF(r)).toRect();-
3830 subRule.drawRule(p, r);-
3831 x += reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? -chunkWidth : chunkWidth;
0
3832 if (reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? x < rect.left() : x > rect.right()
reverse ? x < ...> rect.right()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3833 break;
never executed: break;
0
3834 --chunkCount;-
3835 }
never executed: end of block
0
3836-
3837 r = rect;-
3838 x = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? r.right() - (r.left() - x - chunkWidth)
0
3839 : r.left() + (x - r.right() - chunkWidth);-
3840 while (chunkCount > 0
chunkCount > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3841 r.setRect(x, rect.y(), chunkWidth, rect.height());-
3842 r = m.mapRect(QRectF(r)).toRect();-
3843 subRule.drawRule(p, r);-
3844 x += reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? -chunkWidth : chunkWidth;
0
3845 --chunkCount;-
3846 }
never executed: end of block
;
0
3847 }
never executed: end of block
else {
0
3848 int x = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? r.left() + r.width() - chunkWidth : r.x();
0
3849-
3850 for (int i = 0; i < ((int)(qreal(fillWidth)/chunkWidth) + ((qreal(fillWidth)/chunkWidth) > 0 && (qreal(fillWidth)/chunkWidth) != (int)(qreal(fillWidth)/chunkWidth)))
i < ((int)(qre.../chunkWidth)))Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
3851 r.setRect(x, rect.y(), chunkWidth, rect.height());-
3852 r = m.mapRect(QRectF(r)).toRect();-
3853 subRule.drawRule(p, r);-
3854 x += reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? -chunkWidth : chunkWidth;
0
3855 }
never executed: end of block
0
3856-
3857 d->stopAnimation(opt->styleObject);-
3858 }
never executed: end of block
0
3859-
3860 p->restore();-
3861 return;
never executed: return;
0
3862 }-
3863 }
never executed: end of block
0
3864 }-
3865 break;
never executed: break;
0
3866-
3867 case
never executed: case CE_ProgressBarLabel:
CE_ProgressBarLabel:
never executed: case CE_ProgressBarLabel:
0
3868 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3869 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_ProgressBarChunk)
hasStyleRule(w...gressBarChunk)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3870 drawItemText(p, pb->rect, pb->textAlignment | Qt::TextSingleLine, pb->palette,-
3871 pb->state & State_Enabled, pb->text, QPalette::Text);-
3872 }
never executed: end of block
else {
0
3873 QStyleOptionProgressBar pbCopy(*pb);-
3874 rule.configurePalette(&pbCopy.palette, QPalette::HighlightedText, QPalette::Highlight);-
3875 baseStyle()->drawControl(ce, &pbCopy, p, w);-
3876 }
never executed: end of block
0
3877 return;
never executed: return;
0
3878 }-
3879 break;
never executed: break;
0
3880-
3881 case
never executed: case CE_SizeGrip:
CE_SizeGrip:
never executed: case CE_SizeGrip:
0
3882 if (const
const QStyleOp...zeGrip *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSizeGrip *sgOpt = qstyleoption_cast<const QStyleOptionSizeGrip *>(opt)
const QStyleOp...zeGrip *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3883 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3884 rule.drawFrame(p, opt->rect);-
3885 p->save();-
3886 switch (sgOpt->corner) {-
3887 case
never executed: case Qt::BottomRightCorner:
Qt::BottomRightCorner:
never executed: case Qt::BottomRightCorner:
break;
never executed: break;
0
3888 case
never executed: case Qt::BottomLeftCorner:
Qt::BottomLeftCorner:
never executed: case Qt::BottomLeftCorner:
p->rotate(90); break;
never executed: break;
0
3889 case
never executed: case Qt::TopLeftCorner:
Qt::TopLeftCorner:
never executed: case Qt::TopLeftCorner:
p->rotate(180); break;
never executed: break;
0
3890 case
never executed: case Qt::TopRightCorner:
Qt::TopRightCorner:
never executed: case Qt::TopRightCorner:
p->rotate(270); break;
never executed: break;
0
3891 default
never executed: default:
:
never executed: default:
break;
never executed: break;
0
3892 }-
3893 rule.drawImage(p, opt->rect);-
3894 p->restore();-
3895 }
never executed: end of block
else {
0
3896 QStyleOptionSizeGrip sg(*sgOpt);-
3897 sg.rect = rule.contentsRect(opt->rect);-
3898 baseStyle()->drawControl(CE_SizeGrip, &sg, p, w);-
3899 }
never executed: end of block
0
3900 return;
never executed: return;
0
3901 }-
3902 break;
never executed: break;
0
3903-
3904 case
never executed: case CE_ToolBoxTab:
CE_ToolBoxTab:
never executed: case CE_ToolBoxTab:
0
3905 QWindowsStyle::drawControl(ce, opt, p, w);-
3906 return;
never executed: return;
0
3907-
3908 case
never executed: case CE_ToolBoxTabShape:
CE_ToolBoxTabShape:
never executed: case CE_ToolBoxTabShape:
{
0
3909 QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolBoxTab);-
3910 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3911 subRule.drawRule(p, opt->rect);-
3912 return;
never executed: return;
0
3913 }-
3914 }-
3915 break;
never executed: break;
0
3916-
3917 case
never executed: case CE_ToolBoxTabLabel:
CE_ToolBoxTabLabel:
never executed: case CE_ToolBoxTabLabel:
0
3918 if (const
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBox *box = qstyleoption_cast<const QStyleOptionToolBox *>(opt)
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3919 QStyleOptionToolBox boxCopy(*box);-
3920 QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolBoxTab);-
3921 subRule.configurePalette(&boxCopy.palette, QPalette::ButtonText, QPalette::Button);-
3922 QFont oldFont = p->font();-
3923 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3924 p->setFont(subRule.font);
never executed: p->setFont(subRule.font);
0
3925 boxCopy.rect = subRule.contentsRect(opt->rect);-
3926 QWindowsStyle::drawControl(ce, &boxCopy, p , w);-
3927 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3928 p->setFont(oldFont);
never executed: p->setFont(oldFont);
0
3929 return;
never executed: return;
0
3930 }-
3931 break;
never executed: break;
0
3932-
3933 case
never executed: case CE_ScrollBarAddPage:
CE_ScrollBarAddPage:
never executed: case CE_ScrollBarAddPage:
0
3934 pe1 = PseudoElement_ScrollBarAddPage;-
3935 break;
never executed: break;
0
3936-
3937 case
never executed: case CE_ScrollBarSubPage:
CE_ScrollBarSubPage:
never executed: case CE_ScrollBarSubPage:
0
3938 pe1 = PseudoElement_ScrollBarSubPage;-
3939 break;
never executed: break;
0
3940-
3941 case
never executed: case CE_ScrollBarAddLine:
CE_ScrollBarAddLine:
never executed: case CE_ScrollBarAddLine:
0
3942 pe1 = PseudoElement_ScrollBarAddLine;-
3943 pe2 = (
(opt->state & ...te_Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & QStyle::State_Horizontal)
(opt->state & ...te_Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_ScrollBarRightArrow : PseudoElement_ScrollBarDownArrow;
0
3944 fallback = true;-
3945 break;
never executed: break;
0
3946-
3947 case
never executed: case CE_ScrollBarSubLine:
CE_ScrollBarSubLine:
never executed: case CE_ScrollBarSubLine:
0
3948 pe1 = PseudoElement_ScrollBarSubLine;-
3949 pe2 = (
(opt->state & ...te_Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & QStyle::State_Horizontal)
(opt->state & ...te_Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_ScrollBarLeftArrow : PseudoElement_ScrollBarUpArrow;
0
3950 fallback = true;-
3951 break;
never executed: break;
0
3952-
3953 case
never executed: case CE_ScrollBarFirst:
CE_ScrollBarFirst:
never executed: case CE_ScrollBarFirst:
0
3954 pe1 = PseudoElement_ScrollBarFirst;-
3955 break;
never executed: break;
0
3956-
3957 case
never executed: case CE_ScrollBarLast:
CE_ScrollBarLast:
never executed: case CE_ScrollBarLast:
0
3958 pe1 = PseudoElement_ScrollBarLast;-
3959 break;
never executed: break;
0
3960-
3961 case
never executed: case CE_ScrollBarSlider:
CE_ScrollBarSlider:
never executed: case CE_ScrollBarSlider:
0
3962 pe1 = PseudoElement_ScrollBarSlider;-
3963 fallback = true;-
3964 break;
never executed: break;
0
3965-
3966-
3967 case
never executed: case CE_ItemViewItem:
CE_ItemViewItem:
never executed: case CE_ItemViewItem:
0
3968 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3969 QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem);-
3970 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_Indicator)
hasStyleRule(w...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3971 QStyleOptionViewItem optCopy(*vopt);-
3972 subRule.configurePalette(&optCopy.palette, vopt->state & QStyle::State_Selected ? QPalette::HighlightedText : QPalette::Text,-
3973 vopt->state & QStyle::State_Selected ? QPalette::Highlight : QPalette::Base);-
3974 QWindowsStyle::drawControl(ce, &optCopy, p, w);-
3975 }
never executed: end of block
else {
0
3976 QStyleOptionViewItem voptCopy(*vopt);-
3977 subRule.configurePalette(&voptCopy.palette, QPalette::Text, QPalette::NoRole);-
3978 baseStyle()->drawControl(ce, &voptCopy, p, w);-
3979 }
never executed: end of block
0
3980 return;
never executed: return;
0
3981 }-
3982 break;
never executed: break;
0
3983-
3984-
3985-
3986 case
never executed: case CE_TabBarTab:
CE_TabBarTab:
never executed: case CE_TabBarTab:
0
3987 if (hasStyleRule(w, PseudoElement_TabBarTab)
hasStyleRule(w...ent_TabBarTab)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3988 QWindowsStyle::drawControl(ce, opt, p, w);-
3989 return;
never executed: return;
0
3990 }-
3991 break;
never executed: break;
0
3992-
3993 case
never executed: case CE_TabBarTabLabel:
CE_TabBarTabLabel:
never executed: case CE_TabBarTabLabel:
0
3994 case
never executed: case CE_TabBarTabShape:
CE_TabBarTabShape:
never executed: case CE_TabBarTabShape:
0
3995 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3996 QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);-
3997 QRect r = positionRect(w, subRule, PseudoElement_TabBarTab, opt->rect, opt->direction);-
3998 if (ce == CE_TabBarTabShape
ce == CE_TabBarTabShapeDescription
TRUEnever evaluated
FALSEnever evaluated
&& subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3999 subRule.drawRule(p, r);-
4000 return;
never executed: return;
0
4001 }-
4002 QStyleOptionTab tabCopy(*tab);-
4003 subRule.configurePalette(&tabCopy.palette, QPalette::WindowText, QPalette::Window);-
4004 QFont oldFont = p->font();-
4005 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4006 p->setFont(subRule.font);
never executed: p->setFont(subRule.font);
0
4007 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4008 tabCopy.rect = ce == CE_TabBarTabShape
ce == CE_TabBarTabShapeDescription
TRUEnever evaluated
FALSEnever evaluated
? subRule.borderRect(r)
0
4009 : subRule.contentsRect(r);-
4010 QWindowsStyle::drawControl(ce, &tabCopy, p, w);-
4011 }
never executed: end of block
else {
0
4012 baseStyle()->drawControl(ce, &tabCopy, p, w);-
4013 }
never executed: end of block
0
4014 if (subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4015 p->setFont(oldFont);
never executed: p->setFont(oldFont);
0
4016-
4017 return;
never executed: return;
0
4018 }-
4019 break;
never executed: break;
0
4020-
4021-
4022 case
never executed: case CE_ColumnViewGrip:
CE_ColumnViewGrip:
never executed: case CE_ColumnViewGrip:
0
4023 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4024 rule.drawRule(p, opt->rect);-
4025 return;
never executed: return;
0
4026 }-
4027 break;
never executed: break;
0
4028-
4029 case
never executed: case CE_DockWidgetTitle:
CE_DockWidgetTitle:
never executed: case CE_DockWidgetTitle:
0
4030 if (const
const QStyleOp...Widget *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)
const QStyleOp...Widget *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4031 QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetTitle);-
4032 if (!subRule.hasDrawable()
!subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !subRule.hasPosition()
!subRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4033 break;
never executed: break;
0
4034 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4035 subRule.drawRule(p, opt->rect);-
4036 }
never executed: end of block
else {
0
4037 QStyleOptionDockWidget dwCopy(*dwOpt);-
4038 dwCopy.title = QString();-
4039 baseStyle()->drawControl(ce, &dwCopy, p, w);-
4040 }
never executed: end of block
0
4041-
4042 if (!dwOpt->title.isEmpty()
!dwOpt->title.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4043 QRect r = subElementRect(SE_DockWidgetTitleBarText, opt, w);-
4044 if (dwOpt->verticalTitleBar
dwOpt->verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4045 r = r.transposed();-
4046 p->save();-
4047 p->translate(r.left(), r.top() + r.width());-
4048 p->rotate(-90);-
4049 p->translate(-r.left(), -r.top());-
4050 }
never executed: end of block
0
4051 r = subRule.contentsRect(r);-
4052-
4053 Qt::Alignment alignment = 0;-
4054 if (subRule.hasPosition()
subRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4055 alignment = subRule.position()->textAlignment;
never executed: alignment = subRule.position()->textAlignment;
0
4056 if (alignment == 0
alignment == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4057 alignment = Qt::AlignLeft;
never executed: alignment = Qt::AlignLeft;
0
4058-
4059 QString titleText = p->fontMetrics().elidedText(dwOpt->title, Qt::ElideRight, r.width());-
4060 drawItemText(p, r,-
4061 alignment | Qt::TextShowMnemonic, dwOpt->palette,-
4062 dwOpt->state & State_Enabled, titleText,-
4063 QPalette::WindowText);-
4064-
4065 if (dwOpt->verticalTitleBar
dwOpt->verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4066 p->restore();
never executed: p->restore();
0
4067 }
never executed: end of block
0
4068-
4069 return;
never executed: return;
0
4070 }-
4071 break;
never executed: break;
0
4072 case
never executed: case CE_ShapedFrame:
CE_ShapedFrame:
never executed: case CE_ShapedFrame:
0
4073 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frm = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4074 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4075 QStyleOptionFrame frmOpt(*frm);-
4076 rule.configurePalette(&frmOpt.palette, QPalette::Text, QPalette::Base);-
4077 frmOpt.rect = rule.borderRect(frmOpt.rect);-
4078 baseStyle()->drawControl(ce, &frmOpt, p, w);-
4079 }
never executed: end of block
0
4080-
4081 }
never executed: end of block
0
4082 return;
never executed: return;
0
4083-
4084-
4085 default
never executed: default:
:
never executed: default:
0
4086 break;
never executed: break;
0
4087 }-
4088-
4089 if (pe1 != PseudoElement_None
pe1 != PseudoElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4090 QRenderRule subRule = renderRule(w, opt, pe1);-
4091 if (subRule.bg != 0
subRule.bg != 0Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4092-
4093-
4094 subRule.drawRule(p, opt->rect);-
4095 }
never executed: end of block
else if (fallback
fallbackDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4096 QWindowsStyle::drawControl(ce, opt, p, w);-
4097 pe2 = PseudoElement_None;-
4098 }
never executed: end of block
else {
0
4099 baseStyle()->drawControl(ce, opt, p, w);-
4100 }
never executed: end of block
0
4101 if (pe2 != PseudoElement_None
pe2 != PseudoElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4102 QRenderRule subSubRule = renderRule(w, opt, pe2);-
4103 QRect r = positionRect(w, subRule, subSubRule, pe2, opt->rect, opt->direction);-
4104 subSubRule.drawRule(p, r);-
4105 }
never executed: end of block
0
4106 return;
never executed: return;
0
4107 }-
4108-
4109 baseStyle()->drawControl(ce, opt, p, w);-
4110}
never executed: end of block
0
4111-
4112void QStyleSheetStyle::drawItemPixmap(QPainter *p, const QRect &rect, int alignment, const-
4113 QPixmap &pixmap) const-
4114{-
4115 baseStyle()->drawItemPixmap(p, rect, alignment, pixmap);-
4116}
never executed: end of block
0
4117-
4118void QStyleSheetStyle::drawItemText(QPainter *painter, const QRect& rect, int alignment, const QPalette &pal,-
4119 bool enabled, const QString& text, QPalette::ColorRole textRole) const-
4120{-
4121 baseStyle()->drawItemText(painter, rect, alignment, pal, enabled, text, textRole);-
4122}
never executed: end of block
0
4123-
4124void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,-
4125 const QWidget *w) const-
4126{-
4127 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { baseStyle()->drawPrimitive(pe, opt, p, w); return;
never executed: return;
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
4128-
4129 int pseudoElement = PseudoElement_None;-
4130 QRenderRule rule = renderRule(w, opt);-
4131 QRect rect = opt->rect;-
4132-
4133 switch (pe) {-
4134-
4135 case
never executed: case PE_FrameStatusBar:
PE_FrameStatusBar:
never executed: case PE_FrameStatusBar:
{
0
4136 QRenderRule subRule = renderRule(w ? w->parentWidget() : nullptr, opt, PseudoElement_Item);-
4137 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4138 subRule.drawRule(p, opt->rect);-
4139 return;
never executed: return;
0
4140 }-
4141 break;
never executed: break;
0
4142 }-
4143-
4144 case
never executed: case PE_IndicatorArrowDown:
PE_IndicatorArrowDown:
never executed: case PE_IndicatorArrowDown:
0
4145 pseudoElement = PseudoElement_DownArrow;-
4146 break;
never executed: break;
0
4147-
4148 case
never executed: case PE_IndicatorArrowUp:
PE_IndicatorArrowUp:
never executed: case PE_IndicatorArrowUp:
0
4149 pseudoElement = PseudoElement_UpArrow;-
4150 break;
never executed: break;
0
4151-
4152 case
never executed: case PE_IndicatorRadioButton:
PE_IndicatorRadioButton:
never executed: case PE_IndicatorRadioButton:
0
4153 pseudoElement = PseudoElement_ExclusiveIndicator;-
4154 break;
never executed: break;
0
4155-
4156 case
never executed: case PE_IndicatorViewItemCheck:
PE_IndicatorViewItemCheck:
never executed: case PE_IndicatorViewItemCheck:
0
4157 pseudoElement = PseudoElement_ViewItemIndicator;-
4158 break;
never executed: break;
0
4159-
4160 case
never executed: case PE_IndicatorCheckBox:
PE_IndicatorCheckBox:
never executed: case PE_IndicatorCheckBox:
0
4161 pseudoElement = PseudoElement_Indicator;-
4162 break;
never executed: break;
0
4163-
4164 case
never executed: case PE_IndicatorHeaderArrow:
PE_IndicatorHeaderArrow:
never executed: case PE_IndicatorHeaderArrow:
0
4165 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4166 pseudoElement = hdr->sortIndicator == QStyleOptionHeader::SortUp
hdr->sortIndic...Header::SortUpDescription
TRUEnever evaluated
FALSEnever evaluated
0
4167 ? PseudoElement_HeaderViewUpArrow-
4168 : PseudoElement_HeaderViewDownArrow;-
4169 }
never executed: end of block
0
4170 break;
never executed: break;
0
4171-
4172 case
never executed: case PE_PanelButtonTool:
PE_PanelButtonTool:
never executed: case PE_PanelButtonTool:
0
4173 case
never executed: case PE_PanelButtonCommand:
PE_PanelButtonCommand:
never executed: case PE_PanelButtonCommand:
0
4174 if (qobject_cast<const QAbstractButton *>(w)
qobject_cast<c...ctButton *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.hasBackground()
rule.hasBackground()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4175-
4176 ParentStyle::drawPrimitive(pe, opt, p, w);-
4177 if (!rule.background()->pixmap.isNull()
!rule.backgrou...ixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasImage()
rule.hasImage()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4178 rule.drawRule(p, rule.boxRect(opt->rect, QRenderRule::Margin).adjusted(1,1,-1,-1));-
4179 }
never executed: end of block
0
4180 return;
never executed: return;
0
4181 }-
4182 if (!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4183 rule.drawRule(p, rule.boxRect(opt->rect, QRenderRule::Margin));-
4184 return;
never executed: return;
0
4185 }-
4186 break;
never executed: break;
0
4187-
4188 case
never executed: case PE_IndicatorButtonDropDown:
PE_IndicatorButtonDropDown:
never executed: case PE_IndicatorButtonDropDown:
{
0
4189 QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolButtonMenu);-
4190 if (!subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4191 rule.drawBorder(p, opt->rect);-
4192 return;
never executed: return;
0
4193 }-
4194 break;
never executed: break;
0
4195 }-
4196-
4197 case
never executed: case PE_FrameDefaultButton:
PE_FrameDefaultButton:
never executed: case PE_FrameDefaultButton:
0
4198 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4199 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4200 break;
never executed: break;
0
4201 QWindowsStyle::drawPrimitive(pe, opt, p, w);-
4202 }
never executed: end of block
0
4203 return;
never executed: return;
0
4204-
4205 case
never executed: case PE_FrameWindow:
PE_FrameWindow:
never executed: case PE_FrameWindow:
0
4206 case
never executed: case PE_FrameDockWidget:
PE_FrameDockWidget:
never executed: case PE_FrameDockWidget:
0
4207 case
never executed: case PE_Frame:
PE_Frame:
never executed: case PE_Frame:
0
4208 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frm = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4209 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4210 QStyleOptionFrame frmOpt(*frm);-
4211 rule.configurePalette(&frmOpt.palette, QPalette::Text, QPalette::Base);-
4212 baseStyle()->drawPrimitive(pe, &frmOpt, p, w);-
4213 }
never executed: end of block
else {
0
4214 rule.drawBorder(p, rule.borderRect(opt->rect));-
4215 }
never executed: end of block
0
4216 }-
4217 return;
never executed: return;
0
4218-
4219 case
never executed: case PE_PanelLineEdit:
PE_PanelLineEdit:
never executed: case PE_PanelLineEdit:
0
4220 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frm = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4221-
4222 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& qobject_cast<const QAbstractSpinBox *>(w->parentWidget())
qobject_cast<c...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4223 QRenderRule spinboxRule = renderRule(w->parentWidget(), opt);-
4224 if (!spinboxRule.hasNativeBorder()
!spinboxRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| !spinboxRule.baseStyleCanDraw()
!spinboxRule.b...StyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4225 return;
never executed: return;
0
4226 rule = spinboxRule;-
4227 }
never executed: end of block
0
4228-
4229 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4230 QStyleOptionFrame frmOpt(*frm);-
4231 rule.configurePalette(&frmOpt.palette, QPalette::Text, QPalette::Base);-
4232 frmOpt.rect = rule.borderRect(frmOpt.rect);-
4233 if (rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4234 rule.drawBackgroundImage(p, opt->rect);-
4235 baseStyle()->drawPrimitive(pe, &frmOpt, p, w);-
4236 }
never executed: end of block
else {
0
4237 rule.drawBackground(p, opt->rect);-
4238 if (frmOpt.lineWidth > 0
frmOpt.lineWidth > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4239 baseStyle()->drawPrimitive(PE_FrameLineEdit, &frmOpt, p, w);
never executed: baseStyle()->drawPrimitive(PE_FrameLineEdit, &frmOpt, p, w);
0
4240 }
never executed: end of block
0
4241 } else {-
4242 rule.drawRule(p, opt->rect);-
4243 }
never executed: end of block
0
4244 }-
4245 return;
never executed: return;
0
4246-
4247 case
never executed: case PE_Widget:
PE_Widget:
never executed: case PE_Widget:
0
4248 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& !rule.hasDrawable()
!rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4249 QWidget *container = containerWidget(w);-
4250 if (styleSheetCaches->autoFillDisabledWidgets.contains(container)
styleSheetCach...ins(container)Description
TRUEnever evaluated
FALSEnever evaluated
0
4251 && (container == w
container == wDescription
TRUEnever evaluated
FALSEnever evaluated
|| !renderRule(container, opt).hasBackground()
!renderRule(co...asBackground()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
4252-
4253-
4254 p->fillRect(opt->rect, opt->palette.brush(w->backgroundRole()));-
4255 }
never executed: end of block
0
4256 break;
never executed: break;
0
4257 }-
4258-
4259 if (const
const QAbstrac...rollArea *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
QAbstractScrollArea *sa = qobject_cast<const QAbstractScrollArea *>(w)
const QAbstrac...rollArea *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4260 const QAbstractScrollAreaPrivate *sap = sa->d_func();-
4261 rule.drawBackground(p, opt->rect, sap->contentsOffset());-
4262 if (rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4263 QRect brect = rule.borderRect(opt->rect);-
4264 if (styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, opt, w)
styleHint(QSty...tents, opt, w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4265 QRect r = brect.adjusted(0, 0, sa->verticalScrollBar()->isVisible() ? -sa->verticalScrollBar()->width() : 0,-
4266 sa->horizontalScrollBar()->isVisible() ? -sa->horizontalScrollBar()->height() : 0);-
4267 brect = QStyle::visualRect(opt->direction, brect, r);-
4268 }
never executed: end of block
0
4269 rule.drawBorder(p, brect);-
4270 }
never executed: end of block
0
4271 break;
never executed: break;
0
4272 }-
4273-
4274-
4275 case
never executed: case PE_PanelMenu:
PE_PanelMenu:
never executed: case PE_PanelMenu:
code before this statement never executed: case PE_PanelMenu:
0
4276 case
never executed: case PE_PanelStatusBar:
PE_PanelStatusBar:
never executed: case PE_PanelStatusBar:
0
4277 if(rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4278 rule.drawRule(p, opt->rect);-
4279 return;
never executed: return;
0
4280 }-
4281 break;
never executed: break;
0
4282-
4283 case
never executed: case PE_FrameMenu:
PE_FrameMenu:
never executed: case PE_FrameMenu:
0
4284 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4285-
4286 return;
never executed: return;
0
4287 }-
4288 break;
never executed: break;
0
4289-
4290 case
never executed: case PE_PanelMenuBar:
PE_PanelMenuBar:
never executed: case PE_PanelMenuBar:
0
4291 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4292-
4293 return;
never executed: return;
0
4294 }-
4295 break;
never executed: break;
0
4296-
4297 case
never executed: case PE_IndicatorToolBarSeparator:
PE_IndicatorToolBarSeparator:
never executed: case PE_IndicatorToolBarSeparator:
0
4298 case
never executed: case PE_IndicatorToolBarHandle:
PE_IndicatorToolBarHandle:
never executed: case PE_IndicatorToolBarHandle:
{
0
4299 PseudoElement ps = pe == PE_IndicatorToolBarHandle
pe == PE_Indic...rToolBarHandleDescription
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_ToolBarHandle : PseudoElement_ToolBarSeparator;
0
4300 QRenderRule subRule = renderRule(w, opt, ps);-
4301 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4302 subRule.drawRule(p, opt->rect);-
4303 return;
never executed: return;
0
4304 }-
4305 }-
4306 break;
never executed: break;
0
4307-
4308 case
never executed: case PE_IndicatorMenuCheckMark:
PE_IndicatorMenuCheckMark:
never executed: case PE_IndicatorMenuCheckMark:
0
4309 pseudoElement = PseudoElement_MenuCheckMark;-
4310 break;
never executed: break;
0
4311-
4312 case
never executed: case PE_IndicatorArrowLeft:
PE_IndicatorArrowLeft:
never executed: case PE_IndicatorArrowLeft:
0
4313 pseudoElement = PseudoElement_LeftArrow;-
4314 break;
never executed: break;
0
4315-
4316 case
never executed: case PE_IndicatorArrowRight:
PE_IndicatorArrowRight:
never executed: case PE_IndicatorArrowRight:
0
4317 pseudoElement = PseudoElement_RightArrow;-
4318 break;
never executed: break;
0
4319-
4320 case
never executed: case PE_IndicatorColumnViewArrow:
PE_IndicatorColumnViewArrow:
never executed: case PE_IndicatorColumnViewArrow:
0
4321 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4322 bool reverse = (viewOpt->direction == Qt::RightToLeft);-
4323 pseudoElement = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_LeftArrow : PseudoElement_RightArrow;
0
4324 }
never executed: end of block
else {
0
4325 pseudoElement = PseudoElement_RightArrow;-
4326 }
never executed: end of block
0
4327 break;
never executed: break;
0
4328-
4329 case
never executed: case PE_IndicatorBranch:
PE_IndicatorBranch:
never executed: case PE_IndicatorBranch:
0
4330 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4331 QRenderRule subRule = renderRule(w, opt, PseudoElement_TreeViewBranch);-
4332 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4333 if ((
(vopt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
vopt->state & QStyle::State_Selected)
(vopt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
&& vopt->showDecorationSelected
vopt->showDecorationSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4334 p->fillRect(vopt->rect, vopt->palette.highlight());
never executed: p->fillRect(vopt->rect, vopt->palette.highlight());
0
4335 else if (vopt->features & QStyleOptionViewItem::Alternate
vopt->features...tem::AlternateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4336 p->fillRect(vopt->rect, vopt->palette.alternateBase());
never executed: p->fillRect(vopt->rect, vopt->palette.alternateBase());
0
4337 subRule.drawRule(p, opt->rect);-
4338 }
never executed: end of block
else {
0
4339 baseStyle()->drawPrimitive(pe, vopt, p, w);-
4340 }
never executed: end of block
0
4341 }-
4342 return;
never executed: return;
0
4343-
4344 case
never executed: case PE_PanelTipLabel:
PE_PanelTipLabel:
never executed: case PE_PanelTipLabel:
0
4345 if (!rule.hasDrawable()
!rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4346 break;
never executed: break;
0
4347-
4348 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frmOpt = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4349 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4350 rule.drawBackground(p, opt->rect);-
4351 QStyleOptionFrame optCopy(*frmOpt);-
4352 optCopy.rect = rule.borderRect(opt->rect);-
4353 optCopy.palette.setBrush(QPalette::Window, Qt::NoBrush);-
4354 baseStyle()->drawPrimitive(pe, &optCopy, p, w);-
4355 }
never executed: end of block
else {
0
4356 rule.drawRule(p, opt->rect);-
4357 }
never executed: end of block
0
4358 }-
4359 return;
never executed: return;
0
4360-
4361 case
never executed: case PE_FrameGroupBox:
PE_FrameGroupBox:
never executed: case PE_FrameGroupBox:
0
4362 if (rule.hasNativeBorder()
rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4363 break;
never executed: break;
0
4364 rule.drawBorder(p, opt->rect);-
4365 return;
never executed: return;
0
4366-
4367-
4368 case
never executed: case PE_FrameTabWidget:
PE_FrameTabWidget:
never executed: case PE_FrameTabWidget:
0
4369 if (const
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabWidgetFrame *frm = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4370 QRenderRule subRule = renderRule(w, opt, PseudoElement_TabWidgetPane);-
4371 if (subRule.hasNativeBorder()
subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4372 subRule.drawBackground(p, opt->rect);-
4373 QStyleOptionTabWidgetFrame frmCopy(*frm);-
4374 subRule.configurePalette(&frmCopy.palette, QPalette::WindowText, QPalette::Window);-
4375 baseStyle()->drawPrimitive(pe, &frmCopy, p, w);-
4376 }
never executed: end of block
else {
0
4377 subRule.drawRule(p, opt->rect);-
4378 }
never executed: end of block
0
4379 return;
never executed: return;
0
4380 }-
4381 break;
never executed: break;
0
4382-
4383-
4384 case
never executed: case PE_IndicatorProgressChunk:
PE_IndicatorProgressChunk:
never executed: case PE_IndicatorProgressChunk:
0
4385 pseudoElement = PseudoElement_ProgressBarChunk;-
4386 break;
never executed: break;
0
4387-
4388 case
never executed: case PE_IndicatorTabTear:
PE_IndicatorTabTear:
never executed: case PE_IndicatorTabTear:
0
4389 pseudoElement = PseudoElement_TabBarTear;-
4390 break;
never executed: break;
0
4391-
4392 case
never executed: case PE_FrameFocusRect:
PE_FrameFocusRect:
never executed: case PE_FrameFocusRect:
0
4393 if (!rule.hasNativeOutline()
!rule.hasNativeOutline()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4394 rule.drawOutline(p, opt->rect);-
4395 return;
never executed: return;
0
4396 }-
4397 break;
never executed: break;
0
4398-
4399 case
never executed: case PE_IndicatorDockWidgetResizeHandle:
PE_IndicatorDockWidgetResizeHandle:
never executed: case PE_IndicatorDockWidgetResizeHandle:
0
4400 pseudoElement = PseudoElement_DockWidgetSeparator;-
4401 break;
never executed: break;
0
4402-
4403 case
never executed: case PE_PanelItemViewItem:
PE_PanelItemViewItem:
never executed: case PE_PanelItemViewItem:
0
4404 pseudoElement = PseudoElement_ViewItem;-
4405 break;
never executed: break;
0
4406-
4407 case
never executed: case PE_PanelScrollAreaCorner:
PE_PanelScrollAreaCorner:
never executed: case PE_PanelScrollAreaCorner:
0
4408 pseudoElement = PseudoElement_ScrollAreaCorner;-
4409 break;
never executed: break;
0
4410-
4411 case
never executed: case PE_IndicatorSpinDown:
PE_IndicatorSpinDown:
never executed: case PE_IndicatorSpinDown:
0
4412 case
never executed: case PE_IndicatorSpinMinus:
PE_IndicatorSpinMinus:
never executed: case PE_IndicatorSpinMinus:
0
4413 pseudoElement = PseudoElement_SpinBoxDownArrow;-
4414 break;
never executed: break;
0
4415-
4416 case
never executed: case PE_IndicatorSpinUp:
PE_IndicatorSpinUp:
never executed: case PE_IndicatorSpinUp:
0
4417 case
never executed: case PE_IndicatorSpinPlus:
PE_IndicatorSpinPlus:
never executed: case PE_IndicatorSpinPlus:
0
4418 pseudoElement = PseudoElement_SpinBoxUpArrow;-
4419 break;
never executed: break;
0
4420-
4421 case
never executed: case PE_IndicatorTabClose:
PE_IndicatorTabClose:
never executed: case PE_IndicatorTabClose:
0
4422 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4423 w = w->parentWidget();
never executed: w = w->parentWidget();
0
4424 pseudoElement = PseudoElement_TabBarTabCloseButton;-
4425-
4426-
4427 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
4428 break;
never executed: break;
0
4429 }-
4430-
4431 if (pseudoElement != PseudoElement_None
pseudoElement ...doElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4432 QRenderRule subRule = renderRule(w, opt, pseudoElement);-
4433 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4434 subRule.drawRule(p, rect);-
4435 }
never executed: end of block
else {
0
4436 baseStyle()->drawPrimitive(pe, opt, p, w);-
4437 }
never executed: end of block
0
4438 } else {-
4439 baseStyle()->drawPrimitive(pe, opt, p, w);-
4440 }
never executed: end of block
0
4441}-
4442-
4443QPixmap QStyleSheetStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap,-
4444 const QStyleOption *option) const-
4445{-
4446 return
never executed: return baseStyle()->generatedIconPixmap(iconMode, pixmap, option);
baseStyle()->generatedIconPixmap(iconMode, pixmap, option);
never executed: return baseStyle()->generatedIconPixmap(iconMode, pixmap, option);
0
4447}-
4448-
4449QStyle::SubControl QStyleSheetStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,-
4450 const QPoint &pt, const QWidget *w) const-
4451{-
4452 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->hitTestComplexControl(cc, opt, pt, w);
baseStyle()->hitTestComplexControl(cc, opt, pt, w);
never executed: return baseStyle()->hitTestComplexControl(cc, opt, pt, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
4453 switch (cc) {-
4454 case
never executed: case CC_TitleBar:
CC_TitleBar:
never executed: case CC_TitleBar:
0
4455 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4456 QRenderRule rule = renderRule(w, opt, PseudoElement_TitleBar);-
4457 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4458 QHash<QStyle::SubControl, QRect> layout = titleBarLayout(w, tb);-
4459 QRect r;-
4460 QStyle::SubControl sc = QStyle::SC_None;-
4461 uint ctrl = SC_TitleBarSysMenu;-
4462 while (ctrl <= SC_TitleBarLabel
ctrl <= SC_TitleBarLabelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4463 r = layout[QStyle::SubControl(ctrl)];-
4464 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4465 sc = QStyle::SubControl(ctrl);-
4466 break;
never executed: break;
0
4467 }-
4468 ctrl <<= 1;-
4469 }
never executed: end of block
0
4470 return
never executed: return sc;
sc;
never executed: return sc;
0
4471 }-
4472 }
never executed: end of block
0
4473 break;
never executed: break;
0
4474-
4475 case
never executed: case CC_MdiControls:
CC_MdiControls:
never executed: case CC_MdiControls:
0
4476 if (hasStyleRule(w, PseudoElement_MdiCloseButton)
hasStyleRule(w...diCloseButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
4477 || hasStyleRule(w, PseudoElement_MdiNormalButton)
hasStyleRule(w...iNormalButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
4478 || hasStyleRule(w, PseudoElement_MdiMinButton)
hasStyleRule(w..._MdiMinButton)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4479 return
never executed: return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);
QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);
never executed: return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);
0
4480 break;
never executed: break;
0
4481-
4482 case
never executed: case CC_ScrollBar:
CC_ScrollBar:
never executed: case CC_ScrollBar:
{
0
4483 QRenderRule rule = renderRule(w, opt);-
4484 if (!rule.hasDrawable()
!rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !rule.hasBox()
!rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4485 break;
never executed: break;
0
4486 }-
4487-
4488 case
never executed: case CC_SpinBox:
CC_SpinBox:
never executed: case CC_SpinBox:
code before this statement never executed: case CC_SpinBox:
0
4489 case
never executed: case CC_GroupBox:
CC_GroupBox:
never executed: case CC_GroupBox:
0
4490 case
never executed: case CC_ComboBox:
CC_ComboBox:
never executed: case CC_ComboBox:
0
4491 case
never executed: case CC_Slider:
CC_Slider:
never executed: case CC_Slider:
0
4492 case
never executed: case CC_ToolButton:
CC_ToolButton:
never executed: case CC_ToolButton:
0
4493 return
never executed: return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);
QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);
never executed: return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);
0
4494 default
never executed: default:
:
never executed: default:
0
4495 break;
never executed: break;
0
4496 }-
4497-
4498 return
never executed: return baseStyle()->hitTestComplexControl(cc, opt, pt, w);
baseStyle()->hitTestComplexControl(cc, opt, pt, w);
never executed: return baseStyle()->hitTestComplexControl(cc, opt, pt, w);
0
4499}-
4500-
4501QRect QStyleSheetStyle::itemPixmapRect(const QRect &rect, int alignment, const QPixmap &pixmap) const-
4502{-
4503 return
never executed: return baseStyle()->itemPixmapRect(rect, alignment, pixmap);
baseStyle()->itemPixmapRect(rect, alignment, pixmap);
never executed: return baseStyle()->itemPixmapRect(rect, alignment, pixmap);
0
4504}-
4505-
4506QRect QStyleSheetStyle::itemTextRect(const QFontMetrics &metrics, const QRect& rect, int alignment,-
4507 bool enabled, const QString& text) const-
4508{-
4509 return
never executed: return baseStyle()->itemTextRect(metrics, rect, alignment, enabled, text);
baseStyle()->itemTextRect(metrics, rect, alignment, enabled, text);
never executed: return baseStyle()->itemTextRect(metrics, rect, alignment, enabled, text);
0
4510}-
4511-
4512int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWidget *w) const-
4513{-
4514 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->pixelMetric(m, opt, w);
baseStyle()->pixelMetric(m, opt, w);
never executed: return baseStyle()->pixelMetric(m, opt, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
4515-
4516 QRenderRule rule = renderRule(w, opt);-
4517 QRenderRule subRule;-
4518-
4519 switch (m) {-
4520 case
never executed: case PM_MenuButtonIndicator:
PM_MenuButtonIndicator:
never executed: case PM_MenuButtonIndicator:
0
4521-
4522-
4523 if (qobject_cast<const QToolButton *>(w)
qobject_cast<c...olButton *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
&& (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
))
0
4524 return
never executed: return 0;
0;
never executed: return 0;
0
4525-
4526 subRule = renderRule(w, opt, PseudoElement_PushButtonMenuIndicator);-
4527 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4528 return
never executed: return subRule.size().width();
subRule.size().width();
never executed: return subRule.size().width();
0
4529 break;
never executed: break;
0
4530-
4531 case
never executed: case PM_ButtonShiftHorizontal:
PM_ButtonShiftHorizontal:
never executed: case PM_ButtonShiftHorizontal:
0
4532 case
never executed: case PM_ButtonShiftVertical:
PM_ButtonShiftVertical:
never executed: case PM_ButtonShiftVertical:
0
4533 case
never executed: case PM_ButtonMargin:
PM_ButtonMargin:
never executed: case PM_ButtonMargin:
0
4534 case
never executed: case PM_ButtonDefaultIndicator:
PM_ButtonDefaultIndicator:
never executed: case PM_ButtonDefaultIndicator:
0
4535 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4536 return
never executed: return 0;
0;
never executed: return 0;
0
4537 break;
never executed: break;
0
4538-
4539 case
never executed: case PM_DefaultFrameWidth:
PM_DefaultFrameWidth:
never executed: case PM_DefaultFrameWidth:
0
4540 if (!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4541 return
never executed: return rule.border()->borders[LeftEdge];
rule.border()->borders[LeftEdge];
never executed: return rule.border()->borders[LeftEdge];
0
4542 break;
never executed: break;
0
4543-
4544 case
never executed: case PM_ExclusiveIndicatorWidth:
PM_ExclusiveIndicatorWidth:
never executed: case PM_ExclusiveIndicatorWidth:
0
4545 case
never executed: case PM_IndicatorWidth:
PM_IndicatorWidth:
never executed: case PM_IndicatorWidth:
0
4546 case
never executed: case PM_ExclusiveIndicatorHeight:
PM_ExclusiveIndicatorHeight:
never executed: case PM_ExclusiveIndicatorHeight:
0
4547 case
never executed: case PM_IndicatorHeight:
PM_IndicatorHeight:
never executed: case PM_IndicatorHeight:
0
4548 subRule = renderRule(w, opt, PseudoElement_Indicator);-
4549 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4550 return
never executed: return (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth) ? subRule.size().width() : subRule.size().height();
(m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth)
never executed: return (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth) ? subRule.size().width() : subRule.size().height();
0
4551 ? subRule.size().width() : subRule.size().height();
never executed: return (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth) ? subRule.size().width() : subRule.size().height();
0
4552 }-
4553 break;
never executed: break;
0
4554-
4555 case
never executed: case PM_DockWidgetFrameWidth:
PM_DockWidgetFrameWidth:
never executed: case PM_DockWidgetFrameWidth:
0
4556 case
never executed: case PM_ToolTipLabelFrameWidth:
PM_ToolTipLabelFrameWidth:
never executed: case PM_ToolTipLabelFrameWidth:
0
4557 if (!rule.hasDrawable()
!rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4558 break;
never executed: break;
0
4559-
4560 return
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0);
(rule.border() ? rule.border()->borders[LeftEdge] : 0)
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0);
0
4561 + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0);
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0);
0
4562-
4563 case
never executed: case PM_ToolBarFrameWidth:
PM_ToolBarFrameWidth:
never executed: case PM_ToolBarFrameWidth:
0
4564 if (rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4565 return
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0);
(rule.border() ? rule.border()->borders[LeftEdge] : 0)
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0);
0
4566 + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0);
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0);
0
4567 break;
never executed: break;
0
4568-
4569 case
never executed: case PM_MenuPanelWidth:
PM_MenuPanelWidth:
never executed: case PM_MenuPanelWidth:
0
4570 case
never executed: case PM_MenuBarPanelWidth:
PM_MenuBarPanelWidth:
never executed: case PM_MenuBarPanelWidth:
0
4571 if (rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4572 return
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0);
(rule.border() ? rule.border()->borders[LeftEdge] : 0)
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0);
0
4573 + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0);
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0);
0
4574 break;
never executed: break;
0
4575-
4576-
4577 case
never executed: case PM_MenuHMargin:
PM_MenuHMargin:
never executed: case PM_MenuHMargin:
0
4578 case
never executed: case PM_MenuBarHMargin:
PM_MenuBarHMargin:
never executed: case PM_MenuBarHMargin:
0
4579 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4580 return
never executed: return rule.box()->paddings[LeftEdge];
rule.box()->paddings[LeftEdge];
never executed: return rule.box()->paddings[LeftEdge];
0
4581 break;
never executed: break;
0
4582-
4583 case
never executed: case PM_MenuVMargin:
PM_MenuVMargin:
never executed: case PM_MenuVMargin:
0
4584 case
never executed: case PM_MenuBarVMargin:
PM_MenuBarVMargin:
never executed: case PM_MenuBarVMargin:
0
4585 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4586 return
never executed: return rule.box()->paddings[TopEdge];
rule.box()->paddings[TopEdge];
never executed: return rule.box()->paddings[TopEdge];
0
4587 break;
never executed: break;
0
4588-
4589 case
never executed: case PM_DockWidgetTitleBarButtonMargin:
PM_DockWidgetTitleBarButtonMargin:
never executed: case PM_DockWidgetTitleBarButtonMargin:
0
4590 case
never executed: case PM_ToolBarItemMargin:
PM_ToolBarItemMargin:
never executed: case PM_ToolBarItemMargin:
0
4591 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4592 return
never executed: return rule.box()->margins[TopEdge];
rule.box()->margins[TopEdge];
never executed: return rule.box()->margins[TopEdge];
0
4593 break;
never executed: break;
0
4594-
4595 case
never executed: case PM_ToolBarItemSpacing:
PM_ToolBarItemSpacing:
never executed: case PM_ToolBarItemSpacing:
0
4596 case
never executed: case PM_MenuBarItemSpacing:
PM_MenuBarItemSpacing:
never executed: case PM_MenuBarItemSpacing:
0
4597 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.box()->spacing != -1
rule.box()->spacing != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4598 return
never executed: return rule.box()->spacing;
rule.box()->spacing;
never executed: return rule.box()->spacing;
0
4599 break;
never executed: break;
0
4600-
4601 case
never executed: case PM_MenuTearoffHeight:
PM_MenuTearoffHeight:
never executed: case PM_MenuTearoffHeight:
0
4602 case
never executed: case PM_MenuScrollerHeight:
PM_MenuScrollerHeight:
never executed: case PM_MenuScrollerHeight:
{
0
4603 PseudoElement ps = m == PM_MenuTearoffHeight
m == PM_MenuTearoffHeightDescription
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_MenuTearoff : PseudoElement_MenuScroller;
0
4604 subRule = renderRule(w, opt, ps);-
4605 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4606 return
never executed: return subRule.size().height();
subRule.size().height();
never executed: return subRule.size().height();
0
4607 break;
never executed: break;
0
4608 }-
4609-
4610 case
never executed: case PM_ToolBarExtensionExtent:
PM_ToolBarExtensionExtent:
never executed: case PM_ToolBarExtensionExtent:
0
4611 break;
never executed: break;
0
4612-
4613 case
never executed: case PM_SplitterWidth:
PM_SplitterWidth:
never executed: case PM_SplitterWidth:
0
4614 case
never executed: case PM_ToolBarSeparatorExtent:
PM_ToolBarSeparatorExtent:
never executed: case PM_ToolBarSeparatorExtent:
0
4615 case
never executed: case PM_ToolBarHandleExtent:
PM_ToolBarHandleExtent:
never executed: case PM_ToolBarHandleExtent:
{
0
4616 PseudoElement ps;-
4617 if (m == PM_ToolBarHandleExtent
m == PM_ToolBarHandleExtentDescription
TRUEnever evaluated
FALSEnever evaluated
) ps = PseudoElement_ToolBarHandle;
never executed: ps = PseudoElement_ToolBarHandle;
0
4618 else if (m == PM_SplitterWidth
m == PM_SplitterWidthDescription
TRUEnever evaluated
FALSEnever evaluated
) ps = PseudoElement_SplitterHandle;
never executed: ps = PseudoElement_SplitterHandle;
0
4619 else ps = PseudoElement_ToolBarSeparator;
never executed: ps = PseudoElement_ToolBarSeparator;
0
4620 subRule = renderRule(w, opt, ps);-
4621 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4622 QSize sz = subRule.size();-
4623 return
never executed: return (opt && opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();
(opt && opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();
never executed: return (opt && opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();
0
4624 }-
4625 break;
never executed: break;
0
4626 }-
4627-
4628 case
never executed: case PM_RadioButtonLabelSpacing:
PM_RadioButtonLabelSpacing:
never executed: case PM_RadioButtonLabelSpacing:
0
4629 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.box()->spacing != -1
rule.box()->spacing != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4630 return
never executed: return rule.box()->spacing;
rule.box()->spacing;
never executed: return rule.box()->spacing;
0
4631 break;
never executed: break;
0
4632 case
never executed: case PM_CheckBoxLabelSpacing:
PM_CheckBoxLabelSpacing:
never executed: case PM_CheckBoxLabelSpacing:
0
4633 if (qobject_cast<const QCheckBox *>(w)
qobject_cast<c...CheckBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4634 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.box()->spacing != -1
rule.box()->spacing != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4635 return
never executed: return rule.box()->spacing;
rule.box()->spacing;
never executed: return rule.box()->spacing;
0
4636 }
never executed: end of block
0
4637-
4638 subRule = renderRule(w, opt, PseudoElement_GroupBoxTitle);-
4639 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& subRule.box()->spacing != -1
subRule.box()->spacing != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4640 return
never executed: return subRule.box()->spacing;
subRule.box()->spacing;
never executed: return subRule.box()->spacing;
0
4641 break;
never executed: break;
0
4642-
4643-
4644 case
never executed: case PM_ScrollBarExtent:
PM_ScrollBarExtent:
never executed: case PM_ScrollBarExtent:
0
4645 if (rule.hasContentsSize()
rule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4646 QSize sz = rule.size();-
4647 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4648 return
never executed: return sb->orientation == Qt::Horizontal ? sz.height() : sz.width();
sb->orientation == Qt::Horizontal ? sz.height() : sz.width();
never executed: return sb->orientation == Qt::Horizontal ? sz.height() : sz.width();
0
4649 return
never executed: return sz.width() == -1 ? sz.height() : sz.width();
sz.width() == -1 ? sz.height() : sz.width();
never executed: return sz.width() == -1 ? sz.height() : sz.width();
0
4650 }-
4651 break;
never executed: break;
0
4652-
4653 case
never executed: case PM_ScrollBarSliderMin:
PM_ScrollBarSliderMin:
never executed: case PM_ScrollBarSliderMin:
0
4654 if (hasStyleRule(w, PseudoElement_ScrollBarSlider)
hasStyleRule(w...rollBarSlider)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4655 subRule = renderRule(w, opt, PseudoElement_ScrollBarSlider);-
4656 QSize msz = subRule.minimumSize();-
4657 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4658 return
never executed: return sb->orientation == Qt::Horizontal ? msz.width() : msz.height();
sb->orientation == Qt::Horizontal ? msz.width() : msz.height();
never executed: return sb->orientation == Qt::Horizontal ? msz.width() : msz.height();
0
4659 return
never executed: return msz.width() == -1 ? msz.height() : msz.width();
msz.width() == -1 ? msz.height() : msz.width();
never executed: return msz.width() == -1 ? msz.height() : msz.width();
0
4660 }-
4661 break;
never executed: break;
0
4662-
4663 case
never executed: case PM_ScrollView_ScrollBarSpacing:
PM_ScrollView_ScrollBarSpacing:
never executed: case PM_ScrollView_ScrollBarSpacing:
0
4664 if(!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4665 return
never executed: return 0;
0;
never executed: return 0;
0
4666 break;
never executed: break;
0
4667-
4668-
4669 case
never executed: case PM_ProgressBarChunkWidth:
PM_ProgressBarChunkWidth:
never executed: case PM_ProgressBarChunkWidth:
0
4670 subRule = renderRule(w, opt, PseudoElement_ProgressBarChunk);-
4671 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4672 QSize sz = subRule.size();-
4673 return
never executed: return (opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();
(opt->state & QStyle::State_Horizontal)
never executed: return (opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();
0
4674 ? sz.width() : sz.height();
never executed: return (opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();
0
4675 }-
4676 break;
never executed: break;
0
4677-
4678-
4679 case
never executed: case PM_TabBarTabHSpace:
PM_TabBarTabHSpace:
never executed: case PM_TabBarTabHSpace:
0
4680 case
never executed: case PM_TabBarTabVSpace:
PM_TabBarTabVSpace:
never executed: case PM_TabBarTabVSpace:
0
4681 subRule = renderRule(w, opt, PseudoElement_TabBarTab);-
4682 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBorder()
subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4683 return
never executed: return 0;
0;
never executed: return 0;
0
4684 break;
never executed: break;
0
4685-
4686 case
never executed: case PM_TabBarScrollButtonWidth:
PM_TabBarScrollButtonWidth:
never executed: case PM_TabBarScrollButtonWidth:
{
0
4687 subRule = renderRule(w, opt, PseudoElement_TabBarScroller);-
4688 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4689 QSize sz = subRule.size();-
4690 return
never executed: return sz.width() != -1 ? sz.width() : sz.height();
sz.width() != -1 ? sz.width() : sz.height();
never executed: return sz.width() != -1 ? sz.width() : sz.height();
0
4691 }-
4692 }-
4693 break;
never executed: break;
0
4694-
4695 case
never executed: case PM_TabBarTabShiftHorizontal:
PM_TabBarTabShiftHorizontal:
never executed: case PM_TabBarTabShiftHorizontal:
0
4696 case
never executed: case PM_TabBarTabShiftVertical:
PM_TabBarTabShiftVertical:
never executed: case PM_TabBarTabShiftVertical:
0
4697 subRule = renderRule(w, opt, PseudoElement_TabBarTab);-
4698 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4699 return
never executed: return 0;
0;
never executed: return 0;
0
4700 break;
never executed: break;
0
4701-
4702 case
never executed: case PM_TabBarBaseOverlap:
PM_TabBarBaseOverlap:
never executed: case PM_TabBarBaseOverlap:
{
0
4703 const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w);-
4704 if (!tabWidget
!tabWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& w
wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4705 tabWidget = w->parentWidget();
never executed: tabWidget = w->parentWidget();
0
4706 if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)
hasStyleRule(t...TabWidgetPane)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4707 return
never executed: return 0;
0;
never executed: return 0;
0
4708 }-
4709 break;
never executed: break;
0
4710 }-
4711-
4712-
4713 case
never executed: case PM_SliderThickness:
PM_SliderThickness:
never executed: case PM_SliderThickness:
0
4714 case
never executed: case PM_SliderLength:
PM_SliderLength:
never executed: case PM_SliderLength:
0
4715 if (rule.hasContentsSize()
rule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4716 bool horizontal = opt->state & QStyle::State_Horizontal;-
4717 if (m == PM_SliderThickness
m == PM_SliderThicknessDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4718 QSize sz = rule.size();-
4719 return
never executed: return horizontal ? sz.height() : sz.width();
horizontal ? sz.height() : sz.width();
never executed: return horizontal ? sz.height() : sz.width();
0
4720 } else {-
4721 QSize msz = rule.minimumContentsSize();-
4722 return
never executed: return horizontal ? msz.width() : msz.height();
horizontal ? msz.width() : msz.height();
never executed: return horizontal ? msz.width() : msz.height();
0
4723 }-
4724 }-
4725 break;
never executed: break;
0
4726-
4727 case
never executed: case PM_SliderControlThickness:
PM_SliderControlThickness:
never executed: case PM_SliderControlThickness:
{
0
4728 QRenderRule subRule = renderRule(w, opt, PseudoElement_SliderHandle);-
4729 if (!subRule.hasContentsSize()
!subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4730 break;
never executed: break;
0
4731 QSize size = subRule.size();-
4732 return
never executed: return (opt->state & QStyle::State_Horizontal) ? size.height() : size.width();
(opt->state & QStyle::State_Horizontal) ? size.height() : size.width();
never executed: return (opt->state & QStyle::State_Horizontal) ? size.height() : size.width();
0
4733 }-
4734-
4735 case
never executed: case PM_ToolBarIconSize:
PM_ToolBarIconSize:
never executed: case PM_ToolBarIconSize:
0
4736 case
never executed: case PM_ListViewIconSize:
PM_ListViewIconSize:
never executed: case PM_ListViewIconSize:
0
4737 case
never executed: case PM_IconViewIconSize:
PM_IconViewIconSize:
never executed: case PM_IconViewIconSize:
0
4738 case
never executed: case PM_TabBarIconSize:
PM_TabBarIconSize:
never executed: case PM_TabBarIconSize:
0
4739 case
never executed: case PM_MessageBoxIconSize:
PM_MessageBoxIconSize:
never executed: case PM_MessageBoxIconSize:
0
4740 case
never executed: case PM_ButtonIconSize:
PM_ButtonIconSize:
never executed: case PM_ButtonIconSize:
0
4741 case
never executed: case PM_SmallIconSize:
PM_SmallIconSize:
never executed: case PM_SmallIconSize:
0
4742 if (rule.hasStyleHint(QLatin1String("icon-size"))
rule.hasStyleH...("icon-size"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4743 return
never executed: return rule.styleHint(QLatin1String("icon-size")).toSize().width();
rule.styleHint(QLatin1String("icon-size")).toSize().width();
never executed: return rule.styleHint(QLatin1String("icon-size")).toSize().width();
0
4744 }-
4745 break;
never executed: break;
0
4746-
4747 case
never executed: case PM_DockWidgetTitleMargin:
PM_DockWidgetTitleMargin:
never executed: case PM_DockWidgetTitleMargin:
{
0
4748 QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetTitle);-
4749 if (!subRule.hasBox()
!subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4750 break;
never executed: break;
0
4751 return
never executed: return (subRule.border() ? subRule.border()->borders[TopEdge] : 0) + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0);
(subRule.border() ? subRule.border()->borders[TopEdge] : 0)
never executed: return (subRule.border() ? subRule.border()->borders[TopEdge] : 0) + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0);
0
4752 + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0);
never executed: return (subRule.border() ? subRule.border()->borders[TopEdge] : 0) + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0);
0
4753 }-
4754-
4755 case
never executed: case PM_DockWidgetSeparatorExtent:
PM_DockWidgetSeparatorExtent:
never executed: case PM_DockWidgetSeparatorExtent:
{
0
4756 QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetSeparator);-
4757 if (!subRule.hasContentsSize()
!subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4758 break;
never executed: break;
0
4759 QSize sz = subRule.size();-
4760 return
never executed: return qMax(sz.width(), sz.height());
qMax(sz.width(), sz.height());
never executed: return qMax(sz.width(), sz.height());
0
4761 }-
4762-
4763 case
never executed: case PM_TitleBarHeight:
PM_TitleBarHeight:
never executed: case PM_TitleBarHeight:
{
0
4764 QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar);-
4765 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4766 return
never executed: return subRule.size().height();
subRule.size().height();
never executed: return subRule.size().height();
0
4767 else if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBorder()
subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4768 QFontMetrics fm = opt
optDescription
TRUEnever evaluated
FALSEnever evaluated
? opt->fontMetrics : w->fontMetrics();
0
4769 return
never executed: return subRule.size(QSize(0, fm.height())).height();
subRule.size(QSize(0, fm.height())).height();
never executed: return subRule.size(QSize(0, fm.height())).height();
0
4770 }-
4771 break;
never executed: break;
0
4772 }-
4773-
4774 case
never executed: case PM_MdiSubWindowFrameWidth:
PM_MdiSubWindowFrameWidth:
never executed: case PM_MdiSubWindowFrameWidth:
0
4775 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4776 return
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0);
(rule.border() ? rule.border()->borders[LeftEdge] : 0)
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0);
0
4777 + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0);
never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0);
0
4778 }-
4779 break;
never executed: break;
0
4780-
4781 case
never executed: case PM_MdiSubWindowMinimizedWidth:
PM_MdiSubWindowMinimizedWidth:
never executed: case PM_MdiSubWindowMinimizedWidth:
{
0
4782 QRenderRule subRule = renderRule(w, PseudoElement_None, PseudoClass_Minimized);-
4783 int width = subRule.size().width();-
4784 if (width != -1
width != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4785 return
never executed: return width;
width;
never executed: return width;
0
4786 break;
never executed: break;
0
4787 }-
4788 default
never executed: default:
:
never executed: default:
0
4789 break;
never executed: break;
0
4790 }-
4791-
4792 return
never executed: return baseStyle()->pixelMetric(m, opt, w);
baseStyle()->pixelMetric(m, opt, w);
never executed: return baseStyle()->pixelMetric(m, opt, w);
0
4793}-
4794-
4795QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,-
4796 const QSize &csz, const QWidget *w) const-
4797{-
4798 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->sizeFromContents(ct, opt, csz, w);
baseStyle()->sizeFromContents(ct, opt, csz, w);
never executed: return baseStyle()->sizeFromContents(ct, opt, csz, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
4799-
4800 QRenderRule rule = renderRule(w, opt);-
4801 QSize sz = rule.adjustSize(csz);-
4802-
4803 switch (ct) {-
4804 case
never executed: case CT_SpinBox:
CT_SpinBox:
never executed: case CT_SpinBox:
0
4805 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4806-
4807 QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);-
4808 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4809 QRect r = positionRect(w, rule, subRule, PseudoElement_SpinBoxUpButton,-
4810 opt->rect, opt->direction);-
4811 sz += QSize(r.width(), 0);-
4812 }
never executed: end of block
else {
0
4813 QSize defaultUpSize = defaultSize(w, subRule.size(), spinbox->rect, PseudoElement_SpinBoxUpButton);-
4814 sz += QSize(defaultUpSize.width(), 0);-
4815 }
never executed: end of block
0
4816 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4817 sz = rule.boxSize(sz);
never executed: sz = rule.boxSize(sz);
0
4818 return
never executed: return sz;
sz;
never executed: return sz;
0
4819 }-
4820 break;
never executed: break;
0
4821 case
never executed: case CT_ToolButton:
CT_ToolButton:
never executed: case CT_ToolButton:
0
4822 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.baseStyleCanDraw()
!rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4823 sz += QSize(3, 3);
never executed: sz += QSize(3, 3);
0
4824-
4825 case
never executed: case CT_ComboBox:
CT_ComboBox:
never executed: case CT_ComboBox:
code before this statement never executed: case CT_ComboBox:
0
4826 case
never executed: case CT_PushButton:
CT_PushButton:
never executed: case CT_PushButton:
0
4827 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4828 if(ct == CT_ComboBox
ct == CT_ComboBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4829-
4830 QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown);-
4831 QRect comboRect = positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction);-
4832-
4833 sz += QSize(comboRect.width() + 2, 0);-
4834 }
never executed: end of block
0
4835 return
never executed: return rule.boxSize(sz);
rule.boxSize(sz);
never executed: return rule.boxSize(sz);
0
4836 }-
4837 sz = rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
? baseStyle()->sizeFromContents(ct, opt, sz, w)
0
4838 : QWindowsStyle::sizeFromContents(ct, opt, sz, w);-
4839 return
never executed: return rule.boxSize(sz, Margin);
rule.boxSize(sz, Margin);
never executed: return rule.boxSize(sz, Margin);
0
4840-
4841 case
never executed: case CT_HeaderSection:
CT_HeaderSection:
never executed: case CT_HeaderSection:
{
0
4842 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4843 QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);-
4844 if (subRule.hasGeometry()
subRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4845 sz = subRule.adjustSize(csz);-
4846 if (!subRule.hasGeometry()
!subRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4847 QSize nativeContentsSize;-
4848 bool nullIcon = hdr->icon.isNull();-
4849 int iconSize = nullIcon
nullIconDescription
TRUEnever evaluated
FALSEnever evaluated
? 0 : pixelMetric(QStyle::PM_SmallIconSize, hdr, w);
0
4850 const QSize txt = subRule.hasFont
subRule.hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
? QFontMetrics(subRule.font).size(0, hdr->text)
0
4851 : hdr->fontMetrics.size(0, hdr->text);-
4852 nativeContentsSize.setHeight(qMax(iconSize, txt.height()));-
4853 nativeContentsSize.setWidth(iconSize + txt.width());-
4854 sz = sz.expandedTo(nativeContentsSize);-
4855 }
never executed: end of block
0
4856 return
never executed: return subRule.size(sz);
subRule.size(sz);
never executed: return subRule.size(sz);
0
4857 }-
4858 return
never executed: return subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w) : QWindowsStyle::sizeFromContents(ct, opt, sz, w);
subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w)
never executed: return subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w) : QWindowsStyle::sizeFromContents(ct, opt, sz, w);
0
4859 : QWindowsStyle::sizeFromContents(ct, opt, sz, w);
never executed: return subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w) : QWindowsStyle::sizeFromContents(ct, opt, sz, w);
0
4860 }-
4861 }-
4862 break;
never executed: break;
0
4863 case
never executed: case CT_GroupBox:
CT_GroupBox:
never executed: case CT_GroupBox:
0
4864 case
never executed: case CT_LineEdit:
CT_LineEdit:
never executed: case CT_LineEdit:
0
4865-
4866 if (qobject_cast<QAbstractSpinBox *>(w ? w->parentWidget() : 0)
qobject_cast<Q...tWidget() : 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4867 return
never executed: return csz;
csz;
never executed: return csz;
0
4868-
4869 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4870 return
never executed: return rule.boxSize(sz);
rule.boxSize(sz);
never executed: return rule.boxSize(sz);
0
4871 }-
4872 break;
never executed: break;
0
4873-
4874 case
never executed: case CT_CheckBox:
CT_CheckBox:
never executed: case CT_CheckBox:
0
4875 case
never executed: case CT_RadioButton:
CT_RadioButton:
never executed: case CT_RadioButton:
0
4876 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4877 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_Indicator)
hasStyleRule(w...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4878 bool isRadio = (ct == CT_RadioButton);-
4879 int iw = pixelMetric(isRadio ? PM_ExclusiveIndicatorWidth-
4880 : PM_IndicatorWidth, btn, w);-
4881 int ih = pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight-
4882 : PM_IndicatorHeight, btn, w);-
4883-
4884 int spacing = pixelMetric(isRadio ? PM_RadioButtonLabelSpacing-
4885 : PM_CheckBoxLabelSpacing, btn, w);-
4886 sz.setWidth(sz.width() + iw + spacing);-
4887 sz.setHeight(qMax(sz.height(), ih));-
4888 return
never executed: return rule.boxSize(sz);
rule.boxSize(sz);
never executed: return rule.boxSize(sz);
0
4889 }-
4890 }
never executed: end of block
0
4891 break;
never executed: break;
0
4892-
4893 case
never executed: case CT_Menu:
CT_Menu:
never executed: case CT_Menu:
0
4894 case
never executed: case CT_MenuBar:
CT_MenuBar:
never executed: case CT_MenuBar:
0
4895 case
never executed: case CT_ScrollBar:
CT_ScrollBar:
never executed: case CT_ScrollBar:
0
4896 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4897 return
never executed: return sz;
sz;
never executed: return sz;
0
4898 break;
never executed: break;
0
4899-
4900 case
never executed: case CT_MenuItem:
CT_MenuItem:
never executed: case CT_MenuItem:
0
4901 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4902 PseudoElement pe = (
(mi->menuItemT...em::Separator)Description
TRUEnever evaluated
FALSEnever evaluated
mi->menuItemType == QStyleOptionMenuItem::Separator)
(mi->menuItemT...em::Separator)Description
TRUEnever evaluated
FALSEnever evaluated
0
4903 ? PseudoElement_MenuSeparator : PseudoElement_Item;-
4904 QRenderRule subRule = renderRule(w, opt, pe);-
4905 if ((
(pe == PseudoE...MenuSeparator)Description
TRUEnever evaluated
FALSEnever evaluated
pe == PseudoElement_MenuSeparator)
(pe == PseudoE...MenuSeparator)Description
TRUEnever evaluated
FALSEnever evaluated
&& subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4906 return
never executed: return QSize(sz.width(), subRule.size().height());
QSize(sz.width(), subRule.size().height());
never executed: return QSize(sz.width(), subRule.size().height());
0
4907 } else if ((
(pe == PseudoElement_Item)Description
TRUEnever evaluated
FALSEnever evaluated
pe == PseudoElement_Item)
(pe == PseudoElement_Item)Description
TRUEnever evaluated
FALSEnever evaluated
&& (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBorder()
subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
4908 int width = csz.width();-
4909 if (mi->text.contains(QLatin1Char('\t'))
mi->text.conta...in1Char('\t'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4910 width += 12;
never executed: width += 12;
0
4911 return
never executed: return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
never executed: return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
0
4912 }-
4913 }
never executed: end of block
0
4914 break;
never executed: break;
0
4915-
4916 case
never executed: case CT_Splitter:
CT_Splitter:
never executed: case CT_Splitter:
0
4917 case
never executed: case CT_MenuBarItem:
CT_MenuBarItem:
never executed: case CT_MenuBarItem:
{
0
4918 PseudoElement pe = (
(ct == CT_Splitter)Description
TRUEnever evaluated
FALSEnever evaluated
ct == CT_Splitter)
(ct == CT_Splitter)Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_SplitterHandle : PseudoElement_Item;
0
4919 QRenderRule subRule = renderRule(w, opt, pe);-
4920 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBorder()
subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4921 return
never executed: return subRule.boxSize(sz);
subRule.boxSize(sz);
never executed: return subRule.boxSize(sz);
0
4922 break;
never executed: break;
0
4923 }-
4924-
4925 case
never executed: case CT_ProgressBar:
CT_ProgressBar:
never executed: case CT_ProgressBar:
0
4926 case
never executed: case CT_SizeGrip:
CT_SizeGrip:
never executed: case CT_SizeGrip:
0
4927 return
never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w));
(rule.hasContentsSize())
never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w));
0
4928 ? rule.size(sz)
never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w));
0
4929 : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w));
never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w));
0
4930 break;
dead code: break;
-
4931-
4932 case
never executed: case CT_Slider:
CT_Slider:
never executed: case CT_Slider:
0
4933 if (rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasGeometry()
rule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4934 return
never executed: return rule.boxSize(sz);
rule.boxSize(sz);
never executed: return rule.boxSize(sz);
0
4935 break;
never executed: break;
0
4936-
4937-
4938 case
never executed: case CT_TabBarTab:
CT_TabBarTab:
never executed: case CT_TabBarTab:
{
0
4939 QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);-
4940 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4941 int spaceForIcon = 0;-
4942 bool vertical = false;-
4943 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4944 if (!tab->icon.isNull()
!tab->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4945 spaceForIcon = 6 + 4 + 2 ;
never executed: spaceForIcon = 6 + 4 + 2 ;
0
4946 vertical = verticalTabs(tab->shape);-
4947 }
never executed: end of block
0
4948 sz = csz + QSize(vertical ? 0 : spaceForIcon, vertical ? spaceForIcon : 0);-
4949 return
never executed: return subRule.boxSize(subRule.adjustSize(sz));
subRule.boxSize(subRule.adjustSize(sz));
never executed: return subRule.boxSize(subRule.adjustSize(sz));
0
4950 }-
4951-
4952-
4953-
4954-
4955-
4956-
4957-
4958 sz = subRule.adjustSize(csz);-
4959 break;
never executed: break;
0
4960 }-
4961-
4962-
4963 case
never executed: case CT_MdiControls:
CT_MdiControls:
never executed: case CT_MdiControls:
0
4964 if (const
const QStyleOp...omplex *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComplex *ccOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt)
const QStyleOp...omplex *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4965 if (!hasStyleRule(w, PseudoElement_MdiCloseButton)
!hasStyleRule(...diCloseButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
4966 && !hasStyleRule(w, PseudoElement_MdiNormalButton)
!hasStyleRule(...iNormalButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
4967 && !hasStyleRule(w, PseudoElement_MdiMinButton)
!hasStyleRule(..._MdiMinButton)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4968 break;
never executed: break;
0
4969-
4970 QList<QVariant> layout = rule.styleHint(QLatin1String("button-layout")).toList();-
4971 if (layout.isEmpty()
layout.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4972 layout = subControlLayout(QLatin1String("mNX"));
never executed: layout = subControlLayout(QLatin1String("mNX"));
0
4973-
4974 int width = 0, height = 0;-
4975 for (int i = 0; i < layout.count()
i < layout.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
4976 int layoutButton = layout[i].toInt();-
4977 if (layoutButton < PseudoElement_MdiCloseButton
layoutButton <...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
4978 || layoutButton > PseudoElement_MdiNormalButton
layoutButton >...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4979 continue;
never executed: continue;
0
4980 QStyle::SubControl sc = knownPseudoElements[layoutButton].subControl;-
4981 if (!(ccOpt->subControls & sc)
!(ccOpt->subControls & sc)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4982 continue;
never executed: continue;
0
4983 QRenderRule subRule = renderRule(w, opt, layoutButton);-
4984 QSize sz = subRule.size();-
4985 width += sz.width();-
4986 height = qMax(height, sz.height());-
4987 }
never executed: end of block
0
4988-
4989 return
never executed: return QSize(width, height);
QSize(width, height);
never executed: return QSize(width, height);
0
4990 }-
4991 break;
never executed: break;
0
4992-
4993-
4994 case
never executed: case CT_ItemViewItem:
CT_ItemViewItem:
never executed: case CT_ItemViewItem:
{
0
4995 QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem);-
4996 sz = baseStyle()->sizeFromContents(ct, opt, csz, w);-
4997 sz = subRule.adjustSize(sz);-
4998 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBorder()
subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4999 sz = subRule.boxSize(sz);
never executed: sz = subRule.boxSize(sz);
0
5000 return
never executed: return sz;
sz;
never executed: return sz;
0
5001 }-
5002-
5003-
5004 default
never executed: default:
:
never executed: default:
0
5005 break;
never executed: break;
0
5006 }-
5007-
5008 return
never executed: return baseStyle()->sizeFromContents(ct, opt, sz, w);
baseStyle()->sizeFromContents(ct, opt, sz, w);
never executed: return baseStyle()->sizeFromContents(ct, opt, sz, w);
0
5009}-
5010-
5011-
5012-
5013-
5014static QLatin1String propertyNameForStandardPixmap(QStyle::StandardPixmap sp)-
5015{-
5016 switch (sp) {-
5017 case
never executed: case QStyle::SP_TitleBarMenuButton:
QStyle::SP_TitleBarMenuButton:
never executed: case QStyle::SP_TitleBarMenuButton:
return
never executed: return QLatin1String("titlebar-menu-icon");
QLatin1String("titlebar-menu-icon");
never executed: return QLatin1String("titlebar-menu-icon");
0
5018 case
never executed: case QStyle::SP_TitleBarMinButton:
QStyle::SP_TitleBarMinButton:
never executed: case QStyle::SP_TitleBarMinButton:
return
never executed: return QLatin1String("titlebar-minimize-icon");
QLatin1String("titlebar-minimize-icon");
never executed: return QLatin1String("titlebar-minimize-icon");
0
5019 case
never executed: case QStyle::SP_TitleBarMaxButton:
QStyle::SP_TitleBarMaxButton:
never executed: case QStyle::SP_TitleBarMaxButton:
return
never executed: return QLatin1String("titlebar-maximize-icon");
QLatin1String("titlebar-maximize-icon");
never executed: return QLatin1String("titlebar-maximize-icon");
0
5020 case
never executed: case QStyle::SP_TitleBarCloseButton:
QStyle::SP_TitleBarCloseButton:
never executed: case QStyle::SP_TitleBarCloseButton:
return
never executed: return QLatin1String("titlebar-close-icon");
QLatin1String("titlebar-close-icon");
never executed: return QLatin1String("titlebar-close-icon");
0
5021 case
never executed: case QStyle::SP_TitleBarNormalButton:
QStyle::SP_TitleBarNormalButton:
never executed: case QStyle::SP_TitleBarNormalButton:
return
never executed: return QLatin1String("titlebar-normal-icon");
QLatin1String("titlebar-normal-icon");
never executed: return QLatin1String("titlebar-normal-icon");
0
5022 case
never executed: case QStyle::SP_TitleBarShadeButton:
QStyle::SP_TitleBarShadeButton:
never executed: case QStyle::SP_TitleBarShadeButton:
return
never executed: return QLatin1String("titlebar-shade-icon");
QLatin1String("titlebar-shade-icon");
never executed: return QLatin1String("titlebar-shade-icon");
0
5023 case
never executed: case QStyle::SP_TitleBarUnshadeButton:
QStyle::SP_TitleBarUnshadeButton:
never executed: case QStyle::SP_TitleBarUnshadeButton:
return
never executed: return QLatin1String("titlebar-unshade-icon");
QLatin1String("titlebar-unshade-icon");
never executed: return QLatin1String("titlebar-unshade-icon");
0
5024 case
never executed: case QStyle::SP_TitleBarContextHelpButton:
QStyle::SP_TitleBarContextHelpButton:
never executed: case QStyle::SP_TitleBarContextHelpButton:
return
never executed: return QLatin1String("titlebar-contexthelp-icon");
QLatin1String("titlebar-contexthelp-icon");
never executed: return QLatin1String("titlebar-contexthelp-icon");
0
5025 case
never executed: case QStyle::SP_DockWidgetCloseButton:
QStyle::SP_DockWidgetCloseButton:
never executed: case QStyle::SP_DockWidgetCloseButton:
return
never executed: return QLatin1String("dockwidget-close-icon");
QLatin1String("dockwidget-close-icon");
never executed: return QLatin1String("dockwidget-close-icon");
0
5026 case
never executed: case QStyle::SP_MessageBoxInformation:
QStyle::SP_MessageBoxInformation:
never executed: case QStyle::SP_MessageBoxInformation:
return
never executed: return QLatin1String("messagebox-information-icon");
QLatin1String("messagebox-information-icon");
never executed: return QLatin1String("messagebox-information-icon");
0
5027 case
never executed: case QStyle::SP_MessageBoxWarning:
QStyle::SP_MessageBoxWarning:
never executed: case QStyle::SP_MessageBoxWarning:
return
never executed: return QLatin1String("messagebox-warning-icon");
QLatin1String("messagebox-warning-icon");
never executed: return QLatin1String("messagebox-warning-icon");
0
5028 case
never executed: case QStyle::SP_MessageBoxCritical:
QStyle::SP_MessageBoxCritical:
never executed: case QStyle::SP_MessageBoxCritical:
return
never executed: return QLatin1String("messagebox-critical-icon");
QLatin1String("messagebox-critical-icon");
never executed: return QLatin1String("messagebox-critical-icon");
0
5029 case
never executed: case QStyle::SP_MessageBoxQuestion:
QStyle::SP_MessageBoxQuestion:
never executed: case QStyle::SP_MessageBoxQuestion:
return
never executed: return QLatin1String("messagebox-question-icon");
QLatin1String("messagebox-question-icon");
never executed: return QLatin1String("messagebox-question-icon");
0
5030 case
never executed: case QStyle::SP_DesktopIcon:
QStyle::SP_DesktopIcon:
never executed: case QStyle::SP_DesktopIcon:
return
never executed: return QLatin1String("desktop-icon");
QLatin1String("desktop-icon");
never executed: return QLatin1String("desktop-icon");
0
5031 case
never executed: case QStyle::SP_TrashIcon:
QStyle::SP_TrashIcon:
never executed: case QStyle::SP_TrashIcon:
return
never executed: return QLatin1String("trash-icon");
QLatin1String("trash-icon");
never executed: return QLatin1String("trash-icon");
0
5032 case
never executed: case QStyle::SP_ComputerIcon:
QStyle::SP_ComputerIcon:
never executed: case QStyle::SP_ComputerIcon:
return
never executed: return QLatin1String("computer-icon");
QLatin1String("computer-icon");
never executed: return QLatin1String("computer-icon");
0
5033 case
never executed: case QStyle::SP_DriveFDIcon:
QStyle::SP_DriveFDIcon:
never executed: case QStyle::SP_DriveFDIcon:
return
never executed: return QLatin1String("floppy-icon");
QLatin1String("floppy-icon");
never executed: return QLatin1String("floppy-icon");
0
5034 case
never executed: case QStyle::SP_DriveHDIcon:
QStyle::SP_DriveHDIcon:
never executed: case QStyle::SP_DriveHDIcon:
return
never executed: return QLatin1String("harddisk-icon");
QLatin1String("harddisk-icon");
never executed: return QLatin1String("harddisk-icon");
0
5035 case
never executed: case QStyle::SP_DriveCDIcon:
QStyle::SP_DriveCDIcon:
never executed: case QStyle::SP_DriveCDIcon:
return
never executed: return QLatin1String("cd-icon");
QLatin1String("cd-icon");
never executed: return QLatin1String("cd-icon");
0
5036 case
never executed: case QStyle::SP_DriveDVDIcon:
QStyle::SP_DriveDVDIcon:
never executed: case QStyle::SP_DriveDVDIcon:
return
never executed: return QLatin1String("dvd-icon");
QLatin1String("dvd-icon");
never executed: return QLatin1String("dvd-icon");
0
5037 case
never executed: case QStyle::SP_DriveNetIcon:
QStyle::SP_DriveNetIcon:
never executed: case QStyle::SP_DriveNetIcon:
return
never executed: return QLatin1String("network-icon");
QLatin1String("network-icon");
never executed: return QLatin1String("network-icon");
0
5038 case
never executed: case QStyle::SP_DirOpenIcon:
QStyle::SP_DirOpenIcon:
never executed: case QStyle::SP_DirOpenIcon:
return
never executed: return QLatin1String("directory-open-icon");
QLatin1String("directory-open-icon");
never executed: return QLatin1String("directory-open-icon");
0
5039 case
never executed: case QStyle::SP_DirClosedIcon:
QStyle::SP_DirClosedIcon:
never executed: case QStyle::SP_DirClosedIcon:
return
never executed: return QLatin1String("directory-closed-icon");
QLatin1String("directory-closed-icon");
never executed: return QLatin1String("directory-closed-icon");
0
5040 case
never executed: case QStyle::SP_DirLinkIcon:
QStyle::SP_DirLinkIcon:
never executed: case QStyle::SP_DirLinkIcon:
return
never executed: return QLatin1String("directory-link-icon");
QLatin1String("directory-link-icon");
never executed: return QLatin1String("directory-link-icon");
0
5041 case
never executed: case QStyle::SP_FileIcon:
QStyle::SP_FileIcon:
never executed: case QStyle::SP_FileIcon:
return
never executed: return QLatin1String("file-icon");
QLatin1String("file-icon");
never executed: return QLatin1String("file-icon");
0
5042 case
never executed: case QStyle::SP_FileLinkIcon:
QStyle::SP_FileLinkIcon:
never executed: case QStyle::SP_FileLinkIcon:
return
never executed: return QLatin1String("file-link-icon");
QLatin1String("file-link-icon");
never executed: return QLatin1String("file-link-icon");
0
5043 case
never executed: case QStyle::SP_FileDialogStart:
QStyle::SP_FileDialogStart:
never executed: case QStyle::SP_FileDialogStart:
return
never executed: return QLatin1String("filedialog-start-icon");
QLatin1String("filedialog-start-icon");
never executed: return QLatin1String("filedialog-start-icon");
0
5044 case
never executed: case QStyle::SP_FileDialogEnd:
QStyle::SP_FileDialogEnd:
never executed: case QStyle::SP_FileDialogEnd:
return
never executed: return QLatin1String("filedialog-end-icon");
QLatin1String("filedialog-end-icon");
never executed: return QLatin1String("filedialog-end-icon");
0
5045 case
never executed: case QStyle::SP_FileDialogToParent:
QStyle::SP_FileDialogToParent:
never executed: case QStyle::SP_FileDialogToParent:
return
never executed: return QLatin1String("filedialog-parent-directory-icon");
QLatin1String("filedialog-parent-directory-icon");
never executed: return QLatin1String("filedialog-parent-directory-icon");
0
5046 case
never executed: case QStyle::SP_FileDialogNewFolder:
QStyle::SP_FileDialogNewFolder:
never executed: case QStyle::SP_FileDialogNewFolder:
return
never executed: return QLatin1String("filedialog-new-directory-icon");
QLatin1String("filedialog-new-directory-icon");
never executed: return QLatin1String("filedialog-new-directory-icon");
0
5047 case
never executed: case QStyle::SP_FileDialogDetailedView:
QStyle::SP_FileDialogDetailedView:
never executed: case QStyle::SP_FileDialogDetailedView:
return
never executed: return QLatin1String("filedialog-detailedview-icon");
QLatin1String("filedialog-detailedview-icon");
never executed: return QLatin1String("filedialog-detailedview-icon");
0
5048 case
never executed: case QStyle::SP_FileDialogInfoView:
QStyle::SP_FileDialogInfoView:
never executed: case QStyle::SP_FileDialogInfoView:
return
never executed: return QLatin1String("filedialog-infoview-icon");
QLatin1String("filedialog-infoview-icon");
never executed: return QLatin1String("filedialog-infoview-icon");
0
5049 case
never executed: case QStyle::SP_FileDialogContentsView:
QStyle::SP_FileDialogContentsView:
never executed: case QStyle::SP_FileDialogContentsView:
return
never executed: return QLatin1String("filedialog-contentsview-icon");
QLatin1String("filedialog-contentsview-icon");
never executed: return QLatin1String("filedialog-contentsview-icon");
0
5050 case
never executed: case QStyle::SP_FileDialogListView:
QStyle::SP_FileDialogListView:
never executed: case QStyle::SP_FileDialogListView:
return
never executed: return QLatin1String("filedialog-listview-icon");
QLatin1String("filedialog-listview-icon");
never executed: return QLatin1String("filedialog-listview-icon");
0
5051 case
never executed: case QStyle::SP_FileDialogBack:
QStyle::SP_FileDialogBack:
never executed: case QStyle::SP_FileDialogBack:
return
never executed: return QLatin1String("filedialog-backward-icon");
QLatin1String("filedialog-backward-icon");
never executed: return QLatin1String("filedialog-backward-icon");
0
5052 case
never executed: case QStyle::SP_DirIcon:
QStyle::SP_DirIcon:
never executed: case QStyle::SP_DirIcon:
return
never executed: return QLatin1String("directory-icon");
QLatin1String("directory-icon");
never executed: return QLatin1String("directory-icon");
0
5053 case
never executed: case QStyle::SP_DialogOkButton:
QStyle::SP_DialogOkButton:
never executed: case QStyle::SP_DialogOkButton:
return
never executed: return QLatin1String("dialog-ok-icon");
QLatin1String("dialog-ok-icon");
never executed: return QLatin1String("dialog-ok-icon");
0
5054 case
never executed: case QStyle::SP_DialogCancelButton:
QStyle::SP_DialogCancelButton:
never executed: case QStyle::SP_DialogCancelButton:
return
never executed: return QLatin1String("dialog-cancel-icon");
QLatin1String("dialog-cancel-icon");
never executed: return QLatin1String("dialog-cancel-icon");
0
5055 case
never executed: case QStyle::SP_DialogHelpButton:
QStyle::SP_DialogHelpButton:
never executed: case QStyle::SP_DialogHelpButton:
return
never executed: return QLatin1String("dialog-help-icon");
QLatin1String("dialog-help-icon");
never executed: return QLatin1String("dialog-help-icon");
0
5056 case
never executed: case QStyle::SP_DialogOpenButton:
QStyle::SP_DialogOpenButton:
never executed: case QStyle::SP_DialogOpenButton:
return
never executed: return QLatin1String("dialog-open-icon");
QLatin1String("dialog-open-icon");
never executed: return QLatin1String("dialog-open-icon");
0
5057 case
never executed: case QStyle::SP_DialogSaveButton:
QStyle::SP_DialogSaveButton:
never executed: case QStyle::SP_DialogSaveButton:
return
never executed: return QLatin1String("dialog-save-icon");
QLatin1String("dialog-save-icon");
never executed: return QLatin1String("dialog-save-icon");
0
5058 case
never executed: case QStyle::SP_DialogCloseButton:
QStyle::SP_DialogCloseButton:
never executed: case QStyle::SP_DialogCloseButton:
return
never executed: return QLatin1String("dialog-close-icon");
QLatin1String("dialog-close-icon");
never executed: return QLatin1String("dialog-close-icon");
0
5059 case
never executed: case QStyle::SP_DialogApplyButton:
QStyle::SP_DialogApplyButton:
never executed: case QStyle::SP_DialogApplyButton:
return
never executed: return QLatin1String("dialog-apply-icon");
QLatin1String("dialog-apply-icon");
never executed: return QLatin1String("dialog-apply-icon");
0
5060 case
never executed: case QStyle::SP_DialogResetButton:
QStyle::SP_DialogResetButton:
never executed: case QStyle::SP_DialogResetButton:
return
never executed: return QLatin1String("dialog-reset-icon");
QLatin1String("dialog-reset-icon");
never executed: return QLatin1String("dialog-reset-icon");
0
5061 case
never executed: case QStyle::SP_DialogDiscardButton:
QStyle::SP_DialogDiscardButton:
never executed: case QStyle::SP_DialogDiscardButton:
return
never executed: return QLatin1String("discard-icon");
QLatin1String("discard-icon");
never executed: return QLatin1String("discard-icon");
0
5062 case
never executed: case QStyle::SP_DialogYesButton:
QStyle::SP_DialogYesButton:
never executed: case QStyle::SP_DialogYesButton:
return
never executed: return QLatin1String("dialog-yes-icon");
QLatin1String("dialog-yes-icon");
never executed: return QLatin1String("dialog-yes-icon");
0
5063 case
never executed: case QStyle::SP_DialogNoButton:
QStyle::SP_DialogNoButton:
never executed: case QStyle::SP_DialogNoButton:
return
never executed: return QLatin1String("dialog-no-icon");
QLatin1String("dialog-no-icon");
never executed: return QLatin1String("dialog-no-icon");
0
5064 case
never executed: case QStyle::SP_ArrowUp:
QStyle::SP_ArrowUp:
never executed: case QStyle::SP_ArrowUp:
return
never executed: return QLatin1String("uparrow-icon");
QLatin1String("uparrow-icon");
never executed: return QLatin1String("uparrow-icon");
0
5065 case
never executed: case QStyle::SP_ArrowDown:
QStyle::SP_ArrowDown:
never executed: case QStyle::SP_ArrowDown:
return
never executed: return QLatin1String("downarrow-icon");
QLatin1String("downarrow-icon");
never executed: return QLatin1String("downarrow-icon");
0
5066 case
never executed: case QStyle::SP_ArrowLeft:
QStyle::SP_ArrowLeft:
never executed: case QStyle::SP_ArrowLeft:
return
never executed: return QLatin1String("leftarrow-icon");
QLatin1String("leftarrow-icon");
never executed: return QLatin1String("leftarrow-icon");
0
5067 case
never executed: case QStyle::SP_ArrowRight:
QStyle::SP_ArrowRight:
never executed: case QStyle::SP_ArrowRight:
return
never executed: return QLatin1String("rightarrow-icon");
QLatin1String("rightarrow-icon");
never executed: return QLatin1String("rightarrow-icon");
0
5068 case
never executed: case QStyle::SP_ArrowBack:
QStyle::SP_ArrowBack:
never executed: case QStyle::SP_ArrowBack:
return
never executed: return QLatin1String("backward-icon");
QLatin1String("backward-icon");
never executed: return QLatin1String("backward-icon");
0
5069 case
never executed: case QStyle::SP_ArrowForward:
QStyle::SP_ArrowForward:
never executed: case QStyle::SP_ArrowForward:
return
never executed: return QLatin1String("forward-icon");
QLatin1String("forward-icon");
never executed: return QLatin1String("forward-icon");
0
5070 case
never executed: case QStyle::SP_DirHomeIcon:
QStyle::SP_DirHomeIcon:
never executed: case QStyle::SP_DirHomeIcon:
return
never executed: return QLatin1String("home-icon");
QLatin1String("home-icon");
never executed: return QLatin1String("home-icon");
0
5071 default
never executed: default:
:
never executed: default:
return
never executed: return QLatin1String("");
QLatin1String("");
never executed: return QLatin1String("");
0
5072 }-
5073}-
5074-
5075QIcon QStyleSheetStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt,-
5076 const QWidget *w) const-
5077{-
5078 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->standardIcon(standardIcon, opt, w);
baseStyle()->standardIcon(standardIcon, opt, w);
never executed: return baseStyle()->standardIcon(standardIcon, opt, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
5079 QString s = propertyNameForStandardPixmap(standardIcon);-
5080 if (!s.isEmpty()
!s.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5081 QRenderRule rule = renderRule(w, opt);-
5082 if (rule.hasStyleHint(s)
rule.hasStyleHint(s)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5083 return
never executed: return qvariant_cast<QIcon>(rule.styleHint(s));
qvariant_cast<QIcon>(rule.styleHint(s));
never executed: return qvariant_cast<QIcon>(rule.styleHint(s));
0
5084 }
never executed: end of block
0
5085 return
never executed: return baseStyle()->standardIcon(standardIcon, opt, w);
baseStyle()->standardIcon(standardIcon, opt, w);
never executed: return baseStyle()->standardIcon(standardIcon, opt, w);
0
5086}-
5087-
5088QPalette QStyleSheetStyle::standardPalette() const-
5089{-
5090 return
never executed: return baseStyle()->standardPalette();
baseStyle()->standardPalette();
never executed: return baseStyle()->standardPalette();
0
5091}-
5092-
5093QPixmap QStyleSheetStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,-
5094 const QWidget *w) const-
5095{-
5096 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->standardPixmap(standardPixmap, opt, w);
baseStyle()->standardPixmap(standardPixmap, opt, w);
never executed: return baseStyle()->standardPixmap(standardPixmap, opt, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
5097 QString s = propertyNameForStandardPixmap(standardPixmap);-
5098 if (!s.isEmpty()
!s.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5099 QRenderRule rule = renderRule(w, opt);-
5100 if (rule.hasStyleHint(s)
rule.hasStyleHint(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5101 QIcon icon = qvariant_cast<QIcon>(rule.styleHint(s));-
5102 return
never executed: return icon.pixmap(16, 16);
icon.pixmap(16, 16);
never executed: return icon.pixmap(16, 16);
0
5103 }-
5104 }
never executed: end of block
0
5105 return
never executed: return baseStyle()->standardPixmap(standardPixmap, opt, w);
baseStyle()->standardPixmap(standardPixmap, opt, w);
never executed: return baseStyle()->standardPixmap(standardPixmap, opt, w);
0
5106}-
5107-
5108int QStyleSheetStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2,-
5109 Qt::Orientation orientation, const QStyleOption *option,-
5110 const QWidget *widget) const-
5111{-
5112 return
never executed: return baseStyle()->layoutSpacing(control1, control2, orientation, option, widget);
baseStyle()->layoutSpacing(control1, control2, orientation, option, widget);
never executed: return baseStyle()->layoutSpacing(control1, control2, orientation, option, widget);
0
5113}-
5114-
5115int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w,-
5116 QStyleHintReturn *shret) const-
5117{-
5118 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->styleHint(sh, opt, w, shret);
baseStyle()->styleHint(sh, opt, w, shret);
never executed: return baseStyle()->styleHint(sh, opt, w, shret);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
5119-
5120-
5121 if (sh == SH_Widget_ShareActivation
sh == SH_Widge...hareActivationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5122 return
never executed: return baseStyle()->styleHint(sh, opt, w, shret);
baseStyle()->styleHint(sh, opt, w, shret);
never executed: return baseStyle()->styleHint(sh, opt, w, shret);
0
5123-
5124 QRenderRule rule = renderRule(w, opt);-
5125 QString s;-
5126 switch (sh) {-
5127 case
never executed: case SH_LineEdit_PasswordCharacter:
SH_LineEdit_PasswordCharacter:
never executed: case SH_LineEdit_PasswordCharacter:
s = QLatin1String("lineedit-password-character"); break;
never executed: break;
0
5128 case
never executed: case SH_LineEdit_PasswordMaskDelay:
SH_LineEdit_PasswordMaskDelay:
never executed: case SH_LineEdit_PasswordMaskDelay:
s = QLatin1String("lineedit-password-mask-delay"); break;
never executed: break;
0
5129 case
never executed: case SH_DitherDisabledText:
SH_DitherDisabledText:
never executed: case SH_DitherDisabledText:
s = QLatin1String("dither-disabled-text"); break;
never executed: break;
0
5130 case
never executed: case SH_EtchDisabledText:
SH_EtchDisabledText:
never executed: case SH_EtchDisabledText:
s = QLatin1String("etch-disabled-text"); break;
never executed: break;
0
5131 case
never executed: case SH_ItemView_ActivateItemOnSingleClick:
SH_ItemView_ActivateItemOnSingleClick:
never executed: case SH_ItemView_ActivateItemOnSingleClick:
s = QLatin1String("activate-on-singleclick"); break;
never executed: break;
0
5132 case
never executed: case SH_ItemView_ShowDecorationSelected:
SH_ItemView_ShowDecorationSelected:
never executed: case SH_ItemView_ShowDecorationSelected:
s = QLatin1String("show-decoration-selected"); break;
never executed: break;
0
5133 case
never executed: case SH_Table_GridLineColor:
SH_Table_GridLineColor:
never executed: case SH_Table_GridLineColor:
s = QLatin1String("gridline-color"); break;
never executed: break;
0
5134 case
never executed: case SH_DialogButtonLayout:
SH_DialogButtonLayout:
never executed: case SH_DialogButtonLayout:
s = QLatin1String("button-layout"); break;
never executed: break;
0
5135 case
never executed: case SH_ToolTipLabel_Opacity:
SH_ToolTipLabel_Opacity:
never executed: case SH_ToolTipLabel_Opacity:
s = QLatin1String("opacity"); break;
never executed: break;
0
5136 case
never executed: case SH_ComboBox_Popup:
SH_ComboBox_Popup:
never executed: case SH_ComboBox_Popup:
s = QLatin1String("combobox-popup"); break;
never executed: break;
0
5137 case
never executed: case SH_ComboBox_ListMouseTracking:
SH_ComboBox_ListMouseTracking:
never executed: case SH_ComboBox_ListMouseTracking:
s = QLatin1String("combobox-list-mousetracking"); break;
never executed: break;
0
5138 case
never executed: case SH_MenuBar_AltKeyNavigation:
SH_MenuBar_AltKeyNavigation:
never executed: case SH_MenuBar_AltKeyNavigation:
s = QLatin1String("menubar-altkey-navigation"); break;
never executed: break;
0
5139 case
never executed: case SH_Menu_Scrollable:
SH_Menu_Scrollable:
never executed: case SH_Menu_Scrollable:
s = QLatin1String("menu-scrollable"); break;
never executed: break;
0
5140 case
never executed: case SH_DrawMenuBarSeparator:
SH_DrawMenuBarSeparator:
never executed: case SH_DrawMenuBarSeparator:
s = QLatin1String("menubar-separator"); break;
never executed: break;
0
5141 case
never executed: case SH_MenuBar_MouseTracking:
SH_MenuBar_MouseTracking:
never executed: case SH_MenuBar_MouseTracking:
s = QLatin1String("mouse-tracking"); break;
never executed: break;
0
5142 case
never executed: case SH_SpinBox_ClickAutoRepeatRate:
SH_SpinBox_ClickAutoRepeatRate:
never executed: case SH_SpinBox_ClickAutoRepeatRate:
s = QLatin1String("spinbox-click-autorepeat-rate"); break;
never executed: break;
0
5143 case
never executed: case SH_SpinControls_DisableOnBounds:
SH_SpinControls_DisableOnBounds:
never executed: case SH_SpinControls_DisableOnBounds:
s = QLatin1String("spincontrol-disable-on-bounds"); break;
never executed: break;
0
5144 case
never executed: case SH_MessageBox_TextInteractionFlags:
SH_MessageBox_TextInteractionFlags:
never executed: case SH_MessageBox_TextInteractionFlags:
s = QLatin1String("messagebox-text-interaction-flags"); break;
never executed: break;
0
5145 case
never executed: case SH_ToolButton_PopupDelay:
SH_ToolButton_PopupDelay:
never executed: case SH_ToolButton_PopupDelay:
s = QLatin1String("toolbutton-popup-delay"); break;
never executed: break;
0
5146 case
never executed: case SH_ToolBox_SelectedPageTitleBold:
SH_ToolBox_SelectedPageTitleBold:
never executed: case SH_ToolBox_SelectedPageTitleBold:
0
5147 if (renderRule(w, opt, PseudoElement_ToolBoxTab).hasFont
renderRule(w, ...oxTab).hasFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5148 return
never executed: return 0;
0;
never executed: return 0;
0
5149 break;
never executed: break;
0
5150 case
never executed: case SH_GroupBox_TextLabelColor:
SH_GroupBox_TextLabelColor:
never executed: case SH_GroupBox_TextLabelColor:
0
5151 if (rule.hasPalette()
rule.hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.palette()->foreground.style() != Qt::NoBrush
rule.palette()...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5152 return
never executed: return rule.palette()->foreground.color().rgba();
rule.palette()->foreground.color().rgba();
never executed: return rule.palette()->foreground.color().rgba();
0
5153 break;
never executed: break;
0
5154 case
never executed: case SH_ScrollView_FrameOnlyAroundContents:
SH_ScrollView_FrameOnlyAroundContents:
never executed: case SH_ScrollView_FrameOnlyAroundContents:
s = QLatin1String("scrollview-frame-around-contents"); break;
never executed: break;
0
5155 case
never executed: case SH_ScrollBar_ContextMenu:
SH_ScrollBar_ContextMenu:
never executed: case SH_ScrollBar_ContextMenu:
s = QLatin1String("scrollbar-contextmenu"); break;
never executed: break;
0
5156 case
never executed: case SH_ScrollBar_LeftClickAbsolutePosition:
SH_ScrollBar_LeftClickAbsolutePosition:
never executed: case SH_ScrollBar_LeftClickAbsolutePosition:
s = QLatin1String("scrollbar-leftclick-absolute-position"); break;
never executed: break;
0
5157 case
never executed: case SH_ScrollBar_MiddleClickAbsolutePosition:
SH_ScrollBar_MiddleClickAbsolutePosition:
never executed: case SH_ScrollBar_MiddleClickAbsolutePosition:
s = QLatin1String("scrollbar-middleclick-absolute-position"); break;
never executed: break;
0
5158 case
never executed: case SH_ScrollBar_RollBetweenButtons:
SH_ScrollBar_RollBetweenButtons:
never executed: case SH_ScrollBar_RollBetweenButtons:
s = QLatin1String("scrollbar-roll-between-buttons"); break;
never executed: break;
0
5159 case
never executed: case SH_ScrollBar_ScrollWhenPointerLeavesControl:
SH_ScrollBar_ScrollWhenPointerLeavesControl:
never executed: case SH_ScrollBar_ScrollWhenPointerLeavesControl:
s = QLatin1String("scrollbar-scroll-when-pointer-leaves-control"); break;
never executed: break;
0
5160 case
never executed: case SH_TabBar_Alignment:
SH_TabBar_Alignment:
never executed: case SH_TabBar_Alignment:
0
5161-
5162 if (qobject_cast<const QTabWidget *>(w)
qobject_cast<c...abWidget *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5163 rule = renderRule(w, opt, PseudoElement_TabWidgetTabBar);-
5164 if (rule.hasPosition()
rule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5165 return
never executed: return rule.position()->position;
rule.position()->position;
never executed: return rule.position()->position;
0
5166 }
never executed: end of block
0
5167-
5168 s = QLatin1String("alignment");-
5169 break;
never executed: break;
0
5170-
5171 case
never executed: case SH_TabBar_CloseButtonPosition:
SH_TabBar_CloseButtonPosition:
never executed: case SH_TabBar_CloseButtonPosition:
0
5172 rule = renderRule(w, opt, PseudoElement_TabBarTabCloseButton);-
5173 if (rule.hasPosition()
rule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5174 Qt::Alignment align = rule.position()->position;-
5175 if (align & Qt::AlignLeft
align & Qt::AlignLeftDescription
TRUEnever evaluated
FALSEnever evaluated
|| align & Qt::AlignTop
align & Qt::AlignTopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5176 return
never executed: return QTabBar::LeftSide;
QTabBar::LeftSide;
never executed: return QTabBar::LeftSide;
0
5177 if (align & Qt::AlignRight
align & Qt::AlignRightDescription
TRUEnever evaluated
FALSEnever evaluated
|| align & Qt::AlignBottom
align & Qt::AlignBottomDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5178 return
never executed: return QTabBar::RightSide;
QTabBar::RightSide;
never executed: return QTabBar::RightSide;
0
5179 }
never executed: end of block
0
5180 break;
never executed: break;
0
5181-
5182 case
never executed: case SH_TabBar_ElideMode:
SH_TabBar_ElideMode:
never executed: case SH_TabBar_ElideMode:
s = QLatin1String("tabbar-elide-mode"); break;
never executed: break;
0
5183 case
never executed: case SH_TabBar_PreferNoArrows:
SH_TabBar_PreferNoArrows:
never executed: case SH_TabBar_PreferNoArrows:
s = QLatin1String("tabbar-prefer-no-arrows"); break;
never executed: break;
0
5184 case
never executed: case SH_ComboBox_PopupFrameStyle:
SH_ComboBox_PopupFrameStyle:
never executed: case SH_ComboBox_PopupFrameStyle:
0
5185-
5186 if (qobject_cast<const QComboBox *>(w)
qobject_cast<c...ComboBox *>(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5187 QAbstractItemView *view = w->findChild<QAbstractItemView *>();-
5188 if (view
viewDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5189 view->ensurePolished();-
5190 QRenderRule subRule = renderRule(view, PseudoElement_None);-
5191 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5192 return
never executed: return QFrame::NoFrame;
QFrame::NoFrame;
never executed: return QFrame::NoFrame;
0
5193 }
never executed: end of block
0
5194 }
never executed: end of block
0
5195-
5196 break;
never executed: break;
0
5197 case
never executed: case SH_DialogButtonBox_ButtonsHaveIcons:
SH_DialogButtonBox_ButtonsHaveIcons:
never executed: case SH_DialogButtonBox_ButtonsHaveIcons:
s = QLatin1String("dialogbuttonbox-buttons-have-icons"); break;
never executed: break;
0
5198 case
never executed: case SH_Workspace_FillSpaceOnMaximize:
SH_Workspace_FillSpaceOnMaximize:
never executed: case SH_Workspace_FillSpaceOnMaximize:
s = QLatin1String("mdi-fill-space-on-maximize"); break;
never executed: break;
0
5199 case
never executed: case SH_TitleBar_NoBorder:
SH_TitleBar_NoBorder:
never executed: case SH_TitleBar_NoBorder:
0
5200 if (rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5201 return
never executed: return !rule.border()->borders[LeftEdge];
!rule.border()->borders[LeftEdge];
never executed: return !rule.border()->borders[LeftEdge];
0
5202 break;
never executed: break;
0
5203 case
never executed: case SH_TitleBar_AutoRaise:
SH_TitleBar_AutoRaise:
never executed: case SH_TitleBar_AutoRaise:
{
0
5204 QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar);-
5205 if (subRule.hasDrawable()
subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5206 return
never executed: return 1;
1;
never executed: return 1;
0
5207 break;
never executed: break;
0
5208 }-
5209 case
never executed: case SH_ItemView_ArrowKeysNavigateIntoChildren:
SH_ItemView_ArrowKeysNavigateIntoChildren:
never executed: case SH_ItemView_ArrowKeysNavigateIntoChildren:
s = QLatin1String("arrow-keys-navigate-into-children"); break;
never executed: break;
0
5210 case
never executed: case SH_ItemView_PaintAlternatingRowColorsForEmptyArea:
SH_ItemView_PaintAlternatingRowColorsForEmptyArea:
never executed: case SH_ItemView_PaintAlternatingRowColorsForEmptyArea:
s = QLatin1String("paint-alternating-row-colors-for-empty-area"); break;
never executed: break;
0
5211 default
never executed: default:
:
never executed: default:
break;
never executed: break;
0
5212 }-
5213 if (!s.isEmpty()
!s.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& rule.hasStyleHint(s)
rule.hasStyleHint(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5214 return
never executed: return rule.styleHint(s).toInt();
rule.styleHint(s).toInt();
never executed: return rule.styleHint(s).toInt();
0
5215 }-
5216-
5217 return
never executed: return baseStyle()->styleHint(sh, opt, w, shret);
baseStyle()->styleHint(sh, opt, w, shret);
never executed: return baseStyle()->styleHint(sh, opt, w, shret);
0
5218}-
5219-
5220QRect QStyleSheetStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc,-
5221 const QWidget *w) const-
5222{-
5223 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
baseStyle()->subControlRect(cc, opt, sc, w);
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
5224-
5225 QRenderRule rule = renderRule(w, opt);-
5226 switch (cc) {-
5227 case
never executed: case CC_ComboBox:
CC_ComboBox:
never executed: case CC_ComboBox:
0
5228 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5229 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5230 switch (sc) {-
5231 case
never executed: case SC_ComboBoxFrame:
SC_ComboBoxFrame:
never executed: case SC_ComboBoxFrame:
return
never executed: return rule.borderRect(opt->rect);
rule.borderRect(opt->rect);
never executed: return rule.borderRect(opt->rect);
0
5232 case
never executed: case SC_ComboBoxEditField:
SC_ComboBoxEditField:
never executed: case SC_ComboBoxEditField:
0
5233 {-
5234 QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown);-
5235 QRect r = rule.contentsRect(opt->rect);-
5236 QRect r2 = positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown,-
5237 opt->rect, opt->direction);-
5238 if (subRule.hasPosition()
subRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
&& subRule.position()->position & Qt::AlignLeft
subRule.positi... Qt::AlignLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5239 return
never executed: return visualRect(opt->direction, r, r.adjusted(r2.width(),0,0,0));
visualRect(opt->direction, r, r.adjusted(r2.width(),0,0,0));
never executed: return visualRect(opt->direction, r, r.adjusted(r2.width(),0,0,0));
0
5240 } else {-
5241 return
never executed: return visualRect(opt->direction, r, r.adjusted(0,0,-r2.width(),0));
visualRect(opt->direction, r, r.adjusted(0,0,-r2.width(),0));
never executed: return visualRect(opt->direction, r, r.adjusted(0,0,-r2.width(),0));
0
5242 }-
5243 }-
5244 case
never executed: case SC_ComboBoxArrow:
SC_ComboBoxArrow:
never executed: case SC_ComboBoxArrow:
{
0
5245 QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown);-
5246 return
never executed: return positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction);
positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction);
never executed: return positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction);
0
5247 }-
5248 case
never executed: case SC_ComboBoxListBoxPopup:
SC_ComboBoxListBoxPopup:
never executed: case SC_ComboBoxListBoxPopup:
0
5249 default
never executed: default:
:
never executed: default:
0
5250 return
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
baseStyle()->subControlRect(cc, opt, sc, w);
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
0
5251 }-
5252 }-
5253-
5254 QStyleOptionComboBox comboBox(*cb);-
5255 comboBox.rect = rule.borderRect(opt->rect);-
5256 return
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w) : QWindowsStyle::subControlRect(cc, &comboBox, sc, w);
rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w)
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w) : QWindowsStyle::subControlRect(cc, &comboBox, sc, w);
0
5257 : QWindowsStyle::subControlRect(cc, &comboBox, sc, w);
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w) : QWindowsStyle::subControlRect(cc, &comboBox, sc, w);
0
5258 }-
5259 break;
never executed: break;
0
5260-
5261-
5262 case
never executed: case CC_SpinBox:
CC_SpinBox:
never executed: case CC_SpinBox:
0
5263 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *spin = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5264 QRenderRule upRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);-
5265 QRenderRule downRule = renderRule(w, opt, PseudoElement_SpinBoxDownButton);-
5266 bool ruleMatch = rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
5267 bool upRuleMatch = upRule.hasGeometry()
upRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| upRule.hasPosition()
upRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
5268 bool downRuleMatch = downRule.hasGeometry()
downRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| downRule.hasPosition()
downRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
5269 if (ruleMatch
ruleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
|| upRuleMatch
upRuleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
|| downRuleMatch
downRuleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5270 switch (sc) {-
5271 case
never executed: case SC_SpinBoxFrame:
SC_SpinBoxFrame:
never executed: case SC_SpinBoxFrame:
0
5272 return
never executed: return rule.borderRect(opt->rect);
rule.borderRect(opt->rect);
never executed: return rule.borderRect(opt->rect);
0
5273 case
never executed: case SC_SpinBoxEditField:
SC_SpinBoxEditField:
never executed: case SC_SpinBoxEditField:
0
5274 {-
5275 QRect r = rule.contentsRect(opt->rect);-
5276-
5277 Qt::Alignment upAlign, downAlign;-
5278-
5279 upAlign = upRule.hasPosition()
upRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
? upRule.position()->position
0
5280 : Qt::Alignment(Qt::AlignRight);-
5281 upAlign = resolveAlignment(opt->direction, upAlign);-
5282-
5283 downAlign = downRule.hasPosition()
downRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
? downRule.position()->position
0
5284 : Qt::Alignment(Qt::AlignRight);-
5285 downAlign = resolveAlignment(opt->direction, downAlign);-
5286-
5287 int upSize = subControlRect(CC_SpinBox, opt, SC_SpinBoxUp, w).width();-
5288 int downSize = subControlRect(CC_SpinBox, opt, SC_SpinBoxDown, w).width();-
5289 int widestL = qMax((upAlign & Qt::AlignLeft) ? upSize : 0,-
5290 (downAlign & Qt::AlignLeft) ? downSize : 0);-
5291 int widestR = qMax((upAlign & Qt::AlignRight) ? upSize : 0,-
5292 (downAlign & Qt::AlignRight) ? downSize : 0);-
5293 r.setRight(r.right() - widestR);-
5294 r.setLeft(r.left() + widestL);-
5295 return
never executed: return r;
r;
never executed: return r;
0
5296 }-
5297 case
never executed: case SC_SpinBoxDown:
SC_SpinBoxDown:
never executed: case SC_SpinBoxDown:
0
5298 if (downRuleMatch
downRuleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5299 return
never executed: return positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton, opt->rect, opt->direction);
positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton,
never executed: return positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton, opt->rect, opt->direction);
0
5300 opt->rect, opt->direction);
never executed: return positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton, opt->rect, opt->direction);
0
5301 break;
never executed: break;
0
5302 case
never executed: case SC_SpinBoxUp:
SC_SpinBoxUp:
never executed: case SC_SpinBoxUp:
0
5303 if (upRuleMatch
upRuleMatchDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5304 return
never executed: return positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton, opt->rect, opt->direction);
positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton,
never executed: return positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton, opt->rect, opt->direction);
0
5305 opt->rect, opt->direction);
never executed: return positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton, opt->rect, opt->direction);
0
5306 break;
never executed: break;
0
5307 default
never executed: default:
:
never executed: default:
0
5308 break;
never executed: break;
0
5309 }-
5310-
5311 return
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
baseStyle()->subControlRect(cc, opt, sc, w);
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
0
5312 }-
5313-
5314 QStyleOptionSpinBox spinBox(*spin);-
5315 spinBox.rect = rule.borderRect(opt->rect);-
5316 return
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w) : QWindowsStyle::subControlRect(cc, &spinBox, sc, w);
rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w)
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w) : QWindowsStyle::subControlRect(cc, &spinBox, sc, w);
0
5317 : QWindowsStyle::subControlRect(cc, &spinBox, sc, w);
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w) : QWindowsStyle::subControlRect(cc, &spinBox, sc, w);
0
5318 }-
5319 break;
never executed: break;
0
5320-
5321-
5322 case
never executed: case CC_GroupBox:
CC_GroupBox:
never executed: case CC_GroupBox:
0
5323 if (const
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionGroupBox *gb = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5324 switch (sc) {-
5325 case
never executed: case SC_GroupBoxFrame:
SC_GroupBoxFrame:
never executed: case SC_GroupBoxFrame:
0
5326 case
never executed: case SC_GroupBoxContents:
SC_GroupBoxContents:
never executed: case SC_GroupBoxContents:
{
0
5327 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5328 return
never executed: return sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect) : rule.contentsRect(opt->rect);
sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect)
never executed: return sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect) : rule.contentsRect(opt->rect);
0
5329 : rule.contentsRect(opt->rect);
never executed: return sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect) : rule.contentsRect(opt->rect);
0
5330 }-
5331 QStyleOptionGroupBox groupBox(*gb);-
5332 groupBox.rect = rule.borderRect(opt->rect);-
5333 return
never executed: return baseStyle()->subControlRect(cc, &groupBox, sc, w);
baseStyle()->subControlRect(cc, &groupBox, sc, w);
never executed: return baseStyle()->subControlRect(cc, &groupBox, sc, w);
0
5334 }-
5335 default
never executed: default:
:
never executed: default:
0
5336 case
never executed: case SC_GroupBoxLabel:
SC_GroupBoxLabel:
never executed: case SC_GroupBoxLabel:
0
5337 case
never executed: case SC_GroupBoxCheckBox:
SC_GroupBoxCheckBox:
never executed: case SC_GroupBoxCheckBox:
{
0
5338 QRenderRule indRule = renderRule(w, opt, PseudoElement_GroupBoxIndicator);-
5339 QRenderRule labelRule = renderRule(w, opt, PseudoElement_GroupBoxTitle);-
5340 if (!labelRule.hasPosition()
!labelRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
&& !labelRule.hasGeometry()
!labelRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
&& !labelRule.hasBox()
!labelRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
0
5341 && !labelRule.hasBorder()
!labelRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
&& !indRule.hasContentsSize()
!indRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5342 QStyleOptionGroupBox groupBox(*gb);-
5343 groupBox.rect = rule.borderRect(opt->rect);-
5344 return
never executed: return baseStyle()->subControlRect(cc, &groupBox, sc, w);
baseStyle()->subControlRect(cc, &groupBox, sc, w);
never executed: return baseStyle()->subControlRect(cc, &groupBox, sc, w);
0
5345 }-
5346 int tw = opt->fontMetrics.width(gb->text);-
5347 int th = opt->fontMetrics.height();-
5348 int spacing = pixelMetric(QStyle::PM_CheckBoxLabelSpacing, opt, w);-
5349 int iw = pixelMetric(QStyle::PM_IndicatorWidth, opt, w);-
5350 int ih = pixelMetric(QStyle::PM_IndicatorHeight, opt, w);-
5351-
5352 if (gb->subControls & QStyle::SC_GroupBoxCheckBox
gb->subControl...oupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5353 tw = tw + iw + spacing;-
5354 th = qMax(th, ih);-
5355 }
never executed: end of block
0
5356 if (!labelRule.hasGeometry()
!labelRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5357 labelRule.geo = new QStyleSheetGeometryData(tw, th, tw, th, -1, -1);-
5358 }
never executed: end of block
else {
0
5359 labelRule.geo->width = tw;-
5360 labelRule.geo->height = th;-
5361 }
never executed: end of block
0
5362 if (!labelRule.hasPosition()
!labelRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5363 labelRule.p = new QStyleSheetPositionData(0, 0, 0, 0, defaultOrigin(PseudoElement_GroupBoxTitle),-
5364 gb->textAlignment, PositionMode_Static);-
5365 }
never executed: end of block
0
5366 QRect r = positionRect(w, rule, labelRule, PseudoElement_GroupBoxTitle,-
5367 opt->rect, opt->direction);-
5368 if (gb->subControls & SC_GroupBoxCheckBox
gb->subControl...oupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5369 r = labelRule.contentsRect(r);-
5370 if (sc == SC_GroupBoxLabel
sc == SC_GroupBoxLabelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5371 r.setLeft(r.left() + iw + spacing);-
5372 r.setTop(r.center().y() - th/2);-
5373 }
never executed: end of block
else {
0
5374 r = QRect(r.left(), r.center().y() - ih/2, iw, ih);-
5375 }
never executed: end of block
0
5376 return
never executed: return r;
r;
never executed: return r;
0
5377 } else {-
5378 return
never executed: return labelRule.contentsRect(r);
labelRule.contentsRect(r);
never executed: return labelRule.contentsRect(r);
0
5379 }-
5380 }-
5381 }-
5382 }-
5383 break;
never executed: break;
0
5384-
5385 case
never executed: case CC_ToolButton:
CC_ToolButton:
never executed: case CC_ToolButton:
0
5386 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5387 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5388 switch (sc) {-
5389 case
never executed: case SC_ToolButton:
SC_ToolButton:
never executed: case SC_ToolButton:
return
never executed: return rule.borderRect(opt->rect);
rule.borderRect(opt->rect);
never executed: return rule.borderRect(opt->rect);
0
5390 case
never executed: case SC_ToolButtonMenu:
SC_ToolButtonMenu:
never executed: case SC_ToolButtonMenu:
{
0
5391 QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolButtonMenu);-
5392 return
never executed: return positionRect(w, rule, subRule, PseudoElement_ToolButtonMenu, opt->rect, opt->direction);
positionRect(w, rule, subRule, PseudoElement_ToolButtonMenu, opt->rect, opt->direction);
never executed: return positionRect(w, rule, subRule, PseudoElement_ToolButtonMenu, opt->rect, opt->direction);
0
5393 }-
5394 default
never executed: default:
:
never executed: default:
0
5395 break;
never executed: break;
0
5396 }-
5397 }-
5398-
5399 QStyleOptionToolButton tool(*tb);-
5400 tool.rect = rule.borderRect(opt->rect);-
5401 return
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w) : QWindowsStyle::subControlRect(cc, &tool, sc, w);
rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w)
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w) : QWindowsStyle::subControlRect(cc, &tool, sc, w);
0
5402 : QWindowsStyle::subControlRect(cc, &tool, sc, w);
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w) : QWindowsStyle::subControlRect(cc, &tool, sc, w);
0
5403 }-
5404 break;
never executed: break;
0
5405-
5406-
5407 case
never executed: case CC_ScrollBar:
CC_ScrollBar:
never executed: case CC_ScrollBar:
0
5408 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5409 QStyleOptionSlider styleOptionSlider(*sb);-
5410 styleOptionSlider.rect = rule.borderRect(opt->rect);-
5411 if (rule.hasDrawable()
rule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5412 QRect grooveRect;-
5413 if (!rule.hasBox()
!rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5414 grooveRect = rule.baseStyleCanDraw()
rule.baseStyleCanDraw()Description
TRUEnever evaluated
FALSEnever evaluated
? baseStyle()->subControlRect(cc, sb, SC_ScrollBarGroove, w)
0
5415 : QWindowsStyle::subControlRect(cc, sb, SC_ScrollBarGroove, w);-
5416 }
never executed: end of block
else {
0
5417 grooveRect = rule.contentsRect(opt->rect);-
5418 }
never executed: end of block
0
5419-
5420 PseudoElement pe = PseudoElement_None;-
5421-
5422 switch (sc) {-
5423 case
never executed: case SC_ScrollBarGroove:
SC_ScrollBarGroove:
never executed: case SC_ScrollBarGroove:
0
5424 return
never executed: return grooveRect;
grooveRect;
never executed: return grooveRect;
0
5425 case
never executed: case SC_ScrollBarAddPage:
SC_ScrollBarAddPage:
never executed: case SC_ScrollBarAddPage:
0
5426 case
never executed: case SC_ScrollBarSubPage:
SC_ScrollBarSubPage:
never executed: case SC_ScrollBarSubPage:
0
5427 case
never executed: case SC_ScrollBarSlider:
SC_ScrollBarSlider:
never executed: case SC_ScrollBarSlider:
{
0
5428 QRect contentRect = grooveRect;-
5429 if (hasStyleRule(w, PseudoElement_ScrollBarSlider)
hasStyleRule(w...rollBarSlider)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5430 QRenderRule sliderRule = renderRule(w, opt, PseudoElement_ScrollBarSlider);-
5431 Origin origin = sliderRule.hasPosition()
sliderRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
? sliderRule.position()->origin : defaultOrigin(PseudoElement_ScrollBarSlider);
0
5432 contentRect = rule.originRect(opt->rect, origin);-
5433 }
never executed: end of block
0
5434 int maxlen = (
(styleOptionSl...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
styleOptionSlider.orientation == Qt::Horizontal)
(styleOptionSl...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
? contentRect.width() : contentRect.height();
0
5435 int sliderlen;-
5436 if (sb->maximum != sb->minimum
sb->maximum != sb->minimumDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5437 uint range = sb->maximum - sb->minimum;-
5438 sliderlen = (qint64(sb->pageStep) * maxlen) / (range + sb->pageStep);-
5439-
5440 int slidermin = pixelMetric(PM_ScrollBarSliderMin, sb, w);-
5441 if (sliderlen < slidermin
sliderlen < sliderminDescription
TRUEnever evaluated
FALSEnever evaluated
|| range > 2147483647 / 2
range > 2147483647 / 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5442 sliderlen = slidermin;
never executed: sliderlen = slidermin;
0
5443 if (sliderlen > maxlen
sliderlen > maxlenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5444 sliderlen = maxlen;
never executed: sliderlen = maxlen;
0
5445 }
never executed: end of block
else {
0
5446 sliderlen = maxlen;-
5447 }
never executed: end of block
0
5448-
5449 int sliderstart = (styleOptionSlider.orientation == Qt::Horizontal
styleOptionSli...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
? contentRect.left() : contentRect.top())
0
5450 + sliderPositionFromValue(sb->minimum, sb->maximum, sb->sliderPosition,-
5451 maxlen - sliderlen, sb->upsideDown);-
5452-
5453 QRect sr = (
(sb->orientati...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
sb->orientation == Qt::Horizontal)
(sb->orientati...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
0
5454 ? QRect(sliderstart, contentRect.top(), sliderlen, contentRect.height())-
5455 : QRect(contentRect.left(), sliderstart, contentRect.width(), sliderlen);-
5456 if (sc == SC_ScrollBarSlider
sc == SC_ScrollBarSliderDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5457 return
never executed: return sr;
sr;
never executed: return sr;
0
5458 } else if (sc == SC_ScrollBarSubPage
sc == SC_ScrollBarSubPageDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5459 return
never executed: return QRect(contentRect.topLeft(), sb->orientation == Qt::Horizontal ? sr.bottomLeft() : sr.topRight());
QRect(contentRect.topLeft(), sb->orientation == Qt::Horizontal ? sr.bottomLeft() : sr.topRight());
never executed: return QRect(contentRect.topLeft(), sb->orientation == Qt::Horizontal ? sr.bottomLeft() : sr.topRight());
0
5460 } else {-
5461 return
never executed: return QRect(sb->orientation == Qt::Horizontal ? sr.topRight() : sr.bottomLeft(), contentRect.bottomRight());
QRect(sb->orientation == Qt::Horizontal ? sr.topRight() : sr.bottomLeft(), contentRect.bottomRight());
never executed: return QRect(sb->orientation == Qt::Horizontal ? sr.topRight() : sr.bottomLeft(), contentRect.bottomRight());
0
5462 }-
5463 break;
dead code: break;
-
5464 }-
5465 case
never executed: case SC_ScrollBarAddLine:
SC_ScrollBarAddLine:
never executed: case SC_ScrollBarAddLine:
pe = PseudoElement_ScrollBarAddLine; break;
never executed: break;
0
5466 case
never executed: case SC_ScrollBarSubLine:
SC_ScrollBarSubLine:
never executed: case SC_ScrollBarSubLine:
pe = PseudoElement_ScrollBarSubLine; break;
never executed: break;
0
5467 case
never executed: case SC_ScrollBarFirst:
SC_ScrollBarFirst:
never executed: case SC_ScrollBarFirst:
pe = PseudoElement_ScrollBarFirst; break;
never executed: break;
0
5468 case
never executed: case SC_ScrollBarLast:
SC_ScrollBarLast:
never executed: case SC_ScrollBarLast:
pe = PseudoElement_ScrollBarLast; break;
never executed: break;
0
5469 default
never executed: default:
:
never executed: default:
break;
never executed: break;
0
5470 }-
5471 if (hasStyleRule(w,pe)
hasStyleRule(w,pe)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5472 QRenderRule subRule = renderRule(w, opt, pe);-
5473 if (subRule.hasPosition()
subRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasGeometry()
subRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5474 const QStyleSheetPositionData *pos = subRule.position();-
5475 QRect originRect = grooveRect;-
5476 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5477 Origin origin = (pos
posDescription
TRUEnever evaluated
FALSEnever evaluated
&& pos->origin != Origin_Unknown
pos->origin != Origin_UnknownDescription
TRUEnever evaluated
FALSEnever evaluated
) ? pos->origin : defaultOrigin(pe);
0
5478 originRect = rule.originRect(opt->rect, origin);-
5479 }
never executed: end of block
0
5480 return
never executed: return positionRect(w, subRule, pe, originRect, styleOptionSlider.direction);
positionRect(w, subRule, pe, originRect, styleOptionSlider.direction);
never executed: return positionRect(w, subRule, pe, originRect, styleOptionSlider.direction);
0
5481 }-
5482 }
never executed: end of block
0
5483 }
never executed: end of block
0
5484 return
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w) : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w);
rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w)
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w) : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w);
0
5485 : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w);
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w) : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w);
0
5486 }-
5487 break;
never executed: break;
0
5488-
5489-
5490-
5491 case
never executed: case CC_Slider:
CC_Slider:
never executed: case CC_Slider:
0
5492 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5493 QRenderRule subRule = renderRule(w, opt, PseudoElement_SliderGroove);-
5494 if (!subRule.hasDrawable()
!subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5495 break;
never executed: break;
0
5496 subRule.img = 0;-
5497 QRect gr = positionRect(w, rule, subRule, PseudoElement_SliderGroove, opt->rect, opt->direction);-
5498 switch (sc) {-
5499 case
never executed: case SC_SliderGroove:
SC_SliderGroove:
never executed: case SC_SliderGroove:
0
5500 return
never executed: return gr;
gr;
never executed: return gr;
0
5501 case
never executed: case SC_SliderHandle:
SC_SliderHandle:
never executed: case SC_SliderHandle:
{
0
5502 bool horizontal = slider->orientation & Qt::Horizontal;-
5503 QRect cr = subRule.contentsRect(gr);-
5504 QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SliderHandle);-
5505 int len = horizontal
horizontalDescription
TRUEnever evaluated
FALSEnever evaluated
? subRule2.size().width() : subRule2.size().height();
0
5506 subRule2.img = 0;-
5507 subRule2.geo = 0;-
5508 cr = positionRect(w, subRule2, PseudoElement_SliderHandle, cr, opt->direction);-
5509 int thickness = horizontal
horizontalDescription
TRUEnever evaluated
FALSEnever evaluated
? cr.height() : cr.width();
0
5510 int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderPosition,-
5511 (horizontal ? cr.width() : cr.height()) - len, slider->upsideDown);-
5512 cr = horizontal
horizontalDescription
TRUEnever evaluated
FALSEnever evaluated
? QRect(cr.x() + sliderPos, cr.y(), len, thickness)
0
5513 : QRect(cr.x(), cr.y() + sliderPos, thickness, len);-
5514 return
never executed: return subRule2.borderRect(cr);
subRule2.borderRect(cr);
never executed: return subRule2.borderRect(cr);
0
5515 break;
dead code: break;
}
-
5516 case
never executed: case SC_SliderTickmarks:
SC_SliderTickmarks:
never executed: case SC_SliderTickmarks:
0
5517-
5518 default
never executed: default:
:
never executed: default:
0
5519 break;
never executed: break;
0
5520 }-
5521 }-
5522 break;
never executed: break;
0
5523-
5524-
5525 case
never executed: case CC_MdiControls:
CC_MdiControls:
never executed: case CC_MdiControls:
0
5526 if (hasStyleRule(w, PseudoElement_MdiCloseButton)
hasStyleRule(w...diCloseButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
5527 || hasStyleRule(w, PseudoElement_MdiNormalButton)
hasStyleRule(w...iNormalButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
5528 || hasStyleRule(w, PseudoElement_MdiMinButton)
hasStyleRule(w..._MdiMinButton)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5529 QList<QVariant> layout = rule.styleHint(QLatin1String("button-layout")).toList();-
5530 if (layout.isEmpty()
layout.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5531 layout = subControlLayout(QLatin1String("mNX"));
never executed: layout = subControlLayout(QLatin1String("mNX"));
0
5532-
5533 int x = 0, width = 0;-
5534 QRenderRule subRule;-
5535 for (int i = 0; i < layout.count()
i < layout.count()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
5536 int layoutButton = layout[i].toInt();-
5537 if (layoutButton < PseudoElement_MdiCloseButton
layoutButton <...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
5538 || layoutButton > PseudoElement_MdiNormalButton
layoutButton >...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5539 continue;
never executed: continue;
0
5540 QStyle::SubControl control = knownPseudoElements[layoutButton].subControl;-
5541 if (!(opt->subControls & control)
!(opt->subControls & control)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5542 continue;
never executed: continue;
0
5543 subRule = renderRule(w, opt, layoutButton);-
5544 width = subRule.size().width();-
5545 if (sc == control
sc == controlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5546 break;
never executed: break;
0
5547 x += width;-
5548 }
never executed: end of block
0
5549-
5550 return
never executed: return subRule.borderRect(QRect(x, opt->rect.top(), width, opt->rect.height()));
subRule.borderRect(QRect(x, opt->rect.top(), width, opt->rect.height()));
never executed: return subRule.borderRect(QRect(x, opt->rect.top(), width, opt->rect.height()));
0
5551 }-
5552 break;
never executed: break;
0
5553-
5554 case
never executed: case CC_TitleBar:
CC_TitleBar:
never executed: case CC_TitleBar:
0
5555 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5556 QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar);-
5557 if (!subRule.hasDrawable()
!subRule.hasDrawable()Description
TRUEnever evaluated
FALSEnever evaluated
&& !subRule.hasBox()
!subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
&& !subRule.hasBorder()
!subRule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5558 break;
never executed: break;
0
5559 QHash<QStyle::SubControl, QRect> layoutRects = titleBarLayout(w, tb);-
5560 return
never executed: return layoutRects.value(sc);
layoutRects.value(sc);
never executed: return layoutRects.value(sc);
0
5561 }-
5562 break;
never executed: break;
0
5563-
5564 default
never executed: default:
:
never executed: default:
0
5565 break;
never executed: break;
0
5566 }-
5567-
5568 return
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
baseStyle()->subControlRect(cc, opt, sc, w);
never executed: return baseStyle()->subControlRect(cc, opt, sc, w);
0
5569}-
5570-
5571QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, const QWidget *w) const-
5572{-
5573 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return baseStyle()->subElementRect(se, opt, w);
baseStyle()->subElementRect(se, opt, w);
never executed: return baseStyle()->subElementRect(se, opt, w);
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
5574-
5575 QRenderRule rule = renderRule(w, opt);-
5576-
5577 int pe = PseudoElement_None;-
5578-
5579-
5580 switch (se) {-
5581 case
never executed: case SE_PushButtonContents:
SE_PushButtonContents:
never executed: case SE_PushButtonContents:
0
5582 case
never executed: case SE_PushButtonFocusRect:
SE_PushButtonFocusRect:
never executed: case SE_PushButtonFocusRect:
0
5583 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5584 QStyleOptionButton btnOpt(*btn);-
5585 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5586 return
never executed: return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
never executed: return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
0
5587 return
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w) : QWindowsStyle::subElementRect(se, &btnOpt, w);
rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w)
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w) : QWindowsStyle::subElementRect(se, &btnOpt, w);
0
5588 : QWindowsStyle::subElementRect(se, &btnOpt, w);
never executed: return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w) : QWindowsStyle::subElementRect(se, &btnOpt, w);
0
5589 }-
5590 break;
never executed: break;
0
5591-
5592 case
never executed: case SE_LineEditContents:
SE_LineEditContents:
never executed: case SE_LineEditContents:
0
5593 case
never executed: case SE_FrameContents:
SE_FrameContents:
never executed: case SE_FrameContents:
0
5594 case
never executed: case SE_ShapedFrameContents:
SE_ShapedFrameContents:
never executed: case SE_ShapedFrameContents:
0
5595 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5596 return
never executed: return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
never executed: return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
0
5597 }-
5598 break;
never executed: break;
0
5599-
5600 case
never executed: case SE_CheckBoxIndicator:
SE_CheckBoxIndicator:
never executed: case SE_CheckBoxIndicator:
0
5601 case
never executed: case SE_RadioButtonIndicator:
SE_RadioButtonIndicator:
never executed: case SE_RadioButtonIndicator:
0
5602 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_Indicator)
hasStyleRule(w...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5603 PseudoElement pe = se == SE_CheckBoxIndicator
se == SE_CheckBoxIndicatorDescription
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_Indicator : PseudoElement_ExclusiveIndicator;
0
5604 QRenderRule subRule = renderRule(w, opt, pe);-
5605 return
never executed: return positionRect(w, rule, subRule, pe, opt->rect, opt->direction);
positionRect(w, rule, subRule, pe, opt->rect, opt->direction);
never executed: return positionRect(w, rule, subRule, pe, opt->rect, opt->direction);
0
5606 }-
5607 break;
never executed: break;
0
5608-
5609 case
never executed: case SE_CheckBoxContents:
SE_CheckBoxContents:
never executed: case SE_CheckBoxContents:
0
5610 case
never executed: case SE_RadioButtonContents:
SE_RadioButtonContents:
never executed: case SE_RadioButtonContents:
0
5611 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_Indicator)
hasStyleRule(w...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5612 bool isRadio = se == SE_RadioButtonContents;-
5613 QRect ir = subElementRect(isRadio ? SE_RadioButtonIndicator : SE_CheckBoxIndicator,-
5614 opt, w);-
5615 ir = visualRect(opt->direction, opt->rect, ir);-
5616 int spacing = pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, 0, w);-
5617 QRect cr = rule.contentsRect(opt->rect);-
5618 ir.setRect(ir.left() + ir.width() + spacing, cr.y(),-
5619 cr.width() - ir.width() - spacing, cr.height());-
5620 return
never executed: return visualRect(opt->direction, opt->rect, ir);
visualRect(opt->direction, opt->rect, ir);
never executed: return visualRect(opt->direction, opt->rect, ir);
0
5621 }-
5622 break;
never executed: break;
0
5623-
5624 case
never executed: case SE_ToolBoxTabContents:
SE_ToolBoxTabContents:
never executed: case SE_ToolBoxTabContents:
0
5625 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& hasStyleRule(w->parentWidget(), PseudoElement_ToolBoxTab)
hasStyleRule(w...nt_ToolBoxTab)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5626 QRenderRule subRule = renderRule(w->parentWidget(), opt, PseudoElement_ToolBoxTab);-
5627 return
never executed: return visualRect(opt->direction, opt->rect, subRule.contentsRect(opt->rect));
visualRect(opt->direction, opt->rect, subRule.contentsRect(opt->rect));
never executed: return visualRect(opt->direction, opt->rect, subRule.contentsRect(opt->rect));
0
5628 }-
5629 break;
never executed: break;
0
5630-
5631 case
never executed: case SE_RadioButtonFocusRect:
SE_RadioButtonFocusRect:
never executed: case SE_RadioButtonFocusRect:
0
5632 case
never executed: case SE_RadioButtonClickRect:
SE_RadioButtonClickRect:
never executed: case SE_RadioButtonClickRect:
0
5633 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasBorder()
rule.hasBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_Indicator)
hasStyleRule(w...ent_Indicator)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5634 return
never executed: return opt->rect;
opt->rect;
never executed: return opt->rect;
0
5635 }-
5636 break;
never executed: break;
0
5637-
5638 case
never executed: case SE_CheckBoxFocusRect:
SE_CheckBoxFocusRect:
never executed: case SE_CheckBoxFocusRect:
0
5639 case
never executed: case SE_CheckBoxClickRect:
SE_CheckBoxClickRect:
never executed: case SE_CheckBoxClickRect:
0
5640 return
never executed: return ParentStyle::subElementRect(se, opt, w);
ParentStyle::subElementRect(se, opt, w);
never executed: return ParentStyle::subElementRect(se, opt, w);
0
5641-
5642-
5643 case
never executed: case SE_ViewItemCheckIndicator:
SE_ViewItemCheckIndicator:
never executed: case SE_ViewItemCheckIndicator:
0
5644 if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)
!qstyleoption_...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5645 return
never executed: return subElementRect(SE_CheckBoxIndicator, opt, w);
subElementRect(SE_CheckBoxIndicator, opt, w);
never executed: return subElementRect(SE_CheckBoxIndicator, opt, w);
0
5646 }-
5647-
5648 case
never executed: case SE_ItemViewItemText:
SE_ItemViewItemText:
never executed: case SE_ItemViewItemText:
code before this statement never executed: case SE_ItemViewItemText:
0
5649 case
never executed: case SE_ItemViewItemDecoration:
SE_ItemViewItemDecoration:
never executed: case SE_ItemViewItemDecoration:
0
5650 case
never executed: case SE_ItemViewItemFocusRect:
SE_ItemViewItemFocusRect:
never executed: case SE_ItemViewItemFocusRect:
0
5651 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5652 QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem);-
5653 PseudoElement pe = PseudoElement_None;-
5654 if (se == SE_ItemViewItemText
se == SE_ItemViewItemTextDescription
TRUEnever evaluated
FALSEnever evaluated
|| se == SE_ItemViewItemFocusRect
se == SE_ItemViewItemFocusRectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5655 pe = PseudoElement_ViewItemText;
never executed: pe = PseudoElement_ViewItemText;
0
5656 else if (se == SE_ItemViewItemDecoration
se == SE_ItemV...ItemDecorationDescription
TRUEnever evaluated
FALSEnever evaluated
&& vopt->features & QStyleOptionViewItem::HasDecoration
vopt->features...:HasDecorationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5657 pe = PseudoElement_ViewItemIcon;
never executed: pe = PseudoElement_ViewItemIcon;
0
5658 else if (se == SE_ItemViewItemCheckIndicator
se == SE_ItemV...CheckIndicatorDescription
TRUEnever evaluated
FALSEnever evaluated
&& vopt->features & QStyleOptionViewItem::HasCheckIndicator
vopt->features...CheckIndicatorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5659 pe = PseudoElement_ViewItemIndicator;
never executed: pe = PseudoElement_ViewItemIndicator;
0
5660 else-
5661 break;
never executed: break;
0
5662 if (subRule.hasGeometry()
subRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, pe)
hasStyleRule(w, pe)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5663 QRenderRule subRule2 = renderRule(w, opt, pe);-
5664 QStyleOptionViewItem optCopy(*vopt);-
5665 optCopy.rect = subRule.contentsRect(vopt->rect);-
5666 QRect rect = ParentStyle::subElementRect(se, &optCopy, w);-
5667 return
never executed: return positionRect(w, subRule2, pe, rect, opt->direction);
positionRect(w, subRule2, pe, rect, opt->direction);
never executed: return positionRect(w, subRule2, pe, rect, opt->direction);
0
5668 }-
5669 }
never executed: end of block
0
5670 break;
never executed: break;
0
5671-
5672-
5673 case
never executed: case SE_HeaderArrow:
SE_HeaderArrow:
never executed: case SE_HeaderArrow:
{
0
5674 QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewUpArrow);-
5675 if (subRule.hasPosition()
subRule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
|| subRule.hasGeometry()
subRule.hasGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5676 return
never executed: return positionRect(w, rule, subRule, PseudoElement_HeaderViewUpArrow, opt->rect, opt->direction);
positionRect(w, rule, subRule, PseudoElement_HeaderViewUpArrow, opt->rect, opt->direction);
never executed: return positionRect(w, rule, subRule, PseudoElement_HeaderViewUpArrow, opt->rect, opt->direction);
0
5677 }-
5678 break;
never executed: break;
0
5679-
5680 case
never executed: case SE_HeaderLabel:
SE_HeaderLabel:
never executed: case SE_HeaderLabel:
{
0
5681 QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);-
5682 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5683 return
never executed: return subRule.contentsRect(opt->rect);
subRule.contentsRect(opt->rect);
never executed: return subRule.contentsRect(opt->rect);
0
5684 }-
5685 break;
never executed: break;
0
5686-
5687 case
never executed: case SE_ProgressBarGroove:
SE_ProgressBarGroove:
never executed: case SE_ProgressBarGroove:
0
5688 case
never executed: case SE_ProgressBarContents:
SE_ProgressBarContents:
never executed: case SE_ProgressBarContents:
0
5689 case
never executed: case SE_ProgressBarLabel:
SE_ProgressBarLabel:
never executed: case SE_ProgressBarLabel:
0
5690 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5691 if (rule.hasBox()
rule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
|| rule.hasPosition()
rule.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
|| hasStyleRule(w, PseudoElement_ProgressBarChunk)
hasStyleRule(w...gressBarChunk)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5692 if (se == SE_ProgressBarGroove
se == SE_ProgressBarGrooveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5693 return
never executed: return rule.borderRect(pb->rect);
rule.borderRect(pb->rect);
never executed: return rule.borderRect(pb->rect);
0
5694 else if (se == SE_ProgressBarContents
se == SE_ProgressBarContentsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5695 return
never executed: return rule.contentsRect(pb->rect);
rule.contentsRect(pb->rect);
never executed: return rule.contentsRect(pb->rect);
0
5696-
5697 QSize sz = pb->fontMetrics.size(0, pb->text);-
5698 return
never executed: return QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment, sz, pb->rect);
QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment,
never executed: return QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment, sz, pb->rect);
0
5699 sz, pb->rect);
never executed: return QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment, sz, pb->rect);
0
5700 }-
5701 }
never executed: end of block
0
5702 break;
never executed: break;
0
5703-
5704-
5705 case
never executed: case SE_TabWidgetLeftCorner:
SE_TabWidgetLeftCorner:
never executed: case SE_TabWidgetLeftCorner:
0
5706 pe = PseudoElement_TabWidgetLeftCorner;-
5707-
5708 case
never executed: case SE_TabWidgetRightCorner:
SE_TabWidgetRightCorner:
never executed: case SE_TabWidgetRightCorner:
code before this statement never executed: case SE_TabWidgetRightCorner:
0
5709 if (pe == PseudoElement_None
pe == PseudoElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5710 pe = PseudoElement_TabWidgetRightCorner;
never executed: pe = PseudoElement_TabWidgetRightCorner;
0
5711-
5712 case
never executed: case SE_TabWidgetTabBar:
SE_TabWidgetTabBar:
never executed: case SE_TabWidgetTabBar:
code before this statement never executed: case SE_TabWidgetTabBar:
0
5713 if (pe == PseudoElement_None
pe == PseudoElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5714 pe = PseudoElement_TabWidgetTabBar;
never executed: pe = PseudoElement_TabWidgetTabBar;
0
5715-
5716 case
never executed: case SE_TabWidgetTabPane:
SE_TabWidgetTabPane:
never executed: case SE_TabWidgetTabPane:
code before this statement never executed: case SE_TabWidgetTabPane:
0
5717 case
never executed: case SE_TabWidgetTabContents:
SE_TabWidgetTabContents:
never executed: case SE_TabWidgetTabContents:
0
5718 if (pe == PseudoElement_None
pe == PseudoElement_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5719 pe = PseudoElement_TabWidgetPane;
never executed: pe = PseudoElement_TabWidgetPane;
0
5720-
5721 if (hasStyleRule(w, pe)
hasStyleRule(w, pe)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5722 QRect r = QWindowsStyle::subElementRect(pe == PseudoElement_TabWidgetPane ? SE_TabWidgetTabPane : se, opt, w);-
5723 QRenderRule subRule = renderRule(w, opt, pe);-
5724 r = positionRect(w, subRule, pe, r, opt->direction);-
5725 if (pe == PseudoElement_TabWidgetTabBar
pe == PseudoEl...abWidgetTabBarDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5726 ((!(opt)) ? qt_assert("opt",__FILE__,5823) : qt_noop());-
5727 r = opt->rect.intersected(r);-
5728 }
never executed: end of block
0
5729 if (se == SE_TabWidgetTabContents
se == SE_TabWidgetTabContentsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5730 r = subRule.contentsRect(r);
never executed: r = subRule.contentsRect(r);
0
5731 return
never executed: return r;
r;
never executed: return r;
0
5732 }-
5733 break;
never executed: break;
0
5734-
5735 case
never executed: case SE_TabBarTearIndicator:
SE_TabBarTearIndicator:
never executed: case SE_TabBarTearIndicator:
{
0
5736 QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTear);-
5737 if (subRule.hasContentsSize()
subRule.hasContentsSize()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5738 QRect r;-
5739 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5740 switch (tab->shape) {-
5741 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
5742 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
5743 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
5744 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
5745 r.setRect(tab->rect.left(), tab->rect.top(), subRule.size().width(), opt->rect.height());-
5746 break;
never executed: break;
0
5747 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
5748 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
5749 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
5750 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
5751 r.setRect(tab->rect.left(), tab->rect.top(), opt->rect.width(), subRule.size().height());-
5752 break;
never executed: break;
0
5753 default
never executed: default:
:
never executed: default:
0
5754 break;
never executed: break;
0
5755 }-
5756 r = visualRect(opt->direction, opt->rect, r);-
5757 }
never executed: end of block
0
5758 return
never executed: return r;
r;
never executed: return r;
0
5759 }-
5760 break;
never executed: break;
0
5761 }-
5762 case
never executed: case SE_TabBarTabText:
SE_TabBarTabText:
never executed: case SE_TabBarTabText:
0
5763 case
never executed: case SE_TabBarTabLeftButton:
SE_TabBarTabLeftButton:
never executed: case SE_TabBarTabLeftButton:
0
5764 case
never executed: case SE_TabBarTabRightButton:
SE_TabBarTabRightButton:
never executed: case SE_TabBarTabRightButton:
{
0
5765 QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);-
5766 if (subRule.hasBox()
subRule.hasBox()Description
TRUEnever evaluated
FALSEnever evaluated
|| !subRule.hasNativeBorder()
!subRule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5767 return
never executed: return ParentStyle::subElementRect(se, opt, w);
ParentStyle::subElementRect(se, opt, w);
never executed: return ParentStyle::subElementRect(se, opt, w);
0
5768 }-
5769 break;
never executed: break;
0
5770 }-
5771-
5772-
5773 case
never executed: case SE_DockWidgetCloseButton:
SE_DockWidgetCloseButton:
never executed: case SE_DockWidgetCloseButton:
0
5774 case
never executed: case SE_DockWidgetFloatButton:
SE_DockWidgetFloatButton:
never executed: case SE_DockWidgetFloatButton:
{
0
5775 PseudoElement pe = (
(se == SE_Dock...etCloseButton)Description
TRUEnever evaluated
FALSEnever evaluated
se == SE_DockWidgetCloseButton)
(se == SE_Dock...etCloseButton)Description
TRUEnever evaluated
FALSEnever evaluated
? PseudoElement_DockWidgetCloseButton : PseudoElement_DockWidgetFloatButton;
0
5776 QRenderRule subRule2 = renderRule(w, opt, pe);-
5777 if (!subRule2.hasPosition()
!subRule2.hasPosition()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5778 break;
never executed: break;
0
5779 QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetTitle);-
5780 return
never executed: return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);
positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);
never executed: return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);
0
5781 }-
5782-
5783-
5784 case
never executed: case SE_ToolBarHandle:
SE_ToolBarHandle:
never executed: case SE_ToolBarHandle:
0
5785 if (hasStyleRule(w, PseudoElement_ToolBarHandle)
hasStyleRule(w...ToolBarHandle)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5786 return
never executed: return ParentStyle::subElementRect(se, opt, w);
ParentStyle::subElementRect(se, opt, w);
never executed: return ParentStyle::subElementRect(se, opt, w);
0
5787 break;
never executed: break;
0
5788-
5789-
5790-
5791-
5792 case
never executed: case SE_CheckBoxLayoutItem:
SE_CheckBoxLayoutItem:
never executed: case SE_CheckBoxLayoutItem:
0
5793 case
never executed: case SE_ComboBoxLayoutItem:
SE_ComboBoxLayoutItem:
never executed: case SE_ComboBoxLayoutItem:
0
5794 case
never executed: case SE_DateTimeEditLayoutItem:
SE_DateTimeEditLayoutItem:
never executed: case SE_DateTimeEditLayoutItem:
0
5795 case
never executed: case SE_LabelLayoutItem:
SE_LabelLayoutItem:
never executed: case SE_LabelLayoutItem:
0
5796 case
never executed: case SE_ProgressBarLayoutItem:
SE_ProgressBarLayoutItem:
never executed: case SE_ProgressBarLayoutItem:
0
5797 case
never executed: case SE_PushButtonLayoutItem:
SE_PushButtonLayoutItem:
never executed: case SE_PushButtonLayoutItem:
0
5798 case
never executed: case SE_RadioButtonLayoutItem:
SE_RadioButtonLayoutItem:
never executed: case SE_RadioButtonLayoutItem:
0
5799 case
never executed: case SE_SliderLayoutItem:
SE_SliderLayoutItem:
never executed: case SE_SliderLayoutItem:
0
5800 case
never executed: case SE_SpinBoxLayoutItem:
SE_SpinBoxLayoutItem:
never executed: case SE_SpinBoxLayoutItem:
0
5801 case
never executed: case SE_ToolButtonLayoutItem:
SE_ToolButtonLayoutItem:
never executed: case SE_ToolButtonLayoutItem:
0
5802 case
never executed: case SE_FrameLayoutItem:
SE_FrameLayoutItem:
never executed: case SE_FrameLayoutItem:
0
5803 case
never executed: case SE_GroupBoxLayoutItem:
SE_GroupBoxLayoutItem:
never executed: case SE_GroupBoxLayoutItem:
0
5804 case
never executed: case SE_TabWidgetLayoutItem:
SE_TabWidgetLayoutItem:
never executed: case SE_TabWidgetLayoutItem:
0
5805 if (!rule.hasNativeBorder()
!rule.hasNativeBorder()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5806 return
never executed: return opt->rect;
opt->rect;
never executed: return opt->rect;
0
5807 break;
never executed: break;
0
5808-
5809 default
never executed: default:
:
never executed: default:
0
5810 break;
never executed: break;
0
5811 }-
5812-
5813 return
never executed: return baseStyle()->subElementRect(se, opt, w);
baseStyle()->subElementRect(se, opt, w);
never executed: return baseStyle()->subElementRect(se, opt, w);
0
5814}-
5815-
5816bool QStyleSheetStyle::event(QEvent *e)-
5817{-
5818 return
never executed: return (baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e);
(baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e);
never executed: return (baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e);
0
5819}-
5820-
5821void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const-
5822{-
5823-
5824-
5825 if (w->objectName() == QLatin1String("qt_fontDialog_sampleEdit")
w->objectName(...g_sampleEdit")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5826 return;
never executed: return;
0
5827-
5828 QWidget *container = containerWidget(w);-
5829 QRenderRule rule = renderRule(container, PseudoElement_None,-
5830 PseudoClass_Active | PseudoClass_Enabled | extendedPseudoClass(container));-
5831-
5832 const bool useStyleSheetPropagationInWidgetStyles =-
5833 QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles);-
5834-
5835 if (useStyleSheetPropagationInWidgetStyles
useStyleSheetP...InWidgetStylesDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5836 unsetStyleSheetFont(w);-
5837-
5838 if (rule.font.resolve()
rule.font.resolve()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5839 QFont wf = w->font();-
5840 styleSheetCaches->customFontWidgets.insert(w, qMakePair(wf, rule.font.resolve()));-
5841-
5842 QFont font = rule.font.resolve(wf);-
5843 font.resolve(wf.resolve() | rule.font.resolve());-
5844 w->setFont(font);-
5845 }
never executed: end of block
0
5846 }
never executed: end of block
else {
0
5847 QFont font = rule.font.resolve(w->font());-
5848-
5849 if ((!w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_WindowPropagation)
w->testAttribu...owPropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5850 && isNaturalChild(w)
isNaturalChild(w)Description
TRUEnever evaluated
FALSEnever evaluated
&& qobject_cast<QWidget *>(w->parent())
qobject_cast<Q...>(w->parent())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5851-
5852 font = font.resolve(static_cast<QWidget *>(w->parent())->font());-
5853 }
never executed: end of block
0
5854-
5855 if (w->data->fnt == font
w->data->fnt == fontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5856 return;
never executed: return;
0
5857-
5858 w->data->fnt = font;-
5859-
5860 QEvent e(QEvent::FontChange);-
5861 QApplication::sendEvent(w, &e);-
5862 }
never executed: end of block
0
5863}-
5864-
5865void QStyleSheetStyle::saveWidgetFont(QWidget* w, const QFont& font) const-
5866{-
5867 w->setProperty("_q_styleSheetWidgetFont", font);-
5868}
never executed: end of block
0
5869-
5870void QStyleSheetStyle::clearWidgetFont(QWidget* w) const-
5871{-
5872 w->setProperty("_q_styleSheetWidgetFont", QVariant(QVariant::Invalid));-
5873}
never executed: end of block
0
5874-
5875-
5876-
5877-
5878-
5879bool QStyleSheetStyle::styleSheetPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal)-
5880{-
5881 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
|| !opt
!optDescription
TRUEnever evaluated
FALSEnever evaluated
|| !pal
!palDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5882 return
never executed: return false;
false;
never executed: return false;
0
5883-
5884 if (globalStyleSheetStyle != 0
globalStyleSheetStyle != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalStyleSheetStyle != this
globalStyleSheetStyle != thisDescription
TRUEnever evaluated
FALSEnever evaluated
) { return
never executed: return false;
false;
never executed: return false;
} QStyleSheetStyleRecursionGuard recursion_guard(this);
0
5885-
5886 w = containerWidget(w);-
5887-
5888 QRenderRule rule = renderRule(w, PseudoElement_None, pseudoClass(opt->state) | extendedPseudoClass(w));-
5889 if (!rule.hasPalette()
!rule.hasPalette()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5890 return
never executed: return false;
false;
never executed: return false;
0
5891-
5892 rule.configurePalette(pal, QPalette::NoRole, QPalette::NoRole);-
5893 return
never executed: return true;
true;
never executed: return true;
0
5894}-
5895-
5896Qt::Alignment QStyleSheetStyle::resolveAlignment(Qt::LayoutDirection layDir, Qt::Alignment src)-
5897{-
5898 if (layDir == Qt::LeftToRight
layDir == Qt::LeftToRightDescription
TRUEnever evaluated
FALSEnever evaluated
|| src & Qt::AlignAbsolute
src & Qt::AlignAbsoluteDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5899 return
never executed: return src;
src;
never executed: return src;
0
5900-
5901 if (src & Qt::AlignLeft
src & Qt::AlignLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5902 src &= ~Qt::AlignLeft;-
5903 src |= Qt::AlignRight;-
5904 }
never executed: end of block
else if (src & Qt::AlignRight
src & Qt::AlignRightDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5905 src &= ~Qt::AlignRight;-
5906 src |= Qt::AlignLeft;-
5907 }
never executed: end of block
0
5908 src |= Qt::AlignAbsolute;-
5909 return
never executed: return src;
src;
never executed: return src;
0
5910}-
5911-
5912-
5913-
5914-
5915-
5916-
5917-
5918bool QStyleSheetStyle::isNaturalChild(const QObject *obj)-
5919{-
5920 if (obj->objectName().startsWith(QLatin1String("qt_"))
obj->objectNam...String("qt_"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5921 return
never executed: return true;
true;
never executed: return true;
0
5922-
5923 return
never executed: return false;
false;
never executed: return false;
0
5924}-
5925-
5926-
5927-
Switch to Source codePreprocessed file

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