Line | Source Code | Coverage |
---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). | - |
4 | ** Contact: http://www.qt-project.org/legal | - |
5 | ** | - |
6 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
7 | ** | - |
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
9 | ** Commercial License Usage | - |
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
11 | ** accordance with the commercial license agreement provided with the | - |
12 | ** Software or, alternatively, in accordance with the terms contained in | - |
13 | ** a written agreement between you and Digia. For licensing terms and | - |
14 | ** conditions see http://qt.digia.com/licensing. For further information | - |
15 | ** use the contact form at http://qt.digia.com/contact-us. | - |
16 | ** | - |
17 | ** GNU Lesser General Public License Usage | - |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
19 | ** General Public License version 2.1 as published by the Free Software | - |
20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | - |
21 | ** packaging of this file. Please review the following information to | - |
22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | - |
23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
24 | ** | - |
25 | ** In addition, as a special exception, Digia gives you certain additional | - |
26 | ** rights. These rights are described in the Digia Qt LGPL Exception | - |
27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
28 | ** | - |
29 | ** GNU General Public License Usage | - |
30 | ** Alternatively, this file may be used under the terms of the GNU | - |
31 | ** General Public License version 3.0 as published by the Free Software | - |
32 | ** Foundation and appearing in the file LICENSE.GPL included in the | - |
33 | ** packaging of this file. Please review the following information to | - |
34 | ** ensure the GNU General Public License version 3.0 requirements will be | - |
35 | ** met: http://www.gnu.org/copyleft/gpl.html. | - |
36 | ** | - |
37 | ** | - |
38 | ** $QT_END_LICENSE$ | - |
39 | ** | - |
40 | ****************************************************************************/ | - |
41 | | - |
42 | #include "qcommonstyle.h" | - |
43 | #include "qcommonstyle_p.h" | - |
44 | | - |
45 | #include <qfile.h> | - |
46 | #include <qapplication.h> | - |
47 | #include <private/qguiapplication_p.h> | - |
48 | #include <qpa/qplatformtheme.h> | - |
49 | #include <qbitmap.h> | - |
50 | #include <qcache.h> | - |
51 | #include <qdockwidget.h> | - |
52 | #include <qdrawutil.h> | - |
53 | #include <qdialogbuttonbox.h> | - |
54 | #include <qformlayout.h> | - |
55 | #include <qgroupbox.h> | - |
56 | #include <qmath.h> | - |
57 | #include <qmenu.h> | - |
58 | #include <qpainter.h> | - |
59 | #include <qpaintengine.h> | - |
60 | #include <qpainterpath.h> | - |
61 | #include <qslider.h> | - |
62 | #include <qstyleoption.h> | - |
63 | #include <qtabbar.h> | - |
64 | #include <qtabwidget.h> | - |
65 | #include <qtoolbar.h> | - |
66 | #include <qtoolbutton.h> | - |
67 | #include <qrubberband.h> | - |
68 | #include <private/qcommonstylepixmaps_p.h> | - |
69 | #include <private/qmath_p.h> | - |
70 | #include <qdebug.h> | - |
71 | #include <qtextformat.h> | - |
72 | #include <qwizard.h> | - |
73 | #include <qfileinfo.h> | - |
74 | #include <qdir.h> | - |
75 | #include <qsettings.h> | - |
76 | #include <qvariant.h> | - |
77 | #include <qpixmapcache.h> | - |
78 | #include <private/qstyleanimation_p.h> | - |
79 | | - |
80 | #include <limits.h> | - |
81 | | - |
82 | #ifndef QT_NO_ITEMVIEWS | - |
83 | # include "private/qtextengine_p.h" | - |
84 | #endif | - |
85 | | - |
86 | #include <private/qstylehelper_p.h> | - |
87 | | - |
88 | QT_BEGIN_NAMESPACE | - |
89 | | - |
90 | /*! | - |
91 | \class QCommonStyle | - |
92 | \brief The QCommonStyle class encapsulates the common Look and Feel of a GUI. | - |
93 | | - |
94 | \ingroup appearance | - |
95 | \inmodule QtWidgets | - |
96 | | - |
97 | This abstract class implements some of the widget's look and feel | - |
98 | that is common to all GUI styles provided and shipped as part of | - |
99 | Qt. | - |
100 | | - |
101 | Since QCommonStyle inherits QStyle, all of its functions are fully documented | - |
102 | in the QStyle documentation. | - |
103 | \omit | - |
104 | , although the | - |
105 | extra functions that QCommonStyle provides, e.g. | - |
106 | drawComplexControl(), drawControl(), drawPrimitive(), | - |
107 | hitTestComplexControl(), subControlRect(), sizeFromContents(), and | - |
108 | subElementRect() are documented here. | - |
109 | \endomit | - |
110 | | - |
111 | \sa QStyle, QProxyStyle | - |
112 | */ | - |
113 | | - |
114 | /*! | - |
115 | Constructs a QCommonStyle. | - |
116 | */ | - |
117 | QCommonStyle::QCommonStyle() | - |
118 | : QStyle(*new QCommonStylePrivate) | - |
119 | { } executed: } Execution Count:4 | 4 |
120 | | - |
121 | /*! \internal | - |
122 | */ | - |
123 | QCommonStyle::QCommonStyle(QCommonStylePrivate &dd) | - |
124 | : QStyle(dd) | - |
125 | { } executed: } Execution Count:1160 | 1160 |
126 | | - |
127 | /*! | - |
128 | Destroys the style. | - |
129 | */ | - |
130 | QCommonStyle::~QCommonStyle() | - |
131 | { } | - |
132 | | - |
133 | | - |
134 | /*! | - |
135 | \reimp | - |
136 | */ | - |
137 | void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, | - |
138 | const QWidget *widget) const | - |
139 | { | - |
140 | Q_D(const QCommonStyle); executed (the execution status of this line is deduced): const QCommonStylePrivate * const d = d_func(); | - |
141 | switch (pe) { | - |
142 | case PE_FrameButtonBevel: | - |
143 | case PE_FrameButtonTool: | - |
144 | qDrawShadeRect(p, opt->rect, opt->palette, never executed (the execution status of this line is deduced): qDrawShadeRect(p, opt->rect, opt->palette, | - |
145 | opt->state & (State_Sunken | State_On), 1, 0); never executed (the execution status of this line is deduced): opt->state & (State_Sunken | State_On), 1, 0); | - |
146 | break; | 0 |
147 | case PE_PanelButtonCommand: | - |
148 | case PE_PanelButtonBevel: | - |
149 | case PE_PanelButtonTool: | - |
150 | case PE_IndicatorButtonDropDown: | - |
151 | qDrawShadePanel(p, opt->rect, opt->palette, executed (the execution status of this line is deduced): qDrawShadePanel(p, opt->rect, opt->palette, | - |
152 | opt->state & (State_Sunken | State_On), 1, executed (the execution status of this line is deduced): opt->state & (State_Sunken | State_On), 1, | - |
153 | &opt->palette.brush(QPalette::Button)); executed (the execution status of this line is deduced): &opt->palette.brush(QPalette::Button)); | - |
154 | break; executed: break; Execution Count:1 | 1 |
155 | case PE_IndicatorViewItemCheck: | - |
156 | proxy()->drawPrimitive(PE_IndicatorCheckBox, opt, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorCheckBox, opt, p, widget); | - |
157 | break; | 0 |
158 | case PE_IndicatorCheckBox: | - |
159 | if (opt->state & State_NoChange) { never evaluated: opt->state & State_NoChange | 0 |
160 | p->setPen(opt->palette.foreground().color()); never executed (the execution status of this line is deduced): p->setPen(opt->palette.foreground().color()); | - |
161 | p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); never executed (the execution status of this line is deduced): p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); | - |
162 | p->drawRect(opt->rect); never executed (the execution status of this line is deduced): p->drawRect(opt->rect); | - |
163 | p->drawLine(opt->rect.topLeft(), opt->rect.bottomRight()); never executed (the execution status of this line is deduced): p->drawLine(opt->rect.topLeft(), opt->rect.bottomRight()); | - |
164 | } else { | 0 |
165 | qDrawShadePanel(p, opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height(), never executed (the execution status of this line is deduced): qDrawShadePanel(p, opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height(), | - |
166 | opt->palette, opt->state & (State_Sunken | State_On), 1, never executed (the execution status of this line is deduced): opt->palette, opt->state & (State_Sunken | State_On), 1, | - |
167 | &opt->palette.brush(QPalette::Button)); never executed (the execution status of this line is deduced): &opt->palette.brush(QPalette::Button)); | - |
168 | } | 0 |
169 | break; | 0 |
170 | case PE_IndicatorRadioButton: { | - |
171 | QRect ir = opt->rect; never executed (the execution status of this line is deduced): QRect ir = opt->rect; | - |
172 | p->setPen(opt->palette.dark().color()); never executed (the execution status of this line is deduced): p->setPen(opt->palette.dark().color()); | - |
173 | p->drawArc(opt->rect, 0, 5760); never executed (the execution status of this line is deduced): p->drawArc(opt->rect, 0, 5760); | - |
174 | if (opt->state & (State_Sunken | State_On)) { never evaluated: opt->state & (State_Sunken | State_On) | 0 |
175 | ir.adjust(2, 2, -2, -2); never executed (the execution status of this line is deduced): ir.adjust(2, 2, -2, -2); | - |
176 | p->setBrush(opt->palette.foreground()); never executed (the execution status of this line is deduced): p->setBrush(opt->palette.foreground()); | - |
177 | bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); never executed (the execution status of this line is deduced): bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); | - |
178 | p->setRenderHint(QPainter::Qt4CompatiblePainting); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting); | - |
179 | p->drawEllipse(ir); never executed (the execution status of this line is deduced): p->drawEllipse(ir); | - |
180 | p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); | - |
181 | } | 0 |
182 | break; } | 0 |
183 | case PE_FrameFocusRect: | - |
184 | if (const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt)) { never evaluated: const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt) | 0 |
185 | QColor bg = fropt->backgroundColor; never executed (the execution status of this line is deduced): QColor bg = fropt->backgroundColor; | - |
186 | QPen oldPen = p->pen(); never executed (the execution status of this line is deduced): QPen oldPen = p->pen(); | - |
187 | if (bg.isValid()) { never evaluated: bg.isValid() | 0 |
188 | int h, s, v; never executed (the execution status of this line is deduced): int h, s, v; | - |
189 | bg.getHsv(&h, &s, &v); never executed (the execution status of this line is deduced): bg.getHsv(&h, &s, &v); | - |
190 | if (v >= 128) never evaluated: v >= 128 | 0 |
191 | p->setPen(Qt::black); never executed: p->setPen(Qt::black); | 0 |
192 | else | - |
193 | p->setPen(Qt::white); never executed: p->setPen(Qt::white); | 0 |
194 | } else { | - |
195 | p->setPen(opt->palette.foreground().color()); never executed (the execution status of this line is deduced): p->setPen(opt->palette.foreground().color()); | - |
196 | } | 0 |
197 | QRect focusRect = opt->rect.adjusted(1, 1, -1, -1); never executed (the execution status of this line is deduced): QRect focusRect = opt->rect.adjusted(1, 1, -1, -1); | - |
198 | p->drawRect(focusRect.adjusted(0, 0, -1, -1)); //draw pen inclusive never executed (the execution status of this line is deduced): p->drawRect(focusRect.adjusted(0, 0, -1, -1)); | - |
199 | p->setPen(oldPen); never executed (the execution status of this line is deduced): p->setPen(oldPen); | - |
200 | } | 0 |
201 | break; | 0 |
202 | case PE_IndicatorMenuCheckMark: { | - |
203 | const int markW = opt->rect.width() > 7 ? 7 : opt->rect.width(); never evaluated: opt->rect.width() > 7 | 0 |
204 | const int markH = markW; never executed (the execution status of this line is deduced): const int markH = markW; | - |
205 | int posX = opt->rect.x() + (opt->rect.width() - markW)/2 + 1; never executed (the execution status of this line is deduced): int posX = opt->rect.x() + (opt->rect.width() - markW)/2 + 1; | - |
206 | int posY = opt->rect.y() + (opt->rect.height() - markH)/2; never executed (the execution status of this line is deduced): int posY = opt->rect.y() + (opt->rect.height() - markH)/2; | - |
207 | | - |
208 | QVector<QLineF> a; never executed (the execution status of this line is deduced): QVector<QLineF> a; | - |
209 | a.reserve(markH); never executed (the execution status of this line is deduced): a.reserve(markH); | - |
210 | | - |
211 | int i, xx, yy; never executed (the execution status of this line is deduced): int i, xx, yy; | - |
212 | xx = posX; never executed (the execution status of this line is deduced): xx = posX; | - |
213 | yy = 3 + posY; never executed (the execution status of this line is deduced): yy = 3 + posY; | - |
214 | for (i = 0; i < markW/2; ++i) { never evaluated: i < markW/2 | 0 |
215 | a << QLineF(xx, yy, xx, yy + 2); never executed (the execution status of this line is deduced): a << QLineF(xx, yy, xx, yy + 2); | - |
216 | ++xx; never executed (the execution status of this line is deduced): ++xx; | - |
217 | ++yy; never executed (the execution status of this line is deduced): ++yy; | - |
218 | } | 0 |
219 | yy -= 2; never executed (the execution status of this line is deduced): yy -= 2; | - |
220 | for (; i < markH; ++i) { never evaluated: i < markH | 0 |
221 | a << QLineF(xx, yy, xx, yy + 2); never executed (the execution status of this line is deduced): a << QLineF(xx, yy, xx, yy + 2); | - |
222 | ++xx; never executed (the execution status of this line is deduced): ++xx; | - |
223 | --yy; never executed (the execution status of this line is deduced): --yy; | - |
224 | } | 0 |
225 | if (!(opt->state & State_Enabled) && !(opt->state & State_On)) { never evaluated: !(opt->state & State_Enabled) never evaluated: !(opt->state & State_On) | 0 |
226 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
227 | p->translate(1, 1); never executed (the execution status of this line is deduced): p->translate(1, 1); | - |
228 | p->setPen(opt->palette.light().color()); never executed (the execution status of this line is deduced): p->setPen(opt->palette.light().color()); | - |
229 | p->drawLines(a); never executed (the execution status of this line is deduced): p->drawLines(a); | - |
230 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
231 | } | 0 |
232 | p->setPen((opt->state & State_On) ? opt->palette.highlightedText().color() : opt->palette.text().color()); never executed (the execution status of this line is deduced): p->setPen((opt->state & State_On) ? opt->palette.highlightedText().color() : opt->palette.text().color()); | - |
233 | p->drawLines(a); never executed (the execution status of this line is deduced): p->drawLines(a); | - |
234 | break; } | 0 |
235 | case PE_Frame: | - |
236 | case PE_FrameMenu: | - |
237 | if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { never evaluated: const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt) | 0 |
238 | if (pe == PE_FrameMenu || (frame->state & State_Sunken) || (frame->state & State_Raised)) { never evaluated: pe == PE_FrameMenu never evaluated: (frame->state & State_Sunken) never evaluated: (frame->state & State_Raised) | 0 |
239 | qDrawShadePanel(p, frame->rect, frame->palette, frame->state & State_Sunken, never executed (the execution status of this line is deduced): qDrawShadePanel(p, frame->rect, frame->palette, frame->state & State_Sunken, | - |
240 | frame->lineWidth); never executed (the execution status of this line is deduced): frame->lineWidth); | - |
241 | } else { | 0 |
242 | qDrawPlainRect(p, frame->rect, frame->palette.foreground().color(), frame->lineWidth); never executed (the execution status of this line is deduced): qDrawPlainRect(p, frame->rect, frame->palette.foreground().color(), frame->lineWidth); | - |
243 | } | 0 |
244 | } | - |
245 | break; | 0 |
246 | #ifndef QT_NO_TOOLBAR | - |
247 | case PE_PanelMenuBar: | - |
248 | if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) never evaluated: widget never evaluated: qobject_cast<QToolBar *>(widget->parentWidget()) | 0 |
249 | break; | 0 |
250 | if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)){ never evaluated: const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt) | 0 |
251 | qDrawShadePanel(p, frame->rect, frame->palette, false, frame->lineWidth, never executed (the execution status of this line is deduced): qDrawShadePanel(p, frame->rect, frame->palette, false, frame->lineWidth, | - |
252 | &frame->palette.brush(QPalette::Button)); never executed (the execution status of this line is deduced): &frame->palette.brush(QPalette::Button)); | - |
253 | | - |
254 | } | 0 |
255 | else if (const QStyleOptionToolBar *frame = qstyleoption_cast<const QStyleOptionToolBar *>(opt)){ never evaluated: const QStyleOptionToolBar *frame = qstyleoption_cast<const QStyleOptionToolBar *>(opt) | 0 |
256 | qDrawShadePanel(p, frame->rect, frame->palette, false, frame->lineWidth, never executed (the execution status of this line is deduced): qDrawShadePanel(p, frame->rect, frame->palette, false, frame->lineWidth, | - |
257 | &frame->palette.brush(QPalette::Button)); never executed (the execution status of this line is deduced): &frame->palette.brush(QPalette::Button)); | - |
258 | } | 0 |
259 | | - |
260 | break; | 0 |
261 | case PE_PanelMenu: | - |
262 | break; executed: break; Execution Count:39 | 39 |
263 | case PE_PanelToolBar: | - |
264 | break; | 0 |
265 | #endif // QT_NO_TOOLBAR | - |
266 | #ifndef QT_NO_PROGRESSBAR | - |
267 | case PE_IndicatorProgressChunk: | - |
268 | { | - |
269 | bool vertical = false; never executed (the execution status of this line is deduced): bool vertical = false; | - |
270 | if (const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt)) never evaluated: const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt) | 0 |
271 | vertical = (pb2->orientation == Qt::Vertical); never executed: vertical = (pb2->orientation == Qt::Vertical); | 0 |
272 | if (!vertical) { never evaluated: !vertical | 0 |
273 | p->fillRect(opt->rect.x(), opt->rect.y() + 3, opt->rect.width() -2, opt->rect.height() - 6, never executed (the execution status of this line is deduced): p->fillRect(opt->rect.x(), opt->rect.y() + 3, opt->rect.width() -2, opt->rect.height() - 6, | - |
274 | opt->palette.brush(QPalette::Highlight)); never executed (the execution status of this line is deduced): opt->palette.brush(QPalette::Highlight)); | - |
275 | } else { | 0 |
276 | p->fillRect(opt->rect.x() + 2, opt->rect.y(), opt->rect.width() -6, opt->rect.height() - 2, never executed (the execution status of this line is deduced): p->fillRect(opt->rect.x() + 2, opt->rect.y(), opt->rect.width() -6, opt->rect.height() - 2, | - |
277 | opt->palette.brush(QPalette::Highlight)); never executed (the execution status of this line is deduced): opt->palette.brush(QPalette::Highlight)); | - |
278 | } | 0 |
279 | } | - |
280 | break; | 0 |
281 | #endif // QT_NO_PROGRESSBAR | - |
282 | case PE_IndicatorBranch: { | - |
283 | static const int decoration_size = 9; | - |
284 | int mid_h = opt->rect.x() + opt->rect.width() / 2; executed (the execution status of this line is deduced): int mid_h = opt->rect.x() + opt->rect.width() / 2; | - |
285 | int mid_v = opt->rect.y() + opt->rect.height() / 2; executed (the execution status of this line is deduced): int mid_v = opt->rect.y() + opt->rect.height() / 2; | - |
286 | int bef_h = mid_h; executed (the execution status of this line is deduced): int bef_h = mid_h; | - |
287 | int bef_v = mid_v; executed (the execution status of this line is deduced): int bef_v = mid_v; | - |
288 | int aft_h = mid_h; executed (the execution status of this line is deduced): int aft_h = mid_h; | - |
289 | int aft_v = mid_v; executed (the execution status of this line is deduced): int aft_v = mid_v; | - |
290 | if (opt->state & State_Children) { evaluated: opt->state & State_Children yes Evaluation Count:831 | yes Evaluation Count:2033 |
| 831-2033 |
291 | int delta = decoration_size / 2; executed (the execution status of this line is deduced): int delta = decoration_size / 2; | - |
292 | bef_h -= delta; executed (the execution status of this line is deduced): bef_h -= delta; | - |
293 | bef_v -= delta; executed (the execution status of this line is deduced): bef_v -= delta; | - |
294 | aft_h += delta; executed (the execution status of this line is deduced): aft_h += delta; | - |
295 | aft_v += delta; executed (the execution status of this line is deduced): aft_v += delta; | - |
296 | p->drawLine(bef_h + 2, bef_v + 4, bef_h + 6, bef_v + 4); executed (the execution status of this line is deduced): p->drawLine(bef_h + 2, bef_v + 4, bef_h + 6, bef_v + 4); | - |
297 | if (!(opt->state & State_Open)) evaluated: !(opt->state & State_Open) yes Evaluation Count:750 | yes Evaluation Count:81 |
| 81-750 |
298 | p->drawLine(bef_h + 4, bef_v + 2, bef_h + 4, bef_v + 6); executed: p->drawLine(bef_h + 4, bef_v + 2, bef_h + 4, bef_v + 6); Execution Count:750 | 750 |
299 | QPen oldPen = p->pen(); executed (the execution status of this line is deduced): QPen oldPen = p->pen(); | - |
300 | p->setPen(opt->palette.dark().color()); executed (the execution status of this line is deduced): p->setPen(opt->palette.dark().color()); | - |
301 | p->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1); executed (the execution status of this line is deduced): p->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1); | - |
302 | p->setPen(oldPen); executed (the execution status of this line is deduced): p->setPen(oldPen); | - |
303 | } executed: } Execution Count:831 | 831 |
304 | QBrush brush(opt->palette.dark().color(), Qt::Dense4Pattern); executed (the execution status of this line is deduced): QBrush brush(opt->palette.dark().color(), Qt::Dense4Pattern); | - |
305 | if (opt->state & State_Item) { evaluated: opt->state & State_Item yes Evaluation Count:1878 | yes Evaluation Count:986 |
| 986-1878 |
306 | if (opt->direction == Qt::RightToLeft) evaluated: opt->direction == Qt::RightToLeft yes Evaluation Count:7 | yes Evaluation Count:1871 |
| 7-1871 |
307 | p->fillRect(opt->rect.left(), mid_v, bef_h - opt->rect.left(), 1, brush); executed: p->fillRect(opt->rect.left(), mid_v, bef_h - opt->rect.left(), 1, brush); Execution Count:7 | 7 |
308 | else | - |
309 | p->fillRect(aft_h, mid_v, opt->rect.right() - aft_h + 1, 1, brush); executed: p->fillRect(aft_h, mid_v, opt->rect.right() - aft_h + 1, 1, brush); Execution Count:1871 | 1871 |
310 | } | - |
311 | if (opt->state & State_Sibling) evaluated: opt->state & State_Sibling yes Evaluation Count:2310 | yes Evaluation Count:554 |
| 554-2310 |
312 | p->fillRect(mid_h, aft_v, 1, opt->rect.bottom() - aft_v + 1, brush); executed: p->fillRect(mid_h, aft_v, 1, opt->rect.bottom() - aft_v + 1, brush); Execution Count:2310 | 2310 |
313 | if (opt->state & (State_Open | State_Children | State_Item | State_Sibling)) evaluated: opt->state & (State_Open | State_Children | State_Item | State_Sibling) yes Evaluation Count:2517 | yes Evaluation Count:347 |
| 347-2517 |
314 | p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush); executed: p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush); Execution Count:2517 | 2517 |
315 | break; } executed: break; Execution Count:2864 | 2864 |
316 | case PE_FrameStatusBarItem: | - |
317 | qDrawShadeRect(p, opt->rect, opt->palette, true, 1, 0, 0); never executed (the execution status of this line is deduced): qDrawShadeRect(p, opt->rect, opt->palette, true, 1, 0, 0); | - |
318 | break; | 0 |
319 | case PE_IndicatorHeaderArrow: | - |
320 | if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) { partially evaluated: const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt) yes Evaluation Count:40 | no Evaluation Count:0 |
| 0-40 |
321 | QPen oldPen = p->pen(); executed (the execution status of this line is deduced): QPen oldPen = p->pen(); | - |
322 | if (header->sortIndicator & QStyleOptionHeader::SortUp) { evaluated: header->sortIndicator & QStyleOptionHeader::SortUp yes Evaluation Count:35 | yes Evaluation Count:5 |
| 5-35 |
323 | QPolygon pa(3); executed (the execution status of this line is deduced): QPolygon pa(3); | - |
324 | p->setPen(QPen(opt->palette.light(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light(), 0)); | - |
325 | p->drawLine(opt->rect.x() + opt->rect.width(), opt->rect.y(), executed (the execution status of this line is deduced): p->drawLine(opt->rect.x() + opt->rect.width(), opt->rect.y(), | - |
326 | opt->rect.x() + opt->rect.width() / 2, opt->rect.y() + opt->rect.height()); executed (the execution status of this line is deduced): opt->rect.x() + opt->rect.width() / 2, opt->rect.y() + opt->rect.height()); | - |
327 | p->setPen(QPen(opt->palette.dark(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark(), 0)); | - |
328 | pa.setPoint(0, opt->rect.x() + opt->rect.width() / 2, opt->rect.y() + opt->rect.height()); executed (the execution status of this line is deduced): pa.setPoint(0, opt->rect.x() + opt->rect.width() / 2, opt->rect.y() + opt->rect.height()); | - |
329 | pa.setPoint(1, opt->rect.x(), opt->rect.y()); executed (the execution status of this line is deduced): pa.setPoint(1, opt->rect.x(), opt->rect.y()); | - |
330 | pa.setPoint(2, opt->rect.x() + opt->rect.width(), opt->rect.y()); executed (the execution status of this line is deduced): pa.setPoint(2, opt->rect.x() + opt->rect.width(), opt->rect.y()); | - |
331 | p->drawPolyline(pa); executed (the execution status of this line is deduced): p->drawPolyline(pa); | - |
332 | } else if (header->sortIndicator & QStyleOptionHeader::SortDown) { executed: } Execution Count:35 partially evaluated: header->sortIndicator & QStyleOptionHeader::SortDown yes Evaluation Count:5 | no Evaluation Count:0 |
| 0-35 |
333 | QPolygon pa(3); executed (the execution status of this line is deduced): QPolygon pa(3); | - |
334 | p->setPen(QPen(opt->palette.light(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light(), 0)); | - |
335 | pa.setPoint(0, opt->rect.x(), opt->rect.y() + opt->rect.height()); executed (the execution status of this line is deduced): pa.setPoint(0, opt->rect.x(), opt->rect.y() + opt->rect.height()); | - |
336 | pa.setPoint(1, opt->rect.x() + opt->rect.width(), opt->rect.y() + opt->rect.height()); executed (the execution status of this line is deduced): pa.setPoint(1, opt->rect.x() + opt->rect.width(), opt->rect.y() + opt->rect.height()); | - |
337 | pa.setPoint(2, opt->rect.x() + opt->rect.width() / 2, opt->rect.y()); executed (the execution status of this line is deduced): pa.setPoint(2, opt->rect.x() + opt->rect.width() / 2, opt->rect.y()); | - |
338 | p->drawPolyline(pa); executed (the execution status of this line is deduced): p->drawPolyline(pa); | - |
339 | p->setPen(QPen(opt->palette.dark(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark(), 0)); | - |
340 | p->drawLine(opt->rect.x(), opt->rect.y() + opt->rect.height(), executed (the execution status of this line is deduced): p->drawLine(opt->rect.x(), opt->rect.y() + opt->rect.height(), | - |
341 | opt->rect.x() + opt->rect.width() / 2, opt->rect.y()); executed (the execution status of this line is deduced): opt->rect.x() + opt->rect.width() / 2, opt->rect.y()); | - |
342 | } executed: } Execution Count:5 | 5 |
343 | p->setPen(oldPen); executed (the execution status of this line is deduced): p->setPen(oldPen); | - |
344 | } executed: } Execution Count:40 | 40 |
345 | break; executed: break; Execution Count:40 | 40 |
346 | #ifndef QT_NO_TABBAR | - |
347 | case PE_FrameTabBarBase: | - |
348 | if (const QStyleOptionTabBarBase *tbb partially evaluated: const QStyleOptionTabBarBase *tbb = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt) yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
349 | = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)) { partially evaluated: const QStyleOptionTabBarBase *tbb = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt) yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
350 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
351 | switch (tbb->shape) { | - |
352 | case QTabBar::RoundedNorth: | - |
353 | case QTabBar::TriangularNorth: | - |
354 | p->setPen(QPen(tbb->palette.light(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(tbb->palette.light(), 0)); | - |
355 | p->drawLine(tbb->rect.topLeft(), tbb->rect.topRight()); executed (the execution status of this line is deduced): p->drawLine(tbb->rect.topLeft(), tbb->rect.topRight()); | - |
356 | break; executed: break; Execution Count:2 | 2 |
357 | case QTabBar::RoundedWest: | - |
358 | case QTabBar::TriangularWest: | - |
359 | p->setPen(QPen(tbb->palette.light(), 0)); never executed (the execution status of this line is deduced): p->setPen(QPen(tbb->palette.light(), 0)); | - |
360 | p->drawLine(tbb->rect.topLeft(), tbb->rect.bottomLeft()); never executed (the execution status of this line is deduced): p->drawLine(tbb->rect.topLeft(), tbb->rect.bottomLeft()); | - |
361 | break; | 0 |
362 | case QTabBar::RoundedSouth: | - |
363 | case QTabBar::TriangularSouth: | - |
364 | p->setPen(QPen(tbb->palette.shadow(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(tbb->palette.shadow(), 0)); | - |
365 | p->drawLine(tbb->rect.left(), tbb->rect.bottom(), executed (the execution status of this line is deduced): p->drawLine(tbb->rect.left(), tbb->rect.bottom(), | - |
366 | tbb->rect.right(), tbb->rect.bottom()); executed (the execution status of this line is deduced): tbb->rect.right(), tbb->rect.bottom()); | - |
367 | p->setPen(QPen(tbb->palette.dark(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(tbb->palette.dark(), 0)); | - |
368 | p->drawLine(tbb->rect.left(), tbb->rect.bottom() - 1, executed (the execution status of this line is deduced): p->drawLine(tbb->rect.left(), tbb->rect.bottom() - 1, | - |
369 | tbb->rect.right() - 1, tbb->rect.bottom() - 1); executed (the execution status of this line is deduced): tbb->rect.right() - 1, tbb->rect.bottom() - 1); | - |
370 | break; executed: break; Execution Count:2 | 2 |
371 | case QTabBar::RoundedEast: | - |
372 | case QTabBar::TriangularEast: | - |
373 | p->setPen(QPen(tbb->palette.dark(), 0)); never executed (the execution status of this line is deduced): p->setPen(QPen(tbb->palette.dark(), 0)); | - |
374 | p->drawLine(tbb->rect.topRight(), tbb->rect.bottomRight()); never executed (the execution status of this line is deduced): p->drawLine(tbb->rect.topRight(), tbb->rect.bottomRight()); | - |
375 | break; | 0 |
376 | } | - |
377 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
378 | } executed: } Execution Count:4 | 4 |
379 | break; executed: break; Execution Count:4 | 4 |
380 | case PE_IndicatorTabClose: { | - |
381 | if (d->tabBarcloseButtonIcon.isNull()) { never evaluated: d->tabBarcloseButtonIcon.isNull() | 0 |
382 | d->tabBarcloseButtonIcon.addPixmap(QPixmap( never executed (the execution status of this line is deduced): d->tabBarcloseButtonIcon.addPixmap(QPixmap( | - |
383 | QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-16.png")), never executed (the execution status of this line is deduced): QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-16.png")), | - |
384 | QIcon::Normal, QIcon::Off); never executed (the execution status of this line is deduced): QIcon::Normal, QIcon::Off); | - |
385 | d->tabBarcloseButtonIcon.addPixmap(QPixmap( never executed (the execution status of this line is deduced): d->tabBarcloseButtonIcon.addPixmap(QPixmap( | - |
386 | QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-down-16.png")), never executed (the execution status of this line is deduced): QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-down-16.png")), | - |
387 | QIcon::Normal, QIcon::On); never executed (the execution status of this line is deduced): QIcon::Normal, QIcon::On); | - |
388 | d->tabBarcloseButtonIcon.addPixmap(QPixmap( never executed (the execution status of this line is deduced): d->tabBarcloseButtonIcon.addPixmap(QPixmap( | - |
389 | QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-hover-16.png")), never executed (the execution status of this line is deduced): QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-hover-16.png")), | - |
390 | QIcon::Active, QIcon::Off); never executed (the execution status of this line is deduced): QIcon::Active, QIcon::Off); | - |
391 | } | 0 |
392 | | - |
393 | int size = proxy()->pixelMetric(QStyle::PM_SmallIconSize); never executed (the execution status of this line is deduced): int size = proxy()->pixelMetric(QStyle::PM_SmallIconSize); | - |
394 | QIcon::Mode mode = opt->state & State_Enabled ? never evaluated: opt->state & State_Enabled | 0 |
395 | (opt->state & State_Raised ? QIcon::Active : QIcon::Normal) never executed (the execution status of this line is deduced): (opt->state & State_Raised ? QIcon::Active : QIcon::Normal) | - |
396 | : QIcon::Disabled; never executed (the execution status of this line is deduced): : QIcon::Disabled; | - |
397 | if (!(opt->state & State_Raised) never evaluated: !(opt->state & State_Raised) | 0 |
398 | && !(opt->state & State_Sunken) never evaluated: !(opt->state & State_Sunken) | 0 |
399 | && !(opt->state & QStyle::State_Selected)) never evaluated: !(opt->state & QStyle::State_Selected) | 0 |
400 | mode = QIcon::Disabled; never executed: mode = QIcon::Disabled; | 0 |
401 | | - |
402 | QIcon::State state = opt->state & State_Sunken ? QIcon::On : QIcon::Off; never evaluated: opt->state & State_Sunken | 0 |
403 | QPixmap pixmap = d->tabBarcloseButtonIcon.pixmap(size, mode, state); never executed (the execution status of this line is deduced): QPixmap pixmap = d->tabBarcloseButtonIcon.pixmap(size, mode, state); | - |
404 | proxy()->drawItemPixmap(p, opt->rect, Qt::AlignCenter, pixmap); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, opt->rect, Qt::AlignCenter, pixmap); | - |
405 | break; | 0 |
406 | } | - |
407 | #endif // QT_NO_TABBAR | - |
408 | case PE_FrameTabWidget: | - |
409 | case PE_FrameWindow: | - |
410 | qDrawWinPanel(p, opt->rect, opt->palette, false, 0); never executed (the execution status of this line is deduced): qDrawWinPanel(p, opt->rect, opt->palette, false, 0); | - |
411 | break; | 0 |
412 | case PE_FrameLineEdit: | - |
413 | proxy()->drawPrimitive(PE_Frame, opt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_Frame, opt, p, widget); | - |
414 | break; executed: break; Execution Count:514 | 514 |
415 | #ifndef QT_NO_GROUPBOX | - |
416 | case PE_FrameGroupBox: | - |
417 | if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { partially evaluated: const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt) yes Evaluation Count:32 | no Evaluation Count:0 |
| 0-32 |
418 | const QStyleOptionFrameV2 *frame2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(opt); executed (the execution status of this line is deduced): const QStyleOptionFrameV2 *frame2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(opt); | - |
419 | if (frame2 && (frame2->features & QStyleOptionFrameV2::Flat)) { partially evaluated: frame2 yes Evaluation Count:32 | no Evaluation Count:0 |
partially evaluated: (frame2->features & QStyleOptionFrameV2::Flat) no Evaluation Count:0 | yes Evaluation Count:32 |
| 0-32 |
420 | QRect fr = frame->rect; never executed (the execution status of this line is deduced): QRect fr = frame->rect; | - |
421 | QPoint p1(fr.x(), fr.y() + 1); never executed (the execution status of this line is deduced): QPoint p1(fr.x(), fr.y() + 1); | - |
422 | QPoint p2(fr.x() + fr.width(), p1.y()); never executed (the execution status of this line is deduced): QPoint p2(fr.x() + fr.width(), p1.y()); | - |
423 | qDrawShadeLine(p, p1, p2, frame->palette, true, never executed (the execution status of this line is deduced): qDrawShadeLine(p, p1, p2, frame->palette, true, | - |
424 | frame->lineWidth, frame->midLineWidth); never executed (the execution status of this line is deduced): frame->lineWidth, frame->midLineWidth); | - |
425 | } else { | 0 |
426 | qDrawShadeRect(p, frame->rect.x(), frame->rect.y(), frame->rect.width(), executed (the execution status of this line is deduced): qDrawShadeRect(p, frame->rect.x(), frame->rect.y(), frame->rect.width(), | - |
427 | frame->rect.height(), frame->palette, true, executed (the execution status of this line is deduced): frame->rect.height(), frame->palette, true, | - |
428 | frame->lineWidth, frame->midLineWidth); executed (the execution status of this line is deduced): frame->lineWidth, frame->midLineWidth); | - |
429 | } executed: } Execution Count:32 | 32 |
430 | } | - |
431 | break; executed: break; Execution Count:32 | 32 |
432 | #endif // QT_NO_GROUPBOX | - |
433 | #ifndef QT_NO_DOCKWIDGET | - |
434 | case PE_FrameDockWidget: | - |
435 | if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { never evaluated: const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt) | 0 |
436 | int lw = frame->lineWidth; never executed (the execution status of this line is deduced): int lw = frame->lineWidth; | - |
437 | if (lw <= 0) | 0 |
438 | lw = proxy()->pixelMetric(PM_DockWidgetFrameWidth); never executed: lw = proxy()->pixelMetric(PM_DockWidgetFrameWidth); | 0 |
439 | | - |
440 | qDrawShadePanel(p, frame->rect, frame->palette, false, lw); never executed (the execution status of this line is deduced): qDrawShadePanel(p, frame->rect, frame->palette, false, lw); | - |
441 | } | 0 |
442 | break; | 0 |
443 | #endif // QT_NO_DOCKWIDGET | - |
444 | #ifndef QT_NO_TOOLBAR | - |
445 | case PE_IndicatorToolBarHandle: | - |
446 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
447 | p->translate(opt->rect.x(), opt->rect.y()); never executed (the execution status of this line is deduced): p->translate(opt->rect.x(), opt->rect.y()); | - |
448 | if (opt->state & State_Horizontal) { never evaluated: opt->state & State_Horizontal | 0 |
449 | int x = opt->rect.width() / 3; never executed (the execution status of this line is deduced): int x = opt->rect.width() / 3; | - |
450 | if (opt->direction == Qt::RightToLeft) never evaluated: opt->direction == Qt::RightToLeft | 0 |
451 | x -= 2; | 0 |
452 | if (opt->rect.height() > 4) { never evaluated: opt->rect.height() > 4 | 0 |
453 | qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4, never executed (the execution status of this line is deduced): qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4, | - |
454 | opt->palette, false, 1, 0); never executed (the execution status of this line is deduced): opt->palette, false, 1, 0); | - |
455 | qDrawShadePanel(p, x+3, 2, 3, opt->rect.height() - 4, never executed (the execution status of this line is deduced): qDrawShadePanel(p, x+3, 2, 3, opt->rect.height() - 4, | - |
456 | opt->palette, false, 1, 0); never executed (the execution status of this line is deduced): opt->palette, false, 1, 0); | - |
457 | } | 0 |
458 | } else { | 0 |
459 | if (opt->rect.width() > 4) { never evaluated: opt->rect.width() > 4 | 0 |
460 | int y = opt->rect.height() / 3; never executed (the execution status of this line is deduced): int y = opt->rect.height() / 3; | - |
461 | qDrawShadePanel(p, 2, y, opt->rect.width() - 4, 3, never executed (the execution status of this line is deduced): qDrawShadePanel(p, 2, y, opt->rect.width() - 4, 3, | - |
462 | opt->palette, false, 1, 0); never executed (the execution status of this line is deduced): opt->palette, false, 1, 0); | - |
463 | qDrawShadePanel(p, 2, y+3, opt->rect.width() - 4, 3, never executed (the execution status of this line is deduced): qDrawShadePanel(p, 2, y+3, opt->rect.width() - 4, 3, | - |
464 | opt->palette, false, 1, 0); never executed (the execution status of this line is deduced): opt->palette, false, 1, 0); | - |
465 | } | 0 |
466 | } | 0 |
467 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
468 | break; | 0 |
469 | case PE_IndicatorToolBarSeparator: | - |
470 | { | - |
471 | QPoint p1, p2; never executed (the execution status of this line is deduced): QPoint p1, p2; | - |
472 | if (opt->state & State_Horizontal) { never evaluated: opt->state & State_Horizontal | 0 |
473 | p1 = QPoint(opt->rect.width()/2, 0); never executed (the execution status of this line is deduced): p1 = QPoint(opt->rect.width()/2, 0); | - |
474 | p2 = QPoint(p1.x(), opt->rect.height()); never executed (the execution status of this line is deduced): p2 = QPoint(p1.x(), opt->rect.height()); | - |
475 | } else { | 0 |
476 | p1 = QPoint(0, opt->rect.height()/2); never executed (the execution status of this line is deduced): p1 = QPoint(0, opt->rect.height()/2); | - |
477 | p2 = QPoint(opt->rect.width(), p1.y()); never executed (the execution status of this line is deduced): p2 = QPoint(opt->rect.width(), p1.y()); | - |
478 | } | 0 |
479 | qDrawShadeLine(p, p1, p2, opt->palette, 1, 1, 0); never executed (the execution status of this line is deduced): qDrawShadeLine(p, p1, p2, opt->palette, 1, 1, 0); | - |
480 | break; | 0 |
481 | } | - |
482 | #endif // QT_NO_TOOLBAR | - |
483 | #ifndef QT_NO_SPINBOX | - |
484 | case PE_IndicatorSpinPlus: | - |
485 | case PE_IndicatorSpinMinus: { | - |
486 | QRect r = opt->rect; never executed (the execution status of this line is deduced): QRect r = opt->rect; | - |
487 | int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); never executed (the execution status of this line is deduced): int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); | - |
488 | QRect br = r.adjusted(fw, fw, -fw, -fw); never executed (the execution status of this line is deduced): QRect br = r.adjusted(fw, fw, -fw, -fw); | - |
489 | | - |
490 | int offset = (opt->state & State_Sunken) ? 1 : 0; never evaluated: (opt->state & State_Sunken) | 0 |
491 | int step = (br.width() + 4) / 5; never executed (the execution status of this line is deduced): int step = (br.width() + 4) / 5; | - |
492 | p->fillRect(br.x() + offset, br.y() + offset +br.height() / 2 - step / 2, never executed (the execution status of this line is deduced): p->fillRect(br.x() + offset, br.y() + offset +br.height() / 2 - step / 2, | - |
493 | br.width(), step, never executed (the execution status of this line is deduced): br.width(), step, | - |
494 | opt->palette.buttonText()); never executed (the execution status of this line is deduced): opt->palette.buttonText()); | - |
495 | if (pe == PE_IndicatorSpinPlus) never evaluated: pe == PE_IndicatorSpinPlus | 0 |
496 | p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, never executed: p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, step, br.height(), opt->palette.buttonText()); | 0 |
497 | step, br.height(), never executed: p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, step, br.height(), opt->palette.buttonText()); | 0 |
498 | opt->palette.buttonText()); never executed: p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, step, br.height(), opt->palette.buttonText()); | 0 |
499 | | - |
500 | break; } | 0 |
501 | case PE_IndicatorSpinUp: | - |
502 | case PE_IndicatorSpinDown: { | - |
503 | QRect r = opt->rect; executed (the execution status of this line is deduced): QRect r = opt->rect; | - |
504 | int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); executed (the execution status of this line is deduced): int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); | - |
505 | // QRect br = r.adjusted(fw, fw, -fw, -fw); | - |
506 | int x = r.x(), y = r.y(), w = r.width(), h = r.height(); executed (the execution status of this line is deduced): int x = r.x(), y = r.y(), w = r.width(), h = r.height(); | - |
507 | int sw = w-4; executed (the execution status of this line is deduced): int sw = w-4; | - |
508 | if (sw < 3) partially evaluated: sw < 3 no Evaluation Count:0 | yes Evaluation Count:567 |
| 0-567 |
509 | break; | 0 |
510 | else if (!(sw & 1)) partially evaluated: !(sw & 1) no Evaluation Count:0 | yes Evaluation Count:567 |
| 0-567 |
511 | sw--; | 0 |
512 | sw -= (sw / 7) * 2; // Empty border executed (the execution status of this line is deduced): sw -= (sw / 7) * 2; | - |
513 | int sh = sw/2 + 2; // Must have empty row at foot of arrow executed (the execution status of this line is deduced): int sh = sw/2 + 2; | - |
514 | | - |
515 | int sx = x + w / 2 - sw / 2; executed (the execution status of this line is deduced): int sx = x + w / 2 - sw / 2; | - |
516 | int sy = y + h / 2 - sh / 2; executed (the execution status of this line is deduced): int sy = y + h / 2 - sh / 2; | - |
517 | | - |
518 | if (pe == PE_IndicatorSpinUp && fw) evaluated: pe == PE_IndicatorSpinUp yes Evaluation Count:210 | yes Evaluation Count:357 |
partially evaluated: fw yes Evaluation Count:210 | no Evaluation Count:0 |
| 0-357 |
519 | --sy; executed: --sy; Execution Count:210 | 210 |
520 | | - |
521 | QPolygon a; executed (the execution status of this line is deduced): QPolygon a; | - |
522 | if (pe == PE_IndicatorSpinDown) evaluated: pe == PE_IndicatorSpinDown yes Evaluation Count:357 | yes Evaluation Count:210 |
| 210-357 |
523 | a.setPoints(3, 0, 1, sw-1, 1, sh-2, sh-1); executed: a.setPoints(3, 0, 1, sw-1, 1, sh-2, sh-1); Execution Count:357 | 357 |
524 | else | - |
525 | a.setPoints(3, 0, sh-1, sw-1, sh-1, sh-2, 1); executed: a.setPoints(3, 0, sh-1, sw-1, sh-1, sh-2, 1); Execution Count:210 | 210 |
526 | int bsx = 0; executed (the execution status of this line is deduced): int bsx = 0; | - |
527 | int bsy = 0; executed (the execution status of this line is deduced): int bsy = 0; | - |
528 | if (opt->state & State_Sunken) { partially evaluated: opt->state & State_Sunken no Evaluation Count:0 | yes Evaluation Count:567 |
| 0-567 |
529 | bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); never executed (the execution status of this line is deduced): bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); | - |
530 | bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); never executed (the execution status of this line is deduced): bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); | - |
531 | } | 0 |
532 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
533 | p->translate(sx + bsx, sy + bsy); executed (the execution status of this line is deduced): p->translate(sx + bsx, sy + bsy); | - |
534 | p->setPen(opt->palette.buttonText().color()); executed (the execution status of this line is deduced): p->setPen(opt->palette.buttonText().color()); | - |
535 | p->setBrush(opt->palette.buttonText()); executed (the execution status of this line is deduced): p->setBrush(opt->palette.buttonText()); | - |
536 | p->setRenderHint(QPainter::Qt4CompatiblePainting); executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting); | - |
537 | p->drawPolygon(a); executed (the execution status of this line is deduced): p->drawPolygon(a); | - |
538 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
539 | break; } executed: break; Execution Count:567 | 567 |
540 | #endif // QT_NO_SPINBOX | - |
541 | case PE_PanelTipLabel: { | - |
542 | QBrush oldBrush = p->brush(); executed (the execution status of this line is deduced): QBrush oldBrush = p->brush(); | - |
543 | QPen oldPen = p->pen(); executed (the execution status of this line is deduced): QPen oldPen = p->pen(); | - |
544 | p->setPen(QPen(opt->palette.toolTipText(), 0)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.toolTipText(), 0)); | - |
545 | p->setBrush(opt->palette.toolTipBase()); executed (the execution status of this line is deduced): p->setBrush(opt->palette.toolTipBase()); | - |
546 | p->drawRect(opt->rect.adjusted(0, 0, -1, -1)); executed (the execution status of this line is deduced): p->drawRect(opt->rect.adjusted(0, 0, -1, -1)); | - |
547 | p->setPen(oldPen); executed (the execution status of this line is deduced): p->setPen(oldPen); | - |
548 | p->setBrush(oldBrush); executed (the execution status of this line is deduced): p->setBrush(oldBrush); | - |
549 | break; executed: break; Execution Count:7 | 7 |
550 | } | - |
551 | #ifndef QT_NO_TABBAR | - |
552 | case PE_IndicatorTabTear: | - |
553 | if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { never evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt) | 0 |
554 | bool rtl = tab->direction == Qt::RightToLeft; never executed (the execution status of this line is deduced): bool rtl = tab->direction == Qt::RightToLeft; | - |
555 | QRect rect = tab->rect; never executed (the execution status of this line is deduced): QRect rect = tab->rect; | - |
556 | QPainterPath path; never executed (the execution status of this line is deduced): QPainterPath path; | - |
557 | | - |
558 | rect.setTop(rect.top() + ((tab->state & State_Selected) ? 1 : 3)); never executed (the execution status of this line is deduced): rect.setTop(rect.top() + ((tab->state & State_Selected) ? 1 : 3)); | - |
559 | rect.setBottom(rect.bottom() - ((tab->state & State_Selected) ? 0 : 2)); never executed (the execution status of this line is deduced): rect.setBottom(rect.bottom() - ((tab->state & State_Selected) ? 0 : 2)); | - |
560 | | - |
561 | path.moveTo(QPoint(rtl ? rect.right() : rect.left(), rect.top())); never executed (the execution status of this line is deduced): path.moveTo(QPoint(rtl ? rect.right() : rect.left(), rect.top())); | - |
562 | int count = 4; never executed (the execution status of this line is deduced): int count = 4; | - |
563 | for(int jags = 1; jags <= count; ++jags, rtl = !rtl) never evaluated: jags <= count | 0 |
564 | path.lineTo(QPoint(rtl ? rect.left() : rect.right(), rect.top() + jags * rect.height()/count)); never executed: path.lineTo(QPoint(rtl ? rect.left() : rect.right(), rect.top() + jags * rect.height()/count)); | 0 |
565 | | - |
566 | p->setPen(QPen(tab->palette.light(), qreal(.8))); never executed (the execution status of this line is deduced): p->setPen(QPen(tab->palette.light(), qreal(.8))); | - |
567 | p->setBrush(tab->palette.background()); never executed (the execution status of this line is deduced): p->setBrush(tab->palette.background()); | - |
568 | p->setRenderHint(QPainter::Antialiasing); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Antialiasing); | - |
569 | p->drawPath(path); never executed (the execution status of this line is deduced): p->drawPath(path); | - |
570 | } | 0 |
571 | break; | 0 |
572 | #endif // QT_NO_TABBAR | - |
573 | #ifndef QT_NO_LINEEDIT | - |
574 | case PE_PanelLineEdit: | - |
575 | if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { partially evaluated: const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt) yes Evaluation Count:760 | no Evaluation Count:0 |
| 0-760 |
576 | p->fillRect(panel->rect.adjusted(panel->lineWidth, panel->lineWidth, -panel->lineWidth, -panel->lineWidth), executed (the execution status of this line is deduced): p->fillRect(panel->rect.adjusted(panel->lineWidth, panel->lineWidth, -panel->lineWidth, -panel->lineWidth), | - |
577 | panel->palette.brush(QPalette::Base)); executed (the execution status of this line is deduced): panel->palette.brush(QPalette::Base)); | - |
578 | | - |
579 | if (panel->lineWidth > 0) evaluated: panel->lineWidth > 0 yes Evaluation Count:515 | yes Evaluation Count:245 |
| 245-515 |
580 | proxy()->drawPrimitive(PE_FrameLineEdit, panel, p, widget); executed: proxy()->drawPrimitive(PE_FrameLineEdit, panel, p, widget); Execution Count:515 | 515 |
581 | } executed: } Execution Count:760 | 760 |
582 | break; executed: break; Execution Count:760 | 760 |
583 | #endif // QT_NO_LINEEDIT | - |
584 | #ifndef QT_NO_COLUMNVIEW | - |
585 | case PE_IndicatorColumnViewArrow: { | - |
586 | if (const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { never evaluated: const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt) | 0 |
587 | bool reverse = (viewOpt->direction == Qt::RightToLeft); never executed (the execution status of this line is deduced): bool reverse = (viewOpt->direction == Qt::RightToLeft); | - |
588 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
589 | QPainterPath path; never executed (the execution status of this line is deduced): QPainterPath path; | - |
590 | int x = viewOpt->rect.x() + 1; never executed (the execution status of this line is deduced): int x = viewOpt->rect.x() + 1; | - |
591 | int offset = (viewOpt->rect.height() / 3); never executed (the execution status of this line is deduced): int offset = (viewOpt->rect.height() / 3); | - |
592 | int height = (viewOpt->rect.height()) - offset * 2; never executed (the execution status of this line is deduced): int height = (viewOpt->rect.height()) - offset * 2; | - |
593 | if (height % 2 == 1) never evaluated: height % 2 == 1 | 0 |
594 | --height; never executed: --height; | 0 |
595 | int x2 = x + height - 1; never executed (the execution status of this line is deduced): int x2 = x + height - 1; | - |
596 | if (reverse) { | 0 |
597 | x = viewOpt->rect.x() + viewOpt->rect.width() - 1; never executed (the execution status of this line is deduced): x = viewOpt->rect.x() + viewOpt->rect.width() - 1; | - |
598 | x2 = x - height + 1; never executed (the execution status of this line is deduced): x2 = x - height + 1; | - |
599 | } | 0 |
600 | path.moveTo(x, viewOpt->rect.y() + offset); never executed (the execution status of this line is deduced): path.moveTo(x, viewOpt->rect.y() + offset); | - |
601 | path.lineTo(x, viewOpt->rect.y() + offset + height); never executed (the execution status of this line is deduced): path.lineTo(x, viewOpt->rect.y() + offset + height); | - |
602 | path.lineTo(x2, viewOpt->rect.y() + offset+height/2); never executed (the execution status of this line is deduced): path.lineTo(x2, viewOpt->rect.y() + offset+height/2); | - |
603 | path.closeSubpath(); never executed (the execution status of this line is deduced): path.closeSubpath(); | - |
604 | if (viewOpt->state & QStyle::State_Selected ) { never evaluated: viewOpt->state & QStyle::State_Selected | 0 |
605 | if (viewOpt->showDecorationSelected) { never evaluated: viewOpt->showDecorationSelected | 0 |
606 | QColor color = viewOpt->palette.color(QPalette::Active, QPalette::HighlightedText); never executed (the execution status of this line is deduced): QColor color = viewOpt->palette.color(QPalette::Active, QPalette::HighlightedText); | - |
607 | p->setPen(color); never executed (the execution status of this line is deduced): p->setPen(color); | - |
608 | p->setBrush(color); never executed (the execution status of this line is deduced): p->setBrush(color); | - |
609 | } else { | 0 |
610 | QColor color = viewOpt->palette.color(QPalette::Active, QPalette::WindowText); never executed (the execution status of this line is deduced): QColor color = viewOpt->palette.color(QPalette::Active, QPalette::WindowText); | - |
611 | p->setPen(color); never executed (the execution status of this line is deduced): p->setPen(color); | - |
612 | p->setBrush(color); never executed (the execution status of this line is deduced): p->setBrush(color); | - |
613 | } | 0 |
614 | | - |
615 | } else { | - |
616 | QColor color = viewOpt->palette.color(QPalette::Active, QPalette::Mid); never executed (the execution status of this line is deduced): QColor color = viewOpt->palette.color(QPalette::Active, QPalette::Mid); | - |
617 | p->setPen(color); never executed (the execution status of this line is deduced): p->setPen(color); | - |
618 | p->setBrush(color); never executed (the execution status of this line is deduced): p->setBrush(color); | - |
619 | } | 0 |
620 | p->drawPath(path); never executed (the execution status of this line is deduced): p->drawPath(path); | - |
621 | | - |
622 | // draw the vertical and top triangle line | - |
623 | if (!(viewOpt->state & QStyle::State_Selected)) { never evaluated: !(viewOpt->state & QStyle::State_Selected) | 0 |
624 | QPainterPath lines; never executed (the execution status of this line is deduced): QPainterPath lines; | - |
625 | lines.moveTo(x, viewOpt->rect.y() + offset); never executed (the execution status of this line is deduced): lines.moveTo(x, viewOpt->rect.y() + offset); | - |
626 | lines.lineTo(x, viewOpt->rect.y() + offset + height); never executed (the execution status of this line is deduced): lines.lineTo(x, viewOpt->rect.y() + offset + height); | - |
627 | lines.moveTo(x, viewOpt->rect.y() + offset); never executed (the execution status of this line is deduced): lines.moveTo(x, viewOpt->rect.y() + offset); | - |
628 | lines.lineTo(x2, viewOpt->rect.y() + offset+height/2); never executed (the execution status of this line is deduced): lines.lineTo(x2, viewOpt->rect.y() + offset+height/2); | - |
629 | QColor color = viewOpt->palette.color(QPalette::Active, QPalette::Dark); never executed (the execution status of this line is deduced): QColor color = viewOpt->palette.color(QPalette::Active, QPalette::Dark); | - |
630 | p->setPen(color); never executed (the execution status of this line is deduced): p->setPen(color); | - |
631 | p->drawPath(lines); never executed (the execution status of this line is deduced): p->drawPath(lines); | - |
632 | } | 0 |
633 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
634 | } | 0 |
635 | break; } | 0 |
636 | #endif //QT_NO_COLUMNVIEW | - |
637 | case PE_IndicatorItemViewItemDrop: { | - |
638 | QRect rect = opt->rect; never executed (the execution status of this line is deduced): QRect rect = opt->rect; | - |
639 | if (opt->rect.height() == 0) never evaluated: opt->rect.height() == 0 | 0 |
640 | p->drawLine(rect.topLeft(), rect.topRight()); never executed: p->drawLine(rect.topLeft(), rect.topRight()); | 0 |
641 | else | - |
642 | p->drawRect(rect); never executed: p->drawRect(rect); | 0 |
643 | break; } | 0 |
644 | #ifndef QT_NO_ITEMVIEWS | - |
645 | case PE_PanelItemViewRow: | - |
646 | if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { partially evaluated: const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt) yes Evaluation Count:12033 | no Evaluation Count:0 |
| 0-12033 |
647 | QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)) partially evaluated: widget yes Evaluation Count:12033 | no Evaluation Count:0 |
| 0-12033 |
648 | ? QPalette::Normal : QPalette::Disabled; executed (the execution status of this line is deduced): ? QPalette::Normal : QPalette::Disabled; | - |
649 | if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) partially evaluated: cg == QPalette::Normal yes Evaluation Count:12033 | no Evaluation Count:0 |
evaluated: !(vopt->state & QStyle::State_Active) yes Evaluation Count:3934 | yes Evaluation Count:8099 |
| 0-12033 |
650 | cg = QPalette::Inactive; executed: cg = QPalette::Inactive; Execution Count:3934 | 3934 |
651 | | - |
652 | if ((vopt->state & QStyle::State_Selected) && proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, opt, widget)) evaluated: (vopt->state & QStyle::State_Selected) yes Evaluation Count:486 | yes Evaluation Count:11547 |
partially evaluated: proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, opt, widget) no Evaluation Count:0 | yes Evaluation Count:486 |
| 0-11547 |
653 | p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight)); never executed: p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight)); | 0 |
654 | else if (vopt->features & QStyleOptionViewItem::Alternate) evaluated: vopt->features & QStyleOptionViewItem::Alternate yes Evaluation Count:89 | yes Evaluation Count:11944 |
| 89-11944 |
655 | p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase)); executed: p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase)); Execution Count:89 | 89 |
656 | } | - |
657 | break; executed: break; Execution Count:12033 | 12033 |
658 | case PE_PanelItemViewItem: | - |
659 | if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { partially evaluated: const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt) yes Evaluation Count:13241 | no Evaluation Count:0 |
| 0-13241 |
660 | QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)) partially evaluated: widget yes Evaluation Count:13241 | no Evaluation Count:0 |
| 0-13241 |
661 | ? QPalette::Normal : QPalette::Disabled; executed (the execution status of this line is deduced): ? QPalette::Normal : QPalette::Disabled; | - |
662 | if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) partially evaluated: cg == QPalette::Normal yes Evaluation Count:13241 | no Evaluation Count:0 |
evaluated: !(vopt->state & QStyle::State_Active) yes Evaluation Count:4882 | yes Evaluation Count:8359 |
| 0-13241 |
663 | cg = QPalette::Inactive; executed: cg = QPalette::Inactive; Execution Count:4882 | 4882 |
664 | | - |
665 | if (vopt->showDecorationSelected && (vopt->state & QStyle::State_Selected)) { evaluated: vopt->showDecorationSelected yes Evaluation Count:11999 | yes Evaluation Count:1242 |
evaluated: (vopt->state & QStyle::State_Selected) yes Evaluation Count:905 | yes Evaluation Count:11094 |
| 905-11999 |
666 | p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight)); executed (the execution status of this line is deduced): p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight)); | - |
667 | } else { executed: } Execution Count:905 | 905 |
668 | if (vopt->backgroundBrush.style() != Qt::NoBrush) { partially evaluated: vopt->backgroundBrush.style() != Qt::NoBrush no Evaluation Count:0 | yes Evaluation Count:12336 |
| 0-12336 |
669 | QPointF oldBO = p->brushOrigin(); never executed (the execution status of this line is deduced): QPointF oldBO = p->brushOrigin(); | - |
670 | p->setBrushOrigin(vopt->rect.topLeft()); never executed (the execution status of this line is deduced): p->setBrushOrigin(vopt->rect.topLeft()); | - |
671 | p->fillRect(vopt->rect, vopt->backgroundBrush); never executed (the execution status of this line is deduced): p->fillRect(vopt->rect, vopt->backgroundBrush); | - |
672 | p->setBrushOrigin(oldBO); never executed (the execution status of this line is deduced): p->setBrushOrigin(oldBO); | - |
673 | } | 0 |
674 | | - |
675 | if (vopt->state & QStyle::State_Selected) { evaluated: vopt->state & QStyle::State_Selected yes Evaluation Count:96 | yes Evaluation Count:12240 |
| 96-12240 |
676 | QRect textRect = subElementRect(QStyle::SE_ItemViewItemText, opt, widget); executed (the execution status of this line is deduced): QRect textRect = subElementRect(QStyle::SE_ItemViewItemText, opt, widget); | - |
677 | p->fillRect(textRect, vopt->palette.brush(cg, QPalette::Highlight)); executed (the execution status of this line is deduced): p->fillRect(textRect, vopt->palette.brush(cg, QPalette::Highlight)); | - |
678 | } executed: } Execution Count:96 | 96 |
679 | } executed: } Execution Count:12336 | 12336 |
680 | } | - |
681 | break; executed: break; Execution Count:13241 | 13241 |
682 | #endif //QT_NO_ITEMVIEWS | - |
683 | case PE_PanelScrollAreaCorner: { | - |
684 | const QBrush brush(opt->palette.brush(QPalette::Window)); executed (the execution status of this line is deduced): const QBrush brush(opt->palette.brush(QPalette::Window)); | - |
685 | p->fillRect(opt->rect, brush); executed (the execution status of this line is deduced): p->fillRect(opt->rect, brush); | - |
686 | } break; executed: break; Execution Count:702 | 702 |
687 | case PE_IndicatorArrowUp: | - |
688 | case PE_IndicatorArrowDown: | - |
689 | case PE_IndicatorArrowRight: | - |
690 | case PE_IndicatorArrowLeft: | - |
691 | { | - |
692 | if (opt->rect.width() <= 1 || opt->rect.height() <= 1) partially evaluated: opt->rect.width() <= 1 no Evaluation Count:0 | yes Evaluation Count:6084 |
evaluated: opt->rect.height() <= 1 yes Evaluation Count:24 | yes Evaluation Count:6060 |
| 0-6084 |
693 | break; executed: break; Execution Count:24 | 24 |
694 | QRect r = opt->rect; executed (the execution status of this line is deduced): QRect r = opt->rect; | - |
695 | int size = qMin(r.height(), r.width()); executed (the execution status of this line is deduced): int size = qMin(r.height(), r.width()); | - |
696 | QPixmap pixmap; executed (the execution status of this line is deduced): QPixmap pixmap; | - |
697 | QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-") executed (the execution status of this line is deduced): QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-") | - |
698 | % QLatin1String(metaObject()->className()), opt, QSize(size, size)) executed (the execution status of this line is deduced): % QLatin1String(metaObject()->className()), opt, QSize(size, size)) | - |
699 | % HexString<uint>(pe); executed (the execution status of this line is deduced): % HexString<uint>(pe); | - |
700 | if (!QPixmapCache::find(pixmapName, pixmap)) { evaluated: !QPixmapCache::find(pixmapName, pixmap) yes Evaluation Count:210 | yes Evaluation Count:5850 |
| 210-5850 |
701 | int border = size/5; executed (the execution status of this line is deduced): int border = size/5; | - |
702 | int sqsize = 2*(size/2); executed (the execution status of this line is deduced): int sqsize = 2*(size/2); | - |
703 | QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied); executed (the execution status of this line is deduced): QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied); | - |
704 | image.fill(0); executed (the execution status of this line is deduced): image.fill(0); | - |
705 | QPainter imagePainter(&image); executed (the execution status of this line is deduced): QPainter imagePainter(&image); | - |
706 | | - |
707 | QPolygon a; executed (the execution status of this line is deduced): QPolygon a; | - |
708 | switch (pe) { | - |
709 | case PE_IndicatorArrowUp: | - |
710 | a.setPoints(3, border, sqsize/2, sqsize/2, border, sqsize - border, sqsize/2); executed (the execution status of this line is deduced): a.setPoints(3, border, sqsize/2, sqsize/2, border, sqsize - border, sqsize/2); | - |
711 | break; executed: break; Execution Count:38 | 38 |
712 | case PE_IndicatorArrowDown: | - |
713 | a.setPoints(3, border, sqsize/2, sqsize/2, sqsize - border, sqsize - border, sqsize/2); executed (the execution status of this line is deduced): a.setPoints(3, border, sqsize/2, sqsize/2, sqsize - border, sqsize - border, sqsize/2); | - |
714 | break; executed: break; Execution Count:95 | 95 |
715 | case PE_IndicatorArrowRight: | - |
716 | a.setPoints(3, sqsize - border, sqsize/2, sqsize/2, border, sqsize/2, sqsize - border); executed (the execution status of this line is deduced): a.setPoints(3, sqsize - border, sqsize/2, sqsize/2, border, sqsize/2, sqsize - border); | - |
717 | break; executed: break; Execution Count:41 | 41 |
718 | case PE_IndicatorArrowLeft: | - |
719 | a.setPoints(3, border, sqsize/2, sqsize/2, border, sqsize/2, sqsize - border); executed (the execution status of this line is deduced): a.setPoints(3, border, sqsize/2, sqsize/2, border, sqsize/2, sqsize - border); | - |
720 | break; executed: break; Execution Count:36 | 36 |
721 | default: | - |
722 | break; | 0 |
723 | } | - |
724 | | - |
725 | int bsx = 0; executed (the execution status of this line is deduced): int bsx = 0; | - |
726 | int bsy = 0; executed (the execution status of this line is deduced): int bsy = 0; | - |
727 | | - |
728 | if (opt->state & State_Sunken) { evaluated: opt->state & State_Sunken yes Evaluation Count:6 | yes Evaluation Count:204 |
| 6-204 |
729 | bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget); executed (the execution status of this line is deduced): bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget); | - |
730 | bsy = proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget); executed (the execution status of this line is deduced): bsy = proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget); | - |
731 | } executed: } Execution Count:6 | 6 |
732 | | - |
733 | QRect bounds = a.boundingRect(); executed (the execution status of this line is deduced): QRect bounds = a.boundingRect(); | - |
734 | int sx = sqsize / 2 - bounds.center().x() - 1; executed (the execution status of this line is deduced): int sx = sqsize / 2 - bounds.center().x() - 1; | - |
735 | int sy = sqsize / 2 - bounds.center().y() - 1; executed (the execution status of this line is deduced): int sy = sqsize / 2 - bounds.center().y() - 1; | - |
736 | imagePainter.translate(sx + bsx, sy + bsy); executed (the execution status of this line is deduced): imagePainter.translate(sx + bsx, sy + bsy); | - |
737 | imagePainter.setPen(opt->palette.buttonText().color()); executed (the execution status of this line is deduced): imagePainter.setPen(opt->palette.buttonText().color()); | - |
738 | imagePainter.setBrush(opt->palette.buttonText()); executed (the execution status of this line is deduced): imagePainter.setBrush(opt->palette.buttonText()); | - |
739 | imagePainter.setRenderHint(QPainter::Qt4CompatiblePainting); executed (the execution status of this line is deduced): imagePainter.setRenderHint(QPainter::Qt4CompatiblePainting); | - |
740 | | - |
741 | if (!(opt->state & State_Enabled)) { evaluated: !(opt->state & State_Enabled) yes Evaluation Count:11 | yes Evaluation Count:199 |
| 11-199 |
742 | imagePainter.translate(1, 1); executed (the execution status of this line is deduced): imagePainter.translate(1, 1); | - |
743 | imagePainter.setBrush(opt->palette.light().color()); executed (the execution status of this line is deduced): imagePainter.setBrush(opt->palette.light().color()); | - |
744 | imagePainter.setPen(opt->palette.light().color()); executed (the execution status of this line is deduced): imagePainter.setPen(opt->palette.light().color()); | - |
745 | imagePainter.drawPolygon(a); executed (the execution status of this line is deduced): imagePainter.drawPolygon(a); | - |
746 | imagePainter.translate(-1, -1); executed (the execution status of this line is deduced): imagePainter.translate(-1, -1); | - |
747 | imagePainter.setBrush(opt->palette.mid().color()); executed (the execution status of this line is deduced): imagePainter.setBrush(opt->palette.mid().color()); | - |
748 | imagePainter.setPen(opt->palette.mid().color()); executed (the execution status of this line is deduced): imagePainter.setPen(opt->palette.mid().color()); | - |
749 | } executed: } Execution Count:11 | 11 |
750 | | - |
751 | imagePainter.drawPolygon(a); executed (the execution status of this line is deduced): imagePainter.drawPolygon(a); | - |
752 | imagePainter.end(); executed (the execution status of this line is deduced): imagePainter.end(); | - |
753 | pixmap = QPixmap::fromImage(image); executed (the execution status of this line is deduced): pixmap = QPixmap::fromImage(image); | - |
754 | QPixmapCache::insert(pixmapName, pixmap); executed (the execution status of this line is deduced): QPixmapCache::insert(pixmapName, pixmap); | - |
755 | } executed: } Execution Count:210 | 210 |
756 | int xOffset = r.x() + (r.width() - size)/2; executed (the execution status of this line is deduced): int xOffset = r.x() + (r.width() - size)/2; | - |
757 | int yOffset = r.y() + (r.height() - size)/2; executed (the execution status of this line is deduced): int yOffset = r.y() + (r.height() - size)/2; | - |
758 | p->drawPixmap(xOffset, yOffset, pixmap); executed (the execution status of this line is deduced): p->drawPixmap(xOffset, yOffset, pixmap); | - |
759 | } | - |
760 | break; executed: break; Execution Count:6060 | 6060 |
761 | default: | - |
762 | break; executed: break; Execution Count:23 | 23 |
763 | } | - |
764 | } executed: } Execution Count:36911 | 36911 |
765 | | - |
766 | #ifndef QT_NO_TOOLBUTTON | - |
767 | static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton, | - |
768 | const QRect &rect, QPainter *painter, const QWidget *widget = 0) | - |
769 | { | - |
770 | QStyle::PrimitiveElement pe; never executed (the execution status of this line is deduced): QStyle::PrimitiveElement pe; | - |
771 | switch (toolbutton->arrowType) { | - |
772 | case Qt::LeftArrow: | - |
773 | pe = QStyle::PE_IndicatorArrowLeft; never executed (the execution status of this line is deduced): pe = QStyle::PE_IndicatorArrowLeft; | - |
774 | break; | 0 |
775 | case Qt::RightArrow: | - |
776 | pe = QStyle::PE_IndicatorArrowRight; never executed (the execution status of this line is deduced): pe = QStyle::PE_IndicatorArrowRight; | - |
777 | break; | 0 |
778 | case Qt::UpArrow: | - |
779 | pe = QStyle::PE_IndicatorArrowUp; never executed (the execution status of this line is deduced): pe = QStyle::PE_IndicatorArrowUp; | - |
780 | break; | 0 |
781 | case Qt::DownArrow: | - |
782 | pe = QStyle::PE_IndicatorArrowDown; never executed (the execution status of this line is deduced): pe = QStyle::PE_IndicatorArrowDown; | - |
783 | break; | 0 |
784 | default: | - |
785 | return; | 0 |
786 | } | - |
787 | QStyleOption arrowOpt; never executed (the execution status of this line is deduced): QStyleOption arrowOpt; | - |
788 | arrowOpt.rect = rect; never executed (the execution status of this line is deduced): arrowOpt.rect = rect; | - |
789 | arrowOpt.palette = toolbutton->palette; never executed (the execution status of this line is deduced): arrowOpt.palette = toolbutton->palette; | - |
790 | arrowOpt.state = toolbutton->state; never executed (the execution status of this line is deduced): arrowOpt.state = toolbutton->state; | - |
791 | style->drawPrimitive(pe, &arrowOpt, painter, widget); never executed (the execution status of this line is deduced): style->drawPrimitive(pe, &arrowOpt, painter, widget); | - |
792 | } | 0 |
793 | #endif // QT_NO_TOOLBUTTON | - |
794 | | - |
795 | #ifndef QT_NO_ITEMVIEWS | - |
796 | | - |
797 | static QSizeF viewItemTextLayout(QTextLayout &textLayout, int lineWidth) | - |
798 | { | - |
799 | qreal height = 0; executed (the execution status of this line is deduced): qreal height = 0; | - |
800 | qreal widthUsed = 0; executed (the execution status of this line is deduced): qreal widthUsed = 0; | - |
801 | textLayout.beginLayout(); executed (the execution status of this line is deduced): textLayout.beginLayout(); | - |
802 | while (true) { partially evaluated: true yes Evaluation Count:283951 | no Evaluation Count:0 |
| 0-283951 |
803 | QTextLine line = textLayout.createLine(); executed (the execution status of this line is deduced): QTextLine line = textLayout.createLine(); | - |
804 | if (!line.isValid()) evaluated: !line.isValid() yes Evaluation Count:136899 | yes Evaluation Count:147052 |
| 136899-147052 |
805 | break; executed: break; Execution Count:136899 | 136899 |
806 | line.setLineWidth(lineWidth); executed (the execution status of this line is deduced): line.setLineWidth(lineWidth); | - |
807 | line.setPosition(QPointF(0, height)); executed (the execution status of this line is deduced): line.setPosition(QPointF(0, height)); | - |
808 | height += line.height(); executed (the execution status of this line is deduced): height += line.height(); | - |
809 | widthUsed = qMax(widthUsed, line.naturalTextWidth()); executed (the execution status of this line is deduced): widthUsed = qMax(widthUsed, line.naturalTextWidth()); | - |
810 | } executed: } Execution Count:147052 | 147052 |
811 | textLayout.endLayout(); executed (the execution status of this line is deduced): textLayout.endLayout(); | - |
812 | return QSizeF(widthUsed, height); executed: return QSizeF(widthUsed, height); Execution Count:136899 | 136899 |
813 | } | - |
814 | | - |
815 | QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItem *option, int role) const | - |
816 | { | - |
817 | const QWidget *widget = option->widget; executed (the execution status of this line is deduced): const QWidget *widget = option->widget; | - |
818 | switch (role) { | - |
819 | case Qt::CheckStateRole: | - |
820 | if (option->features & QStyleOptionViewItem::HasCheckIndicator) evaluated: option->features & QStyleOptionViewItem::HasCheckIndicator yes Evaluation Count:86 | yes Evaluation Count:163894 |
| 86-163894 |
821 | return QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), executed: return QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget)); Execution Count:86 | 86 |
822 | proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget)); executed: return QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget)); Execution Count:86 | 86 |
823 | break; executed: break; Execution Count:163894 | 163894 |
824 | case Qt::DisplayRole: | - |
825 | if (option->features & QStyleOptionViewItem::HasDisplay) { evaluated: option->features & QStyleOptionViewItem::HasDisplay yes Evaluation Count:124580 | yes Evaluation Count:39400 |
| 39400-124580 |
826 | QTextOption textOption; executed (the execution status of this line is deduced): QTextOption textOption; | - |
827 | textOption.setWrapMode(QTextOption::WordWrap); executed (the execution status of this line is deduced): textOption.setWrapMode(QTextOption::WordWrap); | - |
828 | QTextLayout textLayout(option->text, option->font); executed (the execution status of this line is deduced): QTextLayout textLayout(option->text, option->font); | - |
829 | textLayout.setTextOption(textOption); executed (the execution status of this line is deduced): textLayout.setTextOption(textOption); | - |
830 | const bool wrapText = option->features & QStyleOptionViewItem::WrapText; executed (the execution status of this line is deduced): const bool wrapText = option->features & QStyleOptionViewItem::WrapText; | - |
831 | const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1; executed (the execution status of this line is deduced): const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1; | - |
832 | QRect bounds = option->rect; executed (the execution status of this line is deduced): QRect bounds = option->rect; | - |
833 | switch (option->decorationPosition) { | - |
834 | case QStyleOptionViewItem::Left: | - |
835 | case QStyleOptionViewItem::Right: | - |
836 | bounds.setWidth(wrapText && bounds.isValid() ? bounds.width() - 2 * textMargin : QFIXED_MAX); executed (the execution status of this line is deduced): bounds.setWidth(wrapText && bounds.isValid() ? bounds.width() - 2 * textMargin : (2147483647/256)); | - |
837 | break; executed: break; Execution Count:123962 | 123962 |
838 | case QStyleOptionViewItem::Top: | - |
839 | case QStyleOptionViewItem::Bottom: | - |
840 | bounds.setWidth(wrapText ? option->decorationSize.width() : QFIXED_MAX); executed (the execution status of this line is deduced): bounds.setWidth(wrapText ? option->decorationSize.width() : (2147483647/256)); | - |
841 | break; executed: break; Execution Count:618 | 618 |
842 | default: | - |
843 | break; | 0 |
844 | } | - |
845 | | - |
846 | const int lineWidth = bounds.width(); executed (the execution status of this line is deduced): const int lineWidth = bounds.width(); | - |
847 | const QSizeF size = viewItemTextLayout(textLayout, lineWidth); executed (the execution status of this line is deduced): const QSizeF size = viewItemTextLayout(textLayout, lineWidth); | - |
848 | return QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height())); executed: return QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height())); Execution Count:124580 | 124580 |
849 | } | - |
850 | break; executed: break; Execution Count:39400 | 39400 |
851 | case Qt::DecorationRole: | - |
852 | if (option->features & QStyleOptionViewItem::HasDecoration) { evaluated: option->features & QStyleOptionViewItem::HasDecoration yes Evaluation Count:27524 | yes Evaluation Count:136456 |
| 27524-136456 |
853 | return option->decorationSize; executed: return option->decorationSize; Execution Count:27524 | 27524 |
854 | } | - |
855 | break; executed: break; Execution Count:136456 | 136456 |
856 | default: | - |
857 | break; | 0 |
858 | } | - |
859 | | - |
860 | return QSize(0, 0); executed: return QSize(0, 0); Execution Count:339750 | 339750 |
861 | } | - |
862 | | - |
863 | void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewItem *option, const QRect &rect) const | - |
864 | { | - |
865 | const QWidget *widget = option->widget; executed (the execution status of this line is deduced): const QWidget *widget = option->widget; | - |
866 | const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1; executed (the execution status of this line is deduced): const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1; | - |
867 | | - |
868 | QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); // remove width padding executed (the execution status of this line is deduced): QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); | - |
869 | const bool wrapText = option->features & QStyleOptionViewItem::WrapText; executed (the execution status of this line is deduced): const bool wrapText = option->features & QStyleOptionViewItem::WrapText; | - |
870 | QTextOption textOption; executed (the execution status of this line is deduced): QTextOption textOption; | - |
871 | textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap); executed (the execution status of this line is deduced): textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap); | - |
872 | textOption.setTextDirection(option->direction); executed (the execution status of this line is deduced): textOption.setTextDirection(option->direction); | - |
873 | textOption.setAlignment(QStyle::visualAlignment(option->direction, option->displayAlignment)); executed (the execution status of this line is deduced): textOption.setAlignment(QStyle::visualAlignment(option->direction, option->displayAlignment)); | - |
874 | QTextLayout textLayout(option->text, option->font); executed (the execution status of this line is deduced): QTextLayout textLayout(option->text, option->font); | - |
875 | textLayout.setTextOption(textOption); executed (the execution status of this line is deduced): textLayout.setTextOption(textOption); | - |
876 | | - |
877 | viewItemTextLayout(textLayout, textRect.width()); executed (the execution status of this line is deduced): viewItemTextLayout(textLayout, textRect.width()); | - |
878 | | - |
879 | QString elidedText; executed (the execution status of this line is deduced): QString elidedText; | - |
880 | qreal height = 0; executed (the execution status of this line is deduced): qreal height = 0; | - |
881 | qreal width = 0; executed (the execution status of this line is deduced): qreal width = 0; | - |
882 | int elidedIndex = -1; executed (the execution status of this line is deduced): int elidedIndex = -1; | - |
883 | const int lineCount = textLayout.lineCount(); executed (the execution status of this line is deduced): const int lineCount = textLayout.lineCount(); | - |
884 | for (int j = 0; j < lineCount; ++j) { evaluated: j < lineCount yes Evaluation Count:13078 | yes Evaluation Count:11473 |
| 11473-13078 |
885 | const QTextLine line = textLayout.lineAt(j); executed (the execution status of this line is deduced): const QTextLine line = textLayout.lineAt(j); | - |
886 | if (j + 1 <= lineCount - 1) { evaluated: j + 1 <= lineCount - 1 yes Evaluation Count:812 | yes Evaluation Count:12266 |
| 812-12266 |
887 | const QTextLine nextLine = textLayout.lineAt(j + 1); executed (the execution status of this line is deduced): const QTextLine nextLine = textLayout.lineAt(j + 1); | - |
888 | if ((nextLine.y() + nextLine.height()) > textRect.height()) { evaluated: (nextLine.y() + nextLine.height()) > textRect.height() yes Evaluation Count:53 | yes Evaluation Count:759 |
| 53-759 |
889 | int start = line.textStart(); executed (the execution status of this line is deduced): int start = line.textStart(); | - |
890 | int length = line.textLength() + nextLine.textLength(); executed (the execution status of this line is deduced): int length = line.textLength() + nextLine.textLength(); | - |
891 | const QStackTextEngine engine(textLayout.text().mid(start, length), option->font); executed (the execution status of this line is deduced): const QStackTextEngine engine(textLayout.text().mid(start, length), option->font); | - |
892 | elidedText = engine.elidedText(option->textElideMode, textRect.width()); executed (the execution status of this line is deduced): elidedText = engine.elidedText(option->textElideMode, textRect.width()); | - |
893 | height += line.height(); executed (the execution status of this line is deduced): height += line.height(); | - |
894 | width = textRect.width(); executed (the execution status of this line is deduced): width = textRect.width(); | - |
895 | elidedIndex = j; executed (the execution status of this line is deduced): elidedIndex = j; | - |
896 | break; executed: break; Execution Count:53 | 53 |
897 | } | - |
898 | } executed: } Execution Count:759 | 759 |
899 | if (line.naturalTextWidth() > textRect.width()) { evaluated: line.naturalTextWidth() > textRect.width() yes Evaluation Count:793 | yes Evaluation Count:12232 |
| 793-12232 |
900 | int start = line.textStart(); executed (the execution status of this line is deduced): int start = line.textStart(); | - |
901 | int length = line.textLength(); executed (the execution status of this line is deduced): int length = line.textLength(); | - |
902 | const QStackTextEngine engine(textLayout.text().mid(start, length), option->font); executed (the execution status of this line is deduced): const QStackTextEngine engine(textLayout.text().mid(start, length), option->font); | - |
903 | elidedText = engine.elidedText(option->textElideMode, textRect.width()); executed (the execution status of this line is deduced): elidedText = engine.elidedText(option->textElideMode, textRect.width()); | - |
904 | height += line.height(); executed (the execution status of this line is deduced): height += line.height(); | - |
905 | width = textRect.width(); executed (the execution status of this line is deduced): width = textRect.width(); | - |
906 | elidedIndex = j; executed (the execution status of this line is deduced): elidedIndex = j; | - |
907 | break; executed: break; Execution Count:793 | 793 |
908 | } | - |
909 | width = qMax<qreal>(width, line.width()); executed (the execution status of this line is deduced): width = qMax<qreal>(width, line.width()); | - |
910 | height += line.height(); executed (the execution status of this line is deduced): height += line.height(); | - |
911 | } executed: } Execution Count:12232 | 12232 |
912 | | - |
913 | const QRect layoutRect = QStyle::alignedRect(option->direction, option->displayAlignment, executed (the execution status of this line is deduced): const QRect layoutRect = QStyle::alignedRect(option->direction, option->displayAlignment, | - |
914 | QSize(int(width), int(height)), textRect); executed (the execution status of this line is deduced): QSize(int(width), int(height)), textRect); | - |
915 | const QPointF position = layoutRect.topLeft(); executed (the execution status of this line is deduced): const QPointF position = layoutRect.topLeft(); | - |
916 | for (int i = 0; i < lineCount; ++i) { evaluated: i < lineCount yes Evaluation Count:13078 | yes Evaluation Count:11473 |
| 11473-13078 |
917 | const QTextLine line = textLayout.lineAt(i); executed (the execution status of this line is deduced): const QTextLine line = textLayout.lineAt(i); | - |
918 | if (i == elidedIndex) { evaluated: i == elidedIndex yes Evaluation Count:846 | yes Evaluation Count:12232 |
| 846-12232 |
919 | qreal x = position.x() + line.x(); executed (the execution status of this line is deduced): qreal x = position.x() + line.x(); | - |
920 | qreal y = position.y() + line.y() + line.ascent(); executed (the execution status of this line is deduced): qreal y = position.y() + line.y() + line.ascent(); | - |
921 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
922 | p->setFont(option->font); executed (the execution status of this line is deduced): p->setFont(option->font); | - |
923 | p->drawText(QPointF(x, y), elidedText); executed (the execution status of this line is deduced): p->drawText(QPointF(x, y), elidedText); | - |
924 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
925 | break; executed: break; Execution Count:846 | 846 |
926 | } | - |
927 | line.draw(p, position); executed (the execution status of this line is deduced): line.draw(p, position); | - |
928 | } executed: } Execution Count:12232 | 12232 |
929 | } executed: } Execution Count:12319 | 12319 |
930 | | - |
931 | /*! \internal | - |
932 | compute the position for the different component of an item (pixmap, text, checkbox) | - |
933 | | - |
934 | Set sizehint to false to layout the elements inside opt->rect. Set sizehint to true to ignore | - |
935 | opt->rect and return rectangles in infinite space | - |
936 | | - |
937 | Code duplicated in QItemDelegate::doLayout | - |
938 | */ | - |
939 | void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItem *opt, QRect *checkRect, | - |
940 | QRect *pixmapRect, QRect *textRect, bool sizehint) const | - |
941 | { | - |
942 | Q_ASSERT(checkRect && pixmapRect && textRect); executed (the execution status of this line is deduced): qt_noop(); | - |
943 | *pixmapRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::DecorationRole)); executed (the execution status of this line is deduced): *pixmapRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::DecorationRole)); | - |
944 | *textRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::DisplayRole)); executed (the execution status of this line is deduced): *textRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::DisplayRole)); | - |
945 | *checkRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::CheckStateRole)); executed (the execution status of this line is deduced): *checkRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::CheckStateRole)); | - |
946 | | - |
947 | const QWidget *widget = opt->widget; executed (the execution status of this line is deduced): const QWidget *widget = opt->widget; | - |
948 | const bool hasCheck = checkRect->isValid(); executed (the execution status of this line is deduced): const bool hasCheck = checkRect->isValid(); | - |
949 | const bool hasPixmap = pixmapRect->isValid(); executed (the execution status of this line is deduced): const bool hasPixmap = pixmapRect->isValid(); | - |
950 | const bool hasText = textRect->isValid(); executed (the execution status of this line is deduced): const bool hasText = textRect->isValid(); | - |
951 | const int textMargin = hasText ? proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, widget) + 1 : 0; evaluated: hasText yes Evaluation Count:124580 | yes Evaluation Count:39400 |
| 39400-124580 |
952 | const int pixmapMargin = hasPixmap ? proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, widget) + 1 : 0; evaluated: hasPixmap yes Evaluation Count:27524 | yes Evaluation Count:136456 |
| 27524-136456 |
953 | const int checkMargin = hasCheck ? proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, widget) + 1 : 0; evaluated: hasCheck yes Evaluation Count:86 | yes Evaluation Count:163894 |
| 86-163894 |
954 | int x = opt->rect.left(); executed (the execution status of this line is deduced): int x = opt->rect.left(); | - |
955 | int y = opt->rect.top(); executed (the execution status of this line is deduced): int y = opt->rect.top(); | - |
956 | int w, h; executed (the execution status of this line is deduced): int w, h; | - |
957 | | - |
958 | if (textRect->height() == 0 && (!hasPixmap || !sizehint)) { evaluated: textRect->height() == 0 yes Evaluation Count:39400 | yes Evaluation Count:124580 |
evaluated: !hasPixmap yes Evaluation Count:39391 | yes Evaluation Count:9 |
evaluated: !sizehint yes Evaluation Count:4 | yes Evaluation Count:5 |
| 4-124580 |
959 | //if there is no text, we still want to have a decent height for the item sizeHint and the editor size | - |
960 | textRect->setHeight(opt->fontMetrics.height()); executed (the execution status of this line is deduced): textRect->setHeight(opt->fontMetrics.height()); | - |
961 | } executed: } Execution Count:39395 | 39395 |
962 | | - |
963 | QSize pm(0, 0); executed (the execution status of this line is deduced): QSize pm(0, 0); | - |
964 | if (hasPixmap) { evaluated: hasPixmap yes Evaluation Count:27524 | yes Evaluation Count:136456 |
| 27524-136456 |
965 | pm = pixmapRect->size(); executed (the execution status of this line is deduced): pm = pixmapRect->size(); | - |
966 | pm.rwidth() += 2 * pixmapMargin; executed (the execution status of this line is deduced): pm.rwidth() += 2 * pixmapMargin; | - |
967 | } executed: } Execution Count:27524 | 27524 |
968 | if (sizehint) { evaluated: sizehint yes Evaluation Count:150673 | yes Evaluation Count:13307 |
| 13307-150673 |
969 | h = qMax(checkRect->height(), qMax(textRect->height(), pm.height())); executed (the execution status of this line is deduced): h = qMax(checkRect->height(), qMax(textRect->height(), pm.height())); | - |
970 | if (opt->decorationPosition == QStyleOptionViewItem::Left evaluated: opt->decorationPosition == QStyleOptionViewItem::Left yes Evaluation Count:150244 | yes Evaluation Count:429 |
| 429-150244 |
971 | || opt->decorationPosition == QStyleOptionViewItem::Right) { partially evaluated: opt->decorationPosition == QStyleOptionViewItem::Right no Evaluation Count:0 | yes Evaluation Count:429 |
| 0-429 |
972 | w = textRect->width() + pm.width(); executed (the execution status of this line is deduced): w = textRect->width() + pm.width(); | - |
973 | } else { executed: } Execution Count:150244 | 150244 |
974 | w = qMax(textRect->width(), pm.width()); executed (the execution status of this line is deduced): w = qMax(textRect->width(), pm.width()); | - |
975 | } executed: } Execution Count:429 | 429 |
976 | } else { | - |
977 | w = opt->rect.width(); executed (the execution status of this line is deduced): w = opt->rect.width(); | - |
978 | h = opt->rect.height(); executed (the execution status of this line is deduced): h = opt->rect.height(); | - |
979 | } executed: } Execution Count:13307 | 13307 |
980 | | - |
981 | int cw = 0; executed (the execution status of this line is deduced): int cw = 0; | - |
982 | QRect check; executed (the execution status of this line is deduced): QRect check; | - |
983 | if (hasCheck) { evaluated: hasCheck yes Evaluation Count:86 | yes Evaluation Count:163894 |
| 86-163894 |
984 | cw = checkRect->width() + 2 * checkMargin; executed (the execution status of this line is deduced): cw = checkRect->width() + 2 * checkMargin; | - |
985 | if (sizehint) w += cw; executed: w += cw; Execution Count:57 evaluated: sizehint yes Evaluation Count:57 | yes Evaluation Count:29 |
| 29-57 |
986 | if (opt->direction == Qt::RightToLeft) { evaluated: opt->direction == Qt::RightToLeft yes Evaluation Count:8 | yes Evaluation Count:78 |
| 8-78 |
987 | check.setRect(x + w - cw, y, cw, h); executed (the execution status of this line is deduced): check.setRect(x + w - cw, y, cw, h); | - |
988 | } else { executed: } Execution Count:8 | 8 |
989 | check.setRect(x, y, cw, h); executed (the execution status of this line is deduced): check.setRect(x, y, cw, h); | - |
990 | } executed: } Execution Count:78 | 78 |
991 | } | - |
992 | | - |
993 | QRect display; executed (the execution status of this line is deduced): QRect display; | - |
994 | QRect decoration; executed (the execution status of this line is deduced): QRect decoration; | - |
995 | switch (opt->decorationPosition) { | - |
996 | case QStyleOptionViewItem::Top: { | - |
997 | if (hasPixmap) evaluated: hasPixmap yes Evaluation Count:102 | yes Evaluation Count:517 |
| 102-517 |
998 | pm.setHeight(pm.height() + pixmapMargin); // add space executed: pm.setHeight(pm.height() + pixmapMargin); Execution Count:102 | 102 |
999 | h = sizehint ? textRect->height() : h - pm.height(); evaluated: sizehint yes Evaluation Count:429 | yes Evaluation Count:190 |
| 190-429 |
1000 | | - |
1001 | if (opt->direction == Qt::RightToLeft) { partially evaluated: opt->direction == Qt::RightToLeft no Evaluation Count:0 | yes Evaluation Count:619 |
| 0-619 |
1002 | decoration.setRect(x, y, w - cw, pm.height()); never executed (the execution status of this line is deduced): decoration.setRect(x, y, w - cw, pm.height()); | - |
1003 | display.setRect(x, y + pm.height(), w - cw, h); never executed (the execution status of this line is deduced): display.setRect(x, y + pm.height(), w - cw, h); | - |
1004 | } else { | 0 |
1005 | decoration.setRect(x + cw, y, w - cw, pm.height()); executed (the execution status of this line is deduced): decoration.setRect(x + cw, y, w - cw, pm.height()); | - |
1006 | display.setRect(x + cw, y + pm.height(), w - cw, h); executed (the execution status of this line is deduced): display.setRect(x + cw, y + pm.height(), w - cw, h); | - |
1007 | } executed: } Execution Count:619 | 619 |
1008 | break; } executed: break; Execution Count:619 | 619 |
1009 | case QStyleOptionViewItem::Bottom: { | - |
1010 | if (hasText) | 0 |
1011 | textRect->setHeight(textRect->height() + textMargin); // add space never executed: textRect->setHeight(textRect->height() + textMargin); | 0 |
1012 | h = sizehint ? textRect->height() + pm.height() : h; never evaluated: sizehint | 0 |
1013 | | - |
1014 | if (opt->direction == Qt::RightToLeft) { never evaluated: opt->direction == Qt::RightToLeft | 0 |
1015 | display.setRect(x, y, w - cw, textRect->height()); never executed (the execution status of this line is deduced): display.setRect(x, y, w - cw, textRect->height()); | - |
1016 | decoration.setRect(x, y + textRect->height(), w - cw, h - textRect->height()); never executed (the execution status of this line is deduced): decoration.setRect(x, y + textRect->height(), w - cw, h - textRect->height()); | - |
1017 | } else { | 0 |
1018 | display.setRect(x + cw, y, w - cw, textRect->height()); never executed (the execution status of this line is deduced): display.setRect(x + cw, y, w - cw, textRect->height()); | - |
1019 | decoration.setRect(x + cw, y + textRect->height(), w - cw, h - textRect->height()); never executed (the execution status of this line is deduced): decoration.setRect(x + cw, y + textRect->height(), w - cw, h - textRect->height()); | - |
1020 | } | 0 |
1021 | break; } | 0 |
1022 | case QStyleOptionViewItem::Left: { | - |
1023 | if (opt->direction == Qt::LeftToRight) { evaluated: opt->direction == Qt::LeftToRight yes Evaluation Count:163319 | yes Evaluation Count:42 |
| 42-163319 |
1024 | decoration.setRect(x + cw, y, pm.width(), h); executed (the execution status of this line is deduced): decoration.setRect(x + cw, y, pm.width(), h); | - |
1025 | display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); executed (the execution status of this line is deduced): display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); | - |
1026 | } else { executed: } Execution Count:163319 | 163319 |
1027 | display.setRect(x, y, w - pm.width() - cw, h); executed (the execution status of this line is deduced): display.setRect(x, y, w - pm.width() - cw, h); | - |
1028 | decoration.setRect(display.right() + 1, y, pm.width(), h); executed (the execution status of this line is deduced): decoration.setRect(display.right() + 1, y, pm.width(), h); | - |
1029 | } executed: } Execution Count:42 | 42 |
1030 | break; } executed: break; Execution Count:163361 | 163361 |
1031 | case QStyleOptionViewItem::Right: { | - |
1032 | if (opt->direction == Qt::LeftToRight) { never evaluated: opt->direction == Qt::LeftToRight | 0 |
1033 | display.setRect(x + cw, y, w - pm.width() - cw, h); never executed (the execution status of this line is deduced): display.setRect(x + cw, y, w - pm.width() - cw, h); | - |
1034 | decoration.setRect(display.right() + 1, y, pm.width(), h); never executed (the execution status of this line is deduced): decoration.setRect(display.right() + 1, y, pm.width(), h); | - |
1035 | } else { | 0 |
1036 | decoration.setRect(x, y, pm.width(), h); never executed (the execution status of this line is deduced): decoration.setRect(x, y, pm.width(), h); | - |
1037 | display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); never executed (the execution status of this line is deduced): display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); | - |
1038 | } | 0 |
1039 | break; } | 0 |
1040 | default: | - |
1041 | qWarning("doLayout: decoration position is invalid"); never executed (the execution status of this line is deduced): QMessageLogger("styles/qcommonstyle.cpp", 1041, __PRETTY_FUNCTION__).warning("doLayout: decoration position is invalid"); | - |
1042 | decoration = *pixmapRect; never executed (the execution status of this line is deduced): decoration = *pixmapRect; | - |
1043 | break; | 0 |
1044 | } | - |
1045 | | - |
1046 | if (!sizehint) { // we only need to do the internal layout if we are going to paint evaluated: !sizehint yes Evaluation Count:13307 | yes Evaluation Count:150673 |
| 13307-150673 |
1047 | *checkRect = QStyle::alignedRect(opt->direction, Qt::AlignCenter, executed (the execution status of this line is deduced): *checkRect = QStyle::alignedRect(opt->direction, Qt::AlignCenter, | - |
1048 | checkRect->size(), check); executed (the execution status of this line is deduced): checkRect->size(), check); | - |
1049 | *pixmapRect = QStyle::alignedRect(opt->direction, opt->decorationAlignment, executed (the execution status of this line is deduced): *pixmapRect = QStyle::alignedRect(opt->direction, opt->decorationAlignment, | - |
1050 | pixmapRect->size(), decoration); executed (the execution status of this line is deduced): pixmapRect->size(), decoration); | - |
1051 | // the text takes up all available space, unless the decoration is not shown as selected | - |
1052 | if (opt->showDecorationSelected) evaluated: opt->showDecorationSelected yes Evaluation Count:12006 | yes Evaluation Count:1301 |
| 1301-12006 |
1053 | *textRect = display; executed: *textRect = display; Execution Count:12006 | 12006 |
1054 | else | - |
1055 | *textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment, executed: *textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment, textRect->size().boundedTo(display.size()), display); Execution Count:1301 | 1301 |
1056 | textRect->size().boundedTo(display.size()), display); executed: *textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment, textRect->size().boundedTo(display.size()), display); Execution Count:1301 | 1301 |
1057 | } else { | - |
1058 | *checkRect = check; executed (the execution status of this line is deduced): *checkRect = check; | - |
1059 | *pixmapRect = decoration; executed (the execution status of this line is deduced): *pixmapRect = decoration; | - |
1060 | *textRect = display; executed (the execution status of this line is deduced): *textRect = display; | - |
1061 | } executed: } Execution Count:150673 | 150673 |
1062 | } | - |
1063 | #endif // QT_NO_ITEMVIEWS | - |
1064 | | - |
1065 | | - |
1066 | #ifndef QT_NO_TABBAR | - |
1067 | /*! \internal | - |
1068 | Compute the textRect and the pixmapRect from the opt rect | - |
1069 | | - |
1070 | Uses the same computation than in QTabBar::tabSizeHint | - |
1071 | */ | - |
1072 | void QCommonStylePrivate::tabLayout(const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const | - |
1073 | { | - |
1074 | Q_ASSERT(textRect); executed (the execution status of this line is deduced): qt_noop(); | - |
1075 | Q_ASSERT(iconRect); executed (the execution status of this line is deduced): qt_noop(); | - |
1076 | QRect tr = opt->rect; executed (the execution status of this line is deduced): QRect tr = opt->rect; | - |
1077 | bool verticalTabs = opt->shape == QTabBar::RoundedEast evaluated: opt->shape == QTabBar::RoundedEast yes Evaluation Count:12 | yes Evaluation Count:776 |
| 12-776 |
1078 | || opt->shape == QTabBar::RoundedWest evaluated: opt->shape == QTabBar::RoundedWest yes Evaluation Count:12 | yes Evaluation Count:764 |
| 12-764 |
1079 | || opt->shape == QTabBar::TriangularEast partially evaluated: opt->shape == QTabBar::TriangularEast no Evaluation Count:0 | yes Evaluation Count:764 |
| 0-764 |
1080 | || opt->shape == QTabBar::TriangularWest; partially evaluated: opt->shape == QTabBar::TriangularWest no Evaluation Count:0 | yes Evaluation Count:764 |
| 0-764 |
1081 | if (verticalTabs) evaluated: verticalTabs yes Evaluation Count:24 | yes Evaluation Count:764 |
| 24-764 |
1082 | tr.setRect(0, 0, tr.height(), tr.width()); //0, 0 as we will have a translate transform executed: tr.setRect(0, 0, tr.height(), tr.width()); Execution Count:24 | 24 |
1083 | | - |
1084 | int verticalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftVertical, opt, widget); executed (the execution status of this line is deduced): int verticalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftVertical, opt, widget); | - |
1085 | int horizontalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, opt, widget); executed (the execution status of this line is deduced): int horizontalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, opt, widget); | - |
1086 | int hpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; executed (the execution status of this line is deduced): int hpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; | - |
1087 | int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; executed (the execution status of this line is deduced): int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; | - |
1088 | if (opt->shape == QTabBar::RoundedSouth || opt->shape == QTabBar::TriangularSouth) evaluated: opt->shape == QTabBar::RoundedSouth yes Evaluation Count:52 | yes Evaluation Count:736 |
partially evaluated: opt->shape == QTabBar::TriangularSouth no Evaluation Count:0 | yes Evaluation Count:736 |
| 0-736 |
1089 | verticalShift = -verticalShift; executed: verticalShift = -verticalShift; Execution Count:52 | 52 |
1090 | tr.adjust(hpadding, verticalShift - vpadding, horizontalShift - hpadding, vpadding); executed (the execution status of this line is deduced): tr.adjust(hpadding, verticalShift - vpadding, horizontalShift - hpadding, vpadding); | - |
1091 | bool selected = opt->state & QStyle::State_Selected; executed (the execution status of this line is deduced): bool selected = opt->state & QStyle::State_Selected; | - |
1092 | if (selected) { evaluated: selected yes Evaluation Count:418 | yes Evaluation Count:370 |
| 370-418 |
1093 | tr.setTop(tr.top() - verticalShift); executed (the execution status of this line is deduced): tr.setTop(tr.top() - verticalShift); | - |
1094 | tr.setRight(tr.right() - horizontalShift); executed (the execution status of this line is deduced): tr.setRight(tr.right() - horizontalShift); | - |
1095 | } executed: } Execution Count:418 | 418 |
1096 | | - |
1097 | // left widget | - |
1098 | if (!opt->leftButtonSize.isEmpty()) { evaluated: !opt->leftButtonSize.isEmpty() yes Evaluation Count:12 | yes Evaluation Count:776 |
| 12-776 |
1099 | tr.setLeft(tr.left() + 4 + executed (the execution status of this line is deduced): tr.setLeft(tr.left() + 4 + | - |
1100 | (verticalTabs ? opt->leftButtonSize.height() : opt->leftButtonSize.width())); executed (the execution status of this line is deduced): (verticalTabs ? opt->leftButtonSize.height() : opt->leftButtonSize.width())); | - |
1101 | } executed: } Execution Count:12 | 12 |
1102 | // right widget | - |
1103 | if (!opt->rightButtonSize.isEmpty()) { evaluated: !opt->rightButtonSize.isEmpty() yes Evaluation Count:58 | yes Evaluation Count:730 |
| 58-730 |
1104 | tr.setRight(tr.right() - 4 - executed (the execution status of this line is deduced): tr.setRight(tr.right() - 4 - | - |
1105 | (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width())); executed (the execution status of this line is deduced): (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width())); | - |
1106 | } executed: } Execution Count:58 | 58 |
1107 | | - |
1108 | // icon | - |
1109 | if (!opt->icon.isNull()) { partially evaluated: !opt->icon.isNull() no Evaluation Count:0 | yes Evaluation Count:788 |
| 0-788 |
1110 | QSize iconSize = opt->iconSize; never executed (the execution status of this line is deduced): QSize iconSize = opt->iconSize; | - |
1111 | if (!iconSize.isValid()) { never evaluated: !iconSize.isValid() | 0 |
1112 | int iconExtent = proxyStyle->pixelMetric(QStyle::PM_SmallIconSize); never executed (the execution status of this line is deduced): int iconExtent = proxyStyle->pixelMetric(QStyle::PM_SmallIconSize); | - |
1113 | iconSize = QSize(iconExtent, iconExtent); never executed (the execution status of this line is deduced): iconSize = QSize(iconExtent, iconExtent); | - |
1114 | } | 0 |
1115 | QSize tabIconSize = opt->icon.actualSize(iconSize, never executed (the execution status of this line is deduced): QSize tabIconSize = opt->icon.actualSize(iconSize, | - |
1116 | (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, never executed (the execution status of this line is deduced): (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, | - |
1117 | (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off ); never executed (the execution status of this line is deduced): (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off ); | - |
1118 | | - |
1119 | *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2, never executed (the execution status of this line is deduced): *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2, | - |
1120 | tabIconSize.width(), tabIconSize .height()); never executed (the execution status of this line is deduced): tabIconSize.width(), tabIconSize .height()); | - |
1121 | if (!verticalTabs) never evaluated: !verticalTabs | 0 |
1122 | *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect); never executed: *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect); | 0 |
1123 | tr.setLeft(tr.left() + tabIconSize.width() + 4); never executed (the execution status of this line is deduced): tr.setLeft(tr.left() + tabIconSize.width() + 4); | - |
1124 | } | 0 |
1125 | | - |
1126 | if (!verticalTabs) evaluated: !verticalTabs yes Evaluation Count:764 | yes Evaluation Count:24 |
| 24-764 |
1127 | tr = proxyStyle->visualRect(opt->direction, opt->rect, tr); executed: tr = proxyStyle->visualRect(opt->direction, opt->rect, tr); Execution Count:764 | 764 |
1128 | | - |
1129 | *textRect = tr; executed (the execution status of this line is deduced): *textRect = tr; | - |
1130 | } executed: } Execution Count:788 | 788 |
1131 | #endif //QT_NO_TABBAR | - |
1132 | | - |
1133 | /*! \internal */ | - |
1134 | QList<const QObject*> QCommonStylePrivate::animationTargets() const | - |
1135 | { | - |
1136 | return animations.keys(); never executed: return animations.keys(); | 0 |
1137 | } | - |
1138 | | - |
1139 | /*! \internal */ | - |
1140 | QStyleAnimation * QCommonStylePrivate::animation(const QObject *target) const | - |
1141 | { | - |
1142 | return animations.value(target); executed: return animations.value(target); Execution Count:17 | 17 |
1143 | } | - |
1144 | | - |
1145 | /*! \internal */ | - |
1146 | void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const | - |
1147 | { | - |
1148 | Q_Q(const QCommonStyle); executed (the execution status of this line is deduced): const QCommonStyle * const q = q_func(); | - |
1149 | stopAnimation(animation->target()); executed (the execution status of this line is deduced): stopAnimation(animation->target()); | - |
1150 | q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection); executed (the execution status of this line is deduced): q->connect(animation, "2""destroyed()", "1""_q_removeAnimation()", Qt::UniqueConnection); | - |
1151 | animations.insert(animation->target(), animation); executed (the execution status of this line is deduced): animations.insert(animation->target(), animation); | - |
1152 | animation->start(QAbstractAnimation::DeleteWhenStopped); executed (the execution status of this line is deduced): animation->start(QAbstractAnimation::DeleteWhenStopped); | - |
1153 | } executed: } Execution Count:2 | 2 |
1154 | | - |
1155 | /*! \internal */ | - |
1156 | void QCommonStylePrivate::stopAnimation(const QObject *target) const | - |
1157 | { | - |
1158 | QStyleAnimation *animation = animations.take(target); executed (the execution status of this line is deduced): QStyleAnimation *animation = animations.take(target); | - |
1159 | if (animation) { evaluated: animation yes Evaluation Count:1 | yes Evaluation Count:44 |
| 1-44 |
1160 | animation->stop(); executed (the execution status of this line is deduced): animation->stop(); | - |
1161 | delete animation; executed (the execution status of this line is deduced): delete animation; | - |
1162 | } executed: } Execution Count:1 | 1 |
1163 | } executed: } Execution Count:45 | 45 |
1164 | | - |
1165 | /*! \internal */ | - |
1166 | void QCommonStylePrivate::_q_removeAnimation() | - |
1167 | { | - |
1168 | Q_Q(QCommonStyle); executed (the execution status of this line is deduced): QCommonStyle * const q = q_func(); | - |
1169 | QObject *animation = q->sender(); executed (the execution status of this line is deduced): QObject *animation = q->sender(); | - |
1170 | if (animation) partially evaluated: animation yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
1171 | animations.remove(animation->parent()); executed: animations.remove(animation->parent()); Execution Count:2 | 2 |
1172 | } executed: } Execution Count:2 | 2 |
1173 | | - |
1174 | /*! | - |
1175 | \reimp | - |
1176 | */ | - |
1177 | void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, | - |
1178 | QPainter *p, const QWidget *widget) const | - |
1179 | { | - |
1180 | Q_D(const QCommonStyle); executed (the execution status of this line is deduced): const QCommonStylePrivate * const d = d_func(); | - |
1181 | switch (element) { | - |
1182 | | - |
1183 | case CE_PushButton: | - |
1184 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:799 | yes Evaluation Count:3 |
| 3-799 |
1185 | proxy()->drawControl(CE_PushButtonBevel, btn, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_PushButtonBevel, btn, p, widget); | - |
1186 | QStyleOptionButton subopt = *btn; executed (the execution status of this line is deduced): QStyleOptionButton subopt = *btn; | - |
1187 | subopt.rect = subElementRect(SE_PushButtonContents, btn, widget); executed (the execution status of this line is deduced): subopt.rect = subElementRect(SE_PushButtonContents, btn, widget); | - |
1188 | proxy()->drawControl(CE_PushButtonLabel, &subopt, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_PushButtonLabel, &subopt, p, widget); | - |
1189 | if (btn->state & State_HasFocus) { evaluated: btn->state & State_HasFocus yes Evaluation Count:229 | yes Evaluation Count:570 |
| 229-570 |
1190 | QStyleOptionFocusRect fropt; executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt; | - |
1191 | fropt.QStyleOption::operator=(*btn); executed (the execution status of this line is deduced): fropt.QStyleOption::operator=(*btn); | - |
1192 | fropt.rect = subElementRect(SE_PushButtonFocusRect, btn, widget); executed (the execution status of this line is deduced): fropt.rect = subElementRect(SE_PushButtonFocusRect, btn, widget); | - |
1193 | proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); | - |
1194 | } executed: } Execution Count:229 | 229 |
1195 | } executed: } Execution Count:799 | 799 |
1196 | break; executed: break; Execution Count:802 | 802 |
1197 | case CE_PushButtonBevel: | - |
1198 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:821 | yes Evaluation Count:4 |
| 4-821 |
1199 | QRect br = btn->rect; executed (the execution status of this line is deduced): QRect br = btn->rect; | - |
1200 | int dbi = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget); executed (the execution status of this line is deduced): int dbi = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget); | - |
1201 | if (btn->features & QStyleOptionButton::DefaultButton) evaluated: btn->features & QStyleOptionButton::DefaultButton yes Evaluation Count:234 | yes Evaluation Count:587 |
| 234-587 |
1202 | proxy()->drawPrimitive(PE_FrameDefaultButton, opt, p, widget); executed: proxy()->drawPrimitive(PE_FrameDefaultButton, opt, p, widget); Execution Count:234 | 234 |
1203 | if (btn->features & QStyleOptionButton::AutoDefaultButton) evaluated: btn->features & QStyleOptionButton::AutoDefaultButton yes Evaluation Count:489 | yes Evaluation Count:332 |
| 332-489 |
1204 | br.setCoords(br.left() + dbi, br.top() + dbi, br.right() - dbi, br.bottom() - dbi); executed: br.setCoords(br.left() + dbi, br.top() + dbi, br.right() - dbi, br.bottom() - dbi); Execution Count:489 | 489 |
1205 | if (!(btn->features & (QStyleOptionButton::Flat | QStyleOptionButton::CommandLinkButton)) evaluated: !(btn->features & (QStyleOptionButton::Flat | QStyleOptionButton::CommandLinkButton)) yes Evaluation Count:780 | yes Evaluation Count:41 |
| 41-780 |
1206 | || btn->state & (State_Sunken | State_On) evaluated: btn->state & (State_Sunken | State_On) yes Evaluation Count:17 | yes Evaluation Count:24 |
| 17-24 |
1207 | || (btn->features & QStyleOptionButton::CommandLinkButton && btn->state & State_MouseOver)) { partially evaluated: btn->features & QStyleOptionButton::CommandLinkButton yes Evaluation Count:24 | no Evaluation Count:0 |
evaluated: btn->state & State_MouseOver yes Evaluation Count:1 | yes Evaluation Count:23 |
| 0-24 |
1208 | QStyleOptionButton tmpBtn = *btn; executed (the execution status of this line is deduced): QStyleOptionButton tmpBtn = *btn; | - |
1209 | tmpBtn.rect = br; executed (the execution status of this line is deduced): tmpBtn.rect = br; | - |
1210 | proxy()->drawPrimitive(PE_PanelButtonCommand, &tmpBtn, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonCommand, &tmpBtn, p, widget); | - |
1211 | } executed: } Execution Count:798 | 798 |
1212 | if (btn->features & QStyleOptionButton::HasMenu) { evaluated: btn->features & QStyleOptionButton::HasMenu yes Evaluation Count:8 | yes Evaluation Count:813 |
| 8-813 |
1213 | int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, btn, widget); executed (the execution status of this line is deduced): int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, btn, widget); | - |
1214 | QRect ir = btn->rect; executed (the execution status of this line is deduced): QRect ir = btn->rect; | - |
1215 | QStyleOptionButton newBtn = *btn; executed (the execution status of this line is deduced): QStyleOptionButton newBtn = *btn; | - |
1216 | newBtn.rect = QRect(ir.right() - mbi + 2, ir.height()/2 - mbi/2 + 3, mbi - 6, mbi - 6); executed (the execution status of this line is deduced): newBtn.rect = QRect(ir.right() - mbi + 2, ir.height()/2 - mbi/2 + 3, mbi - 6, mbi - 6); | - |
1217 | proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); | - |
1218 | } executed: } Execution Count:8 | 8 |
1219 | } executed: } Execution Count:821 | 821 |
1220 | break; executed: break; Execution Count:825 | 825 |
1221 | case CE_PushButtonLabel: | - |
1222 | if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(opt)) { evaluated: const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:799 | yes Evaluation Count:3 |
| 3-799 |
1223 | QRect textRect = button->rect; executed (the execution status of this line is deduced): QRect textRect = button->rect; | - |
1224 | uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic; executed (the execution status of this line is deduced): uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic; | - |
1225 | if (!proxy()->styleHint(SH_UnderlineShortcut, button, widget)) partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, button, widget) no Evaluation Count:0 | yes Evaluation Count:799 |
| 0-799 |
1226 | tf |= Qt::TextHideMnemonic; never executed: tf |= Qt::TextHideMnemonic; | 0 |
1227 | | - |
1228 | if (!button->icon.isNull()) { partially evaluated: !button->icon.isNull() no Evaluation Count:0 | yes Evaluation Count:799 |
| 0-799 |
1229 | //Center both icon and text | - |
1230 | QRect iconRect; never executed (the execution status of this line is deduced): QRect iconRect; | - |
1231 | QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; never evaluated: button->state & State_Enabled | 0 |
1232 | if (mode == QIcon::Normal && button->state & State_HasFocus) never evaluated: mode == QIcon::Normal never evaluated: button->state & State_HasFocus | 0 |
1233 | mode = QIcon::Active; never executed: mode = QIcon::Active; | 0 |
1234 | QIcon::State state = QIcon::Off; never executed (the execution status of this line is deduced): QIcon::State state = QIcon::Off; | - |
1235 | if (button->state & State_On) never evaluated: button->state & State_On | 0 |
1236 | state = QIcon::On; never executed: state = QIcon::On; | 0 |
1237 | | - |
1238 | QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state); never executed (the execution status of this line is deduced): QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state); | - |
1239 | int labelWidth = pixmap.width(); never executed (the execution status of this line is deduced): int labelWidth = pixmap.width(); | - |
1240 | int labelHeight = pixmap.height(); never executed (the execution status of this line is deduced): int labelHeight = pixmap.height(); | - |
1241 | int iconSpacing = 4;//### 4 is currently hardcoded in QPushButton::sizeHint() never executed (the execution status of this line is deduced): int iconSpacing = 4; | - |
1242 | int textWidth = button->fontMetrics.boundingRect(opt->rect, tf, button->text).width(); never executed (the execution status of this line is deduced): int textWidth = button->fontMetrics.boundingRect(opt->rect, tf, button->text).width(); | - |
1243 | if (!button->text.isEmpty()) never evaluated: !button->text.isEmpty() | 0 |
1244 | labelWidth += (textWidth + iconSpacing); never executed: labelWidth += (textWidth + iconSpacing); | 0 |
1245 | | - |
1246 | iconRect = QRect(textRect.x() + (textRect.width() - labelWidth) / 2, never executed (the execution status of this line is deduced): iconRect = QRect(textRect.x() + (textRect.width() - labelWidth) / 2, | - |
1247 | textRect.y() + (textRect.height() - labelHeight) / 2, never executed (the execution status of this line is deduced): textRect.y() + (textRect.height() - labelHeight) / 2, | - |
1248 | pixmap.width(), pixmap.height()); never executed (the execution status of this line is deduced): pixmap.width(), pixmap.height()); | - |
1249 | | - |
1250 | iconRect = visualRect(button->direction, textRect, iconRect); never executed (the execution status of this line is deduced): iconRect = visualRect(button->direction, textRect, iconRect); | - |
1251 | | - |
1252 | tf |= Qt::AlignLeft; //left align, we adjust the text-rect instead never executed (the execution status of this line is deduced): tf |= Qt::AlignLeft; | - |
1253 | | - |
1254 | if (button->direction == Qt::RightToLeft) never evaluated: button->direction == Qt::RightToLeft | 0 |
1255 | textRect.setRight(iconRect.left() - iconSpacing); never executed: textRect.setRight(iconRect.left() - iconSpacing); | 0 |
1256 | else | - |
1257 | textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing); never executed: textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing); | 0 |
1258 | | - |
1259 | if (button->state & (State_On | State_Sunken)) never evaluated: button->state & (State_On | State_Sunken) | 0 |
1260 | iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), never executed: iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget)); | 0 |
1261 | proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget)); never executed: iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget)); | 0 |
1262 | p->drawPixmap(iconRect, pixmap); never executed (the execution status of this line is deduced): p->drawPixmap(iconRect, pixmap); | - |
1263 | } else { | 0 |
1264 | tf |= Qt::AlignHCenter; executed (the execution status of this line is deduced): tf |= Qt::AlignHCenter; | - |
1265 | } executed: } Execution Count:799 | 799 |
1266 | if (button->state & (State_On | State_Sunken)) evaluated: button->state & (State_On | State_Sunken) yes Evaluation Count:72 | yes Evaluation Count:727 |
| 72-727 |
1267 | textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), executed: textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget)); Execution Count:72 | 72 |
1268 | proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget)); executed: textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget)); Execution Count:72 | 72 |
1269 | | - |
1270 | if (button->features & QStyleOptionButton::HasMenu) { evaluated: button->features & QStyleOptionButton::HasMenu yes Evaluation Count:8 | yes Evaluation Count:791 |
| 8-791 |
1271 | int indicatorSize = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget); executed (the execution status of this line is deduced): int indicatorSize = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget); | - |
1272 | if (button->direction == Qt::LeftToRight) partially evaluated: button->direction == Qt::LeftToRight yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
1273 | textRect = textRect.adjusted(0, 0, -indicatorSize, 0); executed: textRect = textRect.adjusted(0, 0, -indicatorSize, 0); Execution Count:8 | 8 |
1274 | else | - |
1275 | textRect = textRect.adjusted(indicatorSize, 0, 0, 0); never executed: textRect = textRect.adjusted(indicatorSize, 0, 0, 0); | 0 |
1276 | } | - |
1277 | proxy()->drawItemText(p, textRect, tf, button->palette, (button->state & State_Enabled), executed (the execution status of this line is deduced): proxy()->drawItemText(p, textRect, tf, button->palette, (button->state & State_Enabled), | - |
1278 | button->text, QPalette::ButtonText); executed (the execution status of this line is deduced): button->text, QPalette::ButtonText); | - |
1279 | } executed: } Execution Count:799 | 799 |
1280 | break; executed: break; Execution Count:802 | 802 |
1281 | case CE_RadioButton: | - |
1282 | case CE_CheckBox: | - |
1283 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:38 | yes Evaluation Count:8 |
| 8-38 |
1284 | bool isRadio = (element == CE_RadioButton); executed (the execution status of this line is deduced): bool isRadio = (element == CE_RadioButton); | - |
1285 | QStyleOptionButton subopt = *btn; executed (the execution status of this line is deduced): QStyleOptionButton subopt = *btn; | - |
1286 | subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator executed (the execution status of this line is deduced): subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator | - |
1287 | : SE_CheckBoxIndicator, btn, widget); executed (the execution status of this line is deduced): : SE_CheckBoxIndicator, btn, widget); | - |
1288 | proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox, executed (the execution status of this line is deduced): proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox, | - |
1289 | &subopt, p, widget); executed (the execution status of this line is deduced): &subopt, p, widget); | - |
1290 | subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents executed (the execution status of this line is deduced): subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents | - |
1291 | : SE_CheckBoxContents, btn, widget); executed (the execution status of this line is deduced): : SE_CheckBoxContents, btn, widget); | - |
1292 | proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, p, widget); | - |
1293 | if (btn->state & State_HasFocus) { evaluated: btn->state & State_HasFocus yes Evaluation Count:11 | yes Evaluation Count:27 |
| 11-27 |
1294 | QStyleOptionFocusRect fropt; executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt; | - |
1295 | fropt.QStyleOption::operator=(*btn); executed (the execution status of this line is deduced): fropt.QStyleOption::operator=(*btn); | - |
1296 | fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect executed (the execution status of this line is deduced): fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect | - |
1297 | : SE_CheckBoxFocusRect, btn, widget); executed (the execution status of this line is deduced): : SE_CheckBoxFocusRect, btn, widget); | - |
1298 | proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); | - |
1299 | } executed: } Execution Count:11 | 11 |
1300 | } executed: } Execution Count:38 | 38 |
1301 | break; executed: break; Execution Count:46 | 46 |
1302 | case CE_RadioButtonLabel: | - |
1303 | case CE_CheckBoxLabel: | - |
1304 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:38 | yes Evaluation Count:8 |
| 8-38 |
1305 | uint alignment = visualAlignment(btn->direction, Qt::AlignLeft | Qt::AlignVCenter); executed (the execution status of this line is deduced): uint alignment = visualAlignment(btn->direction, Qt::AlignLeft | Qt::AlignVCenter); | - |
1306 | | - |
1307 | if (!proxy()->styleHint(SH_UnderlineShortcut, btn, widget)) partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, btn, widget) no Evaluation Count:0 | yes Evaluation Count:38 |
| 0-38 |
1308 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
1309 | QPixmap pix; executed (the execution status of this line is deduced): QPixmap pix; | - |
1310 | QRect textRect = btn->rect; executed (the execution status of this line is deduced): QRect textRect = btn->rect; | - |
1311 | if (!btn->icon.isNull()) { partially evaluated: !btn->icon.isNull() no Evaluation Count:0 | yes Evaluation Count:38 |
| 0-38 |
1312 | pix = btn->icon.pixmap(btn->iconSize, btn->state & State_Enabled ? QIcon::Normal : QIcon::Disabled); never executed (the execution status of this line is deduced): pix = btn->icon.pixmap(btn->iconSize, btn->state & State_Enabled ? QIcon::Normal : QIcon::Disabled); | - |
1313 | proxy()->drawItemPixmap(p, btn->rect, alignment, pix); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, btn->rect, alignment, pix); | - |
1314 | if (btn->direction == Qt::RightToLeft) never evaluated: btn->direction == Qt::RightToLeft | 0 |
1315 | textRect.setRight(textRect.right() - btn->iconSize.width() - 4); never executed: textRect.setRight(textRect.right() - btn->iconSize.width() - 4); | 0 |
1316 | else | - |
1317 | textRect.setLeft(textRect.left() + btn->iconSize.width() + 4); never executed: textRect.setLeft(textRect.left() + btn->iconSize.width() + 4); | 0 |
1318 | } | - |
1319 | if (!btn->text.isEmpty()){ evaluated: !btn->text.isEmpty() yes Evaluation Count:31 | yes Evaluation Count:7 |
| 7-31 |
1320 | proxy()->drawItemText(p, textRect, alignment | Qt::TextShowMnemonic, executed (the execution status of this line is deduced): proxy()->drawItemText(p, textRect, alignment | Qt::TextShowMnemonic, | - |
1321 | btn->palette, btn->state & State_Enabled, btn->text, QPalette::WindowText); executed (the execution status of this line is deduced): btn->palette, btn->state & State_Enabled, btn->text, QPalette::WindowText); | - |
1322 | } executed: } Execution Count:31 | 31 |
1323 | } executed: } Execution Count:38 | 38 |
1324 | break; executed: break; Execution Count:46 | 46 |
1325 | #ifndef QT_NO_MENU | - |
1326 | case CE_MenuScroller: { | - |
1327 | p->fillRect(opt->rect, opt->palette.background()); executed (the execution status of this line is deduced): p->fillRect(opt->rect, opt->palette.background()); | - |
1328 | QStyleOption arrowOpt = *opt; executed (the execution status of this line is deduced): QStyleOption arrowOpt = *opt; | - |
1329 | arrowOpt.state |= State_Enabled; executed (the execution status of this line is deduced): arrowOpt.state |= State_Enabled; | - |
1330 | proxy()->drawPrimitive(((opt->state & State_DownArrow) ? PE_IndicatorArrowDown : PE_IndicatorArrowUp), executed (the execution status of this line is deduced): proxy()->drawPrimitive(((opt->state & State_DownArrow) ? PE_IndicatorArrowDown : PE_IndicatorArrowUp), | - |
1331 | &arrowOpt, p, widget); executed (the execution status of this line is deduced): &arrowOpt, p, widget); | - |
1332 | break; } executed: break; Execution Count:4 | 4 |
1333 | case CE_MenuTearoff: | - |
1334 | if (opt->state & State_Selected) partially evaluated: opt->state & State_Selected no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
1335 | p->fillRect(opt->rect, opt->palette.brush(QPalette::Highlight)); never executed: p->fillRect(opt->rect, opt->palette.brush(QPalette::Highlight)); | 0 |
1336 | else | - |
1337 | p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); executed: p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); Execution Count:5 | 5 |
1338 | p->setPen(QPen(opt->palette.dark().color(), 1, Qt::DashLine)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1, Qt::DashLine)); | - |
1339 | p->drawLine(opt->rect.x() + 2, opt->rect.y() + opt->rect.height() / 2 - 1, executed (the execution status of this line is deduced): p->drawLine(opt->rect.x() + 2, opt->rect.y() + opt->rect.height() / 2 - 1, | - |
1340 | opt->rect.x() + opt->rect.width() - 4, executed (the execution status of this line is deduced): opt->rect.x() + opt->rect.width() - 4, | - |
1341 | opt->rect.y() + opt->rect.height() / 2 - 1); executed (the execution status of this line is deduced): opt->rect.y() + opt->rect.height() / 2 - 1); | - |
1342 | p->setPen(QPen(opt->palette.light().color(), 1, Qt::DashLine)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color(), 1, Qt::DashLine)); | - |
1343 | p->drawLine(opt->rect.x() + 2, opt->rect.y() + opt->rect.height() / 2, executed (the execution status of this line is deduced): p->drawLine(opt->rect.x() + 2, opt->rect.y() + opt->rect.height() / 2, | - |
1344 | opt->rect.x() + opt->rect.width() - 4, opt->rect.y() + opt->rect.height() / 2); executed (the execution status of this line is deduced): opt->rect.x() + opt->rect.width() - 4, opt->rect.y() + opt->rect.height() / 2); | - |
1345 | break; executed: break; Execution Count:5 | 5 |
1346 | #endif // QT_NO_MENU | - |
1347 | #ifndef QT_NO_MENUBAR | - |
1348 | case CE_MenuBarItem: | - |
1349 | if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) { partially evaluated: const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt) yes Evaluation Count:46 | no Evaluation Count:0 |
| 0-46 |
1350 | uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip executed (the execution status of this line is deduced): uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | - |
1351 | | Qt::TextSingleLine; executed (the execution status of this line is deduced): | Qt::TextSingleLine; | - |
1352 | if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget)) partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, mbi, widget) no Evaluation Count:0 | yes Evaluation Count:46 |
| 0-46 |
1353 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
1354 | QPixmap pix = mbi->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize), (mbi->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled); executed (the execution status of this line is deduced): QPixmap pix = mbi->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize), (mbi->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled); | - |
1355 | if (!pix.isNull()) partially evaluated: !pix.isNull() no Evaluation Count:0 | yes Evaluation Count:46 |
| 0-46 |
1356 | proxy()->drawItemPixmap(p,mbi->rect, alignment, pix); never executed: proxy()->drawItemPixmap(p,mbi->rect, alignment, pix); | 0 |
1357 | else | - |
1358 | proxy()->drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, executed: proxy()->drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, QPalette::ButtonText); Execution Count:46 | 46 |
1359 | mbi->text, QPalette::ButtonText); executed: proxy()->drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, QPalette::ButtonText); Execution Count:46 | 46 |
1360 | } | - |
1361 | break; executed: break; Execution Count:46 | 46 |
1362 | case CE_MenuBarEmptyArea: | - |
1363 | if (widget && !widget->testAttribute(Qt::WA_NoSystemBackground)) never evaluated: widget never evaluated: !widget->testAttribute(Qt::WA_NoSystemBackground) | 0 |
1364 | p->eraseRect(opt->rect); never executed: p->eraseRect(opt->rect); | 0 |
1365 | break; | 0 |
1366 | #endif // QT_NO_MENUBAR | - |
1367 | #ifndef QT_NO_PROGRESSBAR | - |
1368 | case CE_ProgressBar: | - |
1369 | if (const QStyleOptionProgressBar *pb evaluated: const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt) yes Evaluation Count:63 | yes Evaluation Count:4 |
| 4-63 |
1370 | = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { evaluated: const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt) yes Evaluation Count:63 | yes Evaluation Count:4 |
| 4-63 |
1371 | QStyleOptionProgressBarV2 subopt = *pb; executed (the execution status of this line is deduced): QStyleOptionProgressBarV2 subopt = *pb; | - |
1372 | subopt.rect = subElementRect(SE_ProgressBarGroove, pb, widget); executed (the execution status of this line is deduced): subopt.rect = subElementRect(SE_ProgressBarGroove, pb, widget); | - |
1373 | proxy()->drawControl(CE_ProgressBarGroove, &subopt, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ProgressBarGroove, &subopt, p, widget); | - |
1374 | subopt.rect = subElementRect(SE_ProgressBarContents, pb, widget); executed (the execution status of this line is deduced): subopt.rect = subElementRect(SE_ProgressBarContents, pb, widget); | - |
1375 | proxy()->drawControl(CE_ProgressBarContents, &subopt, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ProgressBarContents, &subopt, p, widget); | - |
1376 | if (pb->textVisible) { evaluated: pb->textVisible yes Evaluation Count:62 | yes Evaluation Count:1 |
| 1-62 |
1377 | subopt.rect = subElementRect(SE_ProgressBarLabel, pb, widget); executed (the execution status of this line is deduced): subopt.rect = subElementRect(SE_ProgressBarLabel, pb, widget); | - |
1378 | proxy()->drawControl(CE_ProgressBarLabel, &subopt, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ProgressBarLabel, &subopt, p, widget); | - |
1379 | } executed: } Execution Count:62 | 62 |
1380 | } executed: } Execution Count:63 | 63 |
1381 | break; executed: break; Execution Count:67 | 67 |
1382 | case CE_ProgressBarGroove: | - |
1383 | if (opt->rect.isValid()) evaluated: opt->rect.isValid() yes Evaluation Count:63 | yes Evaluation Count:1 |
| 1-63 |
1384 | qDrawShadePanel(p, opt->rect, opt->palette, true, 1, executed: qDrawShadePanel(p, opt->rect, opt->palette, true, 1, &opt->palette.brush(QPalette::Window)); Execution Count:63 | 63 |
1385 | &opt->palette.brush(QPalette::Window)); executed: qDrawShadePanel(p, opt->rect, opt->palette, true, 1, &opt->palette.brush(QPalette::Window)); Execution Count:63 | 63 |
1386 | break; executed: break; Execution Count:64 | 64 |
1387 | case CE_ProgressBarLabel: | - |
1388 | if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { evaluated: const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt) yes Evaluation Count:60 | yes Evaluation Count:3 |
| 3-60 |
1389 | bool vertical = false; executed (the execution status of this line is deduced): bool vertical = false; | - |
1390 | if (const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt)) { partially evaluated: const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt) yes Evaluation Count:60 | no Evaluation Count:0 |
| 0-60 |
1391 | vertical = (pb2->orientation == Qt::Vertical); executed (the execution status of this line is deduced): vertical = (pb2->orientation == Qt::Vertical); | - |
1392 | } executed: } Execution Count:60 | 60 |
1393 | if (!vertical) { partially evaluated: !vertical yes Evaluation Count:60 | no Evaluation Count:0 |
| 0-60 |
1394 | QPalette::ColorRole textRole = QPalette::NoRole; executed (the execution status of this line is deduced): QPalette::ColorRole textRole = QPalette::NoRole; | - |
1395 | if ((pb->textAlignment & Qt::AlignCenter) && pb->textVisible partially evaluated: (pb->textAlignment & Qt::AlignCenter) no Evaluation Count:0 | yes Evaluation Count:60 |
never evaluated: pb->textVisible | 0-60 |
1396 | && ((qint64(pb->progress) - qint64(pb->minimum)) * 2 >= (qint64(pb->maximum) - qint64(pb->minimum)))) { never evaluated: ((qint64(pb->progress) - qint64(pb->minimum)) * 2 >= (qint64(pb->maximum) - qint64(pb->minimum))) | 0 |
1397 | textRole = QPalette::HighlightedText; never executed (the execution status of this line is deduced): textRole = QPalette::HighlightedText; | - |
1398 | //Draw text shadow, This will increase readability when the background of same color | - |
1399 | QRect shadowRect(pb->rect); never executed (the execution status of this line is deduced): QRect shadowRect(pb->rect); | - |
1400 | shadowRect.translate(1,1); never executed (the execution status of this line is deduced): shadowRect.translate(1,1); | - |
1401 | QColor shadowColor = (pb->palette.color(textRole).value() <= 128) never evaluated: (pb->palette.color(textRole).value() <= 128) | 0 |
1402 | ? QColor(255,255,255,160) : QColor(0,0,0,160); never executed (the execution status of this line is deduced): ? QColor(255,255,255,160) : QColor(0,0,0,160); | - |
1403 | QPalette shadowPalette = pb->palette; never executed (the execution status of this line is deduced): QPalette shadowPalette = pb->palette; | - |
1404 | shadowPalette.setColor(textRole, shadowColor); never executed (the execution status of this line is deduced): shadowPalette.setColor(textRole, shadowColor); | - |
1405 | proxy()->drawItemText(p, shadowRect, Qt::AlignCenter | Qt::TextSingleLine, shadowPalette, never executed (the execution status of this line is deduced): proxy()->drawItemText(p, shadowRect, Qt::AlignCenter | Qt::TextSingleLine, shadowPalette, | - |
1406 | pb->state & State_Enabled, pb->text, textRole); never executed (the execution status of this line is deduced): pb->state & State_Enabled, pb->text, textRole); | - |
1407 | } | 0 |
1408 | proxy()->drawItemText(p, pb->rect, Qt::AlignCenter | Qt::TextSingleLine, pb->palette, executed (the execution status of this line is deduced): proxy()->drawItemText(p, pb->rect, Qt::AlignCenter | Qt::TextSingleLine, pb->palette, | - |
1409 | pb->state & State_Enabled, pb->text, textRole); executed (the execution status of this line is deduced): pb->state & State_Enabled, pb->text, textRole); | - |
1410 | } executed: } Execution Count:60 | 60 |
1411 | } executed: } Execution Count:60 | 60 |
1412 | break; executed: break; Execution Count:63 | 63 |
1413 | case CE_ProgressBarContents: | - |
1414 | if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { partially evaluated: const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt) yes Evaluation Count:43 | no Evaluation Count:0 |
| 0-43 |
1415 | | - |
1416 | QRect rect = pb->rect; executed (the execution status of this line is deduced): QRect rect = pb->rect; | - |
1417 | bool vertical = false; executed (the execution status of this line is deduced): bool vertical = false; | - |
1418 | bool inverted = false; executed (the execution status of this line is deduced): bool inverted = false; | - |
1419 | qint64 minimum = qint64(pb->minimum); executed (the execution status of this line is deduced): qint64 minimum = qint64(pb->minimum); | - |
1420 | qint64 maximum = qint64(pb->maximum); executed (the execution status of this line is deduced): qint64 maximum = qint64(pb->maximum); | - |
1421 | qint64 progress = qint64(pb->progress); executed (the execution status of this line is deduced): qint64 progress = qint64(pb->progress); | - |
1422 | | - |
1423 | // Get extra style options if version 2 | - |
1424 | const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt); executed (the execution status of this line is deduced): const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt); | - |
1425 | if (pb2) { partially evaluated: pb2 yes Evaluation Count:43 | no Evaluation Count:0 |
| 0-43 |
1426 | vertical = (pb2->orientation == Qt::Vertical); executed (the execution status of this line is deduced): vertical = (pb2->orientation == Qt::Vertical); | - |
1427 | inverted = pb2->invertedAppearance; executed (the execution status of this line is deduced): inverted = pb2->invertedAppearance; | - |
1428 | } executed: } Execution Count:43 | 43 |
1429 | QMatrix m; executed (the execution status of this line is deduced): QMatrix m; | - |
1430 | | - |
1431 | if (vertical) { partially evaluated: vertical no Evaluation Count:0 | yes Evaluation Count:43 |
| 0-43 |
1432 | rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); // flip width and height never executed (the execution status of this line is deduced): rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); | - |
1433 | m.rotate(90); never executed (the execution status of this line is deduced): m.rotate(90); | - |
1434 | m.translate(0, -(rect.height() + rect.y()*2)); never executed (the execution status of this line is deduced): m.translate(0, -(rect.height() + rect.y()*2)); | - |
1435 | } | 0 |
1436 | | - |
1437 | QPalette pal2 = pb->palette; executed (the execution status of this line is deduced): QPalette pal2 = pb->palette; | - |
1438 | // Correct the highlight color if it is the same as the background | - |
1439 | if (pal2.highlight() == pal2.background()) partially evaluated: pal2.highlight() == pal2.background() no Evaluation Count:0 | yes Evaluation Count:43 |
| 0-43 |
1440 | pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, never executed: pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, QPalette::Highlight)); | 0 |
1441 | QPalette::Highlight)); never executed: pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, QPalette::Highlight)); | 0 |
1442 | bool reverse = ((!vertical && (pb->direction == Qt::RightToLeft)) || vertical); partially evaluated: !vertical yes Evaluation Count:43 | no Evaluation Count:0 |
partially evaluated: (pb->direction == Qt::RightToLeft) no Evaluation Count:0 | yes Evaluation Count:43 |
partially evaluated: vertical no Evaluation Count:0 | yes Evaluation Count:43 |
| 0-43 |
1443 | if (inverted) partially evaluated: inverted no Evaluation Count:0 | yes Evaluation Count:43 |
| 0-43 |
1444 | reverse = !reverse; never executed: reverse = !reverse; | 0 |
1445 | int w = rect.width(); executed (the execution status of this line is deduced): int w = rect.width(); | - |
1446 | if (pb->minimum == 0 && pb->maximum == 0) { evaluated: pb->minimum == 0 yes Evaluation Count:26 | yes Evaluation Count:17 |
partially evaluated: pb->maximum == 0 no Evaluation Count:0 | yes Evaluation Count:26 |
| 0-26 |
1447 | // draw busy indicator | - |
1448 | int x = (progress - minimum) % (w * 2); never executed (the execution status of this line is deduced): int x = (progress - minimum) % (w * 2); | - |
1449 | if (x > w) | 0 |
1450 | x = 2 * w - x; never executed: x = 2 * w - x; | 0 |
1451 | x = reverse ? rect.right() - x : x + rect.x(); | 0 |
1452 | p->setPen(QPen(pal2.highlight().color(), 4)); never executed (the execution status of this line is deduced): p->setPen(QPen(pal2.highlight().color(), 4)); | - |
1453 | p->drawLine(x, rect.y(), x, rect.height()); never executed (the execution status of this line is deduced): p->drawLine(x, rect.y(), x, rect.height()); | - |
1454 | } else { | 0 |
1455 | const int unit_width = proxy()->pixelMetric(PM_ProgressBarChunkWidth, pb, widget); executed (the execution status of this line is deduced): const int unit_width = proxy()->pixelMetric(PM_ProgressBarChunkWidth, pb, widget); | - |
1456 | if (!unit_width) partially evaluated: !unit_width no Evaluation Count:0 | yes Evaluation Count:43 |
| 0-43 |
1457 | return; | 0 |
1458 | | - |
1459 | int u; executed (the execution status of this line is deduced): int u; | - |
1460 | if (unit_width > 1) partially evaluated: unit_width > 1 yes Evaluation Count:43 | no Evaluation Count:0 |
| 0-43 |
1461 | u = ((rect.width() + unit_width) / unit_width); executed: u = ((rect.width() + unit_width) / unit_width); Execution Count:43 | 43 |
1462 | else | - |
1463 | u = w / unit_width; never executed: u = w / unit_width; | 0 |
1464 | qint64 p_v = progress - minimum; executed (the execution status of this line is deduced): qint64 p_v = progress - minimum; | - |
1465 | qint64 t_s = (maximum - minimum) ? (maximum - minimum) : qint64(1); evaluated: (maximum - minimum) yes Evaluation Count:40 | yes Evaluation Count:3 |
| 3-40 |
1466 | | - |
1467 | if (u > 0 && p_v >= INT_MAX / u && t_s >= u) { partially evaluated: u > 0 yes Evaluation Count:43 | no Evaluation Count:0 |
partially evaluated: p_v >= 2147483647 / u no Evaluation Count:0 | yes Evaluation Count:43 |
never evaluated: t_s >= u | 0-43 |
1468 | // scale down to something usable. | - |
1469 | p_v /= u; never executed (the execution status of this line is deduced): p_v /= u; | - |
1470 | t_s /= u; never executed (the execution status of this line is deduced): t_s /= u; | - |
1471 | } | 0 |
1472 | | - |
1473 | // nu < tnu, if last chunk is only a partial chunk | - |
1474 | int tnu, nu; executed (the execution status of this line is deduced): int tnu, nu; | - |
1475 | tnu = nu = p_v * u / t_s; executed (the execution status of this line is deduced): tnu = nu = p_v * u / t_s; | - |
1476 | | - |
1477 | if (nu * unit_width > w) evaluated: nu * unit_width > w yes Evaluation Count:2 | yes Evaluation Count:41 |
| 2-41 |
1478 | --nu; executed: --nu; Execution Count:2 | 2 |
1479 | | - |
1480 | // Draw nu units out of a possible u of unit_width | - |
1481 | // width, each a rectangle bordered by background | - |
1482 | // color, all in a sunken panel with a percentage text | - |
1483 | // display at the end. | - |
1484 | int x = 0; executed (the execution status of this line is deduced): int x = 0; | - |
1485 | int x0 = reverse ? rect.right() - ((unit_width > 1) ? unit_width : 0) partially evaluated: reverse no Evaluation Count:0 | yes Evaluation Count:43 |
| 0-43 |
1486 | : rect.x(); executed (the execution status of this line is deduced): : rect.x(); | - |
1487 | | - |
1488 | QStyleOptionProgressBarV2 pbBits = *pb; executed (the execution status of this line is deduced): QStyleOptionProgressBarV2 pbBits = *pb; | - |
1489 | pbBits.rect = rect; executed (the execution status of this line is deduced): pbBits.rect = rect; | - |
1490 | pbBits.palette = pal2; executed (the execution status of this line is deduced): pbBits.palette = pal2; | - |
1491 | int myY = pbBits.rect.y(); executed (the execution status of this line is deduced): int myY = pbBits.rect.y(); | - |
1492 | int myHeight = pbBits.rect.height(); executed (the execution status of this line is deduced): int myHeight = pbBits.rect.height(); | - |
1493 | pbBits.state = State_None; executed (the execution status of this line is deduced): pbBits.state = State_None; | - |
1494 | for (int i = 0; i < nu; ++i) { evaluated: i < nu yes Evaluation Count:197 | yes Evaluation Count:43 |
| 43-197 |
1495 | pbBits.rect.setRect(x0 + x, myY, unit_width, myHeight); executed (the execution status of this line is deduced): pbBits.rect.setRect(x0 + x, myY, unit_width, myHeight); | - |
1496 | pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect(); executed (the execution status of this line is deduced): pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect(); | - |
1497 | proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget); | - |
1498 | x += reverse ? -unit_width : unit_width; partially evaluated: reverse no Evaluation Count:0 | yes Evaluation Count:197 |
| 0-197 |
1499 | } executed: } Execution Count:197 | 197 |
1500 | | - |
1501 | // Draw the last partial chunk to fill up the | - |
1502 | // progress bar entirely | - |
1503 | if (nu < tnu) { evaluated: nu < tnu yes Evaluation Count:2 | yes Evaluation Count:41 |
| 2-41 |
1504 | int pixels_left = w - (nu * unit_width); executed (the execution status of this line is deduced): int pixels_left = w - (nu * unit_width); | - |
1505 | int offset = reverse ? x0 + x + unit_width-pixels_left : x0 + x; partially evaluated: reverse no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
1506 | pbBits.rect.setRect(offset, myY, pixels_left, myHeight); executed (the execution status of this line is deduced): pbBits.rect.setRect(offset, myY, pixels_left, myHeight); | - |
1507 | pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect(); executed (the execution status of this line is deduced): pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect(); | - |
1508 | proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget); | - |
1509 | } executed: } Execution Count:2 | 2 |
1510 | } executed: } Execution Count:43 | 43 |
1511 | } | - |
1512 | break; executed: break; Execution Count:43 | 43 |
1513 | #endif // QT_NO_PROGRESSBAR | - |
1514 | case CE_HeaderLabel: | - |
1515 | if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) { evaluated: const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt) yes Evaluation Count:2103 | yes Evaluation Count:4 |
| 4-2103 |
1516 | QRect rect = header->rect; executed (the execution status of this line is deduced): QRect rect = header->rect; | - |
1517 | if (!header->icon.isNull()) { evaluated: !header->icon.isNull() yes Evaluation Count:34 | yes Evaluation Count:2069 |
| 34-2069 |
1518 | QPixmap pixmap executed (the execution status of this line is deduced): QPixmap pixmap | - |
1519 | = header->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize), (header->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled); executed (the execution status of this line is deduced): = header->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize), (header->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled); | - |
1520 | int pixw = pixmap.width(); executed (the execution status of this line is deduced): int pixw = pixmap.width(); | - |
1521 | | - |
1522 | QRect aligned = alignedRect(header->direction, QFlag(header->iconAlignment), pixmap.size(), rect); executed (the execution status of this line is deduced): QRect aligned = alignedRect(header->direction, QFlag(header->iconAlignment), pixmap.size(), rect); | - |
1523 | QRect inter = aligned.intersected(rect); executed (the execution status of this line is deduced): QRect inter = aligned.intersected(rect); | - |
1524 | p->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width(), inter.height()); executed (the execution status of this line is deduced): p->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width(), inter.height()); | - |
1525 | | - |
1526 | if (header->direction == Qt::LeftToRight) partially evaluated: header->direction == Qt::LeftToRight yes Evaluation Count:34 | no Evaluation Count:0 |
| 0-34 |
1527 | rect.setLeft(rect.left() + pixw + 2); executed: rect.setLeft(rect.left() + pixw + 2); Execution Count:34 | 34 |
1528 | else | - |
1529 | rect.setRight(rect.right() - pixw - 2); never executed: rect.setRight(rect.right() - pixw - 2); | 0 |
1530 | } | - |
1531 | if (header->state & QStyle::State_On) { evaluated: header->state & QStyle::State_On yes Evaluation Count:475 | yes Evaluation Count:1628 |
| 475-1628 |
1532 | QFont fnt = p->font(); executed (the execution status of this line is deduced): QFont fnt = p->font(); | - |
1533 | fnt.setBold(true); executed (the execution status of this line is deduced): fnt.setBold(true); | - |
1534 | p->setFont(fnt); executed (the execution status of this line is deduced): p->setFont(fnt); | - |
1535 | } executed: } Execution Count:475 | 475 |
1536 | proxy()->drawItemText(p, rect, header->textAlignment, header->palette, executed (the execution status of this line is deduced): proxy()->drawItemText(p, rect, header->textAlignment, header->palette, | - |
1537 | (header->state & State_Enabled), header->text, QPalette::ButtonText); executed (the execution status of this line is deduced): (header->state & State_Enabled), header->text, QPalette::ButtonText); | - |
1538 | } executed: } Execution Count:2103 | 2103 |
1539 | break; executed: break; Execution Count:2107 | 2107 |
1540 | #ifndef QT_NO_TOOLBUTTON | - |
1541 | case CE_ToolButtonLabel: | - |
1542 | if (const QStyleOptionToolButton *toolbutton evaluated: const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt) yes Evaluation Count:451 | yes Evaluation Count:4 |
| 4-451 |
1543 | = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) { evaluated: const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt) yes Evaluation Count:451 | yes Evaluation Count:4 |
| 4-451 |
1544 | QRect rect = toolbutton->rect; executed (the execution status of this line is deduced): QRect rect = toolbutton->rect; | - |
1545 | int shiftX = 0; executed (the execution status of this line is deduced): int shiftX = 0; | - |
1546 | int shiftY = 0; executed (the execution status of this line is deduced): int shiftY = 0; | - |
1547 | if (toolbutton->state & (State_Sunken | State_On)) { evaluated: toolbutton->state & (State_Sunken | State_On) yes Evaluation Count:54 | yes Evaluation Count:397 |
| 54-397 |
1548 | shiftX = proxy()->pixelMetric(PM_ButtonShiftHorizontal, toolbutton, widget); executed (the execution status of this line is deduced): shiftX = proxy()->pixelMetric(PM_ButtonShiftHorizontal, toolbutton, widget); | - |
1549 | shiftY = proxy()->pixelMetric(PM_ButtonShiftVertical, toolbutton, widget); executed (the execution status of this line is deduced): shiftY = proxy()->pixelMetric(PM_ButtonShiftVertical, toolbutton, widget); | - |
1550 | } executed: } Execution Count:54 | 54 |
1551 | // Arrow type always overrules and is always shown | - |
1552 | bool hasArrow = toolbutton->features & QStyleOptionToolButton::Arrow; executed (the execution status of this line is deduced): bool hasArrow = toolbutton->features & QStyleOptionToolButton::Arrow; | - |
1553 | if (((!hasArrow && toolbutton->icon.isNull()) && !toolbutton->text.isEmpty()) partially evaluated: !hasArrow yes Evaluation Count:451 | no Evaluation Count:0 |
evaluated: toolbutton->icon.isNull() yes Evaluation Count:111 | yes Evaluation Count:340 |
evaluated: !toolbutton->text.isEmpty() yes Evaluation Count:102 | yes Evaluation Count:9 |
| 0-451 |
1554 | || toolbutton->toolButtonStyle == Qt::ToolButtonTextOnly) { partially evaluated: toolbutton->toolButtonStyle == Qt::ToolButtonTextOnly no Evaluation Count:0 | yes Evaluation Count:349 |
| 0-349 |
1555 | int alignment = Qt::AlignCenter | Qt::TextShowMnemonic; executed (the execution status of this line is deduced): int alignment = Qt::AlignCenter | Qt::TextShowMnemonic; | - |
1556 | if (!proxy()->styleHint(SH_UnderlineShortcut, opt, widget)) partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, opt, widget) no Evaluation Count:0 | yes Evaluation Count:102 |
| 0-102 |
1557 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
1558 | rect.translate(shiftX, shiftY); executed (the execution status of this line is deduced): rect.translate(shiftX, shiftY); | - |
1559 | p->setFont(toolbutton->font); executed (the execution status of this line is deduced): p->setFont(toolbutton->font); | - |
1560 | proxy()->drawItemText(p, rect, alignment, toolbutton->palette, executed (the execution status of this line is deduced): proxy()->drawItemText(p, rect, alignment, toolbutton->palette, | - |
1561 | opt->state & State_Enabled, toolbutton->text, executed (the execution status of this line is deduced): opt->state & State_Enabled, toolbutton->text, | - |
1562 | QPalette::ButtonText); executed (the execution status of this line is deduced): QPalette::ButtonText); | - |
1563 | } else { executed: } Execution Count:102 | 102 |
1564 | QPixmap pm; executed (the execution status of this line is deduced): QPixmap pm; | - |
1565 | QSize pmSize = toolbutton->iconSize; executed (the execution status of this line is deduced): QSize pmSize = toolbutton->iconSize; | - |
1566 | if (!toolbutton->icon.isNull()) { evaluated: !toolbutton->icon.isNull() yes Evaluation Count:340 | yes Evaluation Count:9 |
| 9-340 |
1567 | QIcon::State state = toolbutton->state & State_On ? QIcon::On : QIcon::Off; partially evaluated: toolbutton->state & State_On no Evaluation Count:0 | yes Evaluation Count:340 |
| 0-340 |
1568 | QIcon::Mode mode; executed (the execution status of this line is deduced): QIcon::Mode mode; | - |
1569 | if (!(toolbutton->state & State_Enabled)) evaluated: !(toolbutton->state & State_Enabled) yes Evaluation Count:63 | yes Evaluation Count:277 |
| 63-277 |
1570 | mode = QIcon::Disabled; executed: mode = QIcon::Disabled; Execution Count:63 | 63 |
1571 | else if ((opt->state & State_MouseOver) && (opt->state & State_AutoRaise)) evaluated: (opt->state & State_MouseOver) yes Evaluation Count:3 | yes Evaluation Count:274 |
partially evaluated: (opt->state & State_AutoRaise) yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-274 |
1572 | mode = QIcon::Active; executed: mode = QIcon::Active; Execution Count:3 | 3 |
1573 | else | - |
1574 | mode = QIcon::Normal; executed: mode = QIcon::Normal; Execution Count:274 | 274 |
1575 | pm = toolbutton->icon.pixmap(toolbutton->rect.size().boundedTo(toolbutton->iconSize), executed (the execution status of this line is deduced): pm = toolbutton->icon.pixmap(toolbutton->rect.size().boundedTo(toolbutton->iconSize), | - |
1576 | mode, state); executed (the execution status of this line is deduced): mode, state); | - |
1577 | pmSize = pm.size(); executed (the execution status of this line is deduced): pmSize = pm.size(); | - |
1578 | } executed: } Execution Count:340 | 340 |
1579 | | - |
1580 | if (toolbutton->toolButtonStyle != Qt::ToolButtonIconOnly) { partially evaluated: toolbutton->toolButtonStyle != Qt::ToolButtonIconOnly no Evaluation Count:0 | yes Evaluation Count:349 |
| 0-349 |
1581 | p->setFont(toolbutton->font); never executed (the execution status of this line is deduced): p->setFont(toolbutton->font); | - |
1582 | QRect pr = rect, never executed (the execution status of this line is deduced): QRect pr = rect, | - |
1583 | tr = rect; never executed (the execution status of this line is deduced): tr = rect; | - |
1584 | int alignment = Qt::TextShowMnemonic; never executed (the execution status of this line is deduced): int alignment = Qt::TextShowMnemonic; | - |
1585 | if (!proxy()->styleHint(SH_UnderlineShortcut, opt, widget)) never evaluated: !proxy()->styleHint(SH_UnderlineShortcut, opt, widget) | 0 |
1586 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
1587 | | - |
1588 | if (toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { never evaluated: toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon | 0 |
1589 | pr.setHeight(pmSize.height() + 6); never executed (the execution status of this line is deduced): pr.setHeight(pmSize.height() + 6); | - |
1590 | tr.adjust(0, pr.height() - 1, 0, -2); never executed (the execution status of this line is deduced): tr.adjust(0, pr.height() - 1, 0, -2); | - |
1591 | pr.translate(shiftX, shiftY); never executed (the execution status of this line is deduced): pr.translate(shiftX, shiftY); | - |
1592 | if (!hasArrow) { never evaluated: !hasArrow | 0 |
1593 | proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pm); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pm); | - |
1594 | } else { | 0 |
1595 | drawArrow(this, toolbutton, pr, p, widget); never executed (the execution status of this line is deduced): drawArrow(this, toolbutton, pr, p, widget); | - |
1596 | } | 0 |
1597 | alignment |= Qt::AlignCenter; never executed (the execution status of this line is deduced): alignment |= Qt::AlignCenter; | - |
1598 | } else { | 0 |
1599 | pr.setWidth(pmSize.width() + 8); never executed (the execution status of this line is deduced): pr.setWidth(pmSize.width() + 8); | - |
1600 | tr.adjust(pr.width(), 0, 0, 0); never executed (the execution status of this line is deduced): tr.adjust(pr.width(), 0, 0, 0); | - |
1601 | pr.translate(shiftX, shiftY); never executed (the execution status of this line is deduced): pr.translate(shiftX, shiftY); | - |
1602 | if (!hasArrow) { never evaluated: !hasArrow | 0 |
1603 | proxy()->drawItemPixmap(p, QStyle::visualRect(opt->direction, rect, pr), Qt::AlignCenter, pm); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, QStyle::visualRect(opt->direction, rect, pr), Qt::AlignCenter, pm); | - |
1604 | } else { | 0 |
1605 | drawArrow(this, toolbutton, pr, p, widget); never executed (the execution status of this line is deduced): drawArrow(this, toolbutton, pr, p, widget); | - |
1606 | } | 0 |
1607 | alignment |= Qt::AlignLeft | Qt::AlignVCenter; never executed (the execution status of this line is deduced): alignment |= Qt::AlignLeft | Qt::AlignVCenter; | - |
1608 | } | 0 |
1609 | tr.translate(shiftX, shiftY); never executed (the execution status of this line is deduced): tr.translate(shiftX, shiftY); | - |
1610 | proxy()->drawItemText(p, QStyle::visualRect(opt->direction, rect, tr), alignment, toolbutton->palette, never executed (the execution status of this line is deduced): proxy()->drawItemText(p, QStyle::visualRect(opt->direction, rect, tr), alignment, toolbutton->palette, | - |
1611 | toolbutton->state & State_Enabled, toolbutton->text, never executed (the execution status of this line is deduced): toolbutton->state & State_Enabled, toolbutton->text, | - |
1612 | QPalette::ButtonText); never executed (the execution status of this line is deduced): QPalette::ButtonText); | - |
1613 | } else { | 0 |
1614 | rect.translate(shiftX, shiftY); executed (the execution status of this line is deduced): rect.translate(shiftX, shiftY); | - |
1615 | if (hasArrow) { partially evaluated: hasArrow no Evaluation Count:0 | yes Evaluation Count:349 |
| 0-349 |
1616 | drawArrow(this, toolbutton, rect, p, widget); never executed (the execution status of this line is deduced): drawArrow(this, toolbutton, rect, p, widget); | - |
1617 | } else { | 0 |
1618 | proxy()->drawItemPixmap(p, rect, Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, rect, Qt::AlignCenter, pm); | - |
1619 | } executed: } Execution Count:349 | 349 |
1620 | } | - |
1621 | } | - |
1622 | } | - |
1623 | break; executed: break; Execution Count:455 | 455 |
1624 | #endif // QT_NO_TOOLBUTTON | - |
1625 | #ifndef QT_NO_TOOLBOX | - |
1626 | case CE_ToolBoxTab: | - |
1627 | if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) { partially evaluated: const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt) no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
1628 | proxy()->drawControl(CE_ToolBoxTabShape, tb, p, widget); never executed (the execution status of this line is deduced): proxy()->drawControl(CE_ToolBoxTabShape, tb, p, widget); | - |
1629 | proxy()->drawControl(CE_ToolBoxTabLabel, tb, p, widget); never executed (the execution status of this line is deduced): proxy()->drawControl(CE_ToolBoxTabLabel, tb, p, widget); | - |
1630 | } | 0 |
1631 | break; executed: break; Execution Count:4 | 4 |
1632 | case CE_ToolBoxTabShape: | - |
1633 | if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) { partially evaluated: const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt) no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
1634 | int d = 20 + tb->rect.height() - 3; never executed (the execution status of this line is deduced): int d = 20 + tb->rect.height() - 3; | - |
1635 | QPolygon a(7); never executed (the execution status of this line is deduced): QPolygon a(7); | - |
1636 | if (tb->direction != Qt::RightToLeft) { never evaluated: tb->direction != Qt::RightToLeft | 0 |
1637 | a.setPoint(0, -1, tb->rect.height() + 1); never executed (the execution status of this line is deduced): a.setPoint(0, -1, tb->rect.height() + 1); | - |
1638 | a.setPoint(1, -1, 1); never executed (the execution status of this line is deduced): a.setPoint(1, -1, 1); | - |
1639 | a.setPoint(2, tb->rect.width() - d, 1); never executed (the execution status of this line is deduced): a.setPoint(2, tb->rect.width() - d, 1); | - |
1640 | a.setPoint(3, tb->rect.width() - 20, tb->rect.height() - 2); never executed (the execution status of this line is deduced): a.setPoint(3, tb->rect.width() - 20, tb->rect.height() - 2); | - |
1641 | a.setPoint(4, tb->rect.width() - 1, tb->rect.height() - 2); never executed (the execution status of this line is deduced): a.setPoint(4, tb->rect.width() - 1, tb->rect.height() - 2); | - |
1642 | a.setPoint(5, tb->rect.width() - 1, tb->rect.height() + 1); never executed (the execution status of this line is deduced): a.setPoint(5, tb->rect.width() - 1, tb->rect.height() + 1); | - |
1643 | a.setPoint(6, -1, tb->rect.height() + 1); never executed (the execution status of this line is deduced): a.setPoint(6, -1, tb->rect.height() + 1); | - |
1644 | } else { | 0 |
1645 | a.setPoint(0, tb->rect.width(), tb->rect.height() + 1); never executed (the execution status of this line is deduced): a.setPoint(0, tb->rect.width(), tb->rect.height() + 1); | - |
1646 | a.setPoint(1, tb->rect.width(), 1); never executed (the execution status of this line is deduced): a.setPoint(1, tb->rect.width(), 1); | - |
1647 | a.setPoint(2, d - 1, 1); never executed (the execution status of this line is deduced): a.setPoint(2, d - 1, 1); | - |
1648 | a.setPoint(3, 20 - 1, tb->rect.height() - 2); never executed (the execution status of this line is deduced): a.setPoint(3, 20 - 1, tb->rect.height() - 2); | - |
1649 | a.setPoint(4, 0, tb->rect.height() - 2); never executed (the execution status of this line is deduced): a.setPoint(4, 0, tb->rect.height() - 2); | - |
1650 | a.setPoint(5, 0, tb->rect.height() + 1); never executed (the execution status of this line is deduced): a.setPoint(5, 0, tb->rect.height() + 1); | - |
1651 | a.setPoint(6, tb->rect.width(), tb->rect.height() + 1); never executed (the execution status of this line is deduced): a.setPoint(6, tb->rect.width(), tb->rect.height() + 1); | - |
1652 | } | 0 |
1653 | | - |
1654 | p->setPen(tb->palette.mid().color().darker(150)); never executed (the execution status of this line is deduced): p->setPen(tb->palette.mid().color().darker(150)); | - |
1655 | bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); never executed (the execution status of this line is deduced): bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); | - |
1656 | p->setRenderHint(QPainter::Qt4CompatiblePainting); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting); | - |
1657 | p->drawPolygon(a); never executed (the execution status of this line is deduced): p->drawPolygon(a); | - |
1658 | p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); | - |
1659 | p->setPen(tb->palette.light().color()); never executed (the execution status of this line is deduced): p->setPen(tb->palette.light().color()); | - |
1660 | if (tb->direction != Qt::RightToLeft) { never evaluated: tb->direction != Qt::RightToLeft | 0 |
1661 | p->drawLine(0, 2, tb->rect.width() - d, 2); never executed (the execution status of this line is deduced): p->drawLine(0, 2, tb->rect.width() - d, 2); | - |
1662 | p->drawLine(tb->rect.width() - d - 1, 2, tb->rect.width() - 21, tb->rect.height() - 1); never executed (the execution status of this line is deduced): p->drawLine(tb->rect.width() - d - 1, 2, tb->rect.width() - 21, tb->rect.height() - 1); | - |
1663 | p->drawLine(tb->rect.width() - 20, tb->rect.height() - 1, never executed (the execution status of this line is deduced): p->drawLine(tb->rect.width() - 20, tb->rect.height() - 1, | - |
1664 | tb->rect.width(), tb->rect.height() - 1); never executed (the execution status of this line is deduced): tb->rect.width(), tb->rect.height() - 1); | - |
1665 | } else { | 0 |
1666 | p->drawLine(tb->rect.width() - 1, 2, d - 1, 2); never executed (the execution status of this line is deduced): p->drawLine(tb->rect.width() - 1, 2, d - 1, 2); | - |
1667 | p->drawLine(d, 2, 20, tb->rect.height() - 1); never executed (the execution status of this line is deduced): p->drawLine(d, 2, 20, tb->rect.height() - 1); | - |
1668 | p->drawLine(19, tb->rect.height() - 1, never executed (the execution status of this line is deduced): p->drawLine(19, tb->rect.height() - 1, | - |
1669 | -1, tb->rect.height() - 1); never executed (the execution status of this line is deduced): -1, tb->rect.height() - 1); | - |
1670 | } | 0 |
1671 | p->setBrush(Qt::NoBrush); never executed (the execution status of this line is deduced): p->setBrush(Qt::NoBrush); | - |
1672 | } | 0 |
1673 | break; executed: break; Execution Count:1 | 1 |
1674 | #endif // QT_NO_TOOLBOX | - |
1675 | #ifndef QT_NO_TABBAR | - |
1676 | case CE_TabBarTab: | - |
1677 | if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt) yes Evaluation Count:51 | yes Evaluation Count:4 |
| 4-51 |
1678 | proxy()->drawControl(CE_TabBarTabShape, tab, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_TabBarTabShape, tab, p, widget); | - |
1679 | proxy()->drawControl(CE_TabBarTabLabel, tab, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_TabBarTabLabel, tab, p, widget); | - |
1680 | } executed: } Execution Count:51 | 51 |
1681 | break; executed: break; Execution Count:55 | 55 |
1682 | case CE_TabBarTabShape: | - |
1683 | if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { never evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt) | 0 |
1684 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
1685 | | - |
1686 | QRect rect(tab->rect); never executed (the execution status of this line is deduced): QRect rect(tab->rect); | - |
1687 | bool selected = tab->state & State_Selected; never executed (the execution status of this line is deduced): bool selected = tab->state & State_Selected; | - |
1688 | bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab; never executed (the execution status of this line is deduced): bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab; | - |
1689 | int tabOverlap = onlyOne ? 0 : proxy()->pixelMetric(PM_TabBarTabOverlap, opt, widget); | 0 |
1690 | | - |
1691 | if (!selected) { never evaluated: !selected | 0 |
1692 | switch (tab->shape) { | - |
1693 | case QTabBar::TriangularNorth: | - |
1694 | rect.adjust(0, 0, 0, -tabOverlap); never executed (the execution status of this line is deduced): rect.adjust(0, 0, 0, -tabOverlap); | - |
1695 | if(!selected) never evaluated: !selected | 0 |
1696 | rect.adjust(1, 1, -1, 0); never executed: rect.adjust(1, 1, -1, 0); | 0 |
1697 | break; | 0 |
1698 | case QTabBar::TriangularSouth: | - |
1699 | rect.adjust(0, tabOverlap, 0, 0); never executed (the execution status of this line is deduced): rect.adjust(0, tabOverlap, 0, 0); | - |
1700 | if(!selected) never evaluated: !selected | 0 |
1701 | rect.adjust(1, 0, -1, -1); never executed: rect.adjust(1, 0, -1, -1); | 0 |
1702 | break; | 0 |
1703 | case QTabBar::TriangularEast: | - |
1704 | rect.adjust(tabOverlap, 0, 0, 0); never executed (the execution status of this line is deduced): rect.adjust(tabOverlap, 0, 0, 0); | - |
1705 | if(!selected) never evaluated: !selected | 0 |
1706 | rect.adjust(0, 1, -1, -1); never executed: rect.adjust(0, 1, -1, -1); | 0 |
1707 | break; | 0 |
1708 | case QTabBar::TriangularWest: | - |
1709 | rect.adjust(0, 0, -tabOverlap, 0); never executed (the execution status of this line is deduced): rect.adjust(0, 0, -tabOverlap, 0); | - |
1710 | if(!selected) never evaluated: !selected | 0 |
1711 | rect.adjust(1, 1, 0, -1); never executed: rect.adjust(1, 1, 0, -1); | 0 |
1712 | break; | 0 |
1713 | default: | - |
1714 | break; | 0 |
1715 | } | - |
1716 | } | 0 |
1717 | | - |
1718 | p->setPen(QPen(tab->palette.foreground(), 0)); never executed (the execution status of this line is deduced): p->setPen(QPen(tab->palette.foreground(), 0)); | - |
1719 | if (selected) { never evaluated: selected | 0 |
1720 | p->setBrush(tab->palette.base()); never executed (the execution status of this line is deduced): p->setBrush(tab->palette.base()); | - |
1721 | } else { | 0 |
1722 | if (widget && widget->parentWidget()) never evaluated: widget never evaluated: widget->parentWidget() | 0 |
1723 | p->setBrush(widget->parentWidget()->palette().background()); never executed: p->setBrush(widget->parentWidget()->palette().background()); | 0 |
1724 | else | - |
1725 | p->setBrush(tab->palette.background()); never executed: p->setBrush(tab->palette.background()); | 0 |
1726 | } | - |
1727 | | - |
1728 | int y; never executed (the execution status of this line is deduced): int y; | - |
1729 | int x; never executed (the execution status of this line is deduced): int x; | - |
1730 | QPolygon a(10); never executed (the execution status of this line is deduced): QPolygon a(10); | - |
1731 | switch (tab->shape) { | - |
1732 | case QTabBar::TriangularNorth: | - |
1733 | case QTabBar::TriangularSouth: { | - |
1734 | a.setPoint(0, 0, -1); never executed (the execution status of this line is deduced): a.setPoint(0, 0, -1); | - |
1735 | a.setPoint(1, 0, 0); never executed (the execution status of this line is deduced): a.setPoint(1, 0, 0); | - |
1736 | y = rect.height() - 2; never executed (the execution status of this line is deduced): y = rect.height() - 2; | - |
1737 | x = y / 3; never executed (the execution status of this line is deduced): x = y / 3; | - |
1738 | a.setPoint(2, x++, y - 1); never executed (the execution status of this line is deduced): a.setPoint(2, x++, y - 1); | - |
1739 | ++x; never executed (the execution status of this line is deduced): ++x; | - |
1740 | a.setPoint(3, x++, y++); never executed (the execution status of this line is deduced): a.setPoint(3, x++, y++); | - |
1741 | a.setPoint(4, x, y); never executed (the execution status of this line is deduced): a.setPoint(4, x, y); | - |
1742 | | - |
1743 | int i; never executed (the execution status of this line is deduced): int i; | - |
1744 | int right = rect.width() - 1; never executed (the execution status of this line is deduced): int right = rect.width() - 1; | - |
1745 | for (i = 0; i < 5; ++i) | 0 |
1746 | a.setPoint(9 - i, right - a.point(i).x(), a.point(i).y()); never executed: a.setPoint(9 - i, right - a.point(i).x(), a.point(i).y()); | 0 |
1747 | if (tab->shape == QTabBar::TriangularNorth) never evaluated: tab->shape == QTabBar::TriangularNorth | 0 |
1748 | for (i = 0; i < 10; ++i) | 0 |
1749 | a.setPoint(i, a.point(i).x(), rect.height() - 1 - a.point(i).y()); never executed: a.setPoint(i, a.point(i).x(), rect.height() - 1 - a.point(i).y()); | 0 |
1750 | | - |
1751 | a.translate(rect.left(), rect.top()); never executed (the execution status of this line is deduced): a.translate(rect.left(), rect.top()); | - |
1752 | p->setRenderHint(QPainter::Antialiasing); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Antialiasing); | - |
1753 | p->translate(0, 0.5); never executed (the execution status of this line is deduced): p->translate(0, 0.5); | - |
1754 | | - |
1755 | QPainterPath path; never executed (the execution status of this line is deduced): QPainterPath path; | - |
1756 | path.addPolygon(a); never executed (the execution status of this line is deduced): path.addPolygon(a); | - |
1757 | p->drawPath(path); never executed (the execution status of this line is deduced): p->drawPath(path); | - |
1758 | break; } | 0 |
1759 | case QTabBar::TriangularEast: | - |
1760 | case QTabBar::TriangularWest: { | - |
1761 | a.setPoint(0, -1, 0); never executed (the execution status of this line is deduced): a.setPoint(0, -1, 0); | - |
1762 | a.setPoint(1, 0, 0); never executed (the execution status of this line is deduced): a.setPoint(1, 0, 0); | - |
1763 | x = rect.width() - 2; never executed (the execution status of this line is deduced): x = rect.width() - 2; | - |
1764 | y = x / 3; never executed (the execution status of this line is deduced): y = x / 3; | - |
1765 | a.setPoint(2, x - 1, y++); never executed (the execution status of this line is deduced): a.setPoint(2, x - 1, y++); | - |
1766 | ++y; never executed (the execution status of this line is deduced): ++y; | - |
1767 | a.setPoint(3, x++, y++); never executed (the execution status of this line is deduced): a.setPoint(3, x++, y++); | - |
1768 | a.setPoint(4, x, y); never executed (the execution status of this line is deduced): a.setPoint(4, x, y); | - |
1769 | int i; never executed (the execution status of this line is deduced): int i; | - |
1770 | int bottom = rect.height() - 1; never executed (the execution status of this line is deduced): int bottom = rect.height() - 1; | - |
1771 | for (i = 0; i < 5; ++i) | 0 |
1772 | a.setPoint(9 - i, a.point(i).x(), bottom - a.point(i).y()); never executed: a.setPoint(9 - i, a.point(i).x(), bottom - a.point(i).y()); | 0 |
1773 | if (tab->shape == QTabBar::TriangularWest) never evaluated: tab->shape == QTabBar::TriangularWest | 0 |
1774 | for (i = 0; i < 10; ++i) | 0 |
1775 | a.setPoint(i, rect.width() - 1 - a.point(i).x(), a.point(i).y()); never executed: a.setPoint(i, rect.width() - 1 - a.point(i).x(), a.point(i).y()); | 0 |
1776 | a.translate(rect.left(), rect.top()); never executed (the execution status of this line is deduced): a.translate(rect.left(), rect.top()); | - |
1777 | p->setRenderHint(QPainter::Antialiasing); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Antialiasing); | - |
1778 | p->translate(0.5, 0); never executed (the execution status of this line is deduced): p->translate(0.5, 0); | - |
1779 | QPainterPath path; never executed (the execution status of this line is deduced): QPainterPath path; | - |
1780 | path.addPolygon(a); never executed (the execution status of this line is deduced): path.addPolygon(a); | - |
1781 | p->drawPath(path); never executed (the execution status of this line is deduced): p->drawPath(path); | - |
1782 | break; } | 0 |
1783 | default: | - |
1784 | break; | 0 |
1785 | } | - |
1786 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
1787 | } | 0 |
1788 | break; | 0 |
1789 | case CE_ToolBoxTabLabel: | - |
1790 | if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) { partially evaluated: const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt) no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
1791 | bool enabled = tb->state & State_Enabled; never executed (the execution status of this line is deduced): bool enabled = tb->state & State_Enabled; | - |
1792 | bool selected = tb->state & State_Selected; never executed (the execution status of this line is deduced): bool selected = tb->state & State_Selected; | - |
1793 | QPixmap pm = tb->icon.pixmap(proxy()->pixelMetric(QStyle::PM_SmallIconSize, tb, widget), never executed (the execution status of this line is deduced): QPixmap pm = tb->icon.pixmap(proxy()->pixelMetric(QStyle::PM_SmallIconSize, tb, widget), | - |
1794 | enabled ? QIcon::Normal : QIcon::Disabled); never executed (the execution status of this line is deduced): enabled ? QIcon::Normal : QIcon::Disabled); | - |
1795 | | - |
1796 | QRect cr = subElementRect(QStyle::SE_ToolBoxTabContents, tb, widget); never executed (the execution status of this line is deduced): QRect cr = subElementRect(QStyle::SE_ToolBoxTabContents, tb, widget); | - |
1797 | QRect tr, ir; never executed (the execution status of this line is deduced): QRect tr, ir; | - |
1798 | int ih = 0; never executed (the execution status of this line is deduced): int ih = 0; | - |
1799 | if (pm.isNull()) { never evaluated: pm.isNull() | 0 |
1800 | tr = cr; never executed (the execution status of this line is deduced): tr = cr; | - |
1801 | tr.adjust(4, 0, -8, 0); never executed (the execution status of this line is deduced): tr.adjust(4, 0, -8, 0); | - |
1802 | } else { | 0 |
1803 | int iw = pm.width() + 4; never executed (the execution status of this line is deduced): int iw = pm.width() + 4; | - |
1804 | ih = pm.height(); never executed (the execution status of this line is deduced): ih = pm.height(); | - |
1805 | ir = QRect(cr.left() + 4, cr.top(), iw + 2, ih); never executed (the execution status of this line is deduced): ir = QRect(cr.left() + 4, cr.top(), iw + 2, ih); | - |
1806 | tr = QRect(ir.right(), cr.top(), cr.width() - ir.right() - 4, cr.height()); never executed (the execution status of this line is deduced): tr = QRect(ir.right(), cr.top(), cr.width() - ir.right() - 4, cr.height()); | - |
1807 | } | 0 |
1808 | | - |
1809 | if (selected && proxy()->styleHint(QStyle::SH_ToolBox_SelectedPageTitleBold, tb, widget)) { never evaluated: selected never evaluated: proxy()->styleHint(QStyle::SH_ToolBox_SelectedPageTitleBold, tb, widget) | 0 |
1810 | QFont f(p->font()); never executed (the execution status of this line is deduced): QFont f(p->font()); | - |
1811 | f.setBold(true); never executed (the execution status of this line is deduced): f.setBold(true); | - |
1812 | p->setFont(f); never executed (the execution status of this line is deduced): p->setFont(f); | - |
1813 | } | 0 |
1814 | | - |
1815 | QString txt = tb->fontMetrics.elidedText(tb->text, Qt::ElideRight, tr.width()); never executed (the execution status of this line is deduced): QString txt = tb->fontMetrics.elidedText(tb->text, Qt::ElideRight, tr.width()); | - |
1816 | | - |
1817 | if (ih) | 0 |
1818 | p->drawPixmap(ir.left(), (tb->rect.height() - ih) / 2, pm); never executed: p->drawPixmap(ir.left(), (tb->rect.height() - ih) / 2, pm); | 0 |
1819 | | - |
1820 | int alignment = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic; never executed (the execution status of this line is deduced): int alignment = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic; | - |
1821 | if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, tb, widget)) never evaluated: !proxy()->styleHint(QStyle::SH_UnderlineShortcut, tb, widget) | 0 |
1822 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
1823 | proxy()->drawItemText(p, tr, alignment, tb->palette, enabled, txt, QPalette::ButtonText); never executed (the execution status of this line is deduced): proxy()->drawItemText(p, tr, alignment, tb->palette, enabled, txt, QPalette::ButtonText); | - |
1824 | | - |
1825 | if (!txt.isEmpty() && opt->state & State_HasFocus) { never evaluated: !txt.isEmpty() never evaluated: opt->state & State_HasFocus | 0 |
1826 | QStyleOptionFocusRect opt; never executed (the execution status of this line is deduced): QStyleOptionFocusRect opt; | - |
1827 | opt.rect = tr; never executed (the execution status of this line is deduced): opt.rect = tr; | - |
1828 | opt.palette = tb->palette; never executed (the execution status of this line is deduced): opt.palette = tb->palette; | - |
1829 | opt.state = QStyle::State_None; never executed (the execution status of this line is deduced): opt.state = QStyle::State_None; | - |
1830 | proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, p, widget); | - |
1831 | } | 0 |
1832 | } | 0 |
1833 | break; executed: break; Execution Count:4 | 4 |
1834 | case CE_TabBarTabLabel: | - |
1835 | if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt) yes Evaluation Count:51 | yes Evaluation Count:4 |
| 4-51 |
1836 | QStyleOptionTabV3 tabV2(*tab); executed (the execution status of this line is deduced): QStyleOptionTabV3 tabV2(*tab); | - |
1837 | QRect tr = tabV2.rect; executed (the execution status of this line is deduced): QRect tr = tabV2.rect; | - |
1838 | bool verticalTabs = tabV2.shape == QTabBar::RoundedEast evaluated: tabV2.shape == QTabBar::RoundedEast yes Evaluation Count:2 | yes Evaluation Count:49 |
| 2-49 |
1839 | || tabV2.shape == QTabBar::RoundedWest evaluated: tabV2.shape == QTabBar::RoundedWest yes Evaluation Count:2 | yes Evaluation Count:47 |
| 2-47 |
1840 | || tabV2.shape == QTabBar::TriangularEast partially evaluated: tabV2.shape == QTabBar::TriangularEast no Evaluation Count:0 | yes Evaluation Count:47 |
| 0-47 |
1841 | || tabV2.shape == QTabBar::TriangularWest; partially evaluated: tabV2.shape == QTabBar::TriangularWest no Evaluation Count:0 | yes Evaluation Count:47 |
| 0-47 |
1842 | | - |
1843 | int alignment = Qt::AlignCenter | Qt::TextShowMnemonic; executed (the execution status of this line is deduced): int alignment = Qt::AlignCenter | Qt::TextShowMnemonic; | - |
1844 | if (!proxy()->styleHint(SH_UnderlineShortcut, opt, widget)) partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, opt, widget) no Evaluation Count:0 | yes Evaluation Count:51 |
| 0-51 |
1845 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
1846 | | - |
1847 | if (verticalTabs) { evaluated: verticalTabs yes Evaluation Count:4 | yes Evaluation Count:47 |
| 4-47 |
1848 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
1849 | int newX, newY, newRot; executed (the execution status of this line is deduced): int newX, newY, newRot; | - |
1850 | if (tabV2.shape == QTabBar::RoundedEast || tabV2.shape == QTabBar::TriangularEast) { evaluated: tabV2.shape == QTabBar::RoundedEast yes Evaluation Count:2 | yes Evaluation Count:2 |
partially evaluated: tabV2.shape == QTabBar::TriangularEast no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
1851 | newX = tr.width() + tr.x(); executed (the execution status of this line is deduced): newX = tr.width() + tr.x(); | - |
1852 | newY = tr.y(); executed (the execution status of this line is deduced): newY = tr.y(); | - |
1853 | newRot = 90; executed (the execution status of this line is deduced): newRot = 90; | - |
1854 | } else { executed: } Execution Count:2 | 2 |
1855 | newX = tr.x(); executed (the execution status of this line is deduced): newX = tr.x(); | - |
1856 | newY = tr.y() + tr.height(); executed (the execution status of this line is deduced): newY = tr.y() + tr.height(); | - |
1857 | newRot = -90; executed (the execution status of this line is deduced): newRot = -90; | - |
1858 | } executed: } Execution Count:2 | 2 |
1859 | QTransform m = QTransform::fromTranslate(newX, newY); executed (the execution status of this line is deduced): QTransform m = QTransform::fromTranslate(newX, newY); | - |
1860 | m.rotate(newRot); executed (the execution status of this line is deduced): m.rotate(newRot); | - |
1861 | p->setTransform(m, true); executed (the execution status of this line is deduced): p->setTransform(m, true); | - |
1862 | } executed: } Execution Count:4 | 4 |
1863 | QRect iconRect; executed (the execution status of this line is deduced): QRect iconRect; | - |
1864 | d->tabLayout(&tabV2, widget, &tr, &iconRect); executed (the execution status of this line is deduced): d->tabLayout(&tabV2, widget, &tr, &iconRect); | - |
1865 | tr = proxy()->subElementRect(SE_TabBarTabText, opt, widget); //we compute tr twice because the style may override subElementRect executed (the execution status of this line is deduced): tr = proxy()->subElementRect(SE_TabBarTabText, opt, widget); | - |
1866 | | - |
1867 | if (!tabV2.icon.isNull()) { partially evaluated: !tabV2.icon.isNull() no Evaluation Count:0 | yes Evaluation Count:51 |
| 0-51 |
1868 | QPixmap tabIcon = tabV2.icon.pixmap(tabV2.iconSize, never executed (the execution status of this line is deduced): QPixmap tabIcon = tabV2.icon.pixmap(tabV2.iconSize, | - |
1869 | (tabV2.state & State_Enabled) ? QIcon::Normal never executed (the execution status of this line is deduced): (tabV2.state & State_Enabled) ? QIcon::Normal | - |
1870 | : QIcon::Disabled, never executed (the execution status of this line is deduced): : QIcon::Disabled, | - |
1871 | (tabV2.state & State_Selected) ? QIcon::On never executed (the execution status of this line is deduced): (tabV2.state & State_Selected) ? QIcon::On | - |
1872 | : QIcon::Off); never executed (the execution status of this line is deduced): : QIcon::Off); | - |
1873 | p->drawPixmap(iconRect.x(), iconRect.y(), tabIcon); never executed (the execution status of this line is deduced): p->drawPixmap(iconRect.x(), iconRect.y(), tabIcon); | - |
1874 | } | 0 |
1875 | | - |
1876 | proxy()->drawItemText(p, tr, alignment, tab->palette, tab->state & State_Enabled, tab->text, QPalette::WindowText); executed (the execution status of this line is deduced): proxy()->drawItemText(p, tr, alignment, tab->palette, tab->state & State_Enabled, tab->text, QPalette::WindowText); | - |
1877 | if (verticalTabs) evaluated: verticalTabs yes Evaluation Count:4 | yes Evaluation Count:47 |
| 4-47 |
1878 | p->restore(); executed: p->restore(); Execution Count:4 | 4 |
1879 | | - |
1880 | if (tabV2.state & State_HasFocus) { evaluated: tabV2.state & State_HasFocus yes Evaluation Count:16 | yes Evaluation Count:35 |
| 16-35 |
1881 | const int OFFSET = 1 + pixelMetric(PM_DefaultFrameWidth); executed (the execution status of this line is deduced): const int OFFSET = 1 + pixelMetric(PM_DefaultFrameWidth); | - |
1882 | | - |
1883 | int x1, x2; executed (the execution status of this line is deduced): int x1, x2; | - |
1884 | x1 = tabV2.rect.left(); executed (the execution status of this line is deduced): x1 = tabV2.rect.left(); | - |
1885 | x2 = tabV2.rect.right() - 1; executed (the execution status of this line is deduced): x2 = tabV2.rect.right() - 1; | - |
1886 | | - |
1887 | QStyleOptionFocusRect fropt; executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt; | - |
1888 | fropt.QStyleOption::operator=(*tab); executed (the execution status of this line is deduced): fropt.QStyleOption::operator=(*tab); | - |
1889 | fropt.rect.setRect(x1 + 1 + OFFSET, tabV2.rect.y() + OFFSET, executed (the execution status of this line is deduced): fropt.rect.setRect(x1 + 1 + OFFSET, tabV2.rect.y() + OFFSET, | - |
1890 | x2 - x1 - 2*OFFSET, tabV2.rect.height() - 2*OFFSET); executed (the execution status of this line is deduced): x2 - x1 - 2*OFFSET, tabV2.rect.height() - 2*OFFSET); | - |
1891 | drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); executed (the execution status of this line is deduced): drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); | - |
1892 | } executed: } Execution Count:16 | 16 |
1893 | } executed: } Execution Count:51 | 51 |
1894 | break; executed: break; Execution Count:55 | 55 |
1895 | #endif // QT_NO_TABBAR | - |
1896 | #ifndef QT_NO_SIZEGRIP | - |
1897 | case CE_SizeGrip: { | - |
1898 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
1899 | int x, y, w, h; executed (the execution status of this line is deduced): int x, y, w, h; | - |
1900 | opt->rect.getRect(&x, &y, &w, &h); executed (the execution status of this line is deduced): opt->rect.getRect(&x, &y, &w, &h); | - |
1901 | | - |
1902 | int sw = qMin(h, w); executed (the execution status of this line is deduced): int sw = qMin(h, w); | - |
1903 | if (h > w) partially evaluated: h > w no Evaluation Count:0 | yes Evaluation Count:48 |
| 0-48 |
1904 | p->translate(0, h - w); never executed: p->translate(0, h - w); | 0 |
1905 | else | - |
1906 | p->translate(w - h, 0); executed: p->translate(w - h, 0); Execution Count:48 | 48 |
1907 | | - |
1908 | int sx = x; executed (the execution status of this line is deduced): int sx = x; | - |
1909 | int sy = y; executed (the execution status of this line is deduced): int sy = y; | - |
1910 | int s = sw / 3; executed (the execution status of this line is deduced): int s = sw / 3; | - |
1911 | | - |
1912 | Qt::Corner corner; executed (the execution status of this line is deduced): Qt::Corner corner; | - |
1913 | if (const QStyleOptionSizeGrip *sgOpt = qstyleoption_cast<const QStyleOptionSizeGrip *>(opt)) evaluated: const QStyleOptionSizeGrip *sgOpt = qstyleoption_cast<const QStyleOptionSizeGrip *>(opt) yes Evaluation Count:45 | yes Evaluation Count:3 |
| 3-45 |
1914 | corner = sgOpt->corner; executed: corner = sgOpt->corner; Execution Count:45 | 45 |
1915 | else if (opt->direction == Qt::RightToLeft) partially evaluated: opt->direction == Qt::RightToLeft no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1916 | corner = Qt::BottomLeftCorner; never executed: corner = Qt::BottomLeftCorner; | 0 |
1917 | else | - |
1918 | corner = Qt::BottomRightCorner; executed: corner = Qt::BottomRightCorner; Execution Count:3 | 3 |
1919 | | - |
1920 | if (corner == Qt::BottomLeftCorner) { evaluated: corner == Qt::BottomLeftCorner yes Evaluation Count:1 | yes Evaluation Count:47 |
| 1-47 |
1921 | sx = x + sw; executed (the execution status of this line is deduced): sx = x + sw; | - |
1922 | for (int i = 0; i < 4; ++i) { evaluated: i < 4 yes Evaluation Count:4 | yes Evaluation Count:1 |
| 1-4 |
1923 | p->setPen(QPen(opt->palette.light().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color(), 1)); | - |
1924 | p->drawLine(x, sy - 1 , sx + 1, sw); executed (the execution status of this line is deduced): p->drawLine(x, sy - 1 , sx + 1, sw); | - |
1925 | p->setPen(QPen(opt->palette.dark().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1926 | p->drawLine(x, sy, sx, sw); executed (the execution status of this line is deduced): p->drawLine(x, sy, sx, sw); | - |
1927 | p->setPen(QPen(opt->palette.dark().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1928 | p->drawLine(x, sy + 1, sx - 1, sw); executed (the execution status of this line is deduced): p->drawLine(x, sy + 1, sx - 1, sw); | - |
1929 | sx -= s; executed (the execution status of this line is deduced): sx -= s; | - |
1930 | sy += s; executed (the execution status of this line is deduced): sy += s; | - |
1931 | } executed: } Execution Count:4 | 4 |
1932 | } else if (corner == Qt::BottomRightCorner) { executed: } Execution Count:1 evaluated: corner == Qt::BottomRightCorner yes Evaluation Count:44 | yes Evaluation Count:3 |
| 1-44 |
1933 | for (int i = 0; i < 4; ++i) { evaluated: i < 4 yes Evaluation Count:176 | yes Evaluation Count:44 |
| 44-176 |
1934 | p->setPen(QPen(opt->palette.light().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color(), 1)); | - |
1935 | p->drawLine(sx - 1, sw, sw, sy - 1); executed (the execution status of this line is deduced): p->drawLine(sx - 1, sw, sw, sy - 1); | - |
1936 | p->setPen(QPen(opt->palette.dark().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1937 | p->drawLine(sx, sw, sw, sy); executed (the execution status of this line is deduced): p->drawLine(sx, sw, sw, sy); | - |
1938 | p->setPen(QPen(opt->palette.dark().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1939 | p->drawLine(sx + 1, sw, sw, sy + 1); executed (the execution status of this line is deduced): p->drawLine(sx + 1, sw, sw, sy + 1); | - |
1940 | sx += s; executed (the execution status of this line is deduced): sx += s; | - |
1941 | sy += s; executed (the execution status of this line is deduced): sy += s; | - |
1942 | } executed: } Execution Count:176 | 176 |
1943 | } else if (corner == Qt::TopRightCorner) { executed: } Execution Count:44 partially evaluated: corner == Qt::TopRightCorner yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-44 |
1944 | sy = y + sw; executed (the execution status of this line is deduced): sy = y + sw; | - |
1945 | for (int i = 0; i < 4; ++i) { evaluated: i < 4 yes Evaluation Count:12 | yes Evaluation Count:3 |
| 3-12 |
1946 | p->setPen(QPen(opt->palette.light().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color(), 1)); | - |
1947 | p->drawLine(sx - 1, y, sw, sy + 1); executed (the execution status of this line is deduced): p->drawLine(sx - 1, y, sw, sy + 1); | - |
1948 | p->setPen(QPen(opt->palette.dark().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1949 | p->drawLine(sx, y, sw, sy); executed (the execution status of this line is deduced): p->drawLine(sx, y, sw, sy); | - |
1950 | p->setPen(QPen(opt->palette.dark().color(), 1)); executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1951 | p->drawLine(sx + 1, y, sw, sy - 1); executed (the execution status of this line is deduced): p->drawLine(sx + 1, y, sw, sy - 1); | - |
1952 | sx += s; executed (the execution status of this line is deduced): sx += s; | - |
1953 | sy -= s; executed (the execution status of this line is deduced): sy -= s; | - |
1954 | } executed: } Execution Count:12 | 12 |
1955 | } else if (corner == Qt::TopLeftCorner) { executed: } Execution Count:3 never evaluated: corner == Qt::TopLeftCorner | 0-3 |
1956 | for (int i = 0; i < 4; ++i) { | 0 |
1957 | p->setPen(QPen(opt->palette.light().color(), 1)); never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color(), 1)); | - |
1958 | p->drawLine(x, sy - 1, sx - 1, y); never executed (the execution status of this line is deduced): p->drawLine(x, sy - 1, sx - 1, y); | - |
1959 | p->setPen(QPen(opt->palette.dark().color(), 1)); never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1960 | p->drawLine(x, sy, sx, y); never executed (the execution status of this line is deduced): p->drawLine(x, sy, sx, y); | - |
1961 | p->setPen(QPen(opt->palette.dark().color(), 1)); never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color(), 1)); | - |
1962 | p->drawLine(x, sy + 1, sx + 1, y); never executed (the execution status of this line is deduced): p->drawLine(x, sy + 1, sx + 1, y); | - |
1963 | sx += s; never executed (the execution status of this line is deduced): sx += s; | - |
1964 | sy += s; never executed (the execution status of this line is deduced): sy += s; | - |
1965 | } | 0 |
1966 | } | 0 |
1967 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
1968 | break; } executed: break; Execution Count:48 | 48 |
1969 | #endif // QT_NO_SIZEGRIP | - |
1970 | #ifndef QT_NO_RUBBERBAND | - |
1971 | case CE_RubberBand: { | - |
1972 | if (const QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt)) { never evaluated: const QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt) | 0 |
1973 | QPixmap tiledPixmap(16, 16); never executed (the execution status of this line is deduced): QPixmap tiledPixmap(16, 16); | - |
1974 | QPainter pixmapPainter(&tiledPixmap); never executed (the execution status of this line is deduced): QPainter pixmapPainter(&tiledPixmap); | - |
1975 | pixmapPainter.setPen(Qt::NoPen); never executed (the execution status of this line is deduced): pixmapPainter.setPen(Qt::NoPen); | - |
1976 | pixmapPainter.setBrush(Qt::Dense4Pattern); never executed (the execution status of this line is deduced): pixmapPainter.setBrush(Qt::Dense4Pattern); | - |
1977 | pixmapPainter.setBackground(QBrush(opt->palette.base())); never executed (the execution status of this line is deduced): pixmapPainter.setBackground(QBrush(opt->palette.base())); | - |
1978 | pixmapPainter.setBackgroundMode(Qt::OpaqueMode); never executed (the execution status of this line is deduced): pixmapPainter.setBackgroundMode(Qt::OpaqueMode); | - |
1979 | pixmapPainter.drawRect(0, 0, tiledPixmap.width(), tiledPixmap.height()); never executed (the execution status of this line is deduced): pixmapPainter.drawRect(0, 0, tiledPixmap.width(), tiledPixmap.height()); | - |
1980 | pixmapPainter.end(); never executed (the execution status of this line is deduced): pixmapPainter.end(); | - |
1981 | // ### workaround for borked XRENDER | - |
1982 | tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage()); never executed (the execution status of this line is deduced): tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage()); | - |
1983 | | - |
1984 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
1985 | QRect r = opt->rect; never executed (the execution status of this line is deduced): QRect r = opt->rect; | - |
1986 | QStyleHintReturnMask mask; never executed (the execution status of this line is deduced): QStyleHintReturnMask mask; | - |
1987 | if (proxy()->styleHint(QStyle::SH_RubberBand_Mask, opt, widget, &mask)) never evaluated: proxy()->styleHint(QStyle::SH_RubberBand_Mask, opt, widget, &mask) | 0 |
1988 | p->setClipRegion(mask.region); never executed: p->setClipRegion(mask.region); | 0 |
1989 | p->drawTiledPixmap(r.x(), r.y(), r.width(), r.height(), tiledPixmap); never executed (the execution status of this line is deduced): p->drawTiledPixmap(r.x(), r.y(), r.width(), r.height(), tiledPixmap); | - |
1990 | p->setPen(opt->palette.color(QPalette::Active, QPalette::WindowText)); never executed (the execution status of this line is deduced): p->setPen(opt->palette.color(QPalette::Active, QPalette::WindowText)); | - |
1991 | p->setBrush(Qt::NoBrush); never executed (the execution status of this line is deduced): p->setBrush(Qt::NoBrush); | - |
1992 | p->drawRect(r.adjusted(0, 0, -1, -1)); never executed (the execution status of this line is deduced): p->drawRect(r.adjusted(0, 0, -1, -1)); | - |
1993 | if (rbOpt->shape == QRubberBand::Rectangle) never evaluated: rbOpt->shape == QRubberBand::Rectangle | 0 |
1994 | p->drawRect(r.adjusted(3, 3, -4, -4)); never executed: p->drawRect(r.adjusted(3, 3, -4, -4)); | 0 |
1995 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
1996 | } | 0 |
1997 | break; } | 0 |
1998 | #endif // QT_NO_RUBBERBAND | - |
1999 | #ifndef QT_NO_DOCKWIDGET | - |
2000 | case CE_DockWidgetTitle: | - |
2001 | if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) { never evaluated: const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt) | 0 |
2002 | QRect r = dwOpt->rect.adjusted(0, 0, -1, -1); never executed (the execution status of this line is deduced): QRect r = dwOpt->rect.adjusted(0, 0, -1, -1); | - |
2003 | if (dwOpt->movable) { never evaluated: dwOpt->movable | 0 |
2004 | p->setPen(dwOpt->palette.color(QPalette::Dark)); never executed (the execution status of this line is deduced): p->setPen(dwOpt->palette.color(QPalette::Dark)); | - |
2005 | p->drawRect(r); never executed (the execution status of this line is deduced): p->drawRect(r); | - |
2006 | } | 0 |
2007 | | - |
2008 | if (!dwOpt->title.isEmpty()) { never evaluated: !dwOpt->title.isEmpty() | 0 |
2009 | const QStyleOptionDockWidgetV2 *v2 never executed (the execution status of this line is deduced): const QStyleOptionDockWidgetV2 *v2 | - |
2010 | = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt); never executed (the execution status of this line is deduced): = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt); | - |
2011 | bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar; | 0 |
2012 | | - |
2013 | if (verticalTitleBar) { never evaluated: verticalTitleBar | 0 |
2014 | QSize s = r.size(); never executed (the execution status of this line is deduced): QSize s = r.size(); | - |
2015 | s.transpose(); never executed (the execution status of this line is deduced): s.transpose(); | - |
2016 | r.setSize(s); never executed (the execution status of this line is deduced): r.setSize(s); | - |
2017 | | - |
2018 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
2019 | p->translate(r.left(), r.top() + r.width()); never executed (the execution status of this line is deduced): p->translate(r.left(), r.top() + r.width()); | - |
2020 | p->rotate(-90); never executed (the execution status of this line is deduced): p->rotate(-90); | - |
2021 | p->translate(-r.left(), -r.top()); never executed (the execution status of this line is deduced): p->translate(-r.left(), -r.top()); | - |
2022 | } | 0 |
2023 | | - |
2024 | const int indent = p->fontMetrics().descent(); never executed (the execution status of this line is deduced): const int indent = p->fontMetrics().descent(); | - |
2025 | proxy()->drawItemText(p, r.adjusted(indent + 1, 1, -indent - 1, -1), never executed (the execution status of this line is deduced): proxy()->drawItemText(p, r.adjusted(indent + 1, 1, -indent - 1, -1), | - |
2026 | Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, dwOpt->palette, never executed (the execution status of this line is deduced): Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, dwOpt->palette, | - |
2027 | dwOpt->state & State_Enabled, dwOpt->title, never executed (the execution status of this line is deduced): dwOpt->state & State_Enabled, dwOpt->title, | - |
2028 | QPalette::WindowText); never executed (the execution status of this line is deduced): QPalette::WindowText); | - |
2029 | | - |
2030 | if (verticalTitleBar) never evaluated: verticalTitleBar | 0 |
2031 | p->restore(); never executed: p->restore(); | 0 |
2032 | } | 0 |
2033 | } | 0 |
2034 | break; | 0 |
2035 | #endif // QT_NO_DOCKWIDGET | - |
2036 | case CE_Header: | - |
2037 | if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) { evaluated: const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt) yes Evaluation Count:2103 | yes Evaluation Count:4 |
| 4-2103 |
2038 | QRegion clipRegion = p->clipRegion(); executed (the execution status of this line is deduced): QRegion clipRegion = p->clipRegion(); | - |
2039 | p->setClipRect(opt->rect); executed (the execution status of this line is deduced): p->setClipRect(opt->rect); | - |
2040 | proxy()->drawControl(CE_HeaderSection, header, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_HeaderSection, header, p, widget); | - |
2041 | QStyleOptionHeader subopt = *header; executed (the execution status of this line is deduced): QStyleOptionHeader subopt = *header; | - |
2042 | subopt.rect = subElementRect(SE_HeaderLabel, header, widget); executed (the execution status of this line is deduced): subopt.rect = subElementRect(SE_HeaderLabel, header, widget); | - |
2043 | if (subopt.rect.isValid()) partially evaluated: subopt.rect.isValid() yes Evaluation Count:2103 | no Evaluation Count:0 |
| 0-2103 |
2044 | proxy()->drawControl(CE_HeaderLabel, &subopt, p, widget); executed: proxy()->drawControl(CE_HeaderLabel, &subopt, p, widget); Execution Count:2103 | 2103 |
2045 | if (header->sortIndicator != QStyleOptionHeader::None) { evaluated: header->sortIndicator != QStyleOptionHeader::None yes Evaluation Count:40 | yes Evaluation Count:2063 |
| 40-2063 |
2046 | subopt.rect = subElementRect(SE_HeaderArrow, opt, widget); executed (the execution status of this line is deduced): subopt.rect = subElementRect(SE_HeaderArrow, opt, widget); | - |
2047 | proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, p, widget); | - |
2048 | } executed: } Execution Count:40 | 40 |
2049 | p->setClipRegion(clipRegion); executed (the execution status of this line is deduced): p->setClipRegion(clipRegion); | - |
2050 | } executed: } Execution Count:2103 | 2103 |
2051 | break; executed: break; Execution Count:2107 | 2107 |
2052 | case CE_FocusFrame: | - |
2053 | p->fillRect(opt->rect, opt->palette.foreground()); executed (the execution status of this line is deduced): p->fillRect(opt->rect, opt->palette.foreground()); | - |
2054 | break; executed: break; Execution Count:4 | 4 |
2055 | case CE_HeaderSection: | - |
2056 | qDrawShadePanel(p, opt->rect, opt->palette, never executed (the execution status of this line is deduced): qDrawShadePanel(p, opt->rect, opt->palette, | - |
2057 | opt->state & State_Sunken, 1, never executed (the execution status of this line is deduced): opt->state & State_Sunken, 1, | - |
2058 | &opt->palette.brush(QPalette::Button)); never executed (the execution status of this line is deduced): &opt->palette.brush(QPalette::Button)); | - |
2059 | break; | 0 |
2060 | case CE_HeaderEmptyArea: | - |
2061 | p->fillRect(opt->rect, opt->palette.background()); executed (the execution status of this line is deduced): p->fillRect(opt->rect, opt->palette.background()); | - |
2062 | break; executed: break; Execution Count:79 | 79 |
2063 | #ifndef QT_NO_COMBOBOX | - |
2064 | case CE_ComboBoxLabel: | - |
2065 | if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { evaluated: const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt) yes Evaluation Count:117 | yes Evaluation Count:3 |
| 3-117 |
2066 | QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget); executed (the execution status of this line is deduced): QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget); | - |
2067 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
2068 | p->setClipRect(editRect); executed (the execution status of this line is deduced): p->setClipRect(editRect); | - |
2069 | if (!cb->currentIcon.isNull()) { evaluated: !cb->currentIcon.isNull() yes Evaluation Count:58 | yes Evaluation Count:59 |
| 58-59 |
2070 | QIcon::Mode mode = cb->state & State_Enabled ? QIcon::Normal partially evaluated: cb->state & State_Enabled yes Evaluation Count:58 | no Evaluation Count:0 |
| 0-58 |
2071 | : QIcon::Disabled; executed (the execution status of this line is deduced): : QIcon::Disabled; | - |
2072 | QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode); executed (the execution status of this line is deduced): QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode); | - |
2073 | QRect iconRect(editRect); executed (the execution status of this line is deduced): QRect iconRect(editRect); | - |
2074 | iconRect.setWidth(cb->iconSize.width() + 4); executed (the execution status of this line is deduced): iconRect.setWidth(cb->iconSize.width() + 4); | - |
2075 | iconRect = alignedRect(cb->direction, executed (the execution status of this line is deduced): iconRect = alignedRect(cb->direction, | - |
2076 | Qt::AlignLeft | Qt::AlignVCenter, executed (the execution status of this line is deduced): Qt::AlignLeft | Qt::AlignVCenter, | - |
2077 | iconRect.size(), editRect); executed (the execution status of this line is deduced): iconRect.size(), editRect); | - |
2078 | if (cb->editable) partially evaluated: cb->editable no Evaluation Count:0 | yes Evaluation Count:58 |
| 0-58 |
2079 | p->fillRect(iconRect, opt->palette.brush(QPalette::Base)); never executed: p->fillRect(iconRect, opt->palette.brush(QPalette::Base)); | 0 |
2080 | proxy()->drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap); | - |
2081 | | - |
2082 | if (cb->direction == Qt::RightToLeft) partially evaluated: cb->direction == Qt::RightToLeft no Evaluation Count:0 | yes Evaluation Count:58 |
| 0-58 |
2083 | editRect.translate(-4 - cb->iconSize.width(), 0); never executed: editRect.translate(-4 - cb->iconSize.width(), 0); | 0 |
2084 | else | - |
2085 | editRect.translate(cb->iconSize.width() + 4, 0); executed: editRect.translate(cb->iconSize.width() + 4, 0); Execution Count:58 | 58 |
2086 | } | - |
2087 | if (!cb->currentText.isEmpty() && !cb->editable) { evaluated: !cb->currentText.isEmpty() yes Evaluation Count:109 | yes Evaluation Count:8 |
evaluated: !cb->editable yes Evaluation Count:106 | yes Evaluation Count:3 |
| 3-109 |
2088 | proxy()->drawItemText(p, editRect.adjusted(1, 0, -1, 0), executed (the execution status of this line is deduced): proxy()->drawItemText(p, editRect.adjusted(1, 0, -1, 0), | - |
2089 | visualAlignment(cb->direction, Qt::AlignLeft | Qt::AlignVCenter), executed (the execution status of this line is deduced): visualAlignment(cb->direction, Qt::AlignLeft | Qt::AlignVCenter), | - |
2090 | cb->palette, cb->state & State_Enabled, cb->currentText); executed (the execution status of this line is deduced): cb->palette, cb->state & State_Enabled, cb->currentText); | - |
2091 | } executed: } Execution Count:106 | 106 |
2092 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
2093 | } executed: } Execution Count:117 | 117 |
2094 | break; executed: break; Execution Count:120 | 120 |
2095 | #endif // QT_NO_COMBOBOX | - |
2096 | #ifndef QT_NO_TOOLBAR | - |
2097 | case CE_ToolBar: | - |
2098 | if (const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) { never evaluated: const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(opt) | 0 |
2099 | // Compatibility with styles that use PE_PanelToolBar | - |
2100 | QStyleOptionFrame frame; never executed (the execution status of this line is deduced): QStyleOptionFrame frame; | - |
2101 | frame.QStyleOption::operator=(*toolBar); never executed (the execution status of this line is deduced): frame.QStyleOption::operator=(*toolBar); | - |
2102 | frame.lineWidth = toolBar->lineWidth; never executed (the execution status of this line is deduced): frame.lineWidth = toolBar->lineWidth; | - |
2103 | frame.midLineWidth = toolBar->midLineWidth; never executed (the execution status of this line is deduced): frame.midLineWidth = toolBar->midLineWidth; | - |
2104 | proxy()->drawPrimitive(PE_PanelToolBar, opt, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelToolBar, opt, p, widget); | - |
2105 | | - |
2106 | if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) never evaluated: widget never evaluated: qobject_cast<QToolBar *>(widget->parentWidget()) | 0 |
2107 | break; | 0 |
2108 | qDrawShadePanel(p, toolBar->rect, toolBar->palette, false, toolBar->lineWidth, never executed (the execution status of this line is deduced): qDrawShadePanel(p, toolBar->rect, toolBar->palette, false, toolBar->lineWidth, | - |
2109 | &toolBar->palette.brush(QPalette::Button)); never executed (the execution status of this line is deduced): &toolBar->palette.brush(QPalette::Button)); | - |
2110 | } | 0 |
2111 | break; | 0 |
2112 | #endif // QT_NO_TOOLBAR | - |
2113 | case CE_ColumnViewGrip: { | - |
2114 | // draw background gradients | - |
2115 | QLinearGradient g(0, 0, opt->rect.width(), 0); never executed (the execution status of this line is deduced): QLinearGradient g(0, 0, opt->rect.width(), 0); | - |
2116 | g.setColorAt(0, opt->palette.color(QPalette::Active, QPalette::Mid)); never executed (the execution status of this line is deduced): g.setColorAt(0, opt->palette.color(QPalette::Active, QPalette::Mid)); | - |
2117 | g.setColorAt(0.5, Qt::white); never executed (the execution status of this line is deduced): g.setColorAt(0.5, Qt::white); | - |
2118 | p->fillRect(QRect(0, 0, opt->rect.width(), opt->rect.height()), g); never executed (the execution status of this line is deduced): p->fillRect(QRect(0, 0, opt->rect.width(), opt->rect.height()), g); | - |
2119 | | - |
2120 | // draw the two lines | - |
2121 | QPen pen(p->pen()); never executed (the execution status of this line is deduced): QPen pen(p->pen()); | - |
2122 | pen.setWidth(opt->rect.width()/20); never executed (the execution status of this line is deduced): pen.setWidth(opt->rect.width()/20); | - |
2123 | pen.setColor(opt->palette.color(QPalette::Active, QPalette::Dark)); never executed (the execution status of this line is deduced): pen.setColor(opt->palette.color(QPalette::Active, QPalette::Dark)); | - |
2124 | p->setPen(pen); never executed (the execution status of this line is deduced): p->setPen(pen); | - |
2125 | | - |
2126 | int line1starting = opt->rect.width()*8 / 20; never executed (the execution status of this line is deduced): int line1starting = opt->rect.width()*8 / 20; | - |
2127 | int line2starting = opt->rect.width()*13 / 20; never executed (the execution status of this line is deduced): int line2starting = opt->rect.width()*13 / 20; | - |
2128 | int top = opt->rect.height()*20/75; never executed (the execution status of this line is deduced): int top = opt->rect.height()*20/75; | - |
2129 | int bottom = opt->rect.height() - 1 - top; never executed (the execution status of this line is deduced): int bottom = opt->rect.height() - 1 - top; | - |
2130 | p->drawLine(line1starting, top, line1starting, bottom); never executed (the execution status of this line is deduced): p->drawLine(line1starting, top, line1starting, bottom); | - |
2131 | p->drawLine(line2starting, top, line2starting, bottom); never executed (the execution status of this line is deduced): p->drawLine(line2starting, top, line2starting, bottom); | - |
2132 | } | - |
2133 | break; | 0 |
2134 | | - |
2135 | #ifndef QT_NO_ITEMVIEWS | - |
2136 | case CE_ItemViewItem: | - |
2137 | if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { partially evaluated: const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt) yes Evaluation Count:13241 | no Evaluation Count:0 |
| 0-13241 |
2138 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
2139 | p->setClipRect(opt->rect); executed (the execution status of this line is deduced): p->setClipRect(opt->rect); | - |
2140 | | - |
2141 | QRect checkRect = subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget); executed (the execution status of this line is deduced): QRect checkRect = subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget); | - |
2142 | QRect iconRect = subElementRect(SE_ItemViewItemDecoration, vopt, widget); executed (the execution status of this line is deduced): QRect iconRect = subElementRect(SE_ItemViewItemDecoration, vopt, widget); | - |
2143 | QRect textRect = subElementRect(SE_ItemViewItemText, vopt, widget); executed (the execution status of this line is deduced): QRect textRect = subElementRect(SE_ItemViewItemText, vopt, widget); | - |
2144 | | - |
2145 | // draw the background | - |
2146 | proxy()->drawPrimitive(PE_PanelItemViewItem, opt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelItemViewItem, opt, p, widget); | - |
2147 | | - |
2148 | // draw the check mark | - |
2149 | if (vopt->features & QStyleOptionViewItem::HasCheckIndicator) { evaluated: vopt->features & QStyleOptionViewItem::HasCheckIndicator yes Evaluation Count:24 | yes Evaluation Count:13217 |
| 24-13217 |
2150 | QStyleOptionViewItem option(*vopt); executed (the execution status of this line is deduced): QStyleOptionViewItem option(*vopt); | - |
2151 | option.rect = checkRect; executed (the execution status of this line is deduced): option.rect = checkRect; | - |
2152 | option.state = option.state & ~QStyle::State_HasFocus; executed (the execution status of this line is deduced): option.state = option.state & ~QStyle::State_HasFocus; | - |
2153 | | - |
2154 | switch (vopt->checkState) { | - |
2155 | case Qt::Unchecked: | - |
2156 | option.state |= QStyle::State_Off; executed (the execution status of this line is deduced): option.state |= QStyle::State_Off; | - |
2157 | break; executed: break; Execution Count:19 | 19 |
2158 | case Qt::PartiallyChecked: | - |
2159 | option.state |= QStyle::State_NoChange; never executed (the execution status of this line is deduced): option.state |= QStyle::State_NoChange; | - |
2160 | break; | 0 |
2161 | case Qt::Checked: | - |
2162 | option.state |= QStyle::State_On; executed (the execution status of this line is deduced): option.state |= QStyle::State_On; | - |
2163 | break; executed: break; Execution Count:5 | 5 |
2164 | } | - |
2165 | proxy()->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &option, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &option, p, widget); | - |
2166 | } executed: } Execution Count:24 | 24 |
2167 | | - |
2168 | // draw the icon | - |
2169 | QIcon::Mode mode = QIcon::Normal; executed (the execution status of this line is deduced): QIcon::Mode mode = QIcon::Normal; | - |
2170 | if (!(vopt->state & QStyle::State_Enabled)) evaluated: !(vopt->state & QStyle::State_Enabled) yes Evaluation Count:611 | yes Evaluation Count:12630 |
| 611-12630 |
2171 | mode = QIcon::Disabled; executed: mode = QIcon::Disabled; Execution Count:611 | 611 |
2172 | else if (vopt->state & QStyle::State_Selected) evaluated: vopt->state & QStyle::State_Selected yes Evaluation Count:981 | yes Evaluation Count:11649 |
| 981-11649 |
2173 | mode = QIcon::Selected; executed: mode = QIcon::Selected; Execution Count:981 | 981 |
2174 | QIcon::State state = vopt->state & QStyle::State_Open ? QIcon::On : QIcon::Off; evaluated: vopt->state & QStyle::State_Open yes Evaluation Count:279 | yes Evaluation Count:12962 |
| 279-12962 |
2175 | vopt->icon.paint(p, iconRect, vopt->decorationAlignment, mode, state); executed (the execution status of this line is deduced): vopt->icon.paint(p, iconRect, vopt->decorationAlignment, mode, state); | - |
2176 | | - |
2177 | // draw the text | - |
2178 | if (!vopt->text.isEmpty()) { evaluated: !vopt->text.isEmpty() yes Evaluation Count:12319 | yes Evaluation Count:922 |
| 922-12319 |
2179 | QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled evaluated: vopt->state & QStyle::State_Enabled yes Evaluation Count:11708 | yes Evaluation Count:611 |
| 611-11708 |
2180 | ? QPalette::Normal : QPalette::Disabled; executed (the execution status of this line is deduced): ? QPalette::Normal : QPalette::Disabled; | - |
2181 | if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) evaluated: cg == QPalette::Normal yes Evaluation Count:11708 | yes Evaluation Count:611 |
evaluated: !(vopt->state & QStyle::State_Active) yes Evaluation Count:4516 | yes Evaluation Count:7192 |
| 611-11708 |
2182 | cg = QPalette::Inactive; executed: cg = QPalette::Inactive; Execution Count:4516 | 4516 |
2183 | | - |
2184 | if (vopt->state & QStyle::State_Selected) { evaluated: vopt->state & QStyle::State_Selected yes Evaluation Count:961 | yes Evaluation Count:11358 |
| 961-11358 |
2185 | p->setPen(vopt->palette.color(cg, QPalette::HighlightedText)); executed (the execution status of this line is deduced): p->setPen(vopt->palette.color(cg, QPalette::HighlightedText)); | - |
2186 | } else { executed: } Execution Count:961 | 961 |
2187 | p->setPen(vopt->palette.color(cg, QPalette::Text)); executed (the execution status of this line is deduced): p->setPen(vopt->palette.color(cg, QPalette::Text)); | - |
2188 | } executed: } Execution Count:11358 | 11358 |
2189 | if (vopt->state & QStyle::State_Editing) { partially evaluated: vopt->state & QStyle::State_Editing no Evaluation Count:0 | yes Evaluation Count:12319 |
| 0-12319 |
2190 | p->setPen(vopt->palette.color(cg, QPalette::Text)); never executed (the execution status of this line is deduced): p->setPen(vopt->palette.color(cg, QPalette::Text)); | - |
2191 | p->drawRect(textRect.adjusted(0, 0, -1, -1)); never executed (the execution status of this line is deduced): p->drawRect(textRect.adjusted(0, 0, -1, -1)); | - |
2192 | } | 0 |
2193 | | - |
2194 | d->viewItemDrawText(p, vopt, textRect); executed (the execution status of this line is deduced): d->viewItemDrawText(p, vopt, textRect); | - |
2195 | } executed: } Execution Count:12319 | 12319 |
2196 | | - |
2197 | // draw the focus rect | - |
2198 | if (vopt->state & QStyle::State_HasFocus) { evaluated: vopt->state & QStyle::State_HasFocus yes Evaluation Count:906 | yes Evaluation Count:12335 |
| 906-12335 |
2199 | QStyleOptionFocusRect o; executed (the execution status of this line is deduced): QStyleOptionFocusRect o; | - |
2200 | o.QStyleOption::operator=(*vopt); executed (the execution status of this line is deduced): o.QStyleOption::operator=(*vopt); | - |
2201 | o.rect = proxy()->subElementRect(SE_ItemViewItemFocusRect, vopt, widget); executed (the execution status of this line is deduced): o.rect = proxy()->subElementRect(SE_ItemViewItemFocusRect, vopt, widget); | - |
2202 | o.state |= QStyle::State_KeyboardFocusChange; executed (the execution status of this line is deduced): o.state |= QStyle::State_KeyboardFocusChange; | - |
2203 | o.state |= QStyle::State_Item; executed (the execution status of this line is deduced): o.state |= QStyle::State_Item; | - |
2204 | QPalette::ColorGroup cg = (vopt->state & QStyle::State_Enabled) partially evaluated: (vopt->state & QStyle::State_Enabled) yes Evaluation Count:906 | no Evaluation Count:0 |
| 0-906 |
2205 | ? QPalette::Normal : QPalette::Disabled; executed (the execution status of this line is deduced): ? QPalette::Normal : QPalette::Disabled; | - |
2206 | o.backgroundColor = vopt->palette.color(cg, (vopt->state & QStyle::State_Selected) executed (the execution status of this line is deduced): o.backgroundColor = vopt->palette.color(cg, (vopt->state & QStyle::State_Selected) | - |
2207 | ? QPalette::Highlight : QPalette::Window); executed (the execution status of this line is deduced): ? QPalette::Highlight : QPalette::Window); | - |
2208 | proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &o, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &o, p, widget); | - |
2209 | } executed: } Execution Count:906 | 906 |
2210 | | - |
2211 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
2212 | } executed: } Execution Count:13241 | 13241 |
2213 | break; executed: break; Execution Count:13241 | 13241 |
2214 | | - |
2215 | #endif // QT_NO_ITEMVIEWS | - |
2216 | #ifndef QT_NO_FRAME | - |
2217 | case CE_ShapedFrame: | - |
2218 | if (const QStyleOptionFrameV3 *f = qstyleoption_cast<const QStyleOptionFrameV3 *>(opt)) { partially evaluated: const QStyleOptionFrameV3 *f = qstyleoption_cast<const QStyleOptionFrameV3 *>(opt) yes Evaluation Count:2696 | no Evaluation Count:0 |
| 0-2696 |
2219 | int frameShape = f->frameShape; executed (the execution status of this line is deduced): int frameShape = f->frameShape; | - |
2220 | int frameShadow = QFrame::Plain; executed (the execution status of this line is deduced): int frameShadow = QFrame::Plain; | - |
2221 | if (f->state & QStyle::State_Sunken) { evaluated: f->state & QStyle::State_Sunken yes Evaluation Count:1206 | yes Evaluation Count:1490 |
| 1206-1490 |
2222 | frameShadow = QFrame::Sunken; executed (the execution status of this line is deduced): frameShadow = QFrame::Sunken; | - |
2223 | } else if (f->state & QStyle::State_Raised) { executed: } Execution Count:1206 evaluated: f->state & QStyle::State_Raised yes Evaluation Count:50 | yes Evaluation Count:1440 |
| 50-1440 |
2224 | frameShadow = QFrame::Raised; executed (the execution status of this line is deduced): frameShadow = QFrame::Raised; | - |
2225 | } executed: } Execution Count:50 | 50 |
2226 | | - |
2227 | int lw = f->lineWidth; executed (the execution status of this line is deduced): int lw = f->lineWidth; | - |
2228 | int mlw = f->midLineWidth; executed (the execution status of this line is deduced): int mlw = f->midLineWidth; | - |
2229 | QPalette::ColorRole foregroundRole = QPalette::WindowText; executed (the execution status of this line is deduced): QPalette::ColorRole foregroundRole = QPalette::WindowText; | - |
2230 | if (widget) partially evaluated: widget yes Evaluation Count:2696 | no Evaluation Count:0 |
| 0-2696 |
2231 | foregroundRole = widget->foregroundRole(); executed: foregroundRole = widget->foregroundRole(); Execution Count:2696 | 2696 |
2232 | | - |
2233 | switch (frameShape) { | - |
2234 | case QFrame::Box: | - |
2235 | if (frameShadow == QFrame::Plain) { evaluated: frameShadow == QFrame::Plain yes Evaluation Count:198 | yes Evaluation Count:11 |
| 11-198 |
2236 | qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw); executed (the execution status of this line is deduced): qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw); | - |
2237 | } else { executed: } Execution Count:198 | 198 |
2238 | qDrawShadeRect(p, f->rect, f->palette, frameShadow == QFrame::Sunken, lw, mlw); executed (the execution status of this line is deduced): qDrawShadeRect(p, f->rect, f->palette, frameShadow == QFrame::Sunken, lw, mlw); | - |
2239 | } executed: } Execution Count:11 | 11 |
2240 | break; executed: break; Execution Count:209 | 209 |
2241 | case QFrame::StyledPanel: | - |
2242 | //keep the compatibility with Qt 4.4 if there is a proxy style. | - |
2243 | //be sure to call drawPrimitive(QStyle::PE_Frame) on the proxy style | - |
2244 | if (widget) { partially evaluated: widget yes Evaluation Count:1586 | no Evaluation Count:0 |
| 0-1586 |
2245 | widget->style()->drawPrimitive(QStyle::PE_Frame, opt, p, widget); executed (the execution status of this line is deduced): widget->style()->drawPrimitive(QStyle::PE_Frame, opt, p, widget); | - |
2246 | } else { executed: } Execution Count:1586 | 1586 |
2247 | proxy()->drawPrimitive(QStyle::PE_Frame, opt, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(QStyle::PE_Frame, opt, p, widget); | - |
2248 | } | 0 |
2249 | break; executed: break; Execution Count:1586 | 1586 |
2250 | case QFrame::Panel: | - |
2251 | if (frameShadow == QFrame::Plain) { partially evaluated: frameShadow == QFrame::Plain no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
2252 | qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw); never executed (the execution status of this line is deduced): qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw); | - |
2253 | } else { | 0 |
2254 | qDrawShadePanel(p, f->rect, f->palette, frameShadow == QFrame::Sunken, lw); executed (the execution status of this line is deduced): qDrawShadePanel(p, f->rect, f->palette, frameShadow == QFrame::Sunken, lw); | - |
2255 | } executed: } Execution Count:4 | 4 |
2256 | break; executed: break; Execution Count:4 | 4 |
2257 | case QFrame::WinPanel: | - |
2258 | if (frameShadow == QFrame::Plain) { never evaluated: frameShadow == QFrame::Plain | 0 |
2259 | qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw); never executed (the execution status of this line is deduced): qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw); | - |
2260 | } else { | 0 |
2261 | qDrawWinPanel(p, f->rect, f->palette, frameShadow == QFrame::Sunken); never executed (the execution status of this line is deduced): qDrawWinPanel(p, f->rect, f->palette, frameShadow == QFrame::Sunken); | - |
2262 | } | 0 |
2263 | break; | 0 |
2264 | case QFrame::HLine: | - |
2265 | case QFrame::VLine: { | - |
2266 | QPoint p1, p2; never executed (the execution status of this line is deduced): QPoint p1, p2; | - |
2267 | if (frameShape == QFrame::HLine) { never evaluated: frameShape == QFrame::HLine | 0 |
2268 | p1 = QPoint(opt->rect.x(), opt->rect.height() / 2); never executed (the execution status of this line is deduced): p1 = QPoint(opt->rect.x(), opt->rect.height() / 2); | - |
2269 | p2 = QPoint(opt->rect.x() + opt->rect.width(), p1.y()); never executed (the execution status of this line is deduced): p2 = QPoint(opt->rect.x() + opt->rect.width(), p1.y()); | - |
2270 | } else { | 0 |
2271 | p1 = QPoint(opt->rect.x()+opt->rect.width() / 2, 0); never executed (the execution status of this line is deduced): p1 = QPoint(opt->rect.x()+opt->rect.width() / 2, 0); | - |
2272 | p2 = QPoint(p1.x(), opt->rect.height()); never executed (the execution status of this line is deduced): p2 = QPoint(p1.x(), opt->rect.height()); | - |
2273 | } | 0 |
2274 | if (frameShadow == QFrame::Plain) { never evaluated: frameShadow == QFrame::Plain | 0 |
2275 | QPen oldPen = p->pen(); never executed (the execution status of this line is deduced): QPen oldPen = p->pen(); | - |
2276 | p->setPen(QPen(opt->palette.brush(foregroundRole), lw)); never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.brush(foregroundRole), lw)); | - |
2277 | p->drawLine(p1, p2); never executed (the execution status of this line is deduced): p->drawLine(p1, p2); | - |
2278 | p->setPen(oldPen); never executed (the execution status of this line is deduced): p->setPen(oldPen); | - |
2279 | } else { | 0 |
2280 | qDrawShadeLine(p, p1, p2, f->palette, frameShadow == QFrame::Sunken, lw, mlw); never executed (the execution status of this line is deduced): qDrawShadeLine(p, p1, p2, f->palette, frameShadow == QFrame::Sunken, lw, mlw); | - |
2281 | } | 0 |
2282 | break; | 0 |
2283 | } | - |
2284 | } | - |
2285 | } executed: } Execution Count:2696 | 2696 |
2286 | break; executed: break; Execution Count:2696 | 2696 |
2287 | #endif | - |
2288 | default: | - |
2289 | break; executed: break; Execution Count:61 | 61 |
2290 | } | - |
2291 | } executed: } Execution Count:23850 | 23850 |
2292 | | - |
2293 | /*! | - |
2294 | \reimp | - |
2295 | */ | - |
2296 | QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, | - |
2297 | const QWidget *widget) const | - |
2298 | { | - |
2299 | Q_D(const QCommonStyle); executed (the execution status of this line is deduced): const QCommonStylePrivate * const d = d_func(); | - |
2300 | QRect r; executed (the execution status of this line is deduced): QRect r; | - |
2301 | switch (sr) { | - |
2302 | case SE_PushButtonContents: | - |
2303 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:821 | no Evaluation Count:0 |
| 0-821 |
2304 | int dx1, dx2; executed (the execution status of this line is deduced): int dx1, dx2; | - |
2305 | dx1 = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget); executed (the execution status of this line is deduced): dx1 = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget); | - |
2306 | if (btn->features & QStyleOptionButton::AutoDefaultButton) evaluated: btn->features & QStyleOptionButton::AutoDefaultButton yes Evaluation Count:489 | yes Evaluation Count:332 |
| 332-489 |
2307 | dx1 += proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget); executed: dx1 += proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget); Execution Count:489 | 489 |
2308 | dx2 = dx1 * 2; executed (the execution status of this line is deduced): dx2 = dx1 * 2; | - |
2309 | r.setRect(opt->rect.x() + dx1, opt->rect.y() + dx1, opt->rect.width() - dx2, executed (the execution status of this line is deduced): r.setRect(opt->rect.x() + dx1, opt->rect.y() + dx1, opt->rect.width() - dx2, | - |
2310 | opt->rect.height() - dx2); executed (the execution status of this line is deduced): opt->rect.height() - dx2); | - |
2311 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2312 | } executed: } Execution Count:821 | 821 |
2313 | break; executed: break; Execution Count:821 | 821 |
2314 | case SE_PushButtonFocusRect: | - |
2315 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:229 | no Evaluation Count:0 |
| 0-229 |
2316 | int dbw1 = 0, dbw2 = 0; executed (the execution status of this line is deduced): int dbw1 = 0, dbw2 = 0; | - |
2317 | if (btn->features & QStyleOptionButton::AutoDefaultButton){ evaluated: btn->features & QStyleOptionButton::AutoDefaultButton yes Evaluation Count:89 | yes Evaluation Count:140 |
| 89-140 |
2318 | dbw1 = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget); executed (the execution status of this line is deduced): dbw1 = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget); | - |
2319 | dbw2 = dbw1 * 2; executed (the execution status of this line is deduced): dbw2 = dbw1 * 2; | - |
2320 | } executed: } Execution Count:89 | 89 |
2321 | | - |
2322 | int dfw1 = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget) + 1, executed (the execution status of this line is deduced): int dfw1 = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget) + 1, | - |
2323 | dfw2 = dfw1 * 2; executed (the execution status of this line is deduced): dfw2 = dfw1 * 2; | - |
2324 | | - |
2325 | r.setRect(btn->rect.x() + dfw1 + dbw1, btn->rect.y() + dfw1 + dbw1, executed (the execution status of this line is deduced): r.setRect(btn->rect.x() + dfw1 + dbw1, btn->rect.y() + dfw1 + dbw1, | - |
2326 | btn->rect.width() - dfw2 - dbw2, btn->rect.height()- dfw2 - dbw2); executed (the execution status of this line is deduced): btn->rect.width() - dfw2 - dbw2, btn->rect.height()- dfw2 - dbw2); | - |
2327 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2328 | } executed: } Execution Count:229 | 229 |
2329 | break; executed: break; Execution Count:229 | 229 |
2330 | case SE_CheckBoxIndicator: | - |
2331 | { | - |
2332 | int h = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget); executed (the execution status of this line is deduced): int h = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget); | - |
2333 | r.setRect(opt->rect.x(), opt->rect.y() + ((opt->rect.height() - h) / 2), executed (the execution status of this line is deduced): r.setRect(opt->rect.x(), opt->rect.y() + ((opt->rect.height() - h) / 2), | - |
2334 | proxy()->pixelMetric(PM_IndicatorWidth, opt, widget), h); executed (the execution status of this line is deduced): proxy()->pixelMetric(PM_IndicatorWidth, opt, widget), h); | - |
2335 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2336 | } | - |
2337 | break; executed: break; Execution Count:44 | 44 |
2338 | | - |
2339 | case SE_CheckBoxContents: | - |
2340 | { | - |
2341 | // Deal with the logical first, then convert it back to screen coords. | - |
2342 | QRect ir = visualRect(opt->direction, opt->rect, executed (the execution status of this line is deduced): QRect ir = visualRect(opt->direction, opt->rect, | - |
2343 | subElementRect(SE_CheckBoxIndicator, opt, widget)); executed (the execution status of this line is deduced): subElementRect(SE_CheckBoxIndicator, opt, widget)); | - |
2344 | int spacing = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget); executed (the execution status of this line is deduced): int spacing = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget); | - |
2345 | r.setRect(ir.right() + spacing, opt->rect.y(), opt->rect.width() - ir.width() - spacing, executed (the execution status of this line is deduced): r.setRect(ir.right() + spacing, opt->rect.y(), opt->rect.width() - ir.width() - spacing, | - |
2346 | opt->rect.height()); executed (the execution status of this line is deduced): opt->rect.height()); | - |
2347 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2348 | } | - |
2349 | break; executed: break; Execution Count:12 | 12 |
2350 | | - |
2351 | case SE_CheckBoxFocusRect: | - |
2352 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
2353 | if (btn->icon.isNull() && btn->text.isEmpty()) { partially evaluated: btn->icon.isNull() yes Evaluation Count:6 | no Evaluation Count:0 |
partially evaluated: btn->text.isEmpty() yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
2354 | r = subElementRect(SE_CheckBoxIndicator, opt, widget); executed (the execution status of this line is deduced): r = subElementRect(SE_CheckBoxIndicator, opt, widget); | - |
2355 | r.adjust(1, 1, -1, -1); executed (the execution status of this line is deduced): r.adjust(1, 1, -1, -1); | - |
2356 | break; executed: break; Execution Count:6 | 6 |
2357 | } | - |
2358 | // As above, deal with the logical first, then convert it back to screen coords. | - |
2359 | QRect cr = visualRect(btn->direction, btn->rect, never executed (the execution status of this line is deduced): QRect cr = visualRect(btn->direction, btn->rect, | - |
2360 | subElementRect(SE_CheckBoxContents, btn, widget)); never executed (the execution status of this line is deduced): subElementRect(SE_CheckBoxContents, btn, widget)); | - |
2361 | | - |
2362 | QRect iconRect, textRect; never executed (the execution status of this line is deduced): QRect iconRect, textRect; | - |
2363 | if (!btn->text.isEmpty()) { never evaluated: !btn->text.isEmpty() | 0 |
2364 | textRect = itemTextRect(opt->fontMetrics, cr, Qt::AlignAbsolute | Qt::AlignLeft never executed (the execution status of this line is deduced): textRect = itemTextRect(opt->fontMetrics, cr, Qt::AlignAbsolute | Qt::AlignLeft | - |
2365 | | Qt::AlignVCenter | Qt::TextShowMnemonic, never executed (the execution status of this line is deduced): | Qt::AlignVCenter | Qt::TextShowMnemonic, | - |
2366 | btn->state & State_Enabled, btn->text); never executed (the execution status of this line is deduced): btn->state & State_Enabled, btn->text); | - |
2367 | } | 0 |
2368 | if (!btn->icon.isNull()) { never evaluated: !btn->icon.isNull() | 0 |
2369 | iconRect = itemPixmapRect(cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter never executed (the execution status of this line is deduced): iconRect = itemPixmapRect(cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter | - |
2370 | | Qt::TextShowMnemonic, never executed (the execution status of this line is deduced): | Qt::TextShowMnemonic, | - |
2371 | btn->icon.pixmap(btn->iconSize, QIcon::Normal)); never executed (the execution status of this line is deduced): btn->icon.pixmap(btn->iconSize, QIcon::Normal)); | - |
2372 | if (!textRect.isEmpty()) never evaluated: !textRect.isEmpty() | 0 |
2373 | textRect.translate(iconRect.right() + 4, 0); never executed: textRect.translate(iconRect.right() + 4, 0); | 0 |
2374 | } | 0 |
2375 | r = iconRect | textRect; never executed (the execution status of this line is deduced): r = iconRect | textRect; | - |
2376 | r.adjust(-3, -2, 3, 2); never executed (the execution status of this line is deduced): r.adjust(-3, -2, 3, 2); | - |
2377 | r = r.intersected(btn->rect); never executed (the execution status of this line is deduced): r = r.intersected(btn->rect); | - |
2378 | r = visualRect(btn->direction, btn->rect, r); never executed (the execution status of this line is deduced): r = visualRect(btn->direction, btn->rect, r); | - |
2379 | } | 0 |
2380 | break; | 0 |
2381 | | - |
2382 | case SE_RadioButtonIndicator: | - |
2383 | { | - |
2384 | int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, opt, widget); executed (the execution status of this line is deduced): int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, opt, widget); | - |
2385 | r.setRect(opt->rect.x(), opt->rect.y() + ((opt->rect.height() - h) / 2), executed (the execution status of this line is deduced): r.setRect(opt->rect.x(), opt->rect.y() + ((opt->rect.height() - h) / 2), | - |
2386 | proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, opt, widget), h); executed (the execution status of this line is deduced): proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, opt, widget), h); | - |
2387 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2388 | } | - |
2389 | break; executed: break; Execution Count:57 | 57 |
2390 | | - |
2391 | case SE_RadioButtonContents: | - |
2392 | { | - |
2393 | QRect ir = visualRect(opt->direction, opt->rect, executed (the execution status of this line is deduced): QRect ir = visualRect(opt->direction, opt->rect, | - |
2394 | subElementRect(SE_RadioButtonIndicator, opt, widget)); executed (the execution status of this line is deduced): subElementRect(SE_RadioButtonIndicator, opt, widget)); | - |
2395 | int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, opt, widget); executed (the execution status of this line is deduced): int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, opt, widget); | - |
2396 | r.setRect(ir.left() + ir.width() + spacing, opt->rect.y(), opt->rect.width() - ir.width() - spacing, executed (the execution status of this line is deduced): r.setRect(ir.left() + ir.width() + spacing, opt->rect.y(), opt->rect.width() - ir.width() - spacing, | - |
2397 | opt->rect.height()); executed (the execution status of this line is deduced): opt->rect.height()); | - |
2398 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2399 | break; executed: break; Execution Count:31 | 31 |
2400 | } | - |
2401 | | - |
2402 | case SE_RadioButtonFocusRect: | - |
2403 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:5 | no Evaluation Count:0 |
| 0-5 |
2404 | if (btn->icon.isNull() && btn->text.isEmpty()) { partially evaluated: btn->icon.isNull() yes Evaluation Count:5 | no Evaluation Count:0 |
partially evaluated: btn->text.isEmpty() no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
2405 | r = subElementRect(SE_RadioButtonIndicator, opt, widget); never executed (the execution status of this line is deduced): r = subElementRect(SE_RadioButtonIndicator, opt, widget); | - |
2406 | r.adjust(1, 1, -1, -1); never executed (the execution status of this line is deduced): r.adjust(1, 1, -1, -1); | - |
2407 | break; | 0 |
2408 | } | - |
2409 | QRect cr = visualRect(btn->direction, btn->rect, executed (the execution status of this line is deduced): QRect cr = visualRect(btn->direction, btn->rect, | - |
2410 | subElementRect(SE_RadioButtonContents, opt, widget)); executed (the execution status of this line is deduced): subElementRect(SE_RadioButtonContents, opt, widget)); | - |
2411 | | - |
2412 | QRect iconRect, textRect; executed (the execution status of this line is deduced): QRect iconRect, textRect; | - |
2413 | if (!btn->text.isEmpty()){ partially evaluated: !btn->text.isEmpty() yes Evaluation Count:5 | no Evaluation Count:0 |
| 0-5 |
2414 | textRect = itemTextRect(opt->fontMetrics, cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter executed (the execution status of this line is deduced): textRect = itemTextRect(opt->fontMetrics, cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter | - |
2415 | | Qt::TextShowMnemonic, btn->state & State_Enabled, btn->text); executed (the execution status of this line is deduced): | Qt::TextShowMnemonic, btn->state & State_Enabled, btn->text); | - |
2416 | } executed: } Execution Count:5 | 5 |
2417 | if (!btn->icon.isNull()) { partially evaluated: !btn->icon.isNull() no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
2418 | iconRect = itemPixmapRect(cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, never executed (the execution status of this line is deduced): iconRect = itemPixmapRect(cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, | - |
2419 | btn->icon.pixmap(btn->iconSize, QIcon::Normal)); never executed (the execution status of this line is deduced): btn->icon.pixmap(btn->iconSize, QIcon::Normal)); | - |
2420 | if (!textRect.isEmpty()) never evaluated: !textRect.isEmpty() | 0 |
2421 | textRect.translate(iconRect.right() + 4, 0); never executed: textRect.translate(iconRect.right() + 4, 0); | 0 |
2422 | } | 0 |
2423 | r = iconRect | textRect; executed (the execution status of this line is deduced): r = iconRect | textRect; | - |
2424 | r.adjust(-3, -2, 3, 2); executed (the execution status of this line is deduced): r.adjust(-3, -2, 3, 2); | - |
2425 | r = r.intersected(btn->rect); executed (the execution status of this line is deduced): r = r.intersected(btn->rect); | - |
2426 | r = visualRect(btn->direction, btn->rect, r); executed (the execution status of this line is deduced): r = visualRect(btn->direction, btn->rect, r); | - |
2427 | } executed: } Execution Count:5 | 5 |
2428 | break; executed: break; Execution Count:5 | 5 |
2429 | #ifndef QT_NO_SLIDER | - |
2430 | case SE_SliderFocusRect: | - |
2431 | if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { never evaluated: const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt) | 0 |
2432 | int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); never executed (the execution status of this line is deduced): int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); | - |
2433 | int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); never executed (the execution status of this line is deduced): int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); | - |
2434 | if (slider->orientation == Qt::Horizontal) never evaluated: slider->orientation == Qt::Horizontal | 0 |
2435 | r.setRect(0, tickOffset - 1, slider->rect.width(), thickness + 2); never executed: r.setRect(0, tickOffset - 1, slider->rect.width(), thickness + 2); | 0 |
2436 | else | - |
2437 | r.setRect(tickOffset - 1, 0, thickness + 2, slider->rect.height()); never executed: r.setRect(tickOffset - 1, 0, thickness + 2, slider->rect.height()); | 0 |
2438 | r = r.intersected(slider->rect); never executed (the execution status of this line is deduced): r = r.intersected(slider->rect); | - |
2439 | r = visualRect(opt->direction, opt->rect, r); never executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2440 | } | 0 |
2441 | break; | 0 |
2442 | #endif // QT_NO_SLIDER | - |
2443 | #ifndef QT_NO_PROGRESSBAR | - |
2444 | case SE_ProgressBarGroove: | - |
2445 | case SE_ProgressBarContents: | - |
2446 | case SE_ProgressBarLabel: | - |
2447 | if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { partially evaluated: const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt) yes Evaluation Count:189 | no Evaluation Count:0 |
| 0-189 |
2448 | int textw = 0; executed (the execution status of this line is deduced): int textw = 0; | - |
2449 | bool vertical = false; executed (the execution status of this line is deduced): bool vertical = false; | - |
2450 | if (const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt)) { partially evaluated: const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt) yes Evaluation Count:189 | no Evaluation Count:0 |
| 0-189 |
2451 | vertical = (pb2->orientation == Qt::Vertical); executed (the execution status of this line is deduced): vertical = (pb2->orientation == Qt::Vertical); | - |
2452 | } executed: } Execution Count:189 | 189 |
2453 | if (!vertical) { partially evaluated: !vertical yes Evaluation Count:189 | no Evaluation Count:0 |
| 0-189 |
2454 | if (pb->textVisible) evaluated: pb->textVisible yes Evaluation Count:187 | yes Evaluation Count:2 |
| 2-187 |
2455 | textw = qMax(pb->fontMetrics.width(pb->text), pb->fontMetrics.width(QLatin1String("100%"))) + 6; executed: textw = qMax(pb->fontMetrics.width(pb->text), pb->fontMetrics.width(QLatin1String("100%"))) + 6; Execution Count:187 | 187 |
2456 | } executed: } Execution Count:189 | 189 |
2457 | | - |
2458 | if ((pb->textAlignment & Qt::AlignCenter) == 0) { partially evaluated: (pb->textAlignment & Qt::AlignCenter) == 0 yes Evaluation Count:189 | no Evaluation Count:0 |
| 0-189 |
2459 | if (sr != SE_ProgressBarLabel) evaluated: sr != SE_ProgressBarLabel yes Evaluation Count:127 | yes Evaluation Count:62 |
| 62-127 |
2460 | r.setCoords(pb->rect.left(), pb->rect.top(), executed: r.setCoords(pb->rect.left(), pb->rect.top(), pb->rect.right() - textw, pb->rect.bottom()); Execution Count:127 | 127 |
2461 | pb->rect.right() - textw, pb->rect.bottom()); executed: r.setCoords(pb->rect.left(), pb->rect.top(), pb->rect.right() - textw, pb->rect.bottom()); Execution Count:127 | 127 |
2462 | else | - |
2463 | r.setCoords(pb->rect.right() - textw, pb->rect.top(), executed: r.setCoords(pb->rect.right() - textw, pb->rect.top(), pb->rect.right(), pb->rect.bottom()); Execution Count:62 | 62 |
2464 | pb->rect.right(), pb->rect.bottom()); executed: r.setCoords(pb->rect.right() - textw, pb->rect.top(), pb->rect.right(), pb->rect.bottom()); Execution Count:62 | 62 |
2465 | } else { | - |
2466 | r = pb->rect; never executed (the execution status of this line is deduced): r = pb->rect; | - |
2467 | } | 0 |
2468 | r = visualRect(pb->direction, pb->rect, r); executed (the execution status of this line is deduced): r = visualRect(pb->direction, pb->rect, r); | - |
2469 | } executed: } Execution Count:189 | 189 |
2470 | break; executed: break; Execution Count:189 | 189 |
2471 | #endif // QT_NO_PROGRESSBAR | - |
2472 | #ifndef QT_NO_COMBOBOX | - |
2473 | case SE_ComboBoxFocusRect: | - |
2474 | if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { partially evaluated: const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt) yes Evaluation Count:5 | no Evaluation Count:0 |
| 0-5 |
2475 | int margin = cb->frame ? 3 : 0; evaluated: cb->frame yes Evaluation Count:3 | yes Evaluation Count:2 |
| 2-3 |
2476 | r.setRect(opt->rect.left() + margin, opt->rect.top() + margin, executed (the execution status of this line is deduced): r.setRect(opt->rect.left() + margin, opt->rect.top() + margin, | - |
2477 | opt->rect.width() - 2*margin - 16, opt->rect.height() - 2*margin); executed (the execution status of this line is deduced): opt->rect.width() - 2*margin - 16, opt->rect.height() - 2*margin); | - |
2478 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2479 | } executed: } Execution Count:5 | 5 |
2480 | break; executed: break; Execution Count:5 | 5 |
2481 | #endif // QT_NO_COMBOBOX | - |
2482 | #ifndef QT_NO_TOOLBOX | - |
2483 | case SE_ToolBoxTabContents: | - |
2484 | r = opt->rect; never executed (the execution status of this line is deduced): r = opt->rect; | - |
2485 | r.adjust(0, 0, -30, 0); never executed (the execution status of this line is deduced): r.adjust(0, 0, -30, 0); | - |
2486 | break; | 0 |
2487 | #endif // QT_NO_TOOLBOX | - |
2488 | case SE_HeaderLabel: { | - |
2489 | int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget); executed (the execution status of this line is deduced): int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget); | - |
2490 | r.setRect(opt->rect.x() + margin, opt->rect.y() + margin, executed (the execution status of this line is deduced): r.setRect(opt->rect.x() + margin, opt->rect.y() + margin, | - |
2491 | opt->rect.width() - margin * 2, opt->rect.height() - margin * 2); executed (the execution status of this line is deduced): opt->rect.width() - margin * 2, opt->rect.height() - margin * 2); | - |
2492 | | - |
2493 | if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) { partially evaluated: const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt) yes Evaluation Count:2103 | no Evaluation Count:0 |
| 0-2103 |
2494 | // Subtract width needed for arrow, if there is one | - |
2495 | if (header->sortIndicator != QStyleOptionHeader::None) { evaluated: header->sortIndicator != QStyleOptionHeader::None yes Evaluation Count:40 | yes Evaluation Count:2063 |
| 40-2063 |
2496 | if (opt->state & State_Horizontal) partially evaluated: opt->state & State_Horizontal yes Evaluation Count:40 | no Evaluation Count:0 |
| 0-40 |
2497 | r.setWidth(r.width() - (opt->rect.height() / 2) - (margin * 2)); executed: r.setWidth(r.width() - (opt->rect.height() / 2) - (margin * 2)); Execution Count:40 | 40 |
2498 | else | - |
2499 | r.setHeight(r.height() - (opt->rect.width() / 2) - (margin * 2)); never executed: r.setHeight(r.height() - (opt->rect.width() / 2) - (margin * 2)); | 0 |
2500 | } | - |
2501 | } executed: } Execution Count:2103 | 2103 |
2502 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2503 | break; } executed: break; Execution Count:2103 | 2103 |
2504 | case SE_HeaderArrow: { | - |
2505 | int h = opt->rect.height(); executed (the execution status of this line is deduced): int h = opt->rect.height(); | - |
2506 | int w = opt->rect.width(); executed (the execution status of this line is deduced): int w = opt->rect.width(); | - |
2507 | int x = opt->rect.x(); executed (the execution status of this line is deduced): int x = opt->rect.x(); | - |
2508 | int y = opt->rect.y(); executed (the execution status of this line is deduced): int y = opt->rect.y(); | - |
2509 | int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget); executed (the execution status of this line is deduced): int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget); | - |
2510 | | - |
2511 | if (opt->state & State_Horizontal) { partially evaluated: opt->state & State_Horizontal yes Evaluation Count:40 | no Evaluation Count:0 |
| 0-40 |
2512 | int horiz_size = h / 2; executed (the execution status of this line is deduced): int horiz_size = h / 2; | - |
2513 | r.setRect(x + w - margin * 2 - horiz_size, y + 5, executed (the execution status of this line is deduced): r.setRect(x + w - margin * 2 - horiz_size, y + 5, | - |
2514 | horiz_size, h - margin * 2 - 5); executed (the execution status of this line is deduced): horiz_size, h - margin * 2 - 5); | - |
2515 | } else { executed: } Execution Count:40 | 40 |
2516 | int vert_size = w / 2; never executed (the execution status of this line is deduced): int vert_size = w / 2; | - |
2517 | r.setRect(x + 5, y + h - margin * 2 - vert_size, never executed (the execution status of this line is deduced): r.setRect(x + 5, y + h - margin * 2 - vert_size, | - |
2518 | w - margin * 2 - 5, vert_size); never executed (the execution status of this line is deduced): w - margin * 2 - 5, vert_size); | - |
2519 | } | 0 |
2520 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2521 | break; } executed: break; Execution Count:40 | 40 |
2522 | | - |
2523 | case SE_RadioButtonClickRect: | - |
2524 | r = subElementRect(SE_RadioButtonFocusRect, opt, widget); never executed (the execution status of this line is deduced): r = subElementRect(SE_RadioButtonFocusRect, opt, widget); | - |
2525 | r |= subElementRect(SE_RadioButtonIndicator, opt, widget); never executed (the execution status of this line is deduced): r |= subElementRect(SE_RadioButtonIndicator, opt, widget); | - |
2526 | break; | 0 |
2527 | case SE_CheckBoxClickRect: | - |
2528 | r = subElementRect(SE_CheckBoxFocusRect, opt, widget); never executed (the execution status of this line is deduced): r = subElementRect(SE_CheckBoxFocusRect, opt, widget); | - |
2529 | r |= subElementRect(SE_CheckBoxIndicator, opt, widget); never executed (the execution status of this line is deduced): r |= subElementRect(SE_CheckBoxIndicator, opt, widget); | - |
2530 | break; | 0 |
2531 | #ifndef QT_NO_TABWIDGET | - |
2532 | case SE_TabWidgetTabBar: | - |
2533 | if (const QStyleOptionTabWidgetFrame *twf partially evaluated: const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt) yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-53 |
2534 | = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) { partially evaluated: const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt) yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-53 |
2535 | r.setSize(twf->tabBarSize); executed (the execution status of this line is deduced): r.setSize(twf->tabBarSize); | - |
2536 | const uint alingMask = Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter; executed (the execution status of this line is deduced): const uint alingMask = Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter; | - |
2537 | switch (twf->shape) { | - |
2538 | case QTabBar::RoundedNorth: | - |
2539 | case QTabBar::TriangularNorth: | - |
2540 | // Constrain the size now, otherwise, center could get off the page | - |
2541 | // This of course repeated for all the other directions | - |
2542 | r.setWidth(qMin(r.width(), twf->rect.width() executed (the execution status of this line is deduced): r.setWidth(qMin(r.width(), twf->rect.width() | - |
2543 | - twf->leftCornerWidgetSize.width() executed (the execution status of this line is deduced): - twf->leftCornerWidgetSize.width() | - |
2544 | - twf->rightCornerWidgetSize.width())); executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.width())); | - |
2545 | switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { | - |
2546 | default: | - |
2547 | case Qt::AlignLeft: | - |
2548 | r.moveTopLeft(QPoint(twf->leftCornerWidgetSize.width(), 0)); executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->leftCornerWidgetSize.width(), 0)); | - |
2549 | break; executed: break; Execution Count:47 | 47 |
2550 | case Qt::AlignHCenter: | - |
2551 | r.moveTopLeft(QPoint(twf->rect.center().x() - qRound(r.width() / 2.0f) never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.center().x() - qRound(r.width() / 2.0f) | - |
2552 | + (twf->leftCornerWidgetSize.width() / 2) never executed (the execution status of this line is deduced): + (twf->leftCornerWidgetSize.width() / 2) | - |
2553 | - (twf->rightCornerWidgetSize.width() / 2), 0)); never executed (the execution status of this line is deduced): - (twf->rightCornerWidgetSize.width() / 2), 0)); | - |
2554 | break; | 0 |
2555 | case Qt::AlignRight: | - |
2556 | r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width() never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width() | - |
2557 | - twf->rightCornerWidgetSize.width(), 0)); never executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.width(), 0)); | - |
2558 | break; | 0 |
2559 | } | - |
2560 | r = visualRect(twf->direction, twf->rect, r); executed (the execution status of this line is deduced): r = visualRect(twf->direction, twf->rect, r); | - |
2561 | break; executed: break; Execution Count:47 | 47 |
2562 | case QTabBar::RoundedSouth: | - |
2563 | case QTabBar::TriangularSouth: | - |
2564 | r.setWidth(qMin(r.width(), twf->rect.width() executed (the execution status of this line is deduced): r.setWidth(qMin(r.width(), twf->rect.width() | - |
2565 | - twf->leftCornerWidgetSize.width() executed (the execution status of this line is deduced): - twf->leftCornerWidgetSize.width() | - |
2566 | - twf->rightCornerWidgetSize.width())); executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.width())); | - |
2567 | switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { | - |
2568 | default: | - |
2569 | case Qt::AlignLeft: | - |
2570 | r.moveTopLeft(QPoint(twf->leftCornerWidgetSize.width(), executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->leftCornerWidgetSize.width(), | - |
2571 | twf->rect.height() - twf->tabBarSize.height())); executed (the execution status of this line is deduced): twf->rect.height() - twf->tabBarSize.height())); | - |
2572 | break; executed: break; Execution Count:2 | 2 |
2573 | case Qt::AlignHCenter: | - |
2574 | r.moveTopLeft(QPoint(twf->rect.center().x() - qRound(r.width() / 2.0f) never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.center().x() - qRound(r.width() / 2.0f) | - |
2575 | + (twf->leftCornerWidgetSize.width() / 2) never executed (the execution status of this line is deduced): + (twf->leftCornerWidgetSize.width() / 2) | - |
2576 | - (twf->rightCornerWidgetSize.width() / 2), never executed (the execution status of this line is deduced): - (twf->rightCornerWidgetSize.width() / 2), | - |
2577 | twf->rect.height() - twf->tabBarSize.height())); never executed (the execution status of this line is deduced): twf->rect.height() - twf->tabBarSize.height())); | - |
2578 | break; | 0 |
2579 | case Qt::AlignRight: | - |
2580 | r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width() never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width() | - |
2581 | - twf->rightCornerWidgetSize.width(), never executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.width(), | - |
2582 | twf->rect.height() - twf->tabBarSize.height())); never executed (the execution status of this line is deduced): twf->rect.height() - twf->tabBarSize.height())); | - |
2583 | break; | 0 |
2584 | } | - |
2585 | r = visualRect(twf->direction, twf->rect, r); executed (the execution status of this line is deduced): r = visualRect(twf->direction, twf->rect, r); | - |
2586 | break; executed: break; Execution Count:2 | 2 |
2587 | case QTabBar::RoundedEast: | - |
2588 | case QTabBar::TriangularEast: | - |
2589 | r.setHeight(qMin(r.height(), twf->rect.height() executed (the execution status of this line is deduced): r.setHeight(qMin(r.height(), twf->rect.height() | - |
2590 | - twf->leftCornerWidgetSize.height() executed (the execution status of this line is deduced): - twf->leftCornerWidgetSize.height() | - |
2591 | - twf->rightCornerWidgetSize.height())); executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.height())); | - |
2592 | switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { | - |
2593 | default: | - |
2594 | case Qt::AlignLeft: | - |
2595 | r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), | - |
2596 | twf->leftCornerWidgetSize.height())); executed (the execution status of this line is deduced): twf->leftCornerWidgetSize.height())); | - |
2597 | break; executed: break; Execution Count:2 | 2 |
2598 | case Qt::AlignHCenter: | - |
2599 | r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), | - |
2600 | twf->rect.center().y() - r.height() / 2)); never executed (the execution status of this line is deduced): twf->rect.center().y() - r.height() / 2)); | - |
2601 | break; | 0 |
2602 | case Qt::AlignRight: | - |
2603 | r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), | - |
2604 | twf->rect.height() - twf->tabBarSize.height() never executed (the execution status of this line is deduced): twf->rect.height() - twf->tabBarSize.height() | - |
2605 | - twf->rightCornerWidgetSize.height())); never executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.height())); | - |
2606 | break; | 0 |
2607 | } | - |
2608 | break; executed: break; Execution Count:2 | 2 |
2609 | case QTabBar::RoundedWest: | - |
2610 | case QTabBar::TriangularWest: | - |
2611 | r.setHeight(qMin(r.height(), twf->rect.height() executed (the execution status of this line is deduced): r.setHeight(qMin(r.height(), twf->rect.height() | - |
2612 | - twf->leftCornerWidgetSize.height() executed (the execution status of this line is deduced): - twf->leftCornerWidgetSize.height() | - |
2613 | - twf->rightCornerWidgetSize.height())); executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.height())); | - |
2614 | switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { | - |
2615 | default: | - |
2616 | case Qt::AlignLeft: | - |
2617 | r.moveTopLeft(QPoint(0, twf->leftCornerWidgetSize.height())); executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(0, twf->leftCornerWidgetSize.height())); | - |
2618 | break; executed: break; Execution Count:2 | 2 |
2619 | case Qt::AlignHCenter: | - |
2620 | r.moveTopLeft(QPoint(0, twf->rect.center().y() - r.height() / 2)); never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(0, twf->rect.center().y() - r.height() / 2)); | - |
2621 | break; | 0 |
2622 | case Qt::AlignRight: | - |
2623 | r.moveTopLeft(QPoint(0, twf->rect.height() - twf->tabBarSize.height() never executed (the execution status of this line is deduced): r.moveTopLeft(QPoint(0, twf->rect.height() - twf->tabBarSize.height() | - |
2624 | - twf->rightCornerWidgetSize.height())); never executed (the execution status of this line is deduced): - twf->rightCornerWidgetSize.height())); | - |
2625 | break; | 0 |
2626 | } | - |
2627 | break; executed: break; Execution Count:2 | 2 |
2628 | } | - |
2629 | } executed: } Execution Count:53 | 53 |
2630 | break; executed: break; Execution Count:53 | 53 |
2631 | case SE_TabWidgetTabPane: | - |
2632 | case SE_TabWidgetTabContents: | - |
2633 | if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) { partially evaluated: const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt) yes Evaluation Count:212 | no Evaluation Count:0 |
| 0-212 |
2634 | QStyleOptionTab tabopt; executed (the execution status of this line is deduced): QStyleOptionTab tabopt; | - |
2635 | tabopt.shape = twf->shape; executed (the execution status of this line is deduced): tabopt.shape = twf->shape; | - |
2636 | int overlap = proxy()->pixelMetric(PM_TabBarBaseOverlap, &tabopt, widget); executed (the execution status of this line is deduced): int overlap = proxy()->pixelMetric(PM_TabBarBaseOverlap, &tabopt, widget); | - |
2637 | if (twf->lineWidth == 0) partially evaluated: twf->lineWidth == 0 no Evaluation Count:0 | yes Evaluation Count:212 |
| 0-212 |
2638 | overlap = 0; never executed: overlap = 0; | 0 |
2639 | switch (twf->shape) { | - |
2640 | case QTabBar::RoundedNorth: | - |
2641 | case QTabBar::TriangularNorth: | - |
2642 | r = QRect(QPoint(0,qMax(twf->tabBarSize.height() - overlap, 0)), executed (the execution status of this line is deduced): r = QRect(QPoint(0,qMax(twf->tabBarSize.height() - overlap, 0)), | - |
2643 | QSize(twf->rect.width(), qMin(twf->rect.height() - twf->tabBarSize.height() + overlap, twf->rect.height()))); executed (the execution status of this line is deduced): QSize(twf->rect.width(), qMin(twf->rect.height() - twf->tabBarSize.height() + overlap, twf->rect.height()))); | - |
2644 | break; executed: break; Execution Count:188 | 188 |
2645 | case QTabBar::RoundedSouth: | - |
2646 | case QTabBar::TriangularSouth: | - |
2647 | r = QRect(QPoint(0,0), QSize(twf->rect.width(), qMin(twf->rect.height() - twf->tabBarSize.height() + overlap, twf->rect.height()))); executed (the execution status of this line is deduced): r = QRect(QPoint(0,0), QSize(twf->rect.width(), qMin(twf->rect.height() - twf->tabBarSize.height() + overlap, twf->rect.height()))); | - |
2648 | break; executed: break; Execution Count:8 | 8 |
2649 | case QTabBar::RoundedEast: | - |
2650 | case QTabBar::TriangularEast: | - |
2651 | r = QRect(QPoint(0, 0), QSize(qMin(twf->rect.width() - twf->tabBarSize.width() + overlap, twf->rect.width()), twf->rect.height())); executed (the execution status of this line is deduced): r = QRect(QPoint(0, 0), QSize(qMin(twf->rect.width() - twf->tabBarSize.width() + overlap, twf->rect.width()), twf->rect.height())); | - |
2652 | break; executed: break; Execution Count:8 | 8 |
2653 | case QTabBar::RoundedWest: | - |
2654 | case QTabBar::TriangularWest: | - |
2655 | r = QRect(QPoint(qMax(twf->tabBarSize.width() - overlap, 0), 0), executed (the execution status of this line is deduced): r = QRect(QPoint(qMax(twf->tabBarSize.width() - overlap, 0), 0), | - |
2656 | QSize(qMin(twf->rect.width() - twf->tabBarSize.width() + overlap, twf->rect.width()), twf->rect.height())); executed (the execution status of this line is deduced): QSize(qMin(twf->rect.width() - twf->tabBarSize.width() + overlap, twf->rect.width()), twf->rect.height())); | - |
2657 | break; executed: break; Execution Count:8 | 8 |
2658 | } | - |
2659 | if (sr == SE_TabWidgetTabContents && twf->lineWidth > 0) evaluated: sr == SE_TabWidgetTabContents yes Evaluation Count:53 | yes Evaluation Count:159 |
partially evaluated: twf->lineWidth > 0 yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-159 |
2660 | r.adjust(2, 2, -2, -2); executed: r.adjust(2, 2, -2, -2); Execution Count:53 | 53 |
2661 | } executed: } Execution Count:212 | 212 |
2662 | break; executed: break; Execution Count:212 | 212 |
2663 | case SE_TabWidgetLeftCorner: | - |
2664 | if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) { partially evaluated: const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt) yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-53 |
2665 | QRect paneRect = subElementRect(SE_TabWidgetTabPane, twf, widget); executed (the execution status of this line is deduced): QRect paneRect = subElementRect(SE_TabWidgetTabPane, twf, widget); | - |
2666 | switch (twf->shape) { | - |
2667 | case QTabBar::RoundedNorth: | - |
2668 | case QTabBar::TriangularNorth: | - |
2669 | r = QRect(QPoint(paneRect.x(), paneRect.y() - twf->leftCornerWidgetSize.height()), executed (the execution status of this line is deduced): r = QRect(QPoint(paneRect.x(), paneRect.y() - twf->leftCornerWidgetSize.height()), | - |
2670 | twf->leftCornerWidgetSize); executed (the execution status of this line is deduced): twf->leftCornerWidgetSize); | - |
2671 | break; executed: break; Execution Count:47 | 47 |
2672 | case QTabBar::RoundedSouth: | - |
2673 | case QTabBar::TriangularSouth: | - |
2674 | r = QRect(QPoint(paneRect.x(), paneRect.height()), twf->leftCornerWidgetSize); executed (the execution status of this line is deduced): r = QRect(QPoint(paneRect.x(), paneRect.height()), twf->leftCornerWidgetSize); | - |
2675 | break; executed: break; Execution Count:2 | 2 |
2676 | default: | - |
2677 | break; executed: break; Execution Count:4 | 4 |
2678 | } | - |
2679 | r = visualRect(twf->direction, twf->rect, r); executed (the execution status of this line is deduced): r = visualRect(twf->direction, twf->rect, r); | - |
2680 | } executed: } Execution Count:53 | 53 |
2681 | break; executed: break; Execution Count:53 | 53 |
2682 | case SE_TabWidgetRightCorner: | - |
2683 | if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) { partially evaluated: const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt) yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-53 |
2684 | QRect paneRect = subElementRect(SE_TabWidgetTabPane, twf, widget); executed (the execution status of this line is deduced): QRect paneRect = subElementRect(SE_TabWidgetTabPane, twf, widget); | - |
2685 | switch (twf->shape) { | - |
2686 | case QTabBar::RoundedNorth: | - |
2687 | case QTabBar::TriangularNorth: | - |
2688 | r = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), executed (the execution status of this line is deduced): r = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), | - |
2689 | paneRect.y() - twf->rightCornerWidgetSize.height()), executed (the execution status of this line is deduced): paneRect.y() - twf->rightCornerWidgetSize.height()), | - |
2690 | twf->rightCornerWidgetSize); executed (the execution status of this line is deduced): twf->rightCornerWidgetSize); | - |
2691 | break; executed: break; Execution Count:47 | 47 |
2692 | case QTabBar::RoundedSouth: | - |
2693 | case QTabBar::TriangularSouth: | - |
2694 | r = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), executed (the execution status of this line is deduced): r = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), | - |
2695 | paneRect.height()), twf->rightCornerWidgetSize); executed (the execution status of this line is deduced): paneRect.height()), twf->rightCornerWidgetSize); | - |
2696 | break; executed: break; Execution Count:2 | 2 |
2697 | default: | - |
2698 | break; executed: break; Execution Count:4 | 4 |
2699 | } | - |
2700 | r = visualRect(twf->direction, twf->rect, r); executed (the execution status of this line is deduced): r = visualRect(twf->direction, twf->rect, r); | - |
2701 | } executed: } Execution Count:53 | 53 |
2702 | break; executed: break; Execution Count:53 | 53 |
2703 | case SE_TabBarTabText: | - |
2704 | if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { partially evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt) yes Evaluation Count:737 | no Evaluation Count:0 |
| 0-737 |
2705 | QStyleOptionTabV3 tabV3(*tab); executed (the execution status of this line is deduced): QStyleOptionTabV3 tabV3(*tab); | - |
2706 | QRect dummyIconRect; executed (the execution status of this line is deduced): QRect dummyIconRect; | - |
2707 | d->tabLayout(&tabV3, widget, &r, &dummyIconRect); executed (the execution status of this line is deduced): d->tabLayout(&tabV3, widget, &r, &dummyIconRect); | - |
2708 | } executed: } Execution Count:737 | 737 |
2709 | break; executed: break; Execution Count:737 | 737 |
2710 | case SE_TabBarTabLeftButton: | - |
2711 | case SE_TabBarTabRightButton: | - |
2712 | if (const QStyleOptionTabV3 *tab = qstyleoption_cast<const QStyleOptionTabV3 *>(opt)) { partially evaluated: const QStyleOptionTabV3 *tab = qstyleoption_cast<const QStyleOptionTabV3 *>(opt) yes Evaluation Count:20 | no Evaluation Count:0 |
| 0-20 |
2713 | bool selected = tab->state & State_Selected; executed (the execution status of this line is deduced): bool selected = tab->state & State_Selected; | - |
2714 | int verticalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget); executed (the execution status of this line is deduced): int verticalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget); | - |
2715 | int horizontalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget); executed (the execution status of this line is deduced): int horizontalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget); | - |
2716 | int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; executed (the execution status of this line is deduced): int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; | - |
2717 | hpadding = qMax(hpadding, 4); //workaround KStyle returning 0 because they workaround an old bug in Qt executed (the execution status of this line is deduced): hpadding = qMax(hpadding, 4); | - |
2718 | | - |
2719 | bool verticalTabs = tab->shape == QTabBar::RoundedEast partially evaluated: tab->shape == QTabBar::RoundedEast no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2720 | || tab->shape == QTabBar::RoundedWest partially evaluated: tab->shape == QTabBar::RoundedWest no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2721 | || tab->shape == QTabBar::TriangularEast partially evaluated: tab->shape == QTabBar::TriangularEast no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2722 | || tab->shape == QTabBar::TriangularWest; partially evaluated: tab->shape == QTabBar::TriangularWest no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2723 | | - |
2724 | QRect tr = tab->rect; executed (the execution status of this line is deduced): QRect tr = tab->rect; | - |
2725 | if (tab->shape == QTabBar::RoundedSouth || tab->shape == QTabBar::TriangularSouth) partially evaluated: tab->shape == QTabBar::RoundedSouth no Evaluation Count:0 | yes Evaluation Count:20 |
partially evaluated: tab->shape == QTabBar::TriangularSouth no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2726 | verticalShift = -verticalShift; never executed: verticalShift = -verticalShift; | 0 |
2727 | if (verticalTabs) { partially evaluated: verticalTabs no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2728 | qSwap(horizontalShift, verticalShift); never executed (the execution status of this line is deduced): qSwap(horizontalShift, verticalShift); | - |
2729 | horizontalShift *= -1; never executed (the execution status of this line is deduced): horizontalShift *= -1; | - |
2730 | verticalShift *= -1; never executed (the execution status of this line is deduced): verticalShift *= -1; | - |
2731 | } | 0 |
2732 | if (tab->shape == QTabBar::RoundedWest || tab->shape == QTabBar::TriangularWest) partially evaluated: tab->shape == QTabBar::RoundedWest no Evaluation Count:0 | yes Evaluation Count:20 |
partially evaluated: tab->shape == QTabBar::TriangularWest no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2733 | horizontalShift = -horizontalShift; never executed: horizontalShift = -horizontalShift; | 0 |
2734 | | - |
2735 | tr.adjust(0, 0, horizontalShift, verticalShift); executed (the execution status of this line is deduced): tr.adjust(0, 0, horizontalShift, verticalShift); | - |
2736 | if (selected) evaluated: selected yes Evaluation Count:15 | yes Evaluation Count:5 |
| 5-15 |
2737 | { | - |
2738 | tr.setBottom(tr.bottom() - verticalShift); executed (the execution status of this line is deduced): tr.setBottom(tr.bottom() - verticalShift); | - |
2739 | tr.setRight(tr.right() - horizontalShift); executed (the execution status of this line is deduced): tr.setRight(tr.right() - horizontalShift); | - |
2740 | } executed: } Execution Count:15 | 15 |
2741 | | - |
2742 | QSize size = (sr == SE_TabBarTabLeftButton) ? tab->leftButtonSize : tab->rightButtonSize; evaluated: (sr == SE_TabBarTabLeftButton) yes Evaluation Count:4 | yes Evaluation Count:16 |
| 4-16 |
2743 | int w = size.width(); executed (the execution status of this line is deduced): int w = size.width(); | - |
2744 | int h = size.height(); executed (the execution status of this line is deduced): int h = size.height(); | - |
2745 | int midHeight = static_cast<int>(qCeil(float(tr.height() - h) / 2)); executed (the execution status of this line is deduced): int midHeight = static_cast<int>(qCeil(float(tr.height() - h) / 2)); | - |
2746 | int midWidth = ((tr.width() - w) / 2); executed (the execution status of this line is deduced): int midWidth = ((tr.width() - w) / 2); | - |
2747 | | - |
2748 | bool atTheTop = true; executed (the execution status of this line is deduced): bool atTheTop = true; | - |
2749 | switch (tab->shape) { | - |
2750 | case QTabBar::RoundedWest: | - |
2751 | case QTabBar::TriangularWest: | - |
2752 | atTheTop = (sr == SE_TabBarTabLeftButton); never executed (the execution status of this line is deduced): atTheTop = (sr == SE_TabBarTabLeftButton); | - |
2753 | break; | 0 |
2754 | case QTabBar::RoundedEast: | - |
2755 | case QTabBar::TriangularEast: | - |
2756 | atTheTop = (sr == SE_TabBarTabRightButton); never executed (the execution status of this line is deduced): atTheTop = (sr == SE_TabBarTabRightButton); | - |
2757 | break; | 0 |
2758 | default: | - |
2759 | if (sr == SE_TabBarTabLeftButton) evaluated: sr == SE_TabBarTabLeftButton yes Evaluation Count:4 | yes Evaluation Count:16 |
| 4-16 |
2760 | r = QRect(tab->rect.x() + hpadding, midHeight, w, h); executed: r = QRect(tab->rect.x() + hpadding, midHeight, w, h); Execution Count:4 | 4 |
2761 | else | - |
2762 | r = QRect(tab->rect.right() - w - hpadding, midHeight, w, h); executed: r = QRect(tab->rect.right() - w - hpadding, midHeight, w, h); Execution Count:16 | 16 |
2763 | r = visualRect(tab->direction, tab->rect, r); executed (the execution status of this line is deduced): r = visualRect(tab->direction, tab->rect, r); | - |
2764 | } executed: } Execution Count:20 | 20 |
2765 | if (verticalTabs) { partially evaluated: verticalTabs no Evaluation Count:0 | yes Evaluation Count:20 |
| 0-20 |
2766 | if (atTheTop) never evaluated: atTheTop | 0 |
2767 | r = QRect(midWidth, tr.y() + tab->rect.height() - hpadding - h, w, h); never executed: r = QRect(midWidth, tr.y() + tab->rect.height() - hpadding - h, w, h); | 0 |
2768 | else | - |
2769 | r = QRect(midWidth, tr.y() + hpadding, w, h); never executed: r = QRect(midWidth, tr.y() + hpadding, w, h); | 0 |
2770 | } | - |
2771 | } executed: } Execution Count:20 | 20 |
2772 | | - |
2773 | break; executed: break; Execution Count:20 | 20 |
2774 | #endif // QT_NO_TABWIDGET | - |
2775 | #ifndef QT_NO_TABBAR | - |
2776 | case SE_TabBarTearIndicator: | - |
2777 | if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { never evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt) | 0 |
2778 | switch (tab->shape) { | - |
2779 | case QTabBar::RoundedNorth: | - |
2780 | case QTabBar::TriangularNorth: | - |
2781 | case QTabBar::RoundedSouth: | - |
2782 | case QTabBar::TriangularSouth: | - |
2783 | r.setRect(tab->rect.left(), tab->rect.top(), 4, opt->rect.height()); never executed (the execution status of this line is deduced): r.setRect(tab->rect.left(), tab->rect.top(), 4, opt->rect.height()); | - |
2784 | break; | 0 |
2785 | case QTabBar::RoundedWest: | - |
2786 | case QTabBar::TriangularWest: | - |
2787 | case QTabBar::RoundedEast: | - |
2788 | case QTabBar::TriangularEast: | - |
2789 | r.setRect(tab->rect.left(), tab->rect.top(), opt->rect.width(), 4); never executed (the execution status of this line is deduced): r.setRect(tab->rect.left(), tab->rect.top(), opt->rect.width(), 4); | - |
2790 | break; | 0 |
2791 | default: | - |
2792 | break; | 0 |
2793 | } | - |
2794 | r = visualRect(opt->direction, opt->rect, r); never executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2795 | } | 0 |
2796 | break; | 0 |
2797 | #endif | - |
2798 | case SE_TreeViewDisclosureItem: | - |
2799 | r = opt->rect; executed (the execution status of this line is deduced): r = opt->rect; | - |
2800 | break; executed: break; Execution Count:179 | 179 |
2801 | case SE_LineEditContents: | - |
2802 | if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { partially evaluated: const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt) yes Evaluation Count:8451 | no Evaluation Count:0 |
| 0-8451 |
2803 | r = f->rect.adjusted(f->lineWidth, f->lineWidth, -f->lineWidth, -f->lineWidth); executed (the execution status of this line is deduced): r = f->rect.adjusted(f->lineWidth, f->lineWidth, -f->lineWidth, -f->lineWidth); | - |
2804 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2805 | } executed: } Execution Count:8451 | 8451 |
2806 | break; executed: break; Execution Count:8451 | 8451 |
2807 | case SE_FrameContents: | - |
2808 | if (const QStyleOptionFrameV2 *f = qstyleoption_cast<const QStyleOptionFrameV2 *>(opt)) { partially evaluated: const QStyleOptionFrameV2 *f = qstyleoption_cast<const QStyleOptionFrameV2 *>(opt) yes Evaluation Count:10280 | no Evaluation Count:0 |
| 0-10280 |
2809 | int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, f, widget); executed (the execution status of this line is deduced): int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, f, widget); | - |
2810 | r = opt->rect.adjusted(fw, fw, -fw, -fw); executed (the execution status of this line is deduced): r = opt->rect.adjusted(fw, fw, -fw, -fw); | - |
2811 | r = visualRect(opt->direction, opt->rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, r); | - |
2812 | } executed: } Execution Count:10280 | 10280 |
2813 | break; executed: break; Execution Count:10280 | 10280 |
2814 | case SE_ShapedFrameContents: | - |
2815 | if (const QStyleOptionFrameV3 *f = qstyleoption_cast<const QStyleOptionFrameV3 *>(opt)) { partially evaluated: const QStyleOptionFrameV3 *f = qstyleoption_cast<const QStyleOptionFrameV3 *>(opt) yes Evaluation Count:18217 | no Evaluation Count:0 |
| 0-18217 |
2816 | int frameShape = f->frameShape; executed (the execution status of this line is deduced): int frameShape = f->frameShape; | - |
2817 | int frameShadow = QFrame::Plain; executed (the execution status of this line is deduced): int frameShadow = QFrame::Plain; | - |
2818 | if (f->state & QStyle::State_Sunken) { partially evaluated: f->state & QStyle::State_Sunken no Evaluation Count:0 | yes Evaluation Count:18217 |
| 0-18217 |
2819 | frameShadow = QFrame::Sunken; never executed (the execution status of this line is deduced): frameShadow = QFrame::Sunken; | - |
2820 | } else if (f->state & QStyle::State_Raised) { never executed: } partially evaluated: f->state & QStyle::State_Raised no Evaluation Count:0 | yes Evaluation Count:18217 |
| 0-18217 |
2821 | frameShadow = QFrame::Raised; never executed (the execution status of this line is deduced): frameShadow = QFrame::Raised; | - |
2822 | } | 0 |
2823 | | - |
2824 | int frameWidth = 0; executed (the execution status of this line is deduced): int frameWidth = 0; | - |
2825 | | - |
2826 | switch (frameShape) { | - |
2827 | case QFrame::NoFrame: | - |
2828 | frameWidth = 0; executed (the execution status of this line is deduced): frameWidth = 0; | - |
2829 | break; executed: break; Execution Count:7514 | 7514 |
2830 | | - |
2831 | case QFrame::Box: | - |
2832 | case QFrame::HLine: | - |
2833 | case QFrame::VLine: | - |
2834 | switch (frameShadow) { | - |
2835 | case QFrame::Plain: | - |
2836 | frameWidth = f->lineWidth; executed (the execution status of this line is deduced): frameWidth = f->lineWidth; | - |
2837 | break; executed: break; Execution Count:413 | 413 |
2838 | case QFrame::Raised: | - |
2839 | case QFrame::Sunken: | - |
2840 | frameWidth = (short)(f->lineWidth*2 + f->midLineWidth); never executed (the execution status of this line is deduced): frameWidth = (short)(f->lineWidth*2 + f->midLineWidth); | - |
2841 | break; | 0 |
2842 | } | - |
2843 | break; executed: break; Execution Count:413 | 413 |
2844 | | - |
2845 | case QFrame::StyledPanel: | - |
2846 | //keep the compatibility with Qt 4.4 if there is a proxy style. | - |
2847 | //be sure to call drawPrimitive(QStyle::SE_FrameContents) on the proxy style | - |
2848 | if (widget) partially evaluated: widget yes Evaluation Count:10280 | no Evaluation Count:0 |
| 0-10280 |
2849 | return widget->style()->subElementRect(QStyle::SE_FrameContents, opt, widget); executed: return widget->style()->subElementRect(QStyle::SE_FrameContents, opt, widget); Execution Count:10280 | 10280 |
2850 | else | - |
2851 | return subElementRect(QStyle::SE_FrameContents, opt, widget); never executed: return subElementRect(QStyle::SE_FrameContents, opt, widget); | 0 |
2852 | | - |
2853 | case QFrame::WinPanel: | - |
2854 | frameWidth = 2; never executed (the execution status of this line is deduced): frameWidth = 2; | - |
2855 | break; | 0 |
2856 | | - |
2857 | case QFrame::Panel: | - |
2858 | switch (frameShadow) { | - |
2859 | case QFrame::Plain: | - |
2860 | case QFrame::Raised: | - |
2861 | case QFrame::Sunken: | - |
2862 | frameWidth = f->lineWidth; executed (the execution status of this line is deduced): frameWidth = f->lineWidth; | - |
2863 | break; executed: break; Execution Count:10 | 10 |
2864 | } | - |
2865 | break; executed: break; Execution Count:10 | 10 |
2866 | } | - |
2867 | r = f->rect.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth); executed (the execution status of this line is deduced): r = f->rect.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth); | - |
2868 | } executed: } Execution Count:7937 | 7937 |
2869 | break; executed: break; Execution Count:7937 | 7937 |
2870 | #ifndef QT_NO_DOCKWIDGET | - |
2871 | case SE_DockWidgetCloseButton: | - |
2872 | case SE_DockWidgetFloatButton: | - |
2873 | case SE_DockWidgetTitleBarText: | - |
2874 | case SE_DockWidgetIcon: { | - |
2875 | int iconSize = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); executed (the execution status of this line is deduced): int iconSize = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); | - |
2876 | int buttonMargin = proxy()->pixelMetric(PM_DockWidgetTitleBarButtonMargin, opt, widget); executed (the execution status of this line is deduced): int buttonMargin = proxy()->pixelMetric(PM_DockWidgetTitleBarButtonMargin, opt, widget); | - |
2877 | int margin = proxy()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, opt, widget); executed (the execution status of this line is deduced): int margin = proxy()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, opt, widget); | - |
2878 | QRect rect = opt->rect; executed (the execution status of this line is deduced): QRect rect = opt->rect; | - |
2879 | | - |
2880 | const QStyleOptionDockWidget *dwOpt executed (the execution status of this line is deduced): const QStyleOptionDockWidget *dwOpt | - |
2881 | = qstyleoption_cast<const QStyleOptionDockWidget*>(opt); executed (the execution status of this line is deduced): = qstyleoption_cast<const QStyleOptionDockWidget*>(opt); | - |
2882 | bool canClose = dwOpt == 0 ? true : dwOpt->closable; partially evaluated: dwOpt == 0 no Evaluation Count:0 | yes Evaluation Count:151 |
| 0-151 |
2883 | bool canFloat = dwOpt == 0 ? false : dwOpt->floatable; partially evaluated: dwOpt == 0 no Evaluation Count:0 | yes Evaluation Count:151 |
| 0-151 |
2884 | const QStyleOptionDockWidgetV2 *v2 executed (the execution status of this line is deduced): const QStyleOptionDockWidgetV2 *v2 | - |
2885 | = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt); executed (the execution status of this line is deduced): = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt); | - |
2886 | bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar; partially evaluated: v2 == 0 no Evaluation Count:0 | yes Evaluation Count:151 |
| 0-151 |
2887 | | - |
2888 | // If this is a vertical titlebar, we transpose and work as if it was | - |
2889 | // horizontal, then transpose again. | - |
2890 | | - |
2891 | if (verticalTitleBar) { partially evaluated: verticalTitleBar no Evaluation Count:0 | yes Evaluation Count:151 |
| 0-151 |
2892 | QSize size = rect.size(); never executed (the execution status of this line is deduced): QSize size = rect.size(); | - |
2893 | size.transpose(); never executed (the execution status of this line is deduced): size.transpose(); | - |
2894 | rect.setSize(size); never executed (the execution status of this line is deduced): rect.setSize(size); | - |
2895 | } | 0 |
2896 | | - |
2897 | do { | - |
2898 | | - |
2899 | int right = rect.right(); executed (the execution status of this line is deduced): int right = rect.right(); | - |
2900 | int left = rect.left(); executed (the execution status of this line is deduced): int left = rect.left(); | - |
2901 | | - |
2902 | QRect closeRect; executed (the execution status of this line is deduced): QRect closeRect; | - |
2903 | if (canClose) { partially evaluated: canClose yes Evaluation Count:151 | no Evaluation Count:0 |
| 0-151 |
2904 | QSize sz = standardIcon(QStyle::SP_TitleBarCloseButton, executed (the execution status of this line is deduced): QSize sz = standardIcon(QStyle::SP_TitleBarCloseButton, | - |
2905 | opt, widget).actualSize(QSize(iconSize, iconSize)); executed (the execution status of this line is deduced): opt, widget).actualSize(QSize(iconSize, iconSize)); | - |
2906 | sz += QSize(buttonMargin, buttonMargin); executed (the execution status of this line is deduced): sz += QSize(buttonMargin, buttonMargin); | - |
2907 | if (verticalTitleBar) partially evaluated: verticalTitleBar no Evaluation Count:0 | yes Evaluation Count:151 |
| 0-151 |
2908 | sz.transpose(); never executed: sz.transpose(); | 0 |
2909 | closeRect = QRect(right - sz.width(), executed (the execution status of this line is deduced): closeRect = QRect(right - sz.width(), | - |
2910 | rect.center().y() - sz.height()/2, executed (the execution status of this line is deduced): rect.center().y() - sz.height()/2, | - |
2911 | sz.width(), sz.height()); executed (the execution status of this line is deduced): sz.width(), sz.height()); | - |
2912 | right = closeRect.left() - 1; executed (the execution status of this line is deduced): right = closeRect.left() - 1; | - |
2913 | } executed: } Execution Count:151 | 151 |
2914 | if (sr == SE_DockWidgetCloseButton) { evaluated: sr == SE_DockWidgetCloseButton yes Evaluation Count:71 | yes Evaluation Count:80 |
| 71-80 |
2915 | r = closeRect; executed (the execution status of this line is deduced): r = closeRect; | - |
2916 | break; executed: break; Execution Count:71 | 71 |
2917 | } | - |
2918 | | - |
2919 | QRect floatRect; executed (the execution status of this line is deduced): QRect floatRect; | - |
2920 | if (canFloat) { partially evaluated: canFloat yes Evaluation Count:80 | no Evaluation Count:0 |
| 0-80 |
2921 | QSize sz = standardIcon(QStyle::SP_TitleBarNormalButton, executed (the execution status of this line is deduced): QSize sz = standardIcon(QStyle::SP_TitleBarNormalButton, | - |
2922 | opt, widget).actualSize(QSize(iconSize, iconSize)); executed (the execution status of this line is deduced): opt, widget).actualSize(QSize(iconSize, iconSize)); | - |
2923 | sz += QSize(buttonMargin, buttonMargin); executed (the execution status of this line is deduced): sz += QSize(buttonMargin, buttonMargin); | - |
2924 | if (verticalTitleBar) partially evaluated: verticalTitleBar no Evaluation Count:0 | yes Evaluation Count:80 |
| 0-80 |
2925 | sz.transpose(); never executed: sz.transpose(); | 0 |
2926 | floatRect = QRect(right - sz.width(), executed (the execution status of this line is deduced): floatRect = QRect(right - sz.width(), | - |
2927 | rect.center().y() - sz.height()/2, executed (the execution status of this line is deduced): rect.center().y() - sz.height()/2, | - |
2928 | sz.width(), sz.height()); executed (the execution status of this line is deduced): sz.width(), sz.height()); | - |
2929 | right = floatRect.left() - 1; executed (the execution status of this line is deduced): right = floatRect.left() - 1; | - |
2930 | } executed: } Execution Count:80 | 80 |
2931 | if (sr == SE_DockWidgetFloatButton) { evaluated: sr == SE_DockWidgetFloatButton yes Evaluation Count:72 | yes Evaluation Count:8 |
| 8-72 |
2932 | r = floatRect; executed (the execution status of this line is deduced): r = floatRect; | - |
2933 | break; executed: break; Execution Count:72 | 72 |
2934 | } | - |
2935 | | - |
2936 | QRect iconRect; executed (the execution status of this line is deduced): QRect iconRect; | - |
2937 | if (const QDockWidget *dw = qobject_cast<const QDockWidget*>(widget)) { partially evaluated: const QDockWidget *dw = qobject_cast<const QDockWidget*>(widget) yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
2938 | QIcon icon; executed (the execution status of this line is deduced): QIcon icon; | - |
2939 | if (dw->isFloating()) evaluated: dw->isFloating() yes Evaluation Count:4 | yes Evaluation Count:4 |
| 4 |
2940 | icon = dw->windowIcon(); executed: icon = dw->windowIcon(); Execution Count:4 | 4 |
2941 | if (!icon.isNull() partially evaluated: !icon.isNull() no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
2942 | && icon.cacheKey() != QApplication::windowIcon().cacheKey()) { never evaluated: icon.cacheKey() != QApplication::windowIcon().cacheKey() | 0 |
2943 | QSize sz = icon.actualSize(QSize(r.height(), r.height())); never executed (the execution status of this line is deduced): QSize sz = icon.actualSize(QSize(r.height(), r.height())); | - |
2944 | if (verticalTitleBar) never evaluated: verticalTitleBar | 0 |
2945 | sz.transpose(); never executed: sz.transpose(); | 0 |
2946 | iconRect = QRect(left, rect.center().y() - sz.height()/2, never executed (the execution status of this line is deduced): iconRect = QRect(left, rect.center().y() - sz.height()/2, | - |
2947 | sz.width(), sz.height()); never executed (the execution status of this line is deduced): sz.width(), sz.height()); | - |
2948 | left = iconRect.right() + margin; never executed (the execution status of this line is deduced): left = iconRect.right() + margin; | - |
2949 | } | 0 |
2950 | } executed: } Execution Count:8 | 8 |
2951 | if (sr == SE_DockWidgetIcon) { partially evaluated: sr == SE_DockWidgetIcon no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
2952 | r = iconRect; never executed (the execution status of this line is deduced): r = iconRect; | - |
2953 | break; | 0 |
2954 | } | - |
2955 | | - |
2956 | QRect textRect = QRect(left, rect.top(), executed (the execution status of this line is deduced): QRect textRect = QRect(left, rect.top(), | - |
2957 | right - left, rect.height()); executed (the execution status of this line is deduced): right - left, rect.height()); | - |
2958 | if (sr == SE_DockWidgetTitleBarText) { partially evaluated: sr == SE_DockWidgetTitleBarText yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
2959 | r = textRect; executed (the execution status of this line is deduced): r = textRect; | - |
2960 | break; executed: break; Execution Count:8 | 8 |
2961 | } | - |
2962 | | - |
2963 | } while (false); never executed: } never evaluated: false | 0 |
2964 | | - |
2965 | if (verticalTitleBar) { partially evaluated: verticalTitleBar no Evaluation Count:0 | yes Evaluation Count:151 |
| 0-151 |
2966 | r = QRect(rect.left() + r.top() - rect.top(), never executed (the execution status of this line is deduced): r = QRect(rect.left() + r.top() - rect.top(), | - |
2967 | rect.top() + rect.right() - r.right(), never executed (the execution status of this line is deduced): rect.top() + rect.right() - r.right(), | - |
2968 | r.height(), r.width()); never executed (the execution status of this line is deduced): r.height(), r.width()); | - |
2969 | } else { | 0 |
2970 | r = visualRect(opt->direction, rect, r); executed (the execution status of this line is deduced): r = visualRect(opt->direction, rect, r); | - |
2971 | } executed: } Execution Count:151 | 151 |
2972 | break; executed: break; Execution Count:151 | 151 |
2973 | } | - |
2974 | #endif | - |
2975 | #ifndef QT_NO_ITEMVIEWS | - |
2976 | case SE_ItemViewItemCheckIndicator: | - |
2977 | if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { evaluated: !qstyleoption_cast<const QStyleOptionViewItem *>(opt) yes Evaluation Count:14 | yes Evaluation Count:13250 |
| 14-13250 |
2978 | r = subElementRect(SE_CheckBoxIndicator, opt, widget); executed (the execution status of this line is deduced): r = subElementRect(SE_CheckBoxIndicator, opt, widget); | - |
2979 | break; executed: break; Execution Count:14 | 14 |
2980 | } | - |
2981 | case SE_ItemViewItemDecoration: code before this statement executed: case SE_ItemViewItemDecoration: Execution Count:13250 | 13250 |
2982 | case SE_ItemViewItemText: | - |
2983 | case SE_ItemViewItemFocusRect: | - |
2984 | if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { partially evaluated: const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt) yes Evaluation Count:40845 | no Evaluation Count:0 |
| 0-40845 |
2985 | if (!d->isViewItemCached(*vopt)) { evaluated: !d->isViewItemCached(*vopt) yes Evaluation Count:13307 | yes Evaluation Count:27538 |
| 13307-27538 |
2986 | d->viewItemLayout(vopt, &d->checkRect, &d->decorationRect, &d->displayRect, false); executed (the execution status of this line is deduced): d->viewItemLayout(vopt, &d->checkRect, &d->decorationRect, &d->displayRect, false); | - |
2987 | if (d->cachedOption) { evaluated: d->cachedOption yes Evaluation Count:13292 | yes Evaluation Count:15 |
| 15-13292 |
2988 | delete d->cachedOption; executed (the execution status of this line is deduced): delete d->cachedOption; | - |
2989 | d->cachedOption = 0; executed (the execution status of this line is deduced): d->cachedOption = 0; | - |
2990 | } executed: } Execution Count:13292 | 13292 |
2991 | d->cachedOption = new QStyleOptionViewItem(*vopt); executed (the execution status of this line is deduced): d->cachedOption = new QStyleOptionViewItem(*vopt); | - |
2992 | } executed: } Execution Count:13307 | 13307 |
2993 | if (sr == SE_ViewItemCheckIndicator) evaluated: sr == SE_ViewItemCheckIndicator yes Evaluation Count:13250 | yes Evaluation Count:27595 |
| 13250-27595 |
2994 | r = d->checkRect; executed: r = d->checkRect; Execution Count:13250 | 13250 |
2995 | else if (sr == SE_ItemViewItemDecoration) evaluated: sr == SE_ItemViewItemDecoration yes Evaluation Count:13241 | yes Evaluation Count:14354 |
| 13241-14354 |
2996 | r = d->decorationRect; executed: r = d->decorationRect; Execution Count:13241 | 13241 |
2997 | else if (sr == SE_ItemViewItemText || sr == SE_ItemViewItemFocusRect) evaluated: sr == SE_ItemViewItemText yes Evaluation Count:13448 | yes Evaluation Count:906 |
partially evaluated: sr == SE_ItemViewItemFocusRect yes Evaluation Count:906 | no Evaluation Count:0 |
| 0-13448 |
2998 | r = d->displayRect; executed: r = d->displayRect; Execution Count:14354 | 14354 |
2999 | } | - |
3000 | break; executed: break; Execution Count:40845 | 40845 |
3001 | #endif //QT_NO_ITEMVIEWS | - |
3002 | #ifndef QT_NO_TOOLBAR | - |
3003 | case SE_ToolBarHandle: | - |
3004 | if (const QStyleOptionToolBar *tbopt = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) { partially evaluated: const QStyleOptionToolBar *tbopt = qstyleoption_cast<const QStyleOptionToolBar *>(opt) yes Evaluation Count:7 | no Evaluation Count:0 |
| 0-7 |
3005 | if (tbopt->features & QStyleOptionToolBar::Movable) { evaluated: tbopt->features & QStyleOptionToolBar::Movable yes Evaluation Count:6 | yes Evaluation Count:1 |
| 1-6 |
3006 | ///we need to access the widget here because the style option doesn't | - |
3007 | //have all the information we need (ie. the layout's margin) | - |
3008 | const QToolBar *tb = qobject_cast<const QToolBar*>(widget); executed (the execution status of this line is deduced): const QToolBar *tb = qobject_cast<const QToolBar*>(widget); | - |
3009 | const int margin = tb && tb->layout() ? tb->layout()->margin() : 2; partially evaluated: tb yes Evaluation Count:6 | no Evaluation Count:0 |
partially evaluated: tb->layout() yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
3010 | const int handleExtent = pixelMetric(QStyle::PM_ToolBarHandleExtent, opt, tb); executed (the execution status of this line is deduced): const int handleExtent = pixelMetric(QStyle::PM_ToolBarHandleExtent, opt, tb); | - |
3011 | if (tbopt->state & QStyle::State_Horizontal) { partially evaluated: tbopt->state & QStyle::State_Horizontal yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
3012 | r = QRect(margin, margin, handleExtent, tbopt->rect.height() - 2*margin); executed (the execution status of this line is deduced): r = QRect(margin, margin, handleExtent, tbopt->rect.height() - 2*margin); | - |
3013 | r = QStyle::visualRect(tbopt->direction, tbopt->rect, r); executed (the execution status of this line is deduced): r = QStyle::visualRect(tbopt->direction, tbopt->rect, r); | - |
3014 | } else { executed: } Execution Count:6 | 6 |
3015 | r = QRect(margin, margin, tbopt->rect.width() - 2*margin, handleExtent); never executed (the execution status of this line is deduced): r = QRect(margin, margin, tbopt->rect.width() - 2*margin, handleExtent); | - |
3016 | } | 0 |
3017 | } | - |
3018 | } executed: } Execution Count:7 | 7 |
3019 | break; executed: break; Execution Count:7 | 7 |
3020 | #endif //QT_NO_TOOLBAR | - |
3021 | default: | - |
3022 | break; executed: break; Execution Count:32269 | 32269 |
3023 | } | - |
3024 | return r; executed: return r; Execution Count:104803 | 104803 |
3025 | } | - |
3026 | | - |
3027 | #ifndef QT_NO_DIAL | - |
3028 | | - |
3029 | static QPolygonF calcArrow(const QStyleOptionSlider *dial, qreal &a) | - |
3030 | { | - |
3031 | int width = dial->rect.width(); executed (the execution status of this line is deduced): int width = dial->rect.width(); | - |
3032 | int height = dial->rect.height(); executed (the execution status of this line is deduced): int height = dial->rect.height(); | - |
3033 | int r = qMin(width, height) / 2; executed (the execution status of this line is deduced): int r = qMin(width, height) / 2; | - |
3034 | int currentSliderPosition = dial->upsideDown ? dial->sliderPosition : (dial->maximum - dial->sliderPosition); evaluated: dial->upsideDown yes Evaluation Count:3 | yes Evaluation Count:3 |
| 3 |
3035 | | - |
3036 | if (dial->maximum == dial->minimum) partially evaluated: dial->maximum == dial->minimum no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
3037 | a = Q_PI / 2; never executed: a = Q_PI / 2; | 0 |
3038 | else if (dial->dialWrapping) partially evaluated: dial->dialWrapping no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
3039 | a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI never executed: a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI / (dial->maximum - dial->minimum); | 0 |
3040 | / (dial->maximum - dial->minimum); never executed: a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI / (dial->maximum - dial->minimum); | 0 |
3041 | else | - |
3042 | a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI executed: a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6; Execution Count:6 | 6 |
3043 | / (dial->maximum - dial->minimum)) / 6; executed: a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6; Execution Count:6 | 6 |
3044 | | - |
3045 | int xc = width / 2; executed (the execution status of this line is deduced): int xc = width / 2; | - |
3046 | int yc = height / 2; executed (the execution status of this line is deduced): int yc = height / 2; | - |
3047 | | - |
3048 | int len = r - QStyleHelper::calcBigLineSize(r) - 5; executed (the execution status of this line is deduced): int len = r - QStyleHelper::calcBigLineSize(r) - 5; | - |
3049 | if (len < 5) partially evaluated: len < 5 no Evaluation Count:0 | yes Evaluation Count:6 |
| 0-6 |
3050 | len = 5; | 0 |
3051 | int back = len / 2; executed (the execution status of this line is deduced): int back = len / 2; | - |
3052 | | - |
3053 | QPolygonF arrow(3); executed (the execution status of this line is deduced): QPolygonF arrow(3); | - |
3054 | arrow[0] = QPointF(0.5 + xc + len * qCos(a), executed (the execution status of this line is deduced): arrow[0] = QPointF(0.5 + xc + len * qCos(a), | - |
3055 | 0.5 + yc - len * qSin(a)); executed (the execution status of this line is deduced): 0.5 + yc - len * qSin(a)); | - |
3056 | arrow[1] = QPointF(0.5 + xc + back * qCos(a + Q_PI * 5 / 6), executed (the execution status of this line is deduced): arrow[1] = QPointF(0.5 + xc + back * qCos(a + Q_PI * 5 / 6), | - |
3057 | 0.5 + yc - back * qSin(a + Q_PI * 5 / 6)); executed (the execution status of this line is deduced): 0.5 + yc - back * qSin(a + Q_PI * 5 / 6)); | - |
3058 | arrow[2] = QPointF(0.5 + xc + back * qCos(a - Q_PI * 5 / 6), executed (the execution status of this line is deduced): arrow[2] = QPointF(0.5 + xc + back * qCos(a - Q_PI * 5 / 6), | - |
3059 | 0.5 + yc - back * qSin(a - Q_PI * 5 / 6)); executed (the execution status of this line is deduced): 0.5 + yc - back * qSin(a - Q_PI * 5 / 6)); | - |
3060 | return arrow; executed: return arrow; Execution Count:6 | 6 |
3061 | } | - |
3062 | | - |
3063 | #endif // QT_NO_DIAL | - |
3064 | | - |
3065 | /*! | - |
3066 | \reimp | - |
3067 | */ | - |
3068 | void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, | - |
3069 | QPainter *p, const QWidget *widget) const | - |
3070 | { | - |
3071 | switch (cc) { | - |
3072 | #ifndef QT_NO_SLIDER | - |
3073 | case CC_Slider: | - |
3074 | if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
3075 | if (slider->subControls == SC_SliderTickmarks) { partially evaluated: slider->subControls == SC_SliderTickmarks yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
3076 | int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); executed (the execution status of this line is deduced): int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); | - |
3077 | int ticks = slider->tickPosition; executed (the execution status of this line is deduced): int ticks = slider->tickPosition; | - |
3078 | int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); executed (the execution status of this line is deduced): int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); | - |
3079 | int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); executed (the execution status of this line is deduced): int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); | - |
3080 | int available = proxy()->pixelMetric(PM_SliderSpaceAvailable, slider, widget); executed (the execution status of this line is deduced): int available = proxy()->pixelMetric(PM_SliderSpaceAvailable, slider, widget); | - |
3081 | int interval = slider->tickInterval; executed (the execution status of this line is deduced): int interval = slider->tickInterval; | - |
3082 | if (interval <= 0) { partially evaluated: interval <= 0 no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
3083 | interval = slider->singleStep; never executed (the execution status of this line is deduced): interval = slider->singleStep; | - |
3084 | if (QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, never evaluated: QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, available) - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, 0, available) < 3 | 0 |
3085 | available) never evaluated: QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, available) - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, 0, available) < 3 | 0 |
3086 | - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, never evaluated: QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, available) - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, 0, available) < 3 | 0 |
3087 | 0, available) < 3) never evaluated: QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, available) - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, 0, available) < 3 | 0 |
3088 | interval = slider->pageStep; never executed: interval = slider->pageStep; | 0 |
3089 | } | 0 |
3090 | if (!interval) partially evaluated: !interval no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
3091 | interval = 1; never executed: interval = 1; | 0 |
3092 | int fudge = len / 2; executed (the execution status of this line is deduced): int fudge = len / 2; | - |
3093 | int pos; executed (the execution status of this line is deduced): int pos; | - |
3094 | // Since there is no subrect for tickmarks do a translation here. | - |
3095 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3096 | p->translate(slider->rect.x(), slider->rect.y()); executed (the execution status of this line is deduced): p->translate(slider->rect.x(), slider->rect.y()); | - |
3097 | p->setPen(slider->palette.foreground().color()); executed (the execution status of this line is deduced): p->setPen(slider->palette.foreground().color()); | - |
3098 | int v = slider->minimum; executed (the execution status of this line is deduced): int v = slider->minimum; | - |
3099 | while (v <= slider->maximum + 1) { evaluated: v <= slider->maximum + 1 yes Evaluation Count:15 | yes Evaluation Count:3 |
| 3-15 |
3100 | if (v == slider->maximum + 1 && interval == 1) partially evaluated: v == slider->maximum + 1 no Evaluation Count:0 | yes Evaluation Count:15 |
never evaluated: interval == 1 | 0-15 |
3101 | break; | 0 |
3102 | const int v_ = qMin(v, slider->maximum); executed (the execution status of this line is deduced): const int v_ = qMin(v, slider->maximum); | - |
3103 | pos = QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, executed (the execution status of this line is deduced): pos = QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, | - |
3104 | v_, available) + fudge; executed (the execution status of this line is deduced): v_, available) + fudge; | - |
3105 | if (slider->orientation == Qt::Horizontal) { partially evaluated: slider->orientation == Qt::Horizontal yes Evaluation Count:15 | no Evaluation Count:0 |
| 0-15 |
3106 | if (ticks & QSlider::TicksAbove) partially evaluated: ticks & QSlider::TicksAbove no Evaluation Count:0 | yes Evaluation Count:15 |
| 0-15 |
3107 | p->drawLine(pos, 0, pos, tickOffset - 2); never executed: p->drawLine(pos, 0, pos, tickOffset - 2); | 0 |
3108 | if (ticks & QSlider::TicksBelow) partially evaluated: ticks & QSlider::TicksBelow no Evaluation Count:0 | yes Evaluation Count:15 |
| 0-15 |
3109 | p->drawLine(pos, tickOffset + thickness + 1, pos, never executed: p->drawLine(pos, tickOffset + thickness + 1, pos, slider->rect.height()-1); | 0 |
3110 | slider->rect.height()-1); never executed: p->drawLine(pos, tickOffset + thickness + 1, pos, slider->rect.height()-1); | 0 |
3111 | } else { executed: } Execution Count:15 | 15 |
3112 | if (ticks & QSlider::TicksAbove) never evaluated: ticks & QSlider::TicksAbove | 0 |
3113 | p->drawLine(0, pos, tickOffset - 2, pos); never executed: p->drawLine(0, pos, tickOffset - 2, pos); | 0 |
3114 | if (ticks & QSlider::TicksBelow) never evaluated: ticks & QSlider::TicksBelow | 0 |
3115 | p->drawLine(tickOffset + thickness + 1, pos, never executed: p->drawLine(tickOffset + thickness + 1, pos, slider->rect.width()-1, pos); | 0 |
3116 | slider->rect.width()-1, pos); never executed: p->drawLine(tickOffset + thickness + 1, pos, slider->rect.width()-1, pos); | 0 |
3117 | } | 0 |
3118 | // in the case where maximum is max int | - |
3119 | int nextInterval = v + interval; executed (the execution status of this line is deduced): int nextInterval = v + interval; | - |
3120 | if (nextInterval < v) partially evaluated: nextInterval < v no Evaluation Count:0 | yes Evaluation Count:15 |
| 0-15 |
3121 | break; | 0 |
3122 | v = nextInterval; executed (the execution status of this line is deduced): v = nextInterval; | - |
3123 | } executed: } Execution Count:15 | 15 |
3124 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3125 | } executed: } Execution Count:3 | 3 |
3126 | } executed: } Execution Count:3 | 3 |
3127 | break; executed: break; Execution Count:3 | 3 |
3128 | #endif // QT_NO_SLIDER | - |
3129 | #ifndef QT_NO_SCROLLBAR | - |
3130 | case CC_ScrollBar: | - |
3131 | if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3132 | // Make a copy here and reset it for each primitive. | - |
3133 | QStyleOptionSlider newScrollbar = *scrollbar; executed (the execution status of this line is deduced): QStyleOptionSlider newScrollbar = *scrollbar; | - |
3134 | State saveFlags = scrollbar->state; executed (the execution status of this line is deduced): State saveFlags = scrollbar->state; | - |
3135 | | - |
3136 | if (scrollbar->subControls & SC_ScrollBarSubLine) { partially evaluated: scrollbar->subControls & SC_ScrollBarSubLine yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3137 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3138 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSubLine, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSubLine, widget); | - |
3139 | if (newScrollbar.rect.isValid()) { partially evaluated: newScrollbar.rect.isValid() yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3140 | if (!(scrollbar->activeSubControls & SC_ScrollBarSubLine)) partially evaluated: !(scrollbar->activeSubControls & SC_ScrollBarSubLine) yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3141 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); Execution Count:2941 | 2941 |
3142 | proxy()->drawControl(CE_ScrollBarSubLine, &newScrollbar, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarSubLine, &newScrollbar, p, widget); | - |
3143 | } executed: } Execution Count:2941 | 2941 |
3144 | } executed: } Execution Count:2941 | 2941 |
3145 | if (scrollbar->subControls & SC_ScrollBarAddLine) { partially evaluated: scrollbar->subControls & SC_ScrollBarAddLine yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3146 | newScrollbar.rect = scrollbar->rect; executed (the execution status of this line is deduced): newScrollbar.rect = scrollbar->rect; | - |
3147 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3148 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarAddLine, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarAddLine, widget); | - |
3149 | if (newScrollbar.rect.isValid()) { partially evaluated: newScrollbar.rect.isValid() yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3150 | if (!(scrollbar->activeSubControls & SC_ScrollBarAddLine)) evaluated: !(scrollbar->activeSubControls & SC_ScrollBarAddLine) yes Evaluation Count:2940 | yes Evaluation Count:1 |
| 1-2940 |
3151 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); Execution Count:2940 | 2940 |
3152 | proxy()->drawControl(CE_ScrollBarAddLine, &newScrollbar, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarAddLine, &newScrollbar, p, widget); | - |
3153 | } executed: } Execution Count:2941 | 2941 |
3154 | } executed: } Execution Count:2941 | 2941 |
3155 | if (scrollbar->subControls & SC_ScrollBarSubPage) { partially evaluated: scrollbar->subControls & SC_ScrollBarSubPage yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3156 | newScrollbar.rect = scrollbar->rect; executed (the execution status of this line is deduced): newScrollbar.rect = scrollbar->rect; | - |
3157 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3158 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSubPage, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSubPage, widget); | - |
3159 | if (newScrollbar.rect.isValid()) { evaluated: newScrollbar.rect.isValid() yes Evaluation Count:2265 | yes Evaluation Count:676 |
| 676-2265 |
3160 | if (!(scrollbar->activeSubControls & SC_ScrollBarSubPage)) partially evaluated: !(scrollbar->activeSubControls & SC_ScrollBarSubPage) yes Evaluation Count:2265 | no Evaluation Count:0 |
| 0-2265 |
3161 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); Execution Count:2265 | 2265 |
3162 | proxy()->drawControl(CE_ScrollBarSubPage, &newScrollbar, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarSubPage, &newScrollbar, p, widget); | - |
3163 | } executed: } Execution Count:2265 | 2265 |
3164 | } executed: } Execution Count:2941 | 2941 |
3165 | if (scrollbar->subControls & SC_ScrollBarAddPage) { partially evaluated: scrollbar->subControls & SC_ScrollBarAddPage yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3166 | newScrollbar.rect = scrollbar->rect; executed (the execution status of this line is deduced): newScrollbar.rect = scrollbar->rect; | - |
3167 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3168 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarAddPage, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarAddPage, widget); | - |
3169 | if (newScrollbar.rect.isValid()) { evaluated: newScrollbar.rect.isValid() yes Evaluation Count:2744 | yes Evaluation Count:197 |
| 197-2744 |
3170 | if (!(scrollbar->activeSubControls & SC_ScrollBarAddPage)) partially evaluated: !(scrollbar->activeSubControls & SC_ScrollBarAddPage) yes Evaluation Count:2744 | no Evaluation Count:0 |
| 0-2744 |
3171 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); Execution Count:2744 | 2744 |
3172 | proxy()->drawControl(CE_ScrollBarAddPage, &newScrollbar, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarAddPage, &newScrollbar, p, widget); | - |
3173 | } executed: } Execution Count:2744 | 2744 |
3174 | } executed: } Execution Count:2941 | 2941 |
3175 | if (scrollbar->subControls & SC_ScrollBarFirst) { partially evaluated: scrollbar->subControls & SC_ScrollBarFirst yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3176 | newScrollbar.rect = scrollbar->rect; executed (the execution status of this line is deduced): newScrollbar.rect = scrollbar->rect; | - |
3177 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3178 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarFirst, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarFirst, widget); | - |
3179 | if (newScrollbar.rect.isValid()) { partially evaluated: newScrollbar.rect.isValid() no Evaluation Count:0 | yes Evaluation Count:2941 |
| 0-2941 |
3180 | if (!(scrollbar->activeSubControls & SC_ScrollBarFirst)) never evaluated: !(scrollbar->activeSubControls & SC_ScrollBarFirst) | 0 |
3181 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); | 0 |
3182 | proxy()->drawControl(CE_ScrollBarFirst, &newScrollbar, p, widget); never executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarFirst, &newScrollbar, p, widget); | - |
3183 | } | 0 |
3184 | } executed: } Execution Count:2941 | 2941 |
3185 | if (scrollbar->subControls & SC_ScrollBarLast) { partially evaluated: scrollbar->subControls & SC_ScrollBarLast yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3186 | newScrollbar.rect = scrollbar->rect; executed (the execution status of this line is deduced): newScrollbar.rect = scrollbar->rect; | - |
3187 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3188 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarLast, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarLast, widget); | - |
3189 | if (newScrollbar.rect.isValid()) { partially evaluated: newScrollbar.rect.isValid() no Evaluation Count:0 | yes Evaluation Count:2941 |
| 0-2941 |
3190 | if (!(scrollbar->activeSubControls & SC_ScrollBarLast)) never evaluated: !(scrollbar->activeSubControls & SC_ScrollBarLast) | 0 |
3191 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); | 0 |
3192 | proxy()->drawControl(CE_ScrollBarLast, &newScrollbar, p, widget); never executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarLast, &newScrollbar, p, widget); | - |
3193 | } | 0 |
3194 | } executed: } Execution Count:2941 | 2941 |
3195 | if (scrollbar->subControls & SC_ScrollBarSlider) { partially evaluated: scrollbar->subControls & SC_ScrollBarSlider yes Evaluation Count:2941 | no Evaluation Count:0 |
| 0-2941 |
3196 | newScrollbar.rect = scrollbar->rect; executed (the execution status of this line is deduced): newScrollbar.rect = scrollbar->rect; | - |
3197 | newScrollbar.state = saveFlags; executed (the execution status of this line is deduced): newScrollbar.state = saveFlags; | - |
3198 | newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSlider, widget); executed (the execution status of this line is deduced): newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSlider, widget); | - |
3199 | if (newScrollbar.rect.isValid()) { evaluated: newScrollbar.rect.isValid() yes Evaluation Count:2929 | yes Evaluation Count:12 |
| 12-2929 |
3200 | if (!(scrollbar->activeSubControls & SC_ScrollBarSlider)) partially evaluated: !(scrollbar->activeSubControls & SC_ScrollBarSlider) yes Evaluation Count:2929 | no Evaluation Count:0 |
| 0-2929 |
3201 | newScrollbar.state &= ~(State_Sunken | State_MouseOver); executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver); Execution Count:2929 | 2929 |
3202 | proxy()->drawControl(CE_ScrollBarSlider, &newScrollbar, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ScrollBarSlider, &newScrollbar, p, widget); | - |
3203 | | - |
3204 | if (scrollbar->state & State_HasFocus) { partially evaluated: scrollbar->state & State_HasFocus no Evaluation Count:0 | yes Evaluation Count:2929 |
| 0-2929 |
3205 | QStyleOptionFocusRect fropt; never executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt; | - |
3206 | fropt.QStyleOption::operator=(newScrollbar); never executed (the execution status of this line is deduced): fropt.QStyleOption::operator=(newScrollbar); | - |
3207 | fropt.rect.setRect(newScrollbar.rect.x() + 2, newScrollbar.rect.y() + 2, never executed (the execution status of this line is deduced): fropt.rect.setRect(newScrollbar.rect.x() + 2, newScrollbar.rect.y() + 2, | - |
3208 | newScrollbar.rect.width() - 5, never executed (the execution status of this line is deduced): newScrollbar.rect.width() - 5, | - |
3209 | newScrollbar.rect.height() - 5); never executed (the execution status of this line is deduced): newScrollbar.rect.height() - 5); | - |
3210 | proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); | - |
3211 | } | 0 |
3212 | } executed: } Execution Count:2929 | 2929 |
3213 | } executed: } Execution Count:2941 | 2941 |
3214 | } executed: } Execution Count:2941 | 2941 |
3215 | break; executed: break; Execution Count:2941 | 2941 |
3216 | #endif // QT_NO_SCROLLBAR | - |
3217 | #ifndef QT_NO_SPINBOX | - |
3218 | case CC_SpinBox: | - |
3219 | if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) { never evaluated: const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt) | 0 |
3220 | QStyleOptionSpinBox copy = *sb; never executed (the execution status of this line is deduced): QStyleOptionSpinBox copy = *sb; | - |
3221 | PrimitiveElement pe; never executed (the execution status of this line is deduced): PrimitiveElement pe; | - |
3222 | | - |
3223 | if (sb->frame && (sb->subControls & SC_SpinBoxFrame)) { never evaluated: sb->frame never evaluated: (sb->subControls & SC_SpinBoxFrame) | 0 |
3224 | QRect r = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxFrame, widget); never executed (the execution status of this line is deduced): QRect r = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxFrame, widget); | - |
3225 | qDrawWinPanel(p, r, sb->palette, true); never executed (the execution status of this line is deduced): qDrawWinPanel(p, r, sb->palette, true); | - |
3226 | } | 0 |
3227 | | - |
3228 | if (sb->subControls & SC_SpinBoxUp) { never evaluated: sb->subControls & SC_SpinBoxUp | 0 |
3229 | copy.subControls = SC_SpinBoxUp; never executed (the execution status of this line is deduced): copy.subControls = SC_SpinBoxUp; | - |
3230 | QPalette pal2 = sb->palette; never executed (the execution status of this line is deduced): QPalette pal2 = sb->palette; | - |
3231 | if (!(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)) { never evaluated: !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) | 0 |
3232 | pal2.setCurrentColorGroup(QPalette::Disabled); never executed (the execution status of this line is deduced): pal2.setCurrentColorGroup(QPalette::Disabled); | - |
3233 | copy.state &= ~State_Enabled; never executed (the execution status of this line is deduced): copy.state &= ~State_Enabled; | - |
3234 | } | 0 |
3235 | | - |
3236 | copy.palette = pal2; never executed (the execution status of this line is deduced): copy.palette = pal2; | - |
3237 | | - |
3238 | if (sb->activeSubControls == SC_SpinBoxUp && (sb->state & State_Sunken)) { never evaluated: sb->activeSubControls == SC_SpinBoxUp never evaluated: (sb->state & State_Sunken) | 0 |
3239 | copy.state |= State_On; never executed (the execution status of this line is deduced): copy.state |= State_On; | - |
3240 | copy.state |= State_Sunken; never executed (the execution status of this line is deduced): copy.state |= State_Sunken; | - |
3241 | } else { | 0 |
3242 | copy.state |= State_Raised; never executed (the execution status of this line is deduced): copy.state |= State_Raised; | - |
3243 | copy.state &= ~State_Sunken; never executed (the execution status of this line is deduced): copy.state &= ~State_Sunken; | - |
3244 | } | 0 |
3245 | pe = (sb->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinPlus never evaluated: sb->buttonSymbols == QAbstractSpinBox::PlusMinus | 0 |
3246 | : PE_IndicatorSpinUp); never executed (the execution status of this line is deduced): : PE_IndicatorSpinUp); | - |
3247 | | - |
3248 | copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget); never executed (the execution status of this line is deduced): copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget); | - |
3249 | proxy()->drawPrimitive(PE_PanelButtonBevel, ©, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonBevel, ©, p, widget); | - |
3250 | copy.rect.adjust(3, 0, -4, 0); never executed (the execution status of this line is deduced): copy.rect.adjust(3, 0, -4, 0); | - |
3251 | proxy()->drawPrimitive(pe, ©, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(pe, ©, p, widget); | - |
3252 | } | 0 |
3253 | | - |
3254 | if (sb->subControls & SC_SpinBoxDown) { never evaluated: sb->subControls & SC_SpinBoxDown | 0 |
3255 | copy.subControls = SC_SpinBoxDown; never executed (the execution status of this line is deduced): copy.subControls = SC_SpinBoxDown; | - |
3256 | copy.state = sb->state; never executed (the execution status of this line is deduced): copy.state = sb->state; | - |
3257 | QPalette pal2 = sb->palette; never executed (the execution status of this line is deduced): QPalette pal2 = sb->palette; | - |
3258 | if (!(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)) { never evaluated: !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) | 0 |
3259 | pal2.setCurrentColorGroup(QPalette::Disabled); never executed (the execution status of this line is deduced): pal2.setCurrentColorGroup(QPalette::Disabled); | - |
3260 | copy.state &= ~State_Enabled; never executed (the execution status of this line is deduced): copy.state &= ~State_Enabled; | - |
3261 | } | 0 |
3262 | copy.palette = pal2; never executed (the execution status of this line is deduced): copy.palette = pal2; | - |
3263 | | - |
3264 | if (sb->activeSubControls == SC_SpinBoxDown && (sb->state & State_Sunken)) { never evaluated: sb->activeSubControls == SC_SpinBoxDown never evaluated: (sb->state & State_Sunken) | 0 |
3265 | copy.state |= State_On; never executed (the execution status of this line is deduced): copy.state |= State_On; | - |
3266 | copy.state |= State_Sunken; never executed (the execution status of this line is deduced): copy.state |= State_Sunken; | - |
3267 | } else { | 0 |
3268 | copy.state |= State_Raised; never executed (the execution status of this line is deduced): copy.state |= State_Raised; | - |
3269 | copy.state &= ~State_Sunken; never executed (the execution status of this line is deduced): copy.state &= ~State_Sunken; | - |
3270 | } | 0 |
3271 | pe = (sb->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinMinus never evaluated: sb->buttonSymbols == QAbstractSpinBox::PlusMinus | 0 |
3272 | : PE_IndicatorSpinDown); never executed (the execution status of this line is deduced): : PE_IndicatorSpinDown); | - |
3273 | | - |
3274 | copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget); never executed (the execution status of this line is deduced): copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget); | - |
3275 | proxy()->drawPrimitive(PE_PanelButtonBevel, ©, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonBevel, ©, p, widget); | - |
3276 | copy.rect.adjust(3, 0, -4, 0); never executed (the execution status of this line is deduced): copy.rect.adjust(3, 0, -4, 0); | - |
3277 | proxy()->drawPrimitive(pe, ©, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(pe, ©, p, widget); | - |
3278 | } | 0 |
3279 | } | 0 |
3280 | break; | 0 |
3281 | #endif // QT_NO_SPINBOX | - |
3282 | #ifndef QT_NO_TOOLBUTTON | - |
3283 | case CC_ToolButton: | - |
3284 | if (const QStyleOptionToolButton *toolbutton partially evaluated: const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt) yes Evaluation Count:451 | no Evaluation Count:0 |
| 0-451 |
3285 | = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) { partially evaluated: const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt) yes Evaluation Count:451 | no Evaluation Count:0 |
| 0-451 |
3286 | QRect button, menuarea; executed (the execution status of this line is deduced): QRect button, menuarea; | - |
3287 | button = proxy()->subControlRect(cc, toolbutton, SC_ToolButton, widget); executed (the execution status of this line is deduced): button = proxy()->subControlRect(cc, toolbutton, SC_ToolButton, widget); | - |
3288 | menuarea = proxy()->subControlRect(cc, toolbutton, SC_ToolButtonMenu, widget); executed (the execution status of this line is deduced): menuarea = proxy()->subControlRect(cc, toolbutton, SC_ToolButtonMenu, widget); | - |
3289 | | - |
3290 | State bflags = toolbutton->state & ~State_Sunken; executed (the execution status of this line is deduced): State bflags = toolbutton->state & ~State_Sunken; | - |
3291 | | - |
3292 | if (bflags & State_AutoRaise) { evaluated: bflags & State_AutoRaise yes Evaluation Count:437 | yes Evaluation Count:14 |
| 14-437 |
3293 | if (!(bflags & State_MouseOver) || !(bflags & State_Enabled)) { evaluated: !(bflags & State_MouseOver) yes Evaluation Count:433 | yes Evaluation Count:4 |
evaluated: !(bflags & State_Enabled) yes Evaluation Count:1 | yes Evaluation Count:3 |
| 1-433 |
3294 | bflags &= ~State_Raised; executed (the execution status of this line is deduced): bflags &= ~State_Raised; | - |
3295 | } executed: } Execution Count:434 | 434 |
3296 | } executed: } Execution Count:437 | 437 |
3297 | State mflags = bflags; executed (the execution status of this line is deduced): State mflags = bflags; | - |
3298 | if (toolbutton->state & State_Sunken) { evaluated: toolbutton->state & State_Sunken yes Evaluation Count:56 | yes Evaluation Count:395 |
| 56-395 |
3299 | if (toolbutton->activeSubControls & SC_ToolButton) evaluated: toolbutton->activeSubControls & SC_ToolButton yes Evaluation Count:54 | yes Evaluation Count:2 |
| 2-54 |
3300 | bflags |= State_Sunken; executed: bflags |= State_Sunken; Execution Count:54 | 54 |
3301 | mflags |= State_Sunken; executed (the execution status of this line is deduced): mflags |= State_Sunken; | - |
3302 | } executed: } Execution Count:56 | 56 |
3303 | | - |
3304 | QStyleOption tool(0); executed (the execution status of this line is deduced): QStyleOption tool(0); | - |
3305 | tool.palette = toolbutton->palette; executed (the execution status of this line is deduced): tool.palette = toolbutton->palette; | - |
3306 | if (toolbutton->subControls & SC_ToolButton) { evaluated: toolbutton->subControls & SC_ToolButton yes Evaluation Count:393 | yes Evaluation Count:58 |
| 58-393 |
3307 | if (bflags & (State_Sunken | State_On | State_Raised)) { evaluated: bflags & (State_Sunken | State_On | State_Raised) yes Evaluation Count:63 | yes Evaluation Count:330 |
| 63-330 |
3308 | tool.rect = button; executed (the execution status of this line is deduced): tool.rect = button; | - |
3309 | tool.state = bflags; executed (the execution status of this line is deduced): tool.state = bflags; | - |
3310 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3311 | } executed: } Execution Count:63 | 63 |
3312 | } executed: } Execution Count:393 | 393 |
3313 | | - |
3314 | if (toolbutton->state & State_HasFocus) { evaluated: toolbutton->state & State_HasFocus yes Evaluation Count:5 | yes Evaluation Count:446 |
| 5-446 |
3315 | QStyleOptionFocusRect fr; executed (the execution status of this line is deduced): QStyleOptionFocusRect fr; | - |
3316 | fr.QStyleOption::operator=(*toolbutton); executed (the execution status of this line is deduced): fr.QStyleOption::operator=(*toolbutton); | - |
3317 | fr.rect.adjust(3, 3, -3, -3); executed (the execution status of this line is deduced): fr.rect.adjust(3, 3, -3, -3); | - |
3318 | if (toolbutton->features & QStyleOptionToolButton::MenuButtonPopup) partially evaluated: toolbutton->features & QStyleOptionToolButton::MenuButtonPopup no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
3319 | fr.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator, never executed: fr.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator, toolbutton, widget), 0); | 0 |
3320 | toolbutton, widget), 0); never executed: fr.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator, toolbutton, widget), 0); | 0 |
3321 | proxy()->drawPrimitive(PE_FrameFocusRect, &fr, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &fr, p, widget); | - |
3322 | } executed: } Execution Count:5 | 5 |
3323 | QStyleOptionToolButton label = *toolbutton; executed (the execution status of this line is deduced): QStyleOptionToolButton label = *toolbutton; | - |
3324 | label.state = bflags; executed (the execution status of this line is deduced): label.state = bflags; | - |
3325 | int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); executed (the execution status of this line is deduced): int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); | - |
3326 | label.rect = button.adjusted(fw, fw, -fw, -fw); executed (the execution status of this line is deduced): label.rect = button.adjusted(fw, fw, -fw, -fw); | - |
3327 | proxy()->drawControl(CE_ToolButtonLabel, &label, p, widget); executed (the execution status of this line is deduced): proxy()->drawControl(CE_ToolButtonLabel, &label, p, widget); | - |
3328 | | - |
3329 | if (toolbutton->subControls & SC_ToolButtonMenu) { evaluated: toolbutton->subControls & SC_ToolButtonMenu yes Evaluation Count:7 | yes Evaluation Count:444 |
| 7-444 |
3330 | tool.rect = menuarea; executed (the execution status of this line is deduced): tool.rect = menuarea; | - |
3331 | tool.state = mflags; executed (the execution status of this line is deduced): tool.state = mflags; | - |
3332 | if (mflags & (State_Sunken | State_On | State_Raised)) evaluated: mflags & (State_Sunken | State_On | State_Raised) yes Evaluation Count:1 | yes Evaluation Count:6 |
| 1-6 |
3333 | proxy()->drawPrimitive(PE_IndicatorButtonDropDown, &tool, p, widget); executed: proxy()->drawPrimitive(PE_IndicatorButtonDropDown, &tool, p, widget); Execution Count:1 | 1 |
3334 | proxy()->drawPrimitive(PE_IndicatorArrowDown, &tool, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorArrowDown, &tool, p, widget); | - |
3335 | } else if (toolbutton->features & QStyleOptionToolButton::HasMenu) { executed: } Execution Count:7 evaluated: toolbutton->features & QStyleOptionToolButton::HasMenu yes Evaluation Count:49 | yes Evaluation Count:395 |
| 7-395 |
3336 | int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, toolbutton, widget); executed (the execution status of this line is deduced): int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, toolbutton, widget); | - |
3337 | QRect ir = toolbutton->rect; executed (the execution status of this line is deduced): QRect ir = toolbutton->rect; | - |
3338 | QStyleOptionToolButton newBtn = *toolbutton; executed (the execution status of this line is deduced): QStyleOptionToolButton newBtn = *toolbutton; | - |
3339 | newBtn.rect = QRect(ir.right() + 5 - mbi, ir.y() + ir.height() - mbi + 4, mbi - 6, mbi - 6); executed (the execution status of this line is deduced): newBtn.rect = QRect(ir.right() + 5 - mbi, ir.y() + ir.height() - mbi + 4, mbi - 6, mbi - 6); | - |
3340 | proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); | - |
3341 | } executed: } Execution Count:49 | 49 |
3342 | } | - |
3343 | break; executed: break; Execution Count:451 | 451 |
3344 | #endif // QT_NO_TOOLBUTTON | - |
3345 | case CC_TitleBar: | - |
3346 | if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) { partially evaluated: const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt) yes Evaluation Count:211 | no Evaluation Count:0 |
| 0-211 |
3347 | QRect ir; executed (the execution status of this line is deduced): QRect ir; | - |
3348 | if (opt->subControls & SC_TitleBarLabel) { partially evaluated: opt->subControls & SC_TitleBarLabel yes Evaluation Count:211 | no Evaluation Count:0 |
| 0-211 |
3349 | QColor left = tb->palette.highlight().color(); executed (the execution status of this line is deduced): QColor left = tb->palette.highlight().color(); | - |
3350 | QColor right = tb->palette.base().color(); executed (the execution status of this line is deduced): QColor right = tb->palette.base().color(); | - |
3351 | | - |
3352 | QBrush fillBrush(left); executed (the execution status of this line is deduced): QBrush fillBrush(left); | - |
3353 | if (left != right) { evaluated: left != right yes Evaluation Count:31 | yes Evaluation Count:180 |
| 31-180 |
3354 | QPoint p1(tb->rect.x(), tb->rect.top() + tb->rect.height()/2); executed (the execution status of this line is deduced): QPoint p1(tb->rect.x(), tb->rect.top() + tb->rect.height()/2); | - |
3355 | QPoint p2(tb->rect.right(), tb->rect.top() + tb->rect.height()/2); executed (the execution status of this line is deduced): QPoint p2(tb->rect.right(), tb->rect.top() + tb->rect.height()/2); | - |
3356 | QLinearGradient lg(p1, p2); executed (the execution status of this line is deduced): QLinearGradient lg(p1, p2); | - |
3357 | lg.setColorAt(0, left); executed (the execution status of this line is deduced): lg.setColorAt(0, left); | - |
3358 | lg.setColorAt(1, right); executed (the execution status of this line is deduced): lg.setColorAt(1, right); | - |
3359 | fillBrush = lg; executed (the execution status of this line is deduced): fillBrush = lg; | - |
3360 | } executed: } Execution Count:31 | 31 |
3361 | | - |
3362 | p->fillRect(opt->rect, fillBrush); executed (the execution status of this line is deduced): p->fillRect(opt->rect, fillBrush); | - |
3363 | | - |
3364 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarLabel, widget); executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarLabel, widget); | - |
3365 | | - |
3366 | p->setPen(tb->palette.highlightedText().color()); executed (the execution status of this line is deduced): p->setPen(tb->palette.highlightedText().color()); | - |
3367 | p->drawText(ir.x() + 2, ir.y(), ir.width() - 2, ir.height(), executed (the execution status of this line is deduced): p->drawText(ir.x() + 2, ir.y(), ir.width() - 2, ir.height(), | - |
3368 | Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text); executed (the execution status of this line is deduced): Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text); | - |
3369 | } executed: } Execution Count:211 | 211 |
3370 | | - |
3371 | bool down = false; executed (the execution status of this line is deduced): bool down = false; | - |
3372 | QPixmap pm; executed (the execution status of this line is deduced): QPixmap pm; | - |
3373 | | - |
3374 | QStyleOption tool(0); executed (the execution status of this line is deduced): QStyleOption tool(0); | - |
3375 | tool.palette = tb->palette; executed (the execution status of this line is deduced): tool.palette = tb->palette; | - |
3376 | if (tb->subControls & SC_TitleBarCloseButton && tb->titleBarFlags & Qt::WindowSystemMenuHint) { partially evaluated: tb->subControls & SC_TitleBarCloseButton yes Evaluation Count:211 | no Evaluation Count:0 |
evaluated: tb->titleBarFlags & Qt::WindowSystemMenuHint yes Evaluation Count:208 | yes Evaluation Count:3 |
| 0-211 |
3377 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarCloseButton, widget); executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarCloseButton, widget); | - |
3378 | down = tb->activeSubControls & SC_TitleBarCloseButton && (opt->state & State_Sunken); partially evaluated: tb->activeSubControls & SC_TitleBarCloseButton no Evaluation Count:0 | yes Evaluation Count:208 |
never evaluated: (opt->state & State_Sunken) | 0-208 |
3379 | if ((tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool partially evaluated: (tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool no Evaluation Count:0 | yes Evaluation Count:208 |
| 0-208 |
3380 | #ifndef QT_NO_DOCKWIDGET executed (the execution status of this line is deduced):
| - |
3381 | || qobject_cast<const QDockWidget *>(widget) partially evaluated: qobject_cast<const QDockWidget *>(widget) no Evaluation Count:0 | yes Evaluation Count:208 |
| 0-208 |
3382 | #endif | - |
3383 | ) | - |
3384 | pm = standardIcon(SP_DockWidgetCloseButton, &tool, widget).pixmap(10, 10); never executed: pm = standardIcon(SP_DockWidgetCloseButton, &tool, widget).pixmap(10, 10); | 0 |
3385 | else | - |
3386 | pm = standardIcon(SP_TitleBarCloseButton, &tool, widget).pixmap(10, 10); executed: pm = standardIcon(SP_TitleBarCloseButton, &tool, widget).pixmap(10, 10); Execution Count:208 | 208 |
3387 | tool.rect = ir; executed (the execution status of this line is deduced): tool.rect = ir; | - |
3388 | tool.state = down ? State_Sunken : State_Raised; partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:208 |
| 0-208 |
3389 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3390 | | - |
3391 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3392 | if (down) partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:208 |
| 0-208 |
3393 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3394 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3395 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3396 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3397 | } executed: } Execution Count:208 | 208 |
3398 | | - |
3399 | if (tb->subControls & SC_TitleBarMaxButton evaluated: tb->subControls & SC_TitleBarMaxButton yes Evaluation Count:183 | yes Evaluation Count:28 |
| 28-183 |
3400 | && tb->titleBarFlags & Qt::WindowMaximizeButtonHint evaluated: tb->titleBarFlags & Qt::WindowMaximizeButtonHint yes Evaluation Count:180 | yes Evaluation Count:3 |
| 3-180 |
3401 | && !(tb->titleBarState & Qt::WindowMaximized)) { evaluated: !(tb->titleBarState & Qt::WindowMaximized) yes Evaluation Count:152 | yes Evaluation Count:28 |
| 28-152 |
3402 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarMaxButton, widget); executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarMaxButton, widget); | - |
3403 | | - |
3404 | down = tb->activeSubControls & SC_TitleBarMaxButton && (opt->state & State_Sunken); partially evaluated: tb->activeSubControls & SC_TitleBarMaxButton no Evaluation Count:0 | yes Evaluation Count:152 |
never evaluated: (opt->state & State_Sunken) | 0-152 |
3405 | pm = standardIcon(SP_TitleBarMaxButton, &tool, widget).pixmap(10, 10); executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarMaxButton, &tool, widget).pixmap(10, 10); | - |
3406 | tool.rect = ir; executed (the execution status of this line is deduced): tool.rect = ir; | - |
3407 | tool.state = down ? State_Sunken : State_Raised; partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:152 |
| 0-152 |
3408 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3409 | | - |
3410 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3411 | if (down) partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:152 |
| 0-152 |
3412 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3413 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3414 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3415 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3416 | } executed: } Execution Count:152 | 152 |
3417 | | - |
3418 | if (tb->subControls & SC_TitleBarMinButton evaluated: tb->subControls & SC_TitleBarMinButton yes Evaluation Count:183 | yes Evaluation Count:28 |
| 28-183 |
3419 | && tb->titleBarFlags & Qt::WindowMinimizeButtonHint evaluated: tb->titleBarFlags & Qt::WindowMinimizeButtonHint yes Evaluation Count:180 | yes Evaluation Count:3 |
| 3-180 |
3420 | && !(tb->titleBarState & Qt::WindowMinimized)) { evaluated: !(tb->titleBarState & Qt::WindowMinimized) yes Evaluation Count:171 | yes Evaluation Count:9 |
| 9-171 |
3421 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarMinButton, widget); executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarMinButton, widget); | - |
3422 | down = tb->activeSubControls & SC_TitleBarMinButton && (opt->state & State_Sunken); partially evaluated: tb->activeSubControls & SC_TitleBarMinButton no Evaluation Count:0 | yes Evaluation Count:171 |
never evaluated: (opt->state & State_Sunken) | 0-171 |
3423 | pm = standardIcon(SP_TitleBarMinButton, &tool, widget).pixmap(10, 10); executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarMinButton, &tool, widget).pixmap(10, 10); | - |
3424 | tool.rect = ir; executed (the execution status of this line is deduced): tool.rect = ir; | - |
3425 | tool.state = down ? State_Sunken : State_Raised; partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:171 |
| 0-171 |
3426 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3427 | | - |
3428 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3429 | if (down) partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:171 |
| 0-171 |
3430 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3431 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3432 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3433 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3434 | } executed: } Execution Count:171 | 171 |
3435 | | - |
3436 | bool drawNormalButton = (tb->subControls & SC_TitleBarNormalButton) evaluated: (tb->subControls & SC_TitleBarNormalButton) yes Evaluation Count:183 | yes Evaluation Count:28 |
| 28-183 |
3437 | && (((tb->titleBarFlags & Qt::WindowMinimizeButtonHint) evaluated: (tb->titleBarFlags & Qt::WindowMinimizeButtonHint) yes Evaluation Count:180 | yes Evaluation Count:3 |
| 3-180 |
3438 | && (tb->titleBarState & Qt::WindowMinimized)) evaluated: (tb->titleBarState & Qt::WindowMinimized) yes Evaluation Count:9 | yes Evaluation Count:171 |
| 9-171 |
3439 | || ((tb->titleBarFlags & Qt::WindowMaximizeButtonHint) evaluated: (tb->titleBarFlags & Qt::WindowMaximizeButtonHint) yes Evaluation Count:171 | yes Evaluation Count:3 |
| 3-171 |
3440 | && (tb->titleBarState & Qt::WindowMaximized))); evaluated: (tb->titleBarState & Qt::WindowMaximized) yes Evaluation Count:28 | yes Evaluation Count:143 |
| 28-143 |
3441 | | - |
3442 | if (drawNormalButton) { evaluated: drawNormalButton yes Evaluation Count:37 | yes Evaluation Count:174 |
| 37-174 |
3443 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarNormalButton, widget); executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarNormalButton, widget); | - |
3444 | down = tb->activeSubControls & SC_TitleBarNormalButton && (opt->state & State_Sunken); partially evaluated: tb->activeSubControls & SC_TitleBarNormalButton no Evaluation Count:0 | yes Evaluation Count:37 |
never evaluated: (opt->state & State_Sunken) | 0-37 |
3445 | pm = standardIcon(SP_TitleBarNormalButton, &tool, widget).pixmap(10, 10); executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarNormalButton, &tool, widget).pixmap(10, 10); | - |
3446 | tool.rect = ir; executed (the execution status of this line is deduced): tool.rect = ir; | - |
3447 | tool.state = down ? State_Sunken : State_Raised; partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:37 |
| 0-37 |
3448 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3449 | | - |
3450 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3451 | if (down) partially evaluated: down no Evaluation Count:0 | yes Evaluation Count:37 |
| 0-37 |
3452 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3453 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3454 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3455 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3456 | } executed: } Execution Count:37 | 37 |
3457 | | - |
3458 | if (tb->subControls & SC_TitleBarShadeButton evaluated: tb->subControls & SC_TitleBarShadeButton yes Evaluation Count:183 | yes Evaluation Count:28 |
| 28-183 |
3459 | && tb->titleBarFlags & Qt::WindowShadeButtonHint partially evaluated: tb->titleBarFlags & Qt::WindowShadeButtonHint no Evaluation Count:0 | yes Evaluation Count:183 |
| 0-183 |
3460 | && !(tb->titleBarState & Qt::WindowMinimized)) { never evaluated: !(tb->titleBarState & Qt::WindowMinimized) | 0 |
3461 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarShadeButton, widget); never executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarShadeButton, widget); | - |
3462 | down = (tb->activeSubControls & SC_TitleBarShadeButton && (opt->state & State_Sunken)); never evaluated: tb->activeSubControls & SC_TitleBarShadeButton never evaluated: (opt->state & State_Sunken) | 0 |
3463 | pm = standardIcon(SP_TitleBarShadeButton, &tool, widget).pixmap(10, 10); never executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarShadeButton, &tool, widget).pixmap(10, 10); | - |
3464 | tool.rect = ir; never executed (the execution status of this line is deduced): tool.rect = ir; | - |
3465 | tool.state = down ? State_Sunken : State_Raised; | 0 |
3466 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3467 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
3468 | if (down) | 0 |
3469 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3470 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3471 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3472 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
3473 | } | 0 |
3474 | | - |
3475 | if (tb->subControls & SC_TitleBarUnshadeButton evaluated: tb->subControls & SC_TitleBarUnshadeButton yes Evaluation Count:183 | yes Evaluation Count:28 |
| 28-183 |
3476 | && tb->titleBarFlags & Qt::WindowShadeButtonHint partially evaluated: tb->titleBarFlags & Qt::WindowShadeButtonHint no Evaluation Count:0 | yes Evaluation Count:183 |
| 0-183 |
3477 | && tb->titleBarState & Qt::WindowMinimized) { never evaluated: tb->titleBarState & Qt::WindowMinimized | 0 |
3478 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarUnshadeButton, widget); never executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarUnshadeButton, widget); | - |
3479 | | - |
3480 | down = tb->activeSubControls & SC_TitleBarUnshadeButton && (opt->state & State_Sunken); never evaluated: tb->activeSubControls & SC_TitleBarUnshadeButton never evaluated: (opt->state & State_Sunken) | 0 |
3481 | pm = standardIcon(SP_TitleBarUnshadeButton, &tool, widget).pixmap(10, 10); never executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarUnshadeButton, &tool, widget).pixmap(10, 10); | - |
3482 | tool.rect = ir; never executed (the execution status of this line is deduced): tool.rect = ir; | - |
3483 | tool.state = down ? State_Sunken : State_Raised; | 0 |
3484 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3485 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
3486 | if (down) | 0 |
3487 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3488 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3489 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3490 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
3491 | } | 0 |
3492 | if (tb->subControls & SC_TitleBarContextHelpButton evaluated: tb->subControls & SC_TitleBarContextHelpButton yes Evaluation Count:183 | yes Evaluation Count:28 |
| 28-183 |
3493 | && tb->titleBarFlags & Qt::WindowContextHelpButtonHint) { partially evaluated: tb->titleBarFlags & Qt::WindowContextHelpButtonHint no Evaluation Count:0 | yes Evaluation Count:183 |
| 0-183 |
3494 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarContextHelpButton, widget); never executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarContextHelpButton, widget); | - |
3495 | | - |
3496 | down = tb->activeSubControls & SC_TitleBarContextHelpButton && (opt->state & State_Sunken); never evaluated: tb->activeSubControls & SC_TitleBarContextHelpButton never evaluated: (opt->state & State_Sunken) | 0 |
3497 | pm = standardIcon(SP_TitleBarContextHelpButton, &tool, widget).pixmap(10, 10); never executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarContextHelpButton, &tool, widget).pixmap(10, 10); | - |
3498 | tool.rect = ir; never executed (the execution status of this line is deduced): tool.rect = ir; | - |
3499 | tool.state = down ? State_Sunken : State_Raised; | 0 |
3500 | proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); | - |
3501 | p->save(); never executed (the execution status of this line is deduced): p->save(); | - |
3502 | if (down) | 0 |
3503 | p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3504 | proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget)); | 0 |
3505 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); never executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3506 | p->restore(); never executed (the execution status of this line is deduced): p->restore(); | - |
3507 | } | 0 |
3508 | if (tb->subControls & SC_TitleBarSysMenu && tb->titleBarFlags & Qt::WindowSystemMenuHint) { partially evaluated: tb->subControls & SC_TitleBarSysMenu yes Evaluation Count:211 | no Evaluation Count:0 |
evaluated: tb->titleBarFlags & Qt::WindowSystemMenuHint yes Evaluation Count:208 | yes Evaluation Count:3 |
| 0-211 |
3509 | ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarSysMenu, widget); executed (the execution status of this line is deduced): ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarSysMenu, widget); | - |
3510 | if (!tb->icon.isNull()) { evaluated: !tb->icon.isNull() yes Evaluation Count:180 | yes Evaluation Count:28 |
| 28-180 |
3511 | tb->icon.paint(p, ir); executed (the execution status of this line is deduced): tb->icon.paint(p, ir); | - |
3512 | } else { executed: } Execution Count:180 | 180 |
3513 | int iconSize = proxy()->pixelMetric(PM_SmallIconSize, tb, widget); executed (the execution status of this line is deduced): int iconSize = proxy()->pixelMetric(PM_SmallIconSize, tb, widget); | - |
3514 | pm = standardIcon(SP_TitleBarMenuButton, &tool, widget).pixmap(iconSize, iconSize); executed (the execution status of this line is deduced): pm = standardIcon(SP_TitleBarMenuButton, &tool, widget).pixmap(iconSize, iconSize); | - |
3515 | tool.rect = ir; executed (the execution status of this line is deduced): tool.rect = ir; | - |
3516 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3517 | proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - |
3518 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3519 | } executed: } Execution Count:28 | 28 |
3520 | } | - |
3521 | } executed: } Execution Count:211 | 211 |
3522 | break; executed: break; Execution Count:211 | 211 |
3523 | #ifndef QT_NO_DIAL | - |
3524 | case CC_Dial: | - |
3525 | if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
3526 | // OK, this is more a port of things over | - |
3527 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3528 | | - |
3529 | // avoid dithering | - |
3530 | if (p->paintEngine()->hasFeature(QPaintEngine::Antialiasing)) partially evaluated: p->paintEngine()->hasFeature(QPaintEngine::Antialiasing) yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
3531 | p->setRenderHint(QPainter::Antialiasing); executed: p->setRenderHint(QPainter::Antialiasing); Execution Count:6 | 6 |
3532 | | - |
3533 | int width = dial->rect.width(); executed (the execution status of this line is deduced): int width = dial->rect.width(); | - |
3534 | int height = dial->rect.height(); executed (the execution status of this line is deduced): int height = dial->rect.height(); | - |
3535 | qreal r = qMin(width, height) / 2; executed (the execution status of this line is deduced): qreal r = qMin(width, height) / 2; | - |
3536 | qreal d_ = r / 6; executed (the execution status of this line is deduced): qreal d_ = r / 6; | - |
3537 | qreal dx = dial->rect.x() + d_ + (width - 2 * r) / 2 + 1; executed (the execution status of this line is deduced): qreal dx = dial->rect.x() + d_ + (width - 2 * r) / 2 + 1; | - |
3538 | qreal dy = dial->rect.y() + d_ + (height - 2 * r) / 2 + 1; executed (the execution status of this line is deduced): qreal dy = dial->rect.y() + d_ + (height - 2 * r) / 2 + 1; | - |
3539 | QRect br = QRect(int(dx), int(dy), int(r * 2 - 2 * d_ - 2), int(r * 2 - 2 * d_ - 2)); executed (the execution status of this line is deduced): QRect br = QRect(int(dx), int(dy), int(r * 2 - 2 * d_ - 2), int(r * 2 - 2 * d_ - 2)); | - |
3540 | | - |
3541 | QPalette pal = opt->palette; executed (the execution status of this line is deduced): QPalette pal = opt->palette; | - |
3542 | // draw notches | - |
3543 | if (dial->subControls & QStyle::SC_DialTickmarks) { evaluated: dial->subControls & QStyle::SC_DialTickmarks yes Evaluation Count:3 | yes Evaluation Count:3 |
| 3 |
3544 | p->setPen(pal.foreground().color()); executed (the execution status of this line is deduced): p->setPen(pal.foreground().color()); | - |
3545 | p->drawLines(QStyleHelper::calcLines(dial)); executed (the execution status of this line is deduced): p->drawLines(QStyleHelper::calcLines(dial)); | - |
3546 | } executed: } Execution Count:3 | 3 |
3547 | | - |
3548 | if (dial->state & State_Enabled) { partially evaluated: dial->state & State_Enabled yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
3549 | p->setBrush(pal.brush(QPalette::ColorRole(proxy()->styleHint(SH_Dial_BackgroundRole, executed (the execution status of this line is deduced): p->setBrush(pal.brush(QPalette::ColorRole(proxy()->styleHint(SH_Dial_BackgroundRole, | - |
3550 | dial, widget)))); executed (the execution status of this line is deduced): dial, widget)))); | - |
3551 | p->setPen(Qt::NoPen); executed (the execution status of this line is deduced): p->setPen(Qt::NoPen); | - |
3552 | p->drawEllipse(br); executed (the execution status of this line is deduced): p->drawEllipse(br); | - |
3553 | p->setBrush(Qt::NoBrush); executed (the execution status of this line is deduced): p->setBrush(Qt::NoBrush); | - |
3554 | } executed: } Execution Count:6 | 6 |
3555 | p->setPen(QPen(pal.dark().color())); never executed (the execution status of this line is deduced): p->setPen(QPen(pal.dark().color())); | - |
3556 | p->drawArc(br, 60 * 16, 180 * 16); never executed (the execution status of this line is deduced): p->drawArc(br, 60 * 16, 180 * 16); | - |
3557 | p->setPen(QPen(pal.light().color())); never executed (the execution status of this line is deduced): p->setPen(QPen(pal.light().color())); | - |
3558 | p->drawArc(br, 240 * 16, 180 * 16); never executed (the execution status of this line is deduced): p->drawArc(br, 240 * 16, 180 * 16); | - |
3559 | | - |
3560 | qreal a; never executed (the execution status of this line is deduced): qreal a; | - |
3561 | QPolygonF arrow(calcArrow(dial, a)); never executed (the execution status of this line is deduced): QPolygonF arrow(calcArrow(dial, a)); | - |
3562 | | - |
3563 | p->setPen(Qt::NoPen); never executed (the execution status of this line is deduced): p->setPen(Qt::NoPen); | - |
3564 | p->setBrush(pal.button()); never executed (the execution status of this line is deduced): p->setBrush(pal.button()); | - |
3565 | p->setRenderHint(QPainter::Qt4CompatiblePainting); never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting); | - |
3566 | p->drawPolygon(arrow); never executed (the execution status of this line is deduced): p->drawPolygon(arrow); | - |
3567 | | - |
3568 | a = QStyleHelper::angle(QPointF(width / 2, height / 2), arrow[0]); never executed (the execution status of this line is deduced): a = QStyleHelper::angle(QPointF(width / 2, height / 2), arrow[0]); | - |
3569 | p->setBrush(Qt::NoBrush); never executed (the execution status of this line is deduced): p->setBrush(Qt::NoBrush); | - |
3570 | | - |
3571 | if (a <= 0 || a > 200) { evaluated: a <= 0 yes Evaluation Count:3 | yes Evaluation Count:3 |
partially evaluated: a > 200 yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
3572 | p->setPen(pal.light().color()); executed (the execution status of this line is deduced): p->setPen(pal.light().color()); | - |
3573 | p->drawLine(arrow[2], arrow[0]); executed (the execution status of this line is deduced): p->drawLine(arrow[2], arrow[0]); | - |
3574 | p->drawLine(arrow[1], arrow[2]); executed (the execution status of this line is deduced): p->drawLine(arrow[1], arrow[2]); | - |
3575 | p->setPen(pal.dark().color()); executed (the execution status of this line is deduced): p->setPen(pal.dark().color()); | - |
3576 | p->drawLine(arrow[0], arrow[1]); executed (the execution status of this line is deduced): p->drawLine(arrow[0], arrow[1]); | - |
3577 | } else if (a > 0 && a < 45) { executed: } Execution Count:6 never evaluated: a > 0 never evaluated: a < 45 | 0-6 |
3578 | p->setPen(pal.light().color()); never executed (the execution status of this line is deduced): p->setPen(pal.light().color()); | - |
3579 | p->drawLine(arrow[2], arrow[0]); never executed (the execution status of this line is deduced): p->drawLine(arrow[2], arrow[0]); | - |
3580 | p->setPen(pal.dark().color()); never executed (the execution status of this line is deduced): p->setPen(pal.dark().color()); | - |
3581 | p->drawLine(arrow[1], arrow[2]); never executed (the execution status of this line is deduced): p->drawLine(arrow[1], arrow[2]); | - |
3582 | p->drawLine(arrow[0], arrow[1]); never executed (the execution status of this line is deduced): p->drawLine(arrow[0], arrow[1]); | - |
3583 | } else if (a >= 45 && a < 135) { never executed: } never evaluated: a >= 45 never evaluated: a < 135 | 0 |
3584 | p->setPen(pal.dark().color()); never executed (the execution status of this line is deduced): p->setPen(pal.dark().color()); | - |
3585 | p->drawLine(arrow[2], arrow[0]); never executed (the execution status of this line is deduced): p->drawLine(arrow[2], arrow[0]); | - |
3586 | p->drawLine(arrow[1], arrow[2]); never executed (the execution status of this line is deduced): p->drawLine(arrow[1], arrow[2]); | - |
3587 | p->setPen(pal.light().color()); never executed (the execution status of this line is deduced): p->setPen(pal.light().color()); | - |
3588 | p->drawLine(arrow[0], arrow[1]); never executed (the execution status of this line is deduced): p->drawLine(arrow[0], arrow[1]); | - |
3589 | } else if (a >= 135 && a < 200) { never executed: } never evaluated: a >= 135 never evaluated: a < 200 | 0 |
3590 | p->setPen(pal.dark().color()); never executed (the execution status of this line is deduced): p->setPen(pal.dark().color()); | - |
3591 | p->drawLine(arrow[2], arrow[0]); never executed (the execution status of this line is deduced): p->drawLine(arrow[2], arrow[0]); | - |
3592 | p->setPen(pal.light().color()); never executed (the execution status of this line is deduced): p->setPen(pal.light().color()); | - |
3593 | p->drawLine(arrow[0], arrow[1]); never executed (the execution status of this line is deduced): p->drawLine(arrow[0], arrow[1]); | - |
3594 | p->drawLine(arrow[1], arrow[2]); never executed (the execution status of this line is deduced): p->drawLine(arrow[1], arrow[2]); | - |
3595 | } | 0 |
3596 | | - |
3597 | // draw focus rect around the dial | - |
3598 | QStyleOptionFocusRect fropt; executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt; | - |
3599 | fropt.rect = dial->rect; executed (the execution status of this line is deduced): fropt.rect = dial->rect; | - |
3600 | fropt.state = dial->state; executed (the execution status of this line is deduced): fropt.state = dial->state; | - |
3601 | fropt.palette = dial->palette; executed (the execution status of this line is deduced): fropt.palette = dial->palette; | - |
3602 | if (fropt.state & QStyle::State_HasFocus) { evaluated: fropt.state & QStyle::State_HasFocus yes Evaluation Count:1 | yes Evaluation Count:5 |
| 1-5 |
3603 | br.adjust(0, 0, 2, 2); executed (the execution status of this line is deduced): br.adjust(0, 0, 2, 2); | - |
3604 | if (dial->subControls & SC_DialTickmarks) { partially evaluated: dial->subControls & SC_DialTickmarks no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
3605 | int r = qMin(width, height) / 2; never executed (the execution status of this line is deduced): int r = qMin(width, height) / 2; | - |
3606 | br.translate(-r / 6, - r / 6); never executed (the execution status of this line is deduced): br.translate(-r / 6, - r / 6); | - |
3607 | br.setWidth(br.width() + r / 3); never executed (the execution status of this line is deduced): br.setWidth(br.width() + r / 3); | - |
3608 | br.setHeight(br.height() + r / 3); never executed (the execution status of this line is deduced): br.setHeight(br.height() + r / 3); | - |
3609 | } | 0 |
3610 | fropt.rect = br.adjusted(-2, -2, 2, 2); executed (the execution status of this line is deduced): fropt.rect = br.adjusted(-2, -2, 2, 2); | - |
3611 | proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &fropt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &fropt, p, widget); | - |
3612 | } executed: } Execution Count:1 | 1 |
3613 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3614 | } executed: } Execution Count:6 | 6 |
3615 | break; executed: break; Execution Count:6 | 6 |
3616 | #endif // QT_NO_DIAL | - |
3617 | #ifndef QT_NO_GROUPBOX | - |
3618 | case CC_GroupBox: | - |
3619 | if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) { partially evaluated: const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt) yes Evaluation Count:32 | no Evaluation Count:0 |
| 0-32 |
3620 | // Draw frame | - |
3621 | QRect textRect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, widget); executed (the execution status of this line is deduced): QRect textRect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, widget); | - |
3622 | QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxCheckBox, widget); executed (the execution status of this line is deduced): QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxCheckBox, widget); | - |
3623 | if (groupBox->subControls & QStyle::SC_GroupBoxFrame) { partially evaluated: groupBox->subControls & QStyle::SC_GroupBoxFrame yes Evaluation Count:32 | no Evaluation Count:0 |
| 0-32 |
3624 | QStyleOptionFrameV2 frame; executed (the execution status of this line is deduced): QStyleOptionFrameV2 frame; | - |
3625 | frame.QStyleOption::operator=(*groupBox); executed (the execution status of this line is deduced): frame.QStyleOption::operator=(*groupBox); | - |
3626 | frame.features = groupBox->features; executed (the execution status of this line is deduced): frame.features = groupBox->features; | - |
3627 | frame.lineWidth = groupBox->lineWidth; executed (the execution status of this line is deduced): frame.lineWidth = groupBox->lineWidth; | - |
3628 | frame.midLineWidth = groupBox->midLineWidth; executed (the execution status of this line is deduced): frame.midLineWidth = groupBox->midLineWidth; | - |
3629 | frame.rect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxFrame, widget); executed (the execution status of this line is deduced): frame.rect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxFrame, widget); | - |
3630 | p->save(); executed (the execution status of this line is deduced): p->save(); | - |
3631 | QRegion region(groupBox->rect); executed (the execution status of this line is deduced): QRegion region(groupBox->rect); | - |
3632 | if (!groupBox->text.isEmpty()) { evaluated: !groupBox->text.isEmpty() yes Evaluation Count:28 | yes Evaluation Count:4 |
| 4-28 |
3633 | bool ltr = groupBox->direction == Qt::LeftToRight; executed (the execution status of this line is deduced): bool ltr = groupBox->direction == Qt::LeftToRight; | - |
3634 | QRect finalRect; executed (the execution status of this line is deduced): QRect finalRect; | - |
3635 | if (groupBox->subControls & QStyle::SC_GroupBoxCheckBox) { evaluated: groupBox->subControls & QStyle::SC_GroupBoxCheckBox yes Evaluation Count:5 | yes Evaluation Count:23 |
| 5-23 |
3636 | finalRect = checkBoxRect.united(textRect); executed (the execution status of this line is deduced): finalRect = checkBoxRect.united(textRect); | - |
3637 | finalRect.adjust(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0); executed (the execution status of this line is deduced): finalRect.adjust(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0); | - |
3638 | } else { executed: } Execution Count:5 | 5 |
3639 | finalRect = textRect; executed (the execution status of this line is deduced): finalRect = textRect; | - |
3640 | } executed: } Execution Count:23 | 23 |
3641 | region -= finalRect; executed (the execution status of this line is deduced): region -= finalRect; | - |
3642 | } executed: } Execution Count:28 | 28 |
3643 | p->setClipRegion(region); executed (the execution status of this line is deduced): p->setClipRegion(region); | - |
3644 | proxy()->drawPrimitive(PE_FrameGroupBox, &frame, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameGroupBox, &frame, p, widget); | - |
3645 | p->restore(); executed (the execution status of this line is deduced): p->restore(); | - |
3646 | } executed: } Execution Count:32 | 32 |
3647 | | - |
3648 | // Draw title | - |
3649 | if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { evaluated: (groupBox->subControls & QStyle::SC_GroupBoxLabel) yes Evaluation Count:31 | yes Evaluation Count:1 |
evaluated: !groupBox->text.isEmpty() yes Evaluation Count:28 | yes Evaluation Count:3 |
| 1-31 |
3650 | QColor textColor = groupBox->textColor; executed (the execution status of this line is deduced): QColor textColor = groupBox->textColor; | - |
3651 | if (textColor.isValid()) partially evaluated: textColor.isValid() yes Evaluation Count:28 | no Evaluation Count:0 |
| 0-28 |
3652 | p->setPen(textColor); executed: p->setPen(textColor); Execution Count:28 | 28 |
3653 | int alignment = int(groupBox->textAlignment); executed (the execution status of this line is deduced): int alignment = int(groupBox->textAlignment); | - |
3654 | if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, opt, widget)) partially evaluated: !proxy()->styleHint(QStyle::SH_UnderlineShortcut, opt, widget) no Evaluation Count:0 | yes Evaluation Count:28 |
| 0-28 |
3655 | alignment |= Qt::TextHideMnemonic; never executed: alignment |= Qt::TextHideMnemonic; | 0 |
3656 | | - |
3657 | proxy()->drawItemText(p, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment, executed (the execution status of this line is deduced): proxy()->drawItemText(p, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment, | - |
3658 | groupBox->palette, groupBox->state & State_Enabled, groupBox->text, executed (the execution status of this line is deduced): groupBox->palette, groupBox->state & State_Enabled, groupBox->text, | - |
3659 | textColor.isValid() ? QPalette::NoRole : QPalette::WindowText); executed (the execution status of this line is deduced): textColor.isValid() ? QPalette::NoRole : QPalette::WindowText); | - |
3660 | | - |
3661 | if (groupBox->state & State_HasFocus) { partially evaluated: groupBox->state & State_HasFocus no Evaluation Count:0 | yes Evaluation Count:28 |
| 0-28 |
3662 | QStyleOptionFocusRect fropt; never executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt; | - |
3663 | fropt.QStyleOption::operator=(*groupBox); never executed (the execution status of this line is deduced): fropt.QStyleOption::operator=(*groupBox); | - |
3664 | fropt.rect = textRect; never executed (the execution status of this line is deduced): fropt.rect = textRect; | - |
3665 | proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); | - |
3666 | } | 0 |
3667 | } executed: } Execution Count:28 | 28 |
3668 | | - |
3669 | // Draw checkbox | - |
3670 | if (groupBox->subControls & SC_GroupBoxCheckBox) { evaluated: groupBox->subControls & SC_GroupBoxCheckBox yes Evaluation Count:8 | yes Evaluation Count:24 |
| 8-24 |
3671 | QStyleOptionButton box; executed (the execution status of this line is deduced): QStyleOptionButton box; | - |
3672 | box.QStyleOption::operator=(*groupBox); executed (the execution status of this line is deduced): box.QStyleOption::operator=(*groupBox); | - |
3673 | box.rect = checkBoxRect; executed (the execution status of this line is deduced): box.rect = checkBoxRect; | - |
3674 | proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, p, widget); | - |
3675 | } executed: } Execution Count:8 | 8 |
3676 | } executed: } Execution Count:32 | 32 |
3677 | break; executed: break; Execution Count:32 | 32 |
3678 | #endif // QT_NO_GROUPBOX | - |
3679 | #ifndef QT_NO_MDIAREA | - |
3680 | case CC_MdiControls: | - |
3681 | { | - |
3682 | QStyleOptionButton btnOpt; executed (the execution status of this line is deduced): QStyleOptionButton btnOpt; | - |
3683 | btnOpt.QStyleOption::operator=(*opt); executed (the execution status of this line is deduced): btnOpt.QStyleOption::operator=(*opt); | - |
3684 | btnOpt.state &= ~State_MouseOver; executed (the execution status of this line is deduced): btnOpt.state &= ~State_MouseOver; | - |
3685 | int bsx = 0; executed (the execution status of this line is deduced): int bsx = 0; | - |
3686 | int bsy = 0; executed (the execution status of this line is deduced): int bsy = 0; | - |
3687 | if (opt->subControls & QStyle::SC_MdiCloseButton) { partially evaluated: opt->subControls & QStyle::SC_MdiCloseButton yes Evaluation Count:24 | no Evaluation Count:0 |
| 0-24 |
3688 | if (opt->activeSubControls & QStyle::SC_MdiCloseButton && (opt->state & State_Sunken)) { partially evaluated: opt->activeSubControls & QStyle::SC_MdiCloseButton no Evaluation Count:0 | yes Evaluation Count:24 |
never evaluated: (opt->state & State_Sunken) | 0-24 |
3689 | btnOpt.state |= State_Sunken; never executed (the execution status of this line is deduced): btnOpt.state |= State_Sunken; | - |
3690 | btnOpt.state &= ~State_Raised; never executed (the execution status of this line is deduced): btnOpt.state &= ~State_Raised; | - |
3691 | bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); never executed (the execution status of this line is deduced): bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); | - |
3692 | bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); never executed (the execution status of this line is deduced): bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); | - |
3693 | } else { | 0 |
3694 | btnOpt.state |= State_Raised; executed (the execution status of this line is deduced): btnOpt.state |= State_Raised; | - |
3695 | btnOpt.state &= ~State_Sunken; executed (the execution status of this line is deduced): btnOpt.state &= ~State_Sunken; | - |
3696 | bsx = 0; executed (the execution status of this line is deduced): bsx = 0; | - |
3697 | bsy = 0; executed (the execution status of this line is deduced): bsy = 0; | - |
3698 | } executed: } Execution Count:24 | 24 |
3699 | btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiCloseButton, widget); executed (the execution status of this line is deduced): btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiCloseButton, widget); | - |
3700 | proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget); | - |
3701 | QPixmap pm = standardIcon(SP_TitleBarCloseButton).pixmap(16, 16); executed (the execution status of this line is deduced): QPixmap pm = standardIcon(SP_TitleBarCloseButton).pixmap(16, 16); | - |
3702 | proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm); | - |
3703 | } executed: } Execution Count:24 | 24 |
3704 | if (opt->subControls & QStyle::SC_MdiNormalButton) { partially evaluated: opt->subControls & QStyle::SC_MdiNormalButton yes Evaluation Count:24 | no Evaluation Count:0 |
| 0-24 |
3705 | if (opt->activeSubControls & QStyle::SC_MdiNormalButton && (opt->state & State_Sunken)) { partially evaluated: opt->activeSubControls & QStyle::SC_MdiNormalButton no Evaluation Count:0 | yes Evaluation Count:24 |
never evaluated: (opt->state & State_Sunken) | 0-24 |
3706 | btnOpt.state |= State_Sunken; never executed (the execution status of this line is deduced): btnOpt.state |= State_Sunken; | - |
3707 | btnOpt.state &= ~State_Raised; never executed (the execution status of this line is deduced): btnOpt.state &= ~State_Raised; | - |
3708 | bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); never executed (the execution status of this line is deduced): bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); | - |
3709 | bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); never executed (the execution status of this line is deduced): bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); | - |
3710 | } else { | 0 |
3711 | btnOpt.state |= State_Raised; executed (the execution status of this line is deduced): btnOpt.state |= State_Raised; | - |
3712 | btnOpt.state &= ~State_Sunken; executed (the execution status of this line is deduced): btnOpt.state &= ~State_Sunken; | - |
3713 | bsx = 0; executed (the execution status of this line is deduced): bsx = 0; | - |
3714 | bsy = 0; executed (the execution status of this line is deduced): bsy = 0; | - |
3715 | } executed: } Execution Count:24 | 24 |
3716 | btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiNormalButton, widget); executed (the execution status of this line is deduced): btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiNormalButton, widget); | - |
3717 | proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget); | - |
3718 | QPixmap pm = standardIcon(SP_TitleBarNormalButton).pixmap(16, 16); executed (the execution status of this line is deduced): QPixmap pm = standardIcon(SP_TitleBarNormalButton).pixmap(16, 16); | - |
3719 | proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm); | - |
3720 | } executed: } Execution Count:24 | 24 |
3721 | if (opt->subControls & QStyle::SC_MdiMinButton) { partially evaluated: opt->subControls & QStyle::SC_MdiMinButton yes Evaluation Count:24 | no Evaluation Count:0 |
| 0-24 |
3722 | if (opt->activeSubControls & QStyle::SC_MdiMinButton && (opt->state & State_Sunken)) { partially evaluated: opt->activeSubControls & QStyle::SC_MdiMinButton no Evaluation Count:0 | yes Evaluation Count:24 |
never evaluated: (opt->state & State_Sunken) | 0-24 |
3723 | btnOpt.state |= State_Sunken; never executed (the execution status of this line is deduced): btnOpt.state |= State_Sunken; | - |
3724 | btnOpt.state &= ~State_Raised; never executed (the execution status of this line is deduced): btnOpt.state &= ~State_Raised; | - |
3725 | bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); never executed (the execution status of this line is deduced): bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); | - |
3726 | bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); never executed (the execution status of this line is deduced): bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); | - |
3727 | } else { | 0 |
3728 | btnOpt.state |= State_Raised; executed (the execution status of this line is deduced): btnOpt.state |= State_Raised; | - |
3729 | btnOpt.state &= ~State_Sunken; executed (the execution status of this line is deduced): btnOpt.state &= ~State_Sunken; | - |
3730 | bsx = 0; executed (the execution status of this line is deduced): bsx = 0; | - |
3731 | bsy = 0; executed (the execution status of this line is deduced): bsy = 0; | - |
3732 | } executed: } Execution Count:24 | 24 |
3733 | btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiMinButton, widget); executed (the execution status of this line is deduced): btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiMinButton, widget); | - |
3734 | proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget); executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget); | - |
3735 | QPixmap pm = standardIcon(SP_TitleBarMinButton).pixmap(16, 16); executed (the execution status of this line is deduced): QPixmap pm = standardIcon(SP_TitleBarMinButton).pixmap(16, 16); | - |
3736 | proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm); executed (the execution status of this line is deduced): proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm); | - |
3737 | } executed: } Execution Count:24 | 24 |
3738 | } | - |
3739 | break; executed: break; Execution Count:24 | 24 |
3740 | #endif // QT_NO_MDIAREA | - |
3741 | default: | - |
3742 | qWarning("QCommonStyle::drawComplexControl: Control %d not handled", cc); never executed (the execution status of this line is deduced): QMessageLogger("styles/qcommonstyle.cpp", 3742, __PRETTY_FUNCTION__).warning("QCommonStyle::drawComplexControl: Control %d not handled", cc); | - |
3743 | } | 0 |
3744 | } executed: } Execution Count:3668 | 3668 |
3745 | | - |
3746 | /*! | - |
3747 | \reimp | - |
3748 | */ | - |
3749 | QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, | - |
3750 | const QPoint &pt, const QWidget *widget) const | - |
3751 | { | - |
3752 | SubControl sc = SC_None; executed (the execution status of this line is deduced): SubControl sc = SC_None; | - |
3753 | switch (cc) { | - |
3754 | #ifndef QT_NO_SLIDER | - |
3755 | case CC_Slider: | - |
3756 | if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
3757 | QRect r = proxy()->subControlRect(cc, slider, SC_SliderHandle, widget); executed (the execution status of this line is deduced): QRect r = proxy()->subControlRect(cc, slider, SC_SliderHandle, widget); | - |
3758 | if (r.isValid() && r.contains(pt)) { partially evaluated: r.isValid() yes Evaluation Count:2 | no Evaluation Count:0 |
evaluated: r.contains(pt) yes Evaluation Count:1 | yes Evaluation Count:1 |
| 0-2 |
3759 | sc = SC_SliderHandle; executed (the execution status of this line is deduced): sc = SC_SliderHandle; | - |
3760 | } else { executed: } Execution Count:1 | 1 |
3761 | r = proxy()->subControlRect(cc, slider, SC_SliderGroove ,widget); executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, slider, SC_SliderGroove ,widget); | - |
3762 | if (r.isValid() && r.contains(pt)) partially evaluated: r.isValid() yes Evaluation Count:1 | no Evaluation Count:0 |
partially evaluated: r.contains(pt) yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
3763 | sc = SC_SliderGroove; executed: sc = SC_SliderGroove; Execution Count:1 | 1 |
3764 | } executed: } Execution Count:1 | 1 |
3765 | } | - |
3766 | break; executed: break; Execution Count:2 | 2 |
3767 | #endif // QT_NO_SLIDER | - |
3768 | #ifndef QT_NO_SCROLLBAR | - |
3769 | case CC_ScrollBar: | - |
3770 | if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
3771 | QRect r; executed (the execution status of this line is deduced): QRect r; | - |
3772 | uint ctrl = SC_ScrollBarAddLine; executed (the execution status of this line is deduced): uint ctrl = SC_ScrollBarAddLine; | - |
3773 | while (ctrl <= SC_ScrollBarGroove) { partially evaluated: ctrl <= SC_ScrollBarGroove yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
3774 | r = proxy()->subControlRect(cc, scrollbar, QStyle::SubControl(ctrl), widget); executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, scrollbar, QStyle::SubControl(ctrl), widget); | - |
3775 | if (r.isValid() && r.contains(pt)) { evaluated: r.isValid() yes Evaluation Count:9 | yes Evaluation Count:3 |
evaluated: r.contains(pt) yes Evaluation Count:4 | yes Evaluation Count:5 |
| 3-9 |
3776 | sc = QStyle::SubControl(ctrl); executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3777 | break; executed: break; Execution Count:4 | 4 |
3778 | } | - |
3779 | ctrl <<= 1; executed (the execution status of this line is deduced): ctrl <<= 1; | - |
3780 | } executed: } Execution Count:8 | 8 |
3781 | } executed: } Execution Count:4 | 4 |
3782 | break; executed: break; Execution Count:4 | 4 |
3783 | #endif // QT_NO_SCROLLBAR | - |
3784 | #ifndef QT_NO_TOOLBUTTON | - |
3785 | case CC_ToolButton: | - |
3786 | if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) { never evaluated: const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt) | 0 |
3787 | QRect r; never executed (the execution status of this line is deduced): QRect r; | - |
3788 | uint ctrl = SC_ToolButton; never executed (the execution status of this line is deduced): uint ctrl = SC_ToolButton; | - |
3789 | while (ctrl <= SC_ToolButtonMenu) { never evaluated: ctrl <= SC_ToolButtonMenu | 0 |
3790 | r = proxy()->subControlRect(cc, toolbutton, QStyle::SubControl(ctrl), widget); never executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, toolbutton, QStyle::SubControl(ctrl), widget); | - |
3791 | if (r.isValid() && r.contains(pt)) { never evaluated: r.isValid() never evaluated: r.contains(pt) | 0 |
3792 | sc = QStyle::SubControl(ctrl); never executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3793 | break; | 0 |
3794 | } | - |
3795 | ctrl <<= 1; never executed (the execution status of this line is deduced): ctrl <<= 1; | - |
3796 | } | 0 |
3797 | } | 0 |
3798 | break; | 0 |
3799 | #endif // QT_NO_TOOLBUTTON | - |
3800 | #ifndef QT_NO_SPINBOX | - |
3801 | case CC_SpinBox: | - |
3802 | if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) { partially evaluated: const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt) yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
3803 | QRect r; executed (the execution status of this line is deduced): QRect r; | - |
3804 | uint ctrl = SC_SpinBoxUp; executed (the execution status of this line is deduced): uint ctrl = SC_SpinBoxUp; | - |
3805 | while (ctrl <= SC_SpinBoxEditField) { partially evaluated: ctrl <= SC_SpinBoxEditField yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
3806 | r = proxy()->subControlRect(cc, spinbox, QStyle::SubControl(ctrl), widget); executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, spinbox, QStyle::SubControl(ctrl), widget); | - |
3807 | if (r.isValid() && r.contains(pt)) { partially evaluated: r.isValid() yes Evaluation Count:6 | no Evaluation Count:0 |
evaluated: r.contains(pt) yes Evaluation Count:3 | yes Evaluation Count:3 |
| 0-6 |
3808 | sc = QStyle::SubControl(ctrl); executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3809 | break; executed: break; Execution Count:3 | 3 |
3810 | } | - |
3811 | ctrl <<= 1; executed (the execution status of this line is deduced): ctrl <<= 1; | - |
3812 | } executed: } Execution Count:3 | 3 |
3813 | } executed: } Execution Count:3 | 3 |
3814 | break; executed: break; Execution Count:3 | 3 |
3815 | #endif // QT_NO_SPINBOX | - |
3816 | case CC_TitleBar: | - |
3817 | if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) { partially evaluated: const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt) yes Evaluation Count:21 | no Evaluation Count:0 |
| 0-21 |
3818 | QRect r; executed (the execution status of this line is deduced): QRect r; | - |
3819 | uint ctrl = SC_TitleBarSysMenu; executed (the execution status of this line is deduced): uint ctrl = SC_TitleBarSysMenu; | - |
3820 | | - |
3821 | while (ctrl <= SC_TitleBarLabel) { evaluated: ctrl <= SC_TitleBarLabel yes Evaluation Count:189 | yes Evaluation Count:17 |
| 17-189 |
3822 | r = proxy()->subControlRect(cc, tb, QStyle::SubControl(ctrl), widget); executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, tb, QStyle::SubControl(ctrl), widget); | - |
3823 | if (r.isValid() && r.contains(pt)) { evaluated: r.isValid() yes Evaluation Count:129 | yes Evaluation Count:60 |
evaluated: r.contains(pt) yes Evaluation Count:4 | yes Evaluation Count:125 |
| 4-129 |
3824 | sc = QStyle::SubControl(ctrl); executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3825 | break; executed: break; Execution Count:4 | 4 |
3826 | } | - |
3827 | ctrl <<= 1; executed (the execution status of this line is deduced): ctrl <<= 1; | - |
3828 | } executed: } Execution Count:185 | 185 |
3829 | } executed: } Execution Count:21 | 21 |
3830 | break; executed: break; Execution Count:21 | 21 |
3831 | #ifndef QT_NO_COMBOBOX | - |
3832 | case CC_ComboBox: | - |
3833 | if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { partially evaluated: const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt) yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
3834 | QRect r; executed (the execution status of this line is deduced): QRect r; | - |
3835 | uint ctrl = SC_ComboBoxArrow; // Start here and go down. executed (the execution status of this line is deduced): uint ctrl = SC_ComboBoxArrow; | - |
3836 | while (ctrl > 0) { partially evaluated: ctrl > 0 yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
3837 | r = proxy()->subControlRect(cc, cb, QStyle::SubControl(ctrl), widget); executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, cb, QStyle::SubControl(ctrl), widget); | - |
3838 | if (r.isValid() && r.contains(pt)) { partially evaluated: r.isValid() yes Evaluation Count:4 | no Evaluation Count:0 |
evaluated: r.contains(pt) yes Evaluation Count:3 | yes Evaluation Count:1 |
| 0-4 |
3839 | sc = QStyle::SubControl(ctrl); executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3840 | break; executed: break; Execution Count:3 | 3 |
3841 | } | - |
3842 | ctrl >>= 1; executed (the execution status of this line is deduced): ctrl >>= 1; | - |
3843 | } executed: } Execution Count:1 | 1 |
3844 | } executed: } Execution Count:3 | 3 |
3845 | break; executed: break; Execution Count:3 | 3 |
3846 | #endif // QT_NO_COMBOBOX | - |
3847 | #ifndef QT_NO_GROUPBOX | - |
3848 | case CC_GroupBox: | - |
3849 | if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) { partially evaluated: const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt) yes Evaluation Count:23 | no Evaluation Count:0 |
| 0-23 |
3850 | QRect r; executed (the execution status of this line is deduced): QRect r; | - |
3851 | uint ctrl = SC_GroupBoxCheckBox; executed (the execution status of this line is deduced): uint ctrl = SC_GroupBoxCheckBox; | - |
3852 | while (ctrl <= SC_GroupBoxFrame) { partially evaluated: ctrl <= SC_GroupBoxFrame yes Evaluation Count:45 | no Evaluation Count:0 |
| 0-45 |
3853 | r = proxy()->subControlRect(cc, groupBox, QStyle::SubControl(ctrl), widget); executed (the execution status of this line is deduced): r = proxy()->subControlRect(cc, groupBox, QStyle::SubControl(ctrl), widget); | - |
3854 | if (r.isValid() && r.contains(pt)) { partially evaluated: r.isValid() yes Evaluation Count:45 | no Evaluation Count:0 |
evaluated: r.contains(pt) yes Evaluation Count:23 | yes Evaluation Count:22 |
| 0-45 |
3855 | sc = QStyle::SubControl(ctrl); executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3856 | break; executed: break; Execution Count:23 | 23 |
3857 | } | - |
3858 | ctrl <<= 1; executed (the execution status of this line is deduced): ctrl <<= 1; | - |
3859 | } executed: } Execution Count:22 | 22 |
3860 | } executed: } Execution Count:23 | 23 |
3861 | break; executed: break; Execution Count:23 | 23 |
3862 | #endif // QT_NO_GROUPBOX | - |
3863 | case CC_MdiControls: | - |
3864 | { | - |
3865 | QRect r; never executed (the execution status of this line is deduced): QRect r; | - |
3866 | uint ctrl = SC_MdiMinButton; never executed (the execution status of this line is deduced): uint ctrl = SC_MdiMinButton; | - |
3867 | while (ctrl <= SC_MdiCloseButton) { never evaluated: ctrl <= SC_MdiCloseButton | 0 |
3868 | r = proxy()->subControlRect(CC_MdiControls, opt, QStyle::SubControl(ctrl), widget); never executed (the execution status of this line is deduced): r = proxy()->subControlRect(CC_MdiControls, opt, QStyle::SubControl(ctrl), widget); | - |
3869 | if (r.isValid() && r.contains(pt) && (opt->subControls & ctrl)) { never evaluated: r.isValid() never evaluated: r.contains(pt) never evaluated: (opt->subControls & ctrl) | 0 |
3870 | sc = QStyle::SubControl(ctrl); never executed (the execution status of this line is deduced): sc = QStyle::SubControl(ctrl); | - |
3871 | return sc; never executed: return sc; | 0 |
3872 | } | - |
3873 | ctrl <<= 1; never executed (the execution status of this line is deduced): ctrl <<= 1; | - |
3874 | } | 0 |
3875 | } | - |
3876 | break; | 0 |
3877 | default: | - |
3878 | qWarning("QCommonStyle::hitTestComplexControl: Case %d not handled", cc); never executed (the execution status of this line is deduced): QMessageLogger("styles/qcommonstyle.cpp", 3878, __PRETTY_FUNCTION__).warning("QCommonStyle::hitTestComplexControl: Case %d not handled", cc); | - |
3879 | } | 0 |
3880 | return sc; executed: return sc; Execution Count:56 | 56 |
3881 | } | - |
3882 | | - |
3883 | /*! | - |
3884 | \reimp | - |
3885 | */ | - |
3886 | QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, | - |
3887 | SubControl sc, const QWidget *widget) const | - |
3888 | { | - |
3889 | QRect ret; executed (the execution status of this line is deduced): QRect ret; | - |
3890 | switch (cc) { | - |
3891 | #ifndef QT_NO_SLIDER | - |
3892 | case CC_Slider: | - |
3893 | if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:21 | no Evaluation Count:0 |
| 0-21 |
3894 | int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); executed (the execution status of this line is deduced): int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget); | - |
3895 | int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); executed (the execution status of this line is deduced): int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget); | - |
3896 | | - |
3897 | switch (sc) { | - |
3898 | case SC_SliderHandle: { | - |
3899 | int sliderPos = 0; executed (the execution status of this line is deduced): int sliderPos = 0; | - |
3900 | int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); executed (the execution status of this line is deduced): int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); | - |
3901 | bool horizontal = slider->orientation == Qt::Horizontal; executed (the execution status of this line is deduced): bool horizontal = slider->orientation == Qt::Horizontal; | - |
3902 | sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, executed (the execution status of this line is deduced): sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, | - |
3903 | slider->sliderPosition, executed (the execution status of this line is deduced): slider->sliderPosition, | - |
3904 | (horizontal ? slider->rect.width() executed (the execution status of this line is deduced): (horizontal ? slider->rect.width() | - |
3905 | : slider->rect.height()) - len, executed (the execution status of this line is deduced): : slider->rect.height()) - len, | - |
3906 | slider->upsideDown); executed (the execution status of this line is deduced): slider->upsideDown); | - |
3907 | if (horizontal) evaluated: horizontal yes Evaluation Count:4 | yes Evaluation Count:8 |
| 4-8 |
3908 | ret.setRect(slider->rect.x() + sliderPos, slider->rect.y() + tickOffset, len, thickness); executed: ret.setRect(slider->rect.x() + sliderPos, slider->rect.y() + tickOffset, len, thickness); Execution Count:4 | 4 |
3909 | else | - |
3910 | ret.setRect(slider->rect.x() + tickOffset, slider->rect.y() + sliderPos, thickness, len); executed: ret.setRect(slider->rect.x() + tickOffset, slider->rect.y() + sliderPos, thickness, len); Execution Count:8 | 8 |
3911 | break; } executed: break; Execution Count:12 | 12 |
3912 | case SC_SliderGroove: | - |
3913 | if (slider->orientation == Qt::Horizontal) evaluated: slider->orientation == Qt::Horizontal yes Evaluation Count:4 | yes Evaluation Count:5 |
| 4-5 |
3914 | ret.setRect(slider->rect.x(), slider->rect.y() + tickOffset, executed: ret.setRect(slider->rect.x(), slider->rect.y() + tickOffset, slider->rect.width(), thickness); Execution Count:4 | 4 |
3915 | slider->rect.width(), thickness); executed: ret.setRect(slider->rect.x(), slider->rect.y() + tickOffset, slider->rect.width(), thickness); Execution Count:4 | 4 |
3916 | else | - |
3917 | ret.setRect(slider->rect.x() + tickOffset, slider->rect.y(), executed: ret.setRect(slider->rect.x() + tickOffset, slider->rect.y(), thickness, slider->rect.height()); Execution Count:5 | 5 |
3918 | thickness, slider->rect.height()); executed: ret.setRect(slider->rect.x() + tickOffset, slider->rect.y(), thickness, slider->rect.height()); Execution Count:5 | 5 |
3919 | break; executed: break; Execution Count:9 | 9 |
3920 | default: | - |
3921 | break; | 0 |
3922 | } | - |
3923 | ret = visualRect(slider->direction, slider->rect, ret); executed (the execution status of this line is deduced): ret = visualRect(slider->direction, slider->rect, ret); | - |
3924 | } executed: } Execution Count:21 | 21 |
3925 | break; executed: break; Execution Count:21 | 21 |
3926 | #endif // QT_NO_SLIDER | - |
3927 | #ifndef QT_NO_SCROLLBAR | - |
3928 | case CC_ScrollBar: | - |
3929 | if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { partially evaluated: const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:21217 | no Evaluation Count:0 |
| 0-21217 |
3930 | const QRect scrollBarRect = scrollbar->rect; executed (the execution status of this line is deduced): const QRect scrollBarRect = scrollbar->rect; | - |
3931 | int sbextent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollbar, widget); executed (the execution status of this line is deduced): int sbextent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollbar, widget); | - |
3932 | int maxlen = ((scrollbar->orientation == Qt::Horizontal) ? evaluated: (scrollbar->orientation == Qt::Horizontal) yes Evaluation Count:9519 | yes Evaluation Count:11698 |
| 9519-11698 |
3933 | scrollBarRect.width() : scrollBarRect.height()) - (sbextent * 2); executed (the execution status of this line is deduced): scrollBarRect.width() : scrollBarRect.height()) - (sbextent * 2); | - |
3934 | int sliderlen; executed (the execution status of this line is deduced): int sliderlen; | - |
3935 | | - |
3936 | // calculate slider length | - |
3937 | if (scrollbar->maximum != scrollbar->minimum) { evaluated: scrollbar->maximum != scrollbar->minimum yes Evaluation Count:19605 | yes Evaluation Count:1612 |
| 1612-19605 |
3938 | uint range = scrollbar->maximum - scrollbar->minimum; executed (the execution status of this line is deduced): uint range = scrollbar->maximum - scrollbar->minimum; | - |
3939 | sliderlen = (qint64(scrollbar->pageStep) * maxlen) / (range + scrollbar->pageStep); executed (the execution status of this line is deduced): sliderlen = (qint64(scrollbar->pageStep) * maxlen) / (range + scrollbar->pageStep); | - |
3940 | | - |
3941 | int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollbar, widget); executed (the execution status of this line is deduced): int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollbar, widget); | - |
3942 | if (sliderlen < slidermin || range > INT_MAX / 2) evaluated: sliderlen < slidermin yes Evaluation Count:4337 | yes Evaluation Count:15268 |
partially evaluated: range > 2147483647 / 2 no Evaluation Count:0 | yes Evaluation Count:15268 |
| 0-15268 |
3943 | sliderlen = slidermin; executed: sliderlen = slidermin; Execution Count:4337 | 4337 |
3944 | if (sliderlen > maxlen) evaluated: sliderlen > maxlen yes Evaluation Count:81 | yes Evaluation Count:19524 |
| 81-19524 |
3945 | sliderlen = maxlen; executed: sliderlen = maxlen; Execution Count:81 | 81 |
3946 | } else { executed: } Execution Count:19605 | 19605 |
3947 | sliderlen = maxlen; executed (the execution status of this line is deduced): sliderlen = maxlen; | - |
3948 | } executed: } Execution Count:1612 | 1612 |
3949 | | - |
3950 | int sliderstart = sbextent + sliderPositionFromValue(scrollbar->minimum, executed (the execution status of this line is deduced): int sliderstart = sbextent + sliderPositionFromValue(scrollbar->minimum, | - |
3951 | scrollbar->maximum, executed (the execution status of this line is deduced): scrollbar->maximum, | - |
3952 | scrollbar->sliderPosition, executed (the execution status of this line is deduced): scrollbar->sliderPosition, | - |
3953 | maxlen - sliderlen, executed (the execution status of this line is deduced): maxlen - sliderlen, | - |
3954 | scrollbar->upsideDown); executed (the execution status of this line is deduced): scrollbar->upsideDown); | - |
3955 | | - |
3956 | switch (sc) { | - |
3957 | case SC_ScrollBarSubLine: // top/left button | - |
3958 | if (scrollbar->orientation == Qt::Horizontal) { evaluated: scrollbar->orientation == Qt::Horizontal yes Evaluation Count:1380 | yes Evaluation Count:1712 |
| 1380-1712 |
3959 | int buttonWidth = qMin(scrollBarRect.width() / 2, sbextent); executed (the execution status of this line is deduced): int buttonWidth = qMin(scrollBarRect.width() / 2, sbextent); | - |
3960 | ret.setRect(0, 0, buttonWidth, scrollBarRect.height()); executed (the execution status of this line is deduced): ret.setRect(0, 0, buttonWidth, scrollBarRect.height()); | - |
3961 | } else { executed: } Execution Count:1380 | 1380 |
3962 | int buttonHeight = qMin(scrollBarRect.height() / 2, sbextent); executed (the execution status of this line is deduced): int buttonHeight = qMin(scrollBarRect.height() / 2, sbextent); | - |
3963 | ret.setRect(0, 0, scrollBarRect.width(), buttonHeight); executed (the execution status of this line is deduced): ret.setRect(0, 0, scrollBarRect.width(), buttonHeight); | - |
3964 | } executed: } Execution Count:1712 | 1712 |
3965 | break; executed: break; Execution Count:3092 | 3092 |
3966 | case SC_ScrollBarAddLine: // bottom/right button | - |
3967 | if (scrollbar->orientation == Qt::Horizontal) { evaluated: scrollbar->orientation == Qt::Horizontal yes Evaluation Count:1382 | yes Evaluation Count:1715 |
| 1382-1715 |
3968 | int buttonWidth = qMin(scrollBarRect.width()/2, sbextent); executed (the execution status of this line is deduced): int buttonWidth = qMin(scrollBarRect.width()/2, sbextent); | - |
3969 | ret.setRect(scrollBarRect.width() - buttonWidth, 0, buttonWidth, scrollBarRect.height()); executed (the execution status of this line is deduced): ret.setRect(scrollBarRect.width() - buttonWidth, 0, buttonWidth, scrollBarRect.height()); | - |
3970 | } else { executed: } Execution Count:1382 | 1382 |
3971 | int buttonHeight = qMin(scrollBarRect.height()/2, sbextent); executed (the execution status of this line is deduced): int buttonHeight = qMin(scrollBarRect.height()/2, sbextent); | - |
3972 | ret.setRect(0, scrollBarRect.height() - buttonHeight, scrollBarRect.width(), buttonHeight); executed (the execution status of this line is deduced): ret.setRect(0, scrollBarRect.height() - buttonHeight, scrollBarRect.width(), buttonHeight); | - |
3973 | } executed: } Execution Count:1715 | 1715 |
3974 | break; executed: break; Execution Count:3097 | 3097 |
3975 | case SC_ScrollBarSubPage: // between top/left button and slider | - |
3976 | if (scrollbar->orientation == Qt::Horizontal) evaluated: scrollbar->orientation == Qt::Horizontal yes Evaluation Count:1331 | yes Evaluation Count:1615 |
| 1331-1615 |
3977 | ret.setRect(sbextent, 0, sliderstart - sbextent, scrollBarRect.height()); executed: ret.setRect(sbextent, 0, sliderstart - sbextent, scrollBarRect.height()); Execution Count:1331 | 1331 |
3978 | else | - |
3979 | ret.setRect(0, sbextent, scrollBarRect.width(), sliderstart - sbextent); executed: ret.setRect(0, sbextent, scrollBarRect.width(), sliderstart - sbextent); Execution Count:1615 | 1615 |
3980 | break; executed: break; Execution Count:2946 | 2946 |
3981 | case SC_ScrollBarAddPage: // between bottom/right button and slider | - |
3982 | if (scrollbar->orientation == Qt::Horizontal) evaluated: scrollbar->orientation == Qt::Horizontal yes Evaluation Count:1331 | yes Evaluation Count:1618 |
| 1331-1618 |
3983 | ret.setRect(sliderstart + sliderlen, 0, executed: ret.setRect(sliderstart + sliderlen, 0, maxlen - sliderstart - sliderlen + sbextent, scrollBarRect.height()); Execution Count:1331 | 1331 |
3984 | maxlen - sliderstart - sliderlen + sbextent, scrollBarRect.height()); executed: ret.setRect(sliderstart + sliderlen, 0, maxlen - sliderstart - sliderlen + sbextent, scrollBarRect.height()); Execution Count:1331 | 1331 |
3985 | else | - |
3986 | ret.setRect(0, sliderstart + sliderlen, scrollBarRect.width(), executed: ret.setRect(0, sliderstart + sliderlen, scrollBarRect.width(), maxlen - sliderstart - sliderlen + sbextent); Execution Count:1618 | 1618 |
3987 | maxlen - sliderstart - sliderlen + sbextent); executed: ret.setRect(0, sliderstart + sliderlen, scrollBarRect.width(), maxlen - sliderstart - sliderlen + sbextent); Execution Count:1618 | 1618 |
3988 | break; executed: break; Execution Count:2949 | 2949 |
3989 | case SC_ScrollBarGroove: | - |
3990 | if (scrollbar->orientation == Qt::Horizontal) evaluated: scrollbar->orientation == Qt::Horizontal yes Evaluation Count:50 | yes Evaluation Count:100 |
| 50-100 |
3991 | ret.setRect(sbextent, 0, scrollBarRect.width() - sbextent * 2, executed: ret.setRect(sbextent, 0, scrollBarRect.width() - sbextent * 2, scrollBarRect.height()); Execution Count:50 | 50 |
3992 | scrollBarRect.height()); executed: ret.setRect(sbextent, 0, scrollBarRect.width() - sbextent * 2, scrollBarRect.height()); Execution Count:50 | 50 |
3993 | else | - |
3994 | ret.setRect(0, sbextent, scrollBarRect.width(), executed: ret.setRect(0, sbextent, scrollBarRect.width(), scrollBarRect.height() - sbextent * 2); Execution Count:100 | 100 |
3995 | scrollBarRect.height() - sbextent * 2); executed: ret.setRect(0, sbextent, scrollBarRect.width(), scrollBarRect.height() - sbextent * 2); Execution Count:100 | 100 |
3996 | break; executed: break; Execution Count:150 | 150 |
3997 | case SC_ScrollBarSlider: | - |
3998 | if (scrollbar->orientation == Qt::Horizontal) evaluated: scrollbar->orientation == Qt::Horizontal yes Evaluation Count:1382 | yes Evaluation Count:1716 |
| 1382-1716 |
3999 | ret.setRect(sliderstart, 0, sliderlen, scrollBarRect.height()); executed: ret.setRect(sliderstart, 0, sliderlen, scrollBarRect.height()); Execution Count:1382 | 1382 |
4000 | else | - |
4001 | ret.setRect(0, sliderstart, scrollBarRect.width(), sliderlen); executed: ret.setRect(0, sliderstart, scrollBarRect.width(), sliderlen); Execution Count:1716 | 1716 |
4002 | break; executed: break; Execution Count:3098 | 3098 |
4003 | default: | - |
4004 | break; executed: break; Execution Count:5885 | 5885 |
4005 | } | - |
4006 | ret = visualRect(scrollbar->direction, scrollBarRect, ret); executed (the execution status of this line is deduced): ret = visualRect(scrollbar->direction, scrollBarRect, ret); | - |
4007 | } executed: } Execution Count:21217 | 21217 |
4008 | break; executed: break; Execution Count:21217 | 21217 |
4009 | #endif // QT_NO_SCROLLBAR | - |
4010 | #ifndef QT_NO_SPINBOX | - |
4011 | case CC_SpinBox: | - |
4012 | if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) { partially evaluated: const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt) yes Evaluation Count:1502 | no Evaluation Count:0 |
| 0-1502 |
4013 | QSize bs; executed (the execution status of this line is deduced): QSize bs; | - |
4014 | int fw = spinbox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0; evaluated: spinbox->frame yes Evaluation Count:1420 | yes Evaluation Count:82 |
| 82-1420 |
4015 | bs.setHeight(qMax(8, spinbox->rect.height()/2 - fw)); executed (the execution status of this line is deduced): bs.setHeight(qMax(8, spinbox->rect.height()/2 - fw)); | - |
4016 | // 1.6 -approximate golden mean | - |
4017 | bs.setWidth(qMax(16, qMin(bs.height() * 8 / 5, spinbox->rect.width() / 4))); executed (the execution status of this line is deduced): bs.setWidth(qMax(16, qMin(bs.height() * 8 / 5, spinbox->rect.width() / 4))); | - |
4018 | bs = bs.expandedTo(QApplication::globalStrut()); executed (the execution status of this line is deduced): bs = bs.expandedTo(QApplication::globalStrut()); | - |
4019 | int y = fw + spinbox->rect.y(); executed (the execution status of this line is deduced): int y = fw + spinbox->rect.y(); | - |
4020 | int x, lx, rx; executed (the execution status of this line is deduced): int x, lx, rx; | - |
4021 | x = spinbox->rect.x() + spinbox->rect.width() - fw - bs.width(); executed (the execution status of this line is deduced): x = spinbox->rect.x() + spinbox->rect.width() - fw - bs.width(); | - |
4022 | lx = fw; executed (the execution status of this line is deduced): lx = fw; | - |
4023 | rx = x - fw; executed (the execution status of this line is deduced): rx = x - fw; | - |
4024 | switch (sc) { | - |
4025 | case SC_SpinBoxUp: | - |
4026 | if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) partially evaluated: spinbox->buttonSymbols == QAbstractSpinBox::NoButtons no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
4027 | return QRect(); never executed: return QRect(); | 0 |
4028 | ret = QRect(x, y, bs.width(), bs.height()); executed (the execution status of this line is deduced): ret = QRect(x, y, bs.width(), bs.height()); | - |
4029 | break; executed: break; Execution Count:205 | 205 |
4030 | case SC_SpinBoxDown: | - |
4031 | if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) partially evaluated: spinbox->buttonSymbols == QAbstractSpinBox::NoButtons no Evaluation Count:0 | yes Evaluation Count:203 |
| 0-203 |
4032 | return QRect(); never executed: return QRect(); | 0 |
4033 | | - |
4034 | ret = QRect(x, y + bs.height(), bs.width(), bs.height()); executed (the execution status of this line is deduced): ret = QRect(x, y + bs.height(), bs.width(), bs.height()); | - |
4035 | break; executed: break; Execution Count:203 | 203 |
4036 | case SC_SpinBoxEditField: | - |
4037 | if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) { evaluated: spinbox->buttonSymbols == QAbstractSpinBox::NoButtons yes Evaluation Count:1 | yes Evaluation Count:907 |
| 1-907 |
4038 | ret = QRect(lx, fw, spinbox->rect.width() - 2*fw, spinbox->rect.height() - 2*fw); executed (the execution status of this line is deduced): ret = QRect(lx, fw, spinbox->rect.width() - 2*fw, spinbox->rect.height() - 2*fw); | - |
4039 | } else { executed: } Execution Count:1 | 1 |
4040 | ret = QRect(lx, fw, rx, spinbox->rect.height() - 2*fw); executed (the execution status of this line is deduced): ret = QRect(lx, fw, rx, spinbox->rect.height() - 2*fw); | - |
4041 | } executed: } Execution Count:907 | 907 |
4042 | break; executed: break; Execution Count:908 | 908 |
4043 | case SC_SpinBoxFrame: | - |
4044 | ret = spinbox->rect; executed (the execution status of this line is deduced): ret = spinbox->rect; | - |
4045 | default: | - |
4046 | break; executed: break; Execution Count:186 | 186 |
4047 | } | - |
4048 | ret = visualRect(spinbox->direction, spinbox->rect, ret); executed (the execution status of this line is deduced): ret = visualRect(spinbox->direction, spinbox->rect, ret); | - |
4049 | } executed: } Execution Count:1502 | 1502 |
4050 | break; executed: break; Execution Count:1502 | 1502 |
4051 | #endif // Qt_NO_SPINBOX | - |
4052 | #ifndef QT_NO_TOOLBUTTON | - |
4053 | case CC_ToolButton: | - |
4054 | if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) { partially evaluated: const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(opt) yes Evaluation Count:902 | no Evaluation Count:0 |
| 0-902 |
4055 | int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, tb, widget); executed (the execution status of this line is deduced): int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, tb, widget); | - |
4056 | ret = tb->rect; executed (the execution status of this line is deduced): ret = tb->rect; | - |
4057 | switch (sc) { | - |
4058 | case SC_ToolButton: | - |
4059 | if ((tb->features evaluated: (tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) == QStyleOptionToolButton::MenuButtonPopup yes Evaluation Count:3 | yes Evaluation Count:448 |
| 3-448 |
4060 | & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) evaluated: (tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) == QStyleOptionToolButton::MenuButtonPopup yes Evaluation Count:3 | yes Evaluation Count:448 |
| 3-448 |
4061 | == QStyleOptionToolButton::MenuButtonPopup) evaluated: (tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) == QStyleOptionToolButton::MenuButtonPopup yes Evaluation Count:3 | yes Evaluation Count:448 |
| 3-448 |
4062 | ret.adjust(0, 0, -mbi, 0); executed: ret.adjust(0, 0, -mbi, 0); Execution Count:3 | 3 |
4063 | break; executed: break; Execution Count:451 | 451 |
4064 | case SC_ToolButtonMenu: | - |
4065 | if ((tb->features evaluated: (tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) == QStyleOptionToolButton::MenuButtonPopup yes Evaluation Count:3 | yes Evaluation Count:448 |
| 3-448 |
4066 | & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) evaluated: (tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) == QStyleOptionToolButton::MenuButtonPopup yes Evaluation Count:3 | yes Evaluation Count:448 |
| 3-448 |
4067 | == QStyleOptionToolButton::MenuButtonPopup) evaluated: (tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) == QStyleOptionToolButton::MenuButtonPopup yes Evaluation Count:3 | yes Evaluation Count:448 |
| 3-448 |
4068 | ret.adjust(ret.width() - mbi, 0, 0, 0); executed: ret.adjust(ret.width() - mbi, 0, 0, 0); Execution Count:3 | 3 |
4069 | break; executed: break; Execution Count:451 | 451 |
4070 | default: | - |
4071 | break; | 0 |
4072 | } | - |
4073 | ret = visualRect(tb->direction, tb->rect, ret); executed (the execution status of this line is deduced): ret = visualRect(tb->direction, tb->rect, ret); | - |
4074 | } executed: } Execution Count:902 | 902 |
4075 | break; executed: break; Execution Count:902 | 902 |
4076 | #endif // QT_NO_TOOLBUTTON | - |
4077 | #ifndef QT_NO_COMBOBOX | - |
4078 | case CC_ComboBox: | - |
4079 | if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { partially evaluated: const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt) yes Evaluation Count:1003 | no Evaluation Count:0 |
| 0-1003 |
4080 | int x = cb->rect.x(), executed (the execution status of this line is deduced): int x = cb->rect.x(), | - |
4081 | y = cb->rect.y(), executed (the execution status of this line is deduced): y = cb->rect.y(), | - |
4082 | wi = cb->rect.width(), executed (the execution status of this line is deduced): wi = cb->rect.width(), | - |
4083 | he = cb->rect.height(); executed (the execution status of this line is deduced): he = cb->rect.height(); | - |
4084 | int xpos = x; executed (the execution status of this line is deduced): int xpos = x; | - |
4085 | int margin = cb->frame ? 3 : 0; evaluated: cb->frame yes Evaluation Count:994 | yes Evaluation Count:9 |
| 9-994 |
4086 | int bmarg = cb->frame ? 2 : 0; evaluated: cb->frame yes Evaluation Count:994 | yes Evaluation Count:9 |
| 9-994 |
4087 | xpos += wi - bmarg - 16; executed (the execution status of this line is deduced): xpos += wi - bmarg - 16; | - |
4088 | | - |
4089 | | - |
4090 | switch (sc) { | - |
4091 | case SC_ComboBoxFrame: | - |
4092 | ret = cb->rect; never executed (the execution status of this line is deduced): ret = cb->rect; | - |
4093 | break; | 0 |
4094 | case SC_ComboBoxArrow: | - |
4095 | ret.setRect(xpos, y + bmarg, 16, he - 2*bmarg); executed (the execution status of this line is deduced): ret.setRect(xpos, y + bmarg, 16, he - 2*bmarg); | - |
4096 | break; executed: break; Execution Count:128 | 128 |
4097 | case SC_ComboBoxEditField: | - |
4098 | ret.setRect(x + margin, y + margin, wi - 2 * margin - 16, he - 2 * margin); executed (the execution status of this line is deduced): ret.setRect(x + margin, y + margin, wi - 2 * margin - 16, he - 2 * margin); | - |
4099 | break; executed: break; Execution Count:874 | 874 |
4100 | case SC_ComboBoxListBoxPopup: | - |
4101 | ret = cb->rect; executed (the execution status of this line is deduced): ret = cb->rect; | - |
4102 | break; executed: break; Execution Count:1 | 1 |
4103 | default: | - |
4104 | break; | 0 |
4105 | } | - |
4106 | ret = visualRect(cb->direction, cb->rect, ret); executed (the execution status of this line is deduced): ret = visualRect(cb->direction, cb->rect, ret); | - |
4107 | } executed: } Execution Count:1003 | 1003 |
4108 | break; executed: break; Execution Count:1003 | 1003 |
4109 | #endif // QT_NO_COMBOBOX | - |
4110 | case CC_TitleBar: | - |
4111 | if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) { partially evaluated: const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt) yes Evaluation Count:26342 | no Evaluation Count:0 |
| 0-26342 |
4112 | const int controlMargin = 2; executed (the execution status of this line is deduced): const int controlMargin = 2; | - |
4113 | const int controlHeight = tb->rect.height() - controlMargin *2; executed (the execution status of this line is deduced): const int controlHeight = tb->rect.height() - controlMargin *2; | - |
4114 | const int delta = controlHeight + controlMargin; executed (the execution status of this line is deduced): const int delta = controlHeight + controlMargin; | - |
4115 | int offset = 0; executed (the execution status of this line is deduced): int offset = 0; | - |
4116 | | - |
4117 | bool isMinimized = tb->titleBarState & Qt::WindowMinimized; executed (the execution status of this line is deduced): bool isMinimized = tb->titleBarState & Qt::WindowMinimized; | - |
4118 | bool isMaximized = tb->titleBarState & Qt::WindowMaximized; executed (the execution status of this line is deduced): bool isMaximized = tb->titleBarState & Qt::WindowMaximized; | - |
4119 | | - |
4120 | switch (sc) { | - |
4121 | case SC_TitleBarLabel: | - |
4122 | if (tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint)) { evaluated: tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint) yes Evaluation Count:2898 | yes Evaluation Count:4 |
| 4-2898 |
4123 | ret = tb->rect; executed (the execution status of this line is deduced): ret = tb->rect; | - |
4124 | if (tb->titleBarFlags & Qt::WindowSystemMenuHint) evaluated: tb->titleBarFlags & Qt::WindowSystemMenuHint yes Evaluation Count:2897 | yes Evaluation Count:1 |
| 1-2897 |
4125 | ret.adjust(delta, 0, -delta, 0); executed: ret.adjust(delta, 0, -delta, 0); Execution Count:2897 | 2897 |
4126 | if (tb->titleBarFlags & Qt::WindowMinimizeButtonHint) evaluated: tb->titleBarFlags & Qt::WindowMinimizeButtonHint yes Evaluation Count:2897 | yes Evaluation Count:1 |
| 1-2897 |
4127 | ret.adjust(0, 0, -delta, 0); executed: ret.adjust(0, 0, -delta, 0); Execution Count:2897 | 2897 |
4128 | if (tb->titleBarFlags & Qt::WindowMaximizeButtonHint) evaluated: tb->titleBarFlags & Qt::WindowMaximizeButtonHint yes Evaluation Count:2897 | yes Evaluation Count:1 |
| 1-2897 |
4129 | ret.adjust(0, 0, -delta, 0); executed: ret.adjust(0, 0, -delta, 0); Execution Count:2897 | 2897 |
4130 | if (tb->titleBarFlags & Qt::WindowShadeButtonHint) evaluated: tb->titleBarFlags & Qt::WindowShadeButtonHint yes Evaluation Count:3 | yes Evaluation Count:2895 |
| 3-2895 |
4131 | ret.adjust(0, 0, -delta, 0); executed: ret.adjust(0, 0, -delta, 0); Execution Count:3 | 3 |
4132 | if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint) partially evaluated: tb->titleBarFlags & Qt::WindowContextHelpButtonHint no Evaluation Count:0 | yes Evaluation Count:2898 |
| 0-2898 |
4133 | ret.adjust(0, 0, -delta, 0); never executed: ret.adjust(0, 0, -delta, 0); | 0 |
4134 | } executed: } Execution Count:2898 | 2898 |
4135 | break; executed: break; Execution Count:2902 | 2902 |
4136 | case SC_TitleBarContextHelpButton: | - |
4137 | if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint) partially evaluated: tb->titleBarFlags & Qt::WindowContextHelpButtonHint no Evaluation Count:0 | yes Evaluation Count:2833 |
| 0-2833 |
4138 | offset += delta; never executed: offset += delta; | 0 |
4139 | case SC_TitleBarMinButton: code before this statement executed: case SC_TitleBarMinButton: Execution Count:2833 | 2833 |
4140 | if (!isMinimized && (tb->titleBarFlags & Qt::WindowMinimizeButtonHint)) evaluated: !isMinimized yes Evaluation Count:5573 | yes Evaluation Count:264 |
evaluated: (tb->titleBarFlags & Qt::WindowMinimizeButtonHint) yes Evaluation Count:5483 | yes Evaluation Count:90 |
| 90-5573 |
4141 | offset += delta; executed: offset += delta; Execution Count:5483 | 5483 |
4142 | else if (sc == SC_TitleBarMinButton) evaluated: sc == SC_TitleBarMinButton yes Evaluation Count:177 | yes Evaluation Count:177 |
| 177 |
4143 | break; executed: break; Execution Count:177 | 177 |
4144 | case SC_TitleBarNormalButton: code before this statement executed: case SC_TitleBarNormalButton: Execution Count:5660 | 5660 |
4145 | if (isMinimized && (tb->titleBarFlags & Qt::WindowMinimizeButtonHint)) evaluated: isMinimized yes Evaluation Count:273 | yes Evaluation Count:8257 |
partially evaluated: (tb->titleBarFlags & Qt::WindowMinimizeButtonHint) yes Evaluation Count:273 | no Evaluation Count:0 |
| 0-8257 |
4146 | offset += delta; executed: offset += delta; Execution Count:273 | 273 |
4147 | else if (isMaximized && (tb->titleBarFlags & Qt::WindowMaximizeButtonHint)) evaluated: isMaximized yes Evaluation Count:1241 | yes Evaluation Count:7016 |
partially evaluated: (tb->titleBarFlags & Qt::WindowMaximizeButtonHint) yes Evaluation Count:1241 | no Evaluation Count:0 |
| 0-7016 |
4148 | offset += delta; executed: offset += delta; Execution Count:1241 | 1241 |
4149 | else if (sc == SC_TitleBarNormalButton) evaluated: sc == SC_TitleBarNormalButton yes Evaluation Count:2306 | yes Evaluation Count:4710 |
| 2306-4710 |
4150 | break; executed: break; Execution Count:2306 | 2306 |
4151 | case SC_TitleBarMaxButton: code before this statement executed: case SC_TitleBarMaxButton: Execution Count:6224 | 6224 |
4152 | if (!isMaximized && (tb->titleBarFlags & Qt::WindowMaximizeButtonHint)) evaluated: !isMaximized yes Evaluation Count:7573 | yes Evaluation Count:1636 |
evaluated: (tb->titleBarFlags & Qt::WindowMaximizeButtonHint) yes Evaluation Count:7483 | yes Evaluation Count:90 |
| 90-7573 |
4153 | offset += delta; executed: offset += delta; Execution Count:7483 | 7483 |
4154 | else if (sc == SC_TitleBarMaxButton) evaluated: sc == SC_TitleBarMaxButton yes Evaluation Count:440 | yes Evaluation Count:1286 |
| 440-1286 |
4155 | break; executed: break; Execution Count:440 | 440 |
4156 | case SC_TitleBarShadeButton: code before this statement executed: case SC_TitleBarShadeButton: Execution Count:8769 | 8769 |
4157 | if (!isMinimized && (tb->titleBarFlags & Qt::WindowShadeButtonHint)) evaluated: !isMinimized yes Evaluation Count:11056 | yes Evaluation Count:546 |
evaluated: (tb->titleBarFlags & Qt::WindowShadeButtonHint) yes Evaluation Count:48 | yes Evaluation Count:11008 |
| 48-11056 |
4158 | offset += delta; executed: offset += delta; Execution Count:48 | 48 |
4159 | else if (sc == SC_TitleBarShadeButton) evaluated: sc == SC_TitleBarShadeButton yes Evaluation Count:2821 | yes Evaluation Count:8733 |
| 2821-8733 |
4160 | break; executed: break; Execution Count:2821 | 2821 |
4161 | case SC_TitleBarUnshadeButton: code before this statement executed: case SC_TitleBarUnshadeButton: Execution Count:8781 | 8781 |
4162 | if (isMinimized && (tb->titleBarFlags & Qt::WindowShadeButtonHint)) evaluated: isMinimized yes Evaluation Count:546 | yes Evaluation Count:11068 |
evaluated: (tb->titleBarFlags & Qt::WindowShadeButtonHint) yes Evaluation Count:56 | yes Evaluation Count:490 |
| 56-11068 |
4163 | offset += delta; executed: offset += delta; Execution Count:56 | 56 |
4164 | else if (sc == SC_TitleBarUnshadeButton) evaluated: sc == SC_TitleBarUnshadeButton yes Evaluation Count:2819 | yes Evaluation Count:8739 |
| 2819-8739 |
4165 | break; executed: break; Execution Count:2819 | 2819 |
4166 | case SC_TitleBarCloseButton: code before this statement executed: case SC_TitleBarCloseButton: Execution Count:8795 | 8795 |
4167 | if (tb->titleBarFlags & Qt::WindowSystemMenuHint) partially evaluated: tb->titleBarFlags & Qt::WindowSystemMenuHint yes Evaluation Count:11836 | no Evaluation Count:0 |
| 0-11836 |
4168 | offset += delta; executed: offset += delta; Execution Count:11836 | 11836 |
4169 | else if (sc == SC_TitleBarCloseButton) never evaluated: sc == SC_TitleBarCloseButton | 0 |
4170 | break; | 0 |
4171 | ret.setRect(tb->rect.right() - offset, tb->rect.top() + controlMargin, executed (the execution status of this line is deduced): ret.setRect(tb->rect.right() - offset, tb->rect.top() + controlMargin, | - |
4172 | controlHeight, controlHeight); executed (the execution status of this line is deduced): controlHeight, controlHeight); | - |
4173 | break; executed: break; Execution Count:11836 | 11836 |
4174 | case SC_TitleBarSysMenu: | - |
4175 | if (tb->titleBarFlags & Qt::WindowSystemMenuHint) { partially evaluated: tb->titleBarFlags & Qt::WindowSystemMenuHint yes Evaluation Count:3041 | no Evaluation Count:0 |
| 0-3041 |
4176 | ret.setRect(tb->rect.left() + controlMargin, tb->rect.top() + controlMargin, executed (the execution status of this line is deduced): ret.setRect(tb->rect.left() + controlMargin, tb->rect.top() + controlMargin, | - |
4177 | controlHeight, controlHeight); executed (the execution status of this line is deduced): controlHeight, controlHeight); | - |
4178 | } executed: } Execution Count:3041 | 3041 |
4179 | break; executed: break; Execution Count:3041 | 3041 |
4180 | default: | - |
4181 | break; | 0 |
4182 | } | - |
4183 | ret = visualRect(tb->direction, tb->rect, ret); executed (the execution status of this line is deduced): ret = visualRect(tb->direction, tb->rect, ret); | - |
4184 | } executed: } Execution Count:26342 | 26342 |
4185 | break; executed: break; Execution Count:26342 | 26342 |
4186 | #ifndef QT_NO_GROUPBOX | - |
4187 | case CC_GroupBox: { | - |
4188 | if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) { partially evaluated: const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt) yes Evaluation Count:322 | no Evaluation Count:0 |
| 0-322 |
4189 | switch (sc) { | - |
4190 | case SC_GroupBoxFrame: | - |
4191 | // FALL THROUGH | - |
4192 | case SC_GroupBoxContents: { | - |
4193 | int topMargin = 0; executed (the execution status of this line is deduced): int topMargin = 0; | - |
4194 | int topHeight = 0; executed (the execution status of this line is deduced): int topHeight = 0; | - |
4195 | int verticalAlignment = proxy()->styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget); executed (the execution status of this line is deduced): int verticalAlignment = proxy()->styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget); | - |
4196 | if (groupBox->text.size() || (groupBox->subControls & QStyle::SC_GroupBoxCheckBox)) { evaluated: groupBox->text.size() yes Evaluation Count:122 | yes Evaluation Count:81 |
evaluated: (groupBox->subControls & QStyle::SC_GroupBoxCheckBox) yes Evaluation Count:13 | yes Evaluation Count:68 |
| 13-122 |
4197 | topHeight = groupBox->fontMetrics.height(); never executed (the execution status of this line is deduced): topHeight = groupBox->fontMetrics.height(); | - |
4198 | if (verticalAlignment & Qt::AlignVCenter) partially evaluated: verticalAlignment & Qt::AlignVCenter yes Evaluation Count:135 | no Evaluation Count:0 |
| 0-135 |
4199 | topMargin = topHeight / 2; executed: topMargin = topHeight / 2; Execution Count:135 | 135 |
4200 | else if (verticalAlignment & Qt::AlignTop) never evaluated: verticalAlignment & Qt::AlignTop | 0 |
4201 | topMargin = topHeight; never executed: topMargin = topHeight; | 0 |
4202 | } | - |
4203 | | - |
4204 | QRect frameRect = groupBox->rect; executed (the execution status of this line is deduced): QRect frameRect = groupBox->rect; | - |
4205 | frameRect.setTop(topMargin); executed (the execution status of this line is deduced): frameRect.setTop(topMargin); | - |
4206 | | - |
4207 | if (sc == SC_GroupBoxFrame) { evaluated: sc == SC_GroupBoxFrame yes Evaluation Count:36 | yes Evaluation Count:167 |
| 36-167 |
4208 | ret = frameRect; executed (the execution status of this line is deduced): ret = frameRect; | - |
4209 | break; executed: break; Execution Count:36 | 36 |
4210 | } | - |
4211 | | - |
4212 | int frameWidth = 0; executed (the execution status of this line is deduced): int frameWidth = 0; | - |
4213 | if ((groupBox->features & QStyleOptionFrameV2::Flat) == 0) partially evaluated: (groupBox->features & QStyleOptionFrameV2::Flat) == 0 yes Evaluation Count:167 | no Evaluation Count:0 |
| 0-167 |
4214 | frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget); executed: frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget); Execution Count:167 | 167 |
4215 | ret = frameRect.adjusted(frameWidth, frameWidth + topHeight - topMargin, executed (the execution status of this line is deduced): ret = frameRect.adjusted(frameWidth, frameWidth + topHeight - topMargin, | - |
4216 | -frameWidth, -frameWidth); executed (the execution status of this line is deduced): -frameWidth, -frameWidth); | - |
4217 | break; executed: break; Execution Count:167 | 167 |
4218 | } | - |
4219 | case SC_GroupBoxCheckBox: | - |
4220 | // FALL THROUGH | - |
4221 | case SC_GroupBoxLabel: { | - |
4222 | QFontMetrics fontMetrics = groupBox->fontMetrics; executed (the execution status of this line is deduced): QFontMetrics fontMetrics = groupBox->fontMetrics; | - |
4223 | int h = fontMetrics.height(); executed (the execution status of this line is deduced): int h = fontMetrics.height(); | - |
4224 | int tw = fontMetrics.size(Qt::TextShowMnemonic, groupBox->text + QLatin1Char(' ')).width(); executed (the execution status of this line is deduced): int tw = fontMetrics.size(Qt::TextShowMnemonic, groupBox->text + QLatin1Char(' ')).width(); | - |
4225 | int marg = (groupBox->features & QStyleOptionFrameV2::Flat) ? 0 : 8; partially evaluated: (groupBox->features & QStyleOptionFrameV2::Flat) no Evaluation Count:0 | yes Evaluation Count:116 |
| 0-116 |
4226 | ret = groupBox->rect.adjusted(marg, 0, -marg, 0); executed (the execution status of this line is deduced): ret = groupBox->rect.adjusted(marg, 0, -marg, 0); | - |
4227 | ret.setHeight(h); executed (the execution status of this line is deduced): ret.setHeight(h); | - |
4228 | | - |
4229 | int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, opt, widget); executed (the execution status of this line is deduced): int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, opt, widget); | - |
4230 | int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget) - 1; executed (the execution status of this line is deduced): int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget) - 1; | - |
4231 | bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox; executed (the execution status of this line is deduced): bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox; | - |
4232 | int checkBoxSize = hasCheckBox ? (indicatorWidth + indicatorSpace) : 0; evaluated: hasCheckBox yes Evaluation Count:58 | yes Evaluation Count:58 |
| 58 |
4233 | | - |
4234 | // Adjusted rect for label + indicatorWidth + indicatorSpace | - |
4235 | QRect totalRect = alignedRect(groupBox->direction, groupBox->textAlignment, executed (the execution status of this line is deduced): QRect totalRect = alignedRect(groupBox->direction, groupBox->textAlignment, | - |
4236 | QSize(tw + checkBoxSize, h), ret); executed (the execution status of this line is deduced): QSize(tw + checkBoxSize, h), ret); | - |
4237 | | - |
4238 | // Adjust totalRect if checkbox is set | - |
4239 | if (hasCheckBox) { evaluated: hasCheckBox yes Evaluation Count:58 | yes Evaluation Count:58 |
| 58 |
4240 | bool ltr = groupBox->direction == Qt::LeftToRight; executed (the execution status of this line is deduced): bool ltr = groupBox->direction == Qt::LeftToRight; | - |
4241 | int left = 0; executed (the execution status of this line is deduced): int left = 0; | - |
4242 | // Adjust for check box | - |
4243 | if (sc == SC_GroupBoxCheckBox) { evaluated: sc == SC_GroupBoxCheckBox yes Evaluation Count:37 | yes Evaluation Count:21 |
| 21-37 |
4244 | int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget); executed (the execution status of this line is deduced): int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget); | - |
4245 | left = ltr ? totalRect.left() : (totalRect.right() - indicatorWidth); partially evaluated: ltr yes Evaluation Count:37 | no Evaluation Count:0 |
| 0-37 |
4246 | int top = totalRect.top() + (fontMetrics.height() - indicatorHeight) / 2; executed (the execution status of this line is deduced): int top = totalRect.top() + (fontMetrics.height() - indicatorHeight) / 2; | - |
4247 | totalRect.setRect(left, top, indicatorWidth, indicatorHeight); executed (the execution status of this line is deduced): totalRect.setRect(left, top, indicatorWidth, indicatorHeight); | - |
4248 | // Adjust for label | - |
4249 | } else { executed: } Execution Count:37 | 37 |
4250 | left = ltr ? (totalRect.left() + checkBoxSize - 2) : totalRect.left(); partially evaluated: ltr yes Evaluation Count:21 | no Evaluation Count:0 |
| 0-21 |
4251 | totalRect.setRect(left, totalRect.top(), executed (the execution status of this line is deduced): totalRect.setRect(left, totalRect.top(), | - |
4252 | totalRect.width() - checkBoxSize, totalRect.height()); executed (the execution status of this line is deduced): totalRect.width() - checkBoxSize, totalRect.height()); | - |
4253 | } executed: } Execution Count:21 | 21 |
4254 | } | - |
4255 | ret = totalRect; executed (the execution status of this line is deduced): ret = totalRect; | - |
4256 | break; executed: break; Execution Count:116 | 116 |
4257 | } | - |
4258 | default: | - |
4259 | break; executed: break; Execution Count:3 | 3 |
4260 | } | - |
4261 | } executed: } Execution Count:322 | 322 |
4262 | break; executed: break; Execution Count:322 | 322 |
4263 | } | - |
4264 | #endif // QT_NO_GROUPBOX | - |
4265 | #ifndef QT_NO_MDIAREA | - |
4266 | case CC_MdiControls: | - |
4267 | { | - |
4268 | int numSubControls = 0; executed (the execution status of this line is deduced): int numSubControls = 0; | - |
4269 | if (opt->subControls & SC_MdiCloseButton) partially evaluated: opt->subControls & SC_MdiCloseButton yes Evaluation Count:72 | no Evaluation Count:0 |
| 0-72 |
4270 | ++numSubControls; executed: ++numSubControls; Execution Count:72 | 72 |
4271 | if (opt->subControls & SC_MdiMinButton) partially evaluated: opt->subControls & SC_MdiMinButton yes Evaluation Count:72 | no Evaluation Count:0 |
| 0-72 |
4272 | ++numSubControls; executed: ++numSubControls; Execution Count:72 | 72 |
4273 | if (opt->subControls & SC_MdiNormalButton) partially evaluated: opt->subControls & SC_MdiNormalButton yes Evaluation Count:72 | no Evaluation Count:0 |
| 0-72 |
4274 | ++numSubControls; executed: ++numSubControls; Execution Count:72 | 72 |
4275 | if (numSubControls == 0) partially evaluated: numSubControls == 0 no Evaluation Count:0 | yes Evaluation Count:72 |
| 0-72 |
4276 | break; | 0 |
4277 | | - |
4278 | int buttonWidth = opt->rect.width() / numSubControls - 1; executed (the execution status of this line is deduced): int buttonWidth = opt->rect.width() / numSubControls - 1; | - |
4279 | int offset = 0; executed (the execution status of this line is deduced): int offset = 0; | - |
4280 | switch (sc) { | - |
4281 | case SC_MdiCloseButton: | - |
4282 | // Only one sub control, no offset needed. | - |
4283 | if (numSubControls == 1) partially evaluated: numSubControls == 1 no Evaluation Count:0 | yes Evaluation Count:24 |
| 0-24 |
4284 | break; | 0 |
4285 | offset += buttonWidth + 2; executed (the execution status of this line is deduced): offset += buttonWidth + 2; | - |
4286 | //FALL THROUGH | - |
4287 | case SC_MdiNormalButton: code before this statement executed: case SC_MdiNormalButton: Execution Count:24 | 24 |
4288 | // No offset needed if | - |
4289 | // 1) There's only one sub control | - |
4290 | // 2) We have a close button and a normal button (offset already added in SC_MdiClose) | - |
4291 | if (numSubControls == 1 || (numSubControls == 2 && !(opt->subControls & SC_MdiMinButton))) partially evaluated: numSubControls == 1 no Evaluation Count:0 | yes Evaluation Count:48 |
partially evaluated: numSubControls == 2 no Evaluation Count:0 | yes Evaluation Count:48 |
never evaluated: !(opt->subControls & SC_MdiMinButton) | 0-48 |
4292 | break; | 0 |
4293 | if (opt->subControls & SC_MdiNormalButton) partially evaluated: opt->subControls & SC_MdiNormalButton yes Evaluation Count:48 | no Evaluation Count:0 |
| 0-48 |
4294 | offset += buttonWidth; executed: offset += buttonWidth; Execution Count:48 | 48 |
4295 | break; executed: break; Execution Count:48 | 48 |
4296 | default: | - |
4297 | break; executed: break; Execution Count:24 | 24 |
4298 | } | - |
4299 | | - |
4300 | // Subtract one pixel if we only have one sub control. At this point | - |
4301 | // buttonWidth is the actual width + 1 pixel margin, but we don't want the | - |
4302 | // margin when there are no other controllers. | - |
4303 | if (numSubControls == 1) partially evaluated: numSubControls == 1 no Evaluation Count:0 | yes Evaluation Count:72 |
| 0-72 |
4304 | --buttonWidth; never executed: --buttonWidth; | 0 |
4305 | ret = QRect(offset, 0, buttonWidth, opt->rect.height()); executed (the execution status of this line is deduced): ret = QRect(offset, 0, buttonWidth, opt->rect.height()); | - |
4306 | break; executed: break; Execution Count:72 | 72 |
4307 | } | - |
4308 | #endif // QT_NO_MDIAREA | - |
4309 | default: | - |
4310 | qWarning("QCommonStyle::subControlRect: Case %d not handled", cc); never executed (the execution status of this line is deduced): QMessageLogger("styles/qcommonstyle.cpp", 4310, __PRETTY_FUNCTION__).warning("QCommonStyle::subControlRect: Case %d not handled", cc); | - |
4311 | } | 0 |
4312 | return ret; executed: return ret; Execution Count:51381 | 51381 |
4313 | } | - |
4314 | | - |
4315 | /*! \reimp */ | - |
4316 | int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWidget *widget) const | - |
4317 | { | - |
4318 | int ret; executed (the execution status of this line is deduced): int ret; | - |
4319 | | - |
4320 | switch (m) { | - |
4321 | case PM_FocusFrameVMargin: | - |
4322 | case PM_FocusFrameHMargin: | - |
4323 | ret = 2; executed (the execution status of this line is deduced): ret = 2; | - |
4324 | break; executed: break; Execution Count:317210 | 317210 |
4325 | case PM_MenuBarVMargin: | - |
4326 | case PM_MenuBarHMargin: | - |
4327 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
4328 | break; | 0 |
4329 | case PM_DialogButtonsSeparator: | - |
4330 | ret = int(QStyleHelper::dpiScaled(5.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(5.)); | - |
4331 | break; executed: break; Execution Count:6 | 6 |
4332 | case PM_DialogButtonsButtonWidth: | - |
4333 | ret = int(QStyleHelper::dpiScaled(70.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(70.)); | - |
4334 | break; executed: break; Execution Count:8 | 8 |
4335 | case PM_DialogButtonsButtonHeight: | - |
4336 | ret = int(QStyleHelper::dpiScaled(30.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(30.)); | - |
4337 | break; executed: break; Execution Count:8 | 8 |
4338 | case PM_TitleBarHeight: { | - |
4339 | if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) { evaluated: const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt) yes Evaluation Count:14194 | yes Evaluation Count:62 |
| 62-14194 |
4340 | if ((tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool) { evaluated: (tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool yes Evaluation Count:1 | yes Evaluation Count:14193 |
| 1-14193 |
4341 | ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 16); executed (the execution status of this line is deduced): ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 16); | - |
4342 | #ifndef QT_NO_DOCKWIDGET | - |
4343 | } else if (qobject_cast<const QDockWidget*>(widget)) { executed: } Execution Count:1 partially evaluated: qobject_cast<const QDockWidget*>(widget) no Evaluation Count:0 | yes Evaluation Count:14193 |
| 0-14193 |
4344 | ret = qMax(widget->fontMetrics().height(), int(QStyleHelper::dpiScaled(13))); never executed (the execution status of this line is deduced): ret = qMax(widget->fontMetrics().height(), int(QStyleHelper::dpiScaled(13))); | - |
4345 | #endif | - |
4346 | } else { | 0 |
4347 | ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 18); executed (the execution status of this line is deduced): ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 18); | - |
4348 | } executed: } Execution Count:14193 | 14193 |
4349 | } else { | - |
4350 | ret = int(QStyleHelper::dpiScaled(18.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(18.)); | - |
4351 | } executed: } Execution Count:62 | 62 |
4352 | | - |
4353 | break; } executed: break; Execution Count:14256 | 14256 |
4354 | case PM_ScrollBarSliderMin: | - |
4355 | ret = int(QStyleHelper::dpiScaled(9.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(9.)); | - |
4356 | break; executed: break; Execution Count:113119 | 113119 |
4357 | | - |
4358 | case PM_ButtonMargin: | - |
4359 | ret = int(QStyleHelper::dpiScaled(6.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(6.)); | - |
4360 | break; executed: break; Execution Count:1133 | 1133 |
4361 | | - |
4362 | case PM_DockWidgetTitleBarButtonMargin: | - |
4363 | ret = int(QStyleHelper::dpiScaled(2.)); never executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(2.)); | - |
4364 | break; | 0 |
4365 | | - |
4366 | case PM_ButtonDefaultIndicator: | - |
4367 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
4368 | break; | 0 |
4369 | | - |
4370 | case PM_MenuButtonIndicator: | - |
4371 | ret = int(QStyleHelper::dpiScaled(12.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(12.)); | - |
4372 | break; executed: break; Execution Count:980 | 980 |
4373 | | - |
4374 | case PM_ButtonShiftHorizontal: | - |
4375 | case PM_ButtonShiftVertical: | - |
4376 | | - |
4377 | case PM_DefaultFrameWidth: | - |
4378 | ret = 2; executed (the execution status of this line is deduced): ret = 2; | - |
4379 | break; executed: break; Execution Count:24832 | 24832 |
4380 | | - |
4381 | case PM_ComboBoxFrameWidth: | - |
4382 | case PM_SpinBoxFrameWidth: | - |
4383 | case PM_MenuPanelWidth: | - |
4384 | case PM_TabBarBaseOverlap: | - |
4385 | case PM_TabBarBaseHeight: | - |
4386 | ret = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); executed (the execution status of this line is deduced): ret = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); | - |
4387 | break; executed: break; Execution Count:3690 | 3690 |
4388 | | - |
4389 | case PM_MdiSubWindowFrameWidth: | - |
4390 | ret = int(QStyleHelper::dpiScaled(4.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(4.)); | - |
4391 | break; executed: break; Execution Count:11772 | 11772 |
4392 | | - |
4393 | case PM_MdiSubWindowMinimizedWidth: | - |
4394 | ret = int(QStyleHelper::dpiScaled(196.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(196.)); | - |
4395 | break; executed: break; Execution Count:89 | 89 |
4396 | | - |
4397 | #ifndef QT_NO_SCROLLBAR | - |
4398 | case PM_ScrollBarExtent: | - |
4399 | if (const QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { evaluated: const QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:114149 | yes Evaluation Count:6502 |
| 6502-114149 |
4400 | int s = sb->orientation == Qt::Horizontal ? evaluated: sb->orientation == Qt::Horizontal yes Evaluation Count:55711 | yes Evaluation Count:58438 |
| 55711-58438 |
4401 | QApplication::globalStrut().height() executed (the execution status of this line is deduced): QApplication::globalStrut().height() | - |
4402 | : QApplication::globalStrut().width(); executed (the execution status of this line is deduced): : QApplication::globalStrut().width(); | - |
4403 | ret = qMax(16, s); executed (the execution status of this line is deduced): ret = qMax(16, s); | - |
4404 | } else { executed: } Execution Count:114149 | 114149 |
4405 | ret = int(QStyleHelper::dpiScaled(16.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(16.)); | - |
4406 | } executed: } Execution Count:6502 | 6502 |
4407 | break; executed: break; Execution Count:120651 | 120651 |
4408 | #endif | - |
4409 | case PM_MaximumDragDistance: | - |
4410 | ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::MaximumScrollBarDragDistance).toInt(); executed (the execution status of this line is deduced): ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::MaximumScrollBarDragDistance).toInt(); | - |
4411 | break; executed: break; Execution Count:6 | 6 |
4412 | | - |
4413 | #ifndef QT_NO_SLIDER | - |
4414 | case PM_SliderThickness: | - |
4415 | ret = int(QStyleHelper::dpiScaled(16.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(16.)); | - |
4416 | break; executed: break; Execution Count:13 | 13 |
4417 | | - |
4418 | case PM_SliderTickmarkOffset: | - |
4419 | if (const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { evaluated: const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:27 | yes Evaluation Count:8 |
| 8-27 |
4420 | int space = (sl->orientation == Qt::Horizontal) ? sl->rect.height() evaluated: (sl->orientation == Qt::Horizontal) yes Evaluation Count:14 | yes Evaluation Count:13 |
| 13-14 |
4421 | : sl->rect.width(); executed (the execution status of this line is deduced): : sl->rect.width(); | - |
4422 | int thickness = proxy()->pixelMetric(PM_SliderControlThickness, sl, widget); executed (the execution status of this line is deduced): int thickness = proxy()->pixelMetric(PM_SliderControlThickness, sl, widget); | - |
4423 | int ticks = sl->tickPosition; executed (the execution status of this line is deduced): int ticks = sl->tickPosition; | - |
4424 | | - |
4425 | if (ticks == QSlider::TicksBothSides) partially evaluated: ticks == QSlider::TicksBothSides no Evaluation Count:0 | yes Evaluation Count:27 |
| 0-27 |
4426 | ret = (space - thickness) / 2; never executed: ret = (space - thickness) / 2; | 0 |
4427 | else if (ticks == QSlider::TicksAbove) partially evaluated: ticks == QSlider::TicksAbove no Evaluation Count:0 | yes Evaluation Count:27 |
| 0-27 |
4428 | ret = space - thickness; never executed: ret = space - thickness; | 0 |
4429 | else | - |
4430 | ret = 0; executed: ret = 0; Execution Count:27 | 27 |
4431 | } else { | - |
4432 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4433 | } executed: } Execution Count:8 | 8 |
4434 | break; executed: break; Execution Count:35 | 35 |
4435 | | - |
4436 | case PM_SliderSpaceAvailable: | - |
4437 | if (const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)) { evaluated: const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt) yes Evaluation Count:4 | yes Evaluation Count:8 |
| 4-8 |
4438 | if (sl->orientation == Qt::Horizontal) partially evaluated: sl->orientation == Qt::Horizontal yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-4 |
4439 | ret = sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, sl, widget); executed: ret = sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, sl, widget); Execution Count:4 | 4 |
4440 | else | - |
4441 | ret = sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, sl, widget); never executed: ret = sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, sl, widget); | 0 |
4442 | } else { | - |
4443 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4444 | } executed: } Execution Count:8 | 8 |
4445 | break; executed: break; Execution Count:12 | 12 |
4446 | #endif // QT_NO_SLIDER | - |
4447 | #ifndef QT_NO_DOCKWIDGET | - |
4448 | case PM_DockWidgetSeparatorExtent: | - |
4449 | ret = int(QStyleHelper::dpiScaled(6.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(6.)); | - |
4450 | break; executed: break; Execution Count:2 | 2 |
4451 | | - |
4452 | case PM_DockWidgetHandleExtent: | - |
4453 | ret = int(QStyleHelper::dpiScaled(8.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(8.)); | - |
4454 | break; executed: break; Execution Count:6 | 6 |
4455 | case PM_DockWidgetTitleMargin: | - |
4456 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
4457 | break; | 0 |
4458 | case PM_DockWidgetFrameWidth: | - |
4459 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4460 | break; executed: break; Execution Count:2 | 2 |
4461 | #endif // QT_NO_DOCKWIDGET | - |
4462 | | - |
4463 | case PM_SpinBoxSliderHeight: | - |
4464 | case PM_MenuBarPanelWidth: | - |
4465 | ret = 2; executed (the execution status of this line is deduced): ret = 2; | - |
4466 | break; executed: break; Execution Count:8 | 8 |
4467 | | - |
4468 | case PM_MenuBarItemSpacing: | - |
4469 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4470 | break; executed: break; Execution Count:362 | 362 |
4471 | | - |
4472 | #ifndef QT_NO_TOOLBAR | - |
4473 | case PM_ToolBarFrameWidth: | - |
4474 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4475 | break; executed: break; Execution Count:180 | 180 |
4476 | | - |
4477 | case PM_ToolBarItemMargin: | - |
4478 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
4479 | break; | 0 |
4480 | | - |
4481 | case PM_ToolBarItemSpacing: | - |
4482 | ret = int(QStyleHelper::dpiScaled(4.)); never executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(4.)); | - |
4483 | break; | 0 |
4484 | | - |
4485 | case PM_ToolBarHandleExtent: | - |
4486 | ret = int(QStyleHelper::dpiScaled(8.)); never executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(8.)); | - |
4487 | break; | 0 |
4488 | | - |
4489 | case PM_ToolBarSeparatorExtent: | - |
4490 | ret = int(QStyleHelper::dpiScaled(6.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(6.)); | - |
4491 | break; executed: break; Execution Count:8 | 8 |
4492 | | - |
4493 | case PM_ToolBarExtensionExtent: | - |
4494 | ret = int(QStyleHelper::dpiScaled(12.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(12.)); | - |
4495 | break; executed: break; Execution Count:265 | 265 |
4496 | #endif // QT_NO_TOOLBAR | - |
4497 | | - |
4498 | #ifndef QT_NO_TABBAR | - |
4499 | case PM_TabBarTabOverlap: | - |
4500 | ret = 3; executed (the execution status of this line is deduced): ret = 3; | - |
4501 | break; executed: break; Execution Count:6 | 6 |
4502 | | - |
4503 | case PM_TabBarTabHSpace: | - |
4504 | ret = int(QStyleHelper::dpiScaled(24.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(24.)); | - |
4505 | break; executed: break; Execution Count:1398 | 1398 |
4506 | | - |
4507 | case PM_TabBarTabShiftHorizontal: | - |
4508 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4509 | break; executed: break; Execution Count:62 | 62 |
4510 | | - |
4511 | case PM_TabBarTabShiftVertical: | - |
4512 | ret = 2; executed (the execution status of this line is deduced): ret = 2; | - |
4513 | break; executed: break; Execution Count:62 | 62 |
4514 | | - |
4515 | case PM_TabBarTabVSpace: { | - |
4516 | const QStyleOptionTab *tb = qstyleoption_cast<const QStyleOptionTab *>(opt); executed (the execution status of this line is deduced): const QStyleOptionTab *tb = qstyleoption_cast<const QStyleOptionTab *>(opt); | - |
4517 | if (tb && (tb->shape == QTabBar::RoundedNorth || tb->shape == QTabBar::RoundedSouth evaluated: tb yes Evaluation Count:1292 | yes Evaluation Count:6 |
evaluated: tb->shape == QTabBar::RoundedNorth yes Evaluation Count:1154 | yes Evaluation Count:138 |
evaluated: tb->shape == QTabBar::RoundedSouth yes Evaluation Count:82 | yes Evaluation Count:56 |
| 6-1292 |
4518 | || tb->shape == QTabBar::RoundedWest || tb->shape == QTabBar::RoundedEast)) evaluated: tb->shape == QTabBar::RoundedWest yes Evaluation Count:16 | yes Evaluation Count:40 |
evaluated: tb->shape == QTabBar::RoundedEast yes Evaluation Count:16 | yes Evaluation Count:24 |
| 16-40 |
4519 | ret = 8; executed: ret = 8; Execution Count:1268 | 1268 |
4520 | else | - |
4521 | if(tb && (tb->shape == QTabBar::TriangularWest || tb->shape == QTabBar::TriangularEast)) evaluated: tb yes Evaluation Count:24 | yes Evaluation Count:6 |
partially evaluated: tb->shape == QTabBar::TriangularWest no Evaluation Count:0 | yes Evaluation Count:24 |
partially evaluated: tb->shape == QTabBar::TriangularEast no Evaluation Count:0 | yes Evaluation Count:24 |
| 0-24 |
4522 | ret = 3; | 0 |
4523 | else | - |
4524 | ret = 2; executed: ret = 2; Execution Count:30 | 30 |
4525 | break; } executed: break; Execution Count:1298 | 1298 |
4526 | #endif | - |
4527 | | - |
4528 | case PM_ProgressBarChunkWidth: | - |
4529 | ret = 9; executed (the execution status of this line is deduced): ret = 9; | - |
4530 | break; executed: break; Execution Count:400 | 400 |
4531 | | - |
4532 | case PM_IndicatorWidth: | - |
4533 | ret = int(QStyleHelper::dpiScaled(13.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(13.)); | - |
4534 | break; executed: break; Execution Count:272 | 272 |
4535 | | - |
4536 | case PM_IndicatorHeight: | - |
4537 | ret = int(QStyleHelper::dpiScaled(13.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(13.)); | - |
4538 | break; executed: break; Execution Count:194 | 194 |
4539 | | - |
4540 | case PM_ExclusiveIndicatorWidth: | - |
4541 | ret = int(QStyleHelper::dpiScaled(12.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(12.)); | - |
4542 | break; executed: break; Execution Count:150 | 150 |
4543 | | - |
4544 | case PM_ExclusiveIndicatorHeight: | - |
4545 | ret = int(QStyleHelper::dpiScaled(12.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(12.)); | - |
4546 | break; executed: break; Execution Count:98 | 98 |
4547 | | - |
4548 | case PM_MenuTearoffHeight: | - |
4549 | ret = int(QStyleHelper::dpiScaled(10.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(10.)); | - |
4550 | break; executed: break; Execution Count:14 | 14 |
4551 | | - |
4552 | case PM_MenuScrollerHeight: | - |
4553 | ret = int(QStyleHelper::dpiScaled(10.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(10.)); | - |
4554 | break; executed: break; Execution Count:8 | 8 |
4555 | | - |
4556 | case PM_MenuDesktopFrameWidth: | - |
4557 | case PM_MenuHMargin: | - |
4558 | case PM_MenuVMargin: | - |
4559 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4560 | break; executed: break; Execution Count:333 | 333 |
4561 | | - |
4562 | case PM_HeaderMargin: | - |
4563 | ret = int(QStyleHelper::dpiScaled(4.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(4.)); | - |
4564 | break; executed: break; Execution Count:33280 | 33280 |
4565 | case PM_HeaderMarkSize: | - |
4566 | ret = int(QStyleHelper::dpiScaled(32.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(32.)); | - |
4567 | break; executed: break; Execution Count:8 | 8 |
4568 | case PM_HeaderGripMargin: | - |
4569 | ret = int(QStyleHelper::dpiScaled(4.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(4.)); | - |
4570 | break; executed: break; Execution Count:342 | 342 |
4571 | case PM_TabBarScrollButtonWidth: | - |
4572 | ret = int(QStyleHelper::dpiScaled(16.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(16.)); | - |
4573 | break; executed: break; Execution Count:74 | 74 |
4574 | case PM_LayoutLeftMargin: | - |
4575 | case PM_LayoutTopMargin: | - |
4576 | case PM_LayoutRightMargin: | - |
4577 | case PM_LayoutBottomMargin: | - |
4578 | { | - |
4579 | bool isWindow = false; executed (the execution status of this line is deduced): bool isWindow = false; | - |
4580 | if (opt) { evaluated: opt yes Evaluation Count:16 | yes Evaluation Count:8507 |
| 16-8507 |
4581 | isWindow = (opt->state & State_Window); executed (the execution status of this line is deduced): isWindow = (opt->state & State_Window); | - |
4582 | } else if (widget) { executed: } Execution Count:16 evaluated: widget yes Evaluation Count:6039 | yes Evaluation Count:2468 |
| 16-6039 |
4583 | isWindow = widget->isWindow(); executed (the execution status of this line is deduced): isWindow = widget->isWindow(); | - |
4584 | } executed: } Execution Count:6039 | 6039 |
4585 | ret = proxy()->pixelMetric(isWindow ? PM_DefaultTopLevelMargin : PM_DefaultChildMargin); executed (the execution status of this line is deduced): ret = proxy()->pixelMetric(isWindow ? PM_DefaultTopLevelMargin : PM_DefaultChildMargin); | - |
4586 | } | - |
4587 | break; executed: break; Execution Count:8523 | 8523 |
4588 | case PM_LayoutHorizontalSpacing: | - |
4589 | case PM_LayoutVerticalSpacing: | - |
4590 | ret = proxy()->pixelMetric(PM_DefaultLayoutSpacing); executed (the execution status of this line is deduced): ret = proxy()->pixelMetric(PM_DefaultLayoutSpacing); | - |
4591 | break; executed: break; Execution Count:15783 | 15783 |
4592 | | - |
4593 | case PM_DefaultTopLevelMargin: | - |
4594 | ret = int(QStyleHelper::dpiScaled(11.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(11.)); | - |
4595 | break; executed: break; Execution Count:4919 | 4919 |
4596 | case PM_DefaultChildMargin: | - |
4597 | ret = int(QStyleHelper::dpiScaled(9.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(9.)); | - |
4598 | break; executed: break; Execution Count:3424 | 3424 |
4599 | case PM_DefaultLayoutSpacing: | - |
4600 | ret = int(QStyleHelper::dpiScaled(6.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(6.)); | - |
4601 | break; executed: break; Execution Count:14883 | 14883 |
4602 | | - |
4603 | case PM_ToolBarIconSize: | - |
4604 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4605 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) partially evaluated: const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme() yes Evaluation Count:69 | no Evaluation Count:0 |
| 0-69 |
4606 | ret = theme->themeHint(QPlatformTheme::ToolBarIconSize).toInt(); executed: ret = theme->themeHint(QPlatformTheme::ToolBarIconSize).toInt(); Execution Count:69 | 69 |
4607 | if (ret <= 0) partially evaluated: ret <= 0 yes Evaluation Count:69 | no Evaluation Count:0 |
| 0-69 |
4608 | ret = int(QStyleHelper::dpiScaled(24.)); executed: ret = int(QStyleHelper::dpiScaled(24.)); Execution Count:69 | 69 |
4609 | break; executed: break; Execution Count:69 | 69 |
4610 | | - |
4611 | case PM_TabBarIconSize: | - |
4612 | case PM_ListViewIconSize: | - |
4613 | ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); executed (the execution status of this line is deduced): ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); | - |
4614 | break; executed: break; Execution Count:23003 | 23003 |
4615 | | - |
4616 | case PM_ButtonIconSize: | - |
4617 | case PM_SmallIconSize: | - |
4618 | ret = int(QStyleHelper::dpiScaled(16.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(16.)); | - |
4619 | break; executed: break; Execution Count:7608 | 7608 |
4620 | case PM_IconViewIconSize: | - |
4621 | ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget); executed (the execution status of this line is deduced): ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget); | - |
4622 | break; executed: break; Execution Count:2 | 2 |
4623 | | - |
4624 | case PM_LargeIconSize: | - |
4625 | ret = int(QStyleHelper::dpiScaled(32.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(32.)); | - |
4626 | break; executed: break; Execution Count:4 | 4 |
4627 | | - |
4628 | case PM_ToolTipLabelFrameWidth: | - |
4629 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4630 | break; executed: break; Execution Count:14 | 14 |
4631 | case PM_CheckBoxLabelSpacing: | - |
4632 | case PM_RadioButtonLabelSpacing: | - |
4633 | ret = int(QStyleHelper::dpiScaled(6.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(6.)); | - |
4634 | break; executed: break; Execution Count:214 | 214 |
4635 | case PM_SizeGripSize: | - |
4636 | ret = int(QStyleHelper::dpiScaled(13.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(13.)); | - |
4637 | break; executed: break; Execution Count:8 | 8 |
4638 | case PM_MessageBoxIconSize: | - |
4639 | #ifdef Q_OS_MAC | - |
4640 | if (QApplication::desktopSettingsAware()) { | - |
4641 | ret = 64; // No DPI scaling, it's handled elsewhere. | - |
4642 | } else | - |
4643 | #endif | - |
4644 | { | - |
4645 | ret = int(QStyleHelper::dpiScaled(32.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(32.)); | - |
4646 | } | - |
4647 | break; executed: break; Execution Count:46 | 46 |
4648 | case PM_TextCursorWidth: | - |
4649 | ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::TextCursorWidth).toInt(); executed (the execution status of this line is deduced): ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::TextCursorWidth).toInt(); | - |
4650 | break; executed: break; Execution Count:1053 | 1053 |
4651 | case PM_TabBar_ScrollButtonOverlap: | - |
4652 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4653 | break; executed: break; Execution Count:30 | 30 |
4654 | case PM_TabCloseIndicatorWidth: | - |
4655 | case PM_TabCloseIndicatorHeight: | - |
4656 | ret = int(QStyleHelper::dpiScaled(16.)); executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(16.)); | - |
4657 | break; executed: break; Execution Count:2 | 2 |
4658 | case PM_ScrollView_ScrollBarSpacing: | - |
4659 | ret = 2 * proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); never executed (the execution status of this line is deduced): ret = 2 * proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); | - |
4660 | break; | 0 |
4661 | case PM_ScrollView_ScrollBarOverlap: | - |
4662 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4663 | break; executed: break; Execution Count:28198 | 28198 |
4664 | case PM_SubMenuOverlap: | - |
4665 | ret = -proxy()->pixelMetric(QStyle::PM_MenuPanelWidth, opt, widget); executed (the execution status of this line is deduced): ret = -proxy()->pixelMetric(QStyle::PM_MenuPanelWidth, opt, widget); | - |
4666 | break; executed: break; Execution Count:69 | 69 |
4667 | default: | - |
4668 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4669 | break; executed: break; Execution Count:9 | 9 |
4670 | } | - |
4671 | | - |
4672 | return ret; executed: return ret; Execution Count:754513 | 754513 |
4673 | } | - |
4674 | | - |
4675 | /*! | - |
4676 | \reimp | - |
4677 | */ | - |
4678 | QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, | - |
4679 | const QSize &csz, const QWidget *widget) const | - |
4680 | { | - |
4681 | Q_D(const QCommonStyle); executed (the execution status of this line is deduced): const QCommonStylePrivate * const d = d_func(); | - |
4682 | QSize sz(csz); executed (the execution status of this line is deduced): QSize sz(csz); | - |
4683 | switch (ct) { | - |
4684 | case CT_PushButton: | - |
4685 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:1125 | no Evaluation Count:0 |
| 0-1125 |
4686 | int w = csz.width(), executed (the execution status of this line is deduced): int w = csz.width(), | - |
4687 | h = csz.height(), executed (the execution status of this line is deduced): h = csz.height(), | - |
4688 | bm = proxy()->pixelMetric(PM_ButtonMargin, btn, widget), executed (the execution status of this line is deduced): bm = proxy()->pixelMetric(PM_ButtonMargin, btn, widget), | - |
4689 | fw = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget) * 2; executed (the execution status of this line is deduced): fw = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget) * 2; | - |
4690 | w += bm + fw; executed (the execution status of this line is deduced): w += bm + fw; | - |
4691 | h += bm + fw; executed (the execution status of this line is deduced): h += bm + fw; | - |
4692 | if (btn->features & QStyleOptionButton::AutoDefaultButton){ evaluated: btn->features & QStyleOptionButton::AutoDefaultButton yes Evaluation Count:871 | yes Evaluation Count:254 |
| 254-871 |
4693 | int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget) * 2; executed (the execution status of this line is deduced): int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget) * 2; | - |
4694 | w += dbw; executed (the execution status of this line is deduced): w += dbw; | - |
4695 | h += dbw; executed (the execution status of this line is deduced): h += dbw; | - |
4696 | } executed: } Execution Count:871 | 871 |
4697 | sz = QSize(w, h); executed (the execution status of this line is deduced): sz = QSize(w, h); | - |
4698 | } executed: } Execution Count:1125 | 1125 |
4699 | break; executed: break; Execution Count:1125 | 1125 |
4700 | case CT_RadioButton: | - |
4701 | case CT_CheckBox: | - |
4702 | if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) yes Evaluation Count:53 | no Evaluation Count:0 |
| 0-53 |
4703 | bool isRadio = (ct == CT_RadioButton); executed (the execution status of this line is deduced): bool isRadio = (ct == CT_RadioButton); | - |
4704 | | - |
4705 | int w = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorWidth executed (the execution status of this line is deduced): int w = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorWidth | - |
4706 | : PM_IndicatorWidth, btn, widget); executed (the execution status of this line is deduced): : PM_IndicatorWidth, btn, widget); | - |
4707 | int h = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight executed (the execution status of this line is deduced): int h = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight | - |
4708 | : PM_IndicatorHeight, btn, widget); executed (the execution status of this line is deduced): : PM_IndicatorHeight, btn, widget); | - |
4709 | | - |
4710 | int margins = 0; executed (the execution status of this line is deduced): int margins = 0; | - |
4711 | // we add 4 pixels for label margins | - |
4712 | if (!btn->icon.isNull() || !btn->text.isEmpty()) partially evaluated: !btn->icon.isNull() no Evaluation Count:0 | yes Evaluation Count:53 |
evaluated: !btn->text.isEmpty() yes Evaluation Count:35 | yes Evaluation Count:18 |
| 0-53 |
4713 | margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing executed: margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, opt, widget); Execution Count:35 | 35 |
4714 | : PM_CheckBoxLabelSpacing, opt, widget); executed: margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, opt, widget); Execution Count:35 | 35 |
4715 | sz += QSize(w + margins, 4); executed (the execution status of this line is deduced): sz += QSize(w + margins, 4); | - |
4716 | sz.setHeight(qMax(sz.height(), h)); executed (the execution status of this line is deduced): sz.setHeight(qMax(sz.height(), h)); | - |
4717 | } executed: } Execution Count:53 | 53 |
4718 | break; executed: break; Execution Count:53 | 53 |
4719 | #ifndef QT_NO_MENU | - |
4720 | case CT_MenuItem: | - |
4721 | if (const QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) { partially evaluated: const QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt) yes Evaluation Count:1915 | no Evaluation Count:0 |
| 0-1915 |
4722 | bool checkable = mi->menuHasCheckableItems; executed (the execution status of this line is deduced): bool checkable = mi->menuHasCheckableItems; | - |
4723 | int maxpmw = mi->maxIconWidth; executed (the execution status of this line is deduced): int maxpmw = mi->maxIconWidth; | - |
4724 | int w = sz.width(), h = sz.height(); executed (the execution status of this line is deduced): int w = sz.width(), h = sz.height(); | - |
4725 | if (mi->menuItemType == QStyleOptionMenuItem::Separator) { evaluated: mi->menuItemType == QStyleOptionMenuItem::Separator yes Evaluation Count:50 | yes Evaluation Count:1865 |
| 50-1865 |
4726 | w = 10; executed (the execution status of this line is deduced): w = 10; | - |
4727 | h = 2; executed (the execution status of this line is deduced): h = 2; | - |
4728 | } else { executed: } Execution Count:50 | 50 |
4729 | h = mi->fontMetrics.height() + 8; executed (the execution status of this line is deduced): h = mi->fontMetrics.height() + 8; | - |
4730 | if (!mi->icon.isNull()) { evaluated: !mi->icon.isNull() yes Evaluation Count:28 | yes Evaluation Count:1837 |
| 28-1837 |
4731 | int iconExtent = proxy()->pixelMetric(PM_SmallIconSize); executed (the execution status of this line is deduced): int iconExtent = proxy()->pixelMetric(PM_SmallIconSize); | - |
4732 | h = qMax(h, mi->icon.actualSize(QSize(iconExtent, iconExtent)).height() + 4); executed (the execution status of this line is deduced): h = qMax(h, mi->icon.actualSize(QSize(iconExtent, iconExtent)).height() + 4); | - |
4733 | } executed: } Execution Count:28 | 28 |
4734 | } executed: } Execution Count:1865 | 1865 |
4735 | if (mi->text.contains(QLatin1Char('\t'))) evaluated: mi->text.contains(QLatin1Char('\t')) yes Evaluation Count:119 | yes Evaluation Count:1796 |
| 119-1796 |
4736 | w += 12; executed: w += 12; Execution Count:119 | 119 |
4737 | if (maxpmw > 0) evaluated: maxpmw > 0 yes Evaluation Count:52 | yes Evaluation Count:1863 |
| 52-1863 |
4738 | w += maxpmw + 6; executed: w += maxpmw + 6; Execution Count:52 | 52 |
4739 | if (checkable && maxpmw < 20) evaluated: checkable yes Evaluation Count:93 | yes Evaluation Count:1822 |
evaluated: maxpmw < 20 yes Evaluation Count:45 | yes Evaluation Count:48 |
| 45-1822 |
4740 | w += 20 - maxpmw; executed: w += 20 - maxpmw; Execution Count:45 | 45 |
4741 | if (checkable || maxpmw > 0) evaluated: checkable yes Evaluation Count:93 | yes Evaluation Count:1822 |
evaluated: maxpmw > 0 yes Evaluation Count:4 | yes Evaluation Count:1818 |
| 4-1822 |
4742 | w += 2; executed: w += 2; Execution Count:97 | 97 |
4743 | w += 12; executed (the execution status of this line is deduced): w += 12; | - |
4744 | sz = QSize(w, h); executed (the execution status of this line is deduced): sz = QSize(w, h); | - |
4745 | } executed: } Execution Count:1915 | 1915 |
4746 | break; executed: break; Execution Count:1915 | 1915 |
4747 | #endif // QT_NO_MENU | - |
4748 | #ifndef QT_NO_TOOLBUTTON | - |
4749 | case CT_ToolButton: | - |
4750 | sz = QSize(sz.width() + 6, sz.height() + 5); executed (the execution status of this line is deduced): sz = QSize(sz.width() + 6, sz.height() + 5); | - |
4751 | break; executed: break; Execution Count:2 | 2 |
4752 | #endif // QT_NO_TOOLBUTTON | - |
4753 | #ifndef QT_NO_COMBOBOX | - |
4754 | case CT_ComboBox: | - |
4755 | if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { partially evaluated: const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt) yes Evaluation Count:995 | no Evaluation Count:0 |
| 0-995 |
4756 | int fw = cmb->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, opt, widget) * 2 : 0; partially evaluated: cmb->frame yes Evaluation Count:995 | no Evaluation Count:0 |
| 0-995 |
4757 | const int textMargins = 2*(proxy()->pixelMetric(PM_FocusFrameHMargin) + 1); executed (the execution status of this line is deduced): const int textMargins = 2*(proxy()->pixelMetric(PM_FocusFrameHMargin) + 1); | - |
4758 | // QItemDelegate::sizeHint expands the textMargins two times, thus the 2*textMargins... | - |
4759 | int other = qMax(23, 2*textMargins + proxy()->pixelMetric(QStyle::PM_ScrollBarExtent, opt, widget)); executed (the execution status of this line is deduced): int other = qMax(23, 2*textMargins + proxy()->pixelMetric(QStyle::PM_ScrollBarExtent, opt, widget)); | - |
4760 | sz = QSize(sz.width() + fw + other, sz.height() + fw); executed (the execution status of this line is deduced): sz = QSize(sz.width() + fw + other, sz.height() + fw); | - |
4761 | } executed: } Execution Count:995 | 995 |
4762 | break; executed: break; Execution Count:995 | 995 |
4763 | #endif // QT_NO_COMBOBOX | - |
4764 | case CT_HeaderSection: | - |
4765 | if (const QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt)) { partially evaluated: const QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt) yes Evaluation Count:24848 | no Evaluation Count:0 |
| 0-24848 |
4766 | bool nullIcon = hdr->icon.isNull(); executed (the execution status of this line is deduced): bool nullIcon = hdr->icon.isNull(); | - |
4767 | int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, hdr, widget); executed (the execution status of this line is deduced): int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, hdr, widget); | - |
4768 | int iconSize = nullIcon ? 0 : proxy()->pixelMetric(QStyle::PM_SmallIconSize, hdr, widget); evaluated: nullIcon yes Evaluation Count:24746 | yes Evaluation Count:102 |
| 102-24746 |
4769 | QSize txt = hdr->fontMetrics.size(0, hdr->text); executed (the execution status of this line is deduced): QSize txt = hdr->fontMetrics.size(0, hdr->text); | - |
4770 | sz.setHeight(margin + qMax(iconSize, txt.height()) + margin); executed (the execution status of this line is deduced): sz.setHeight(margin + qMax(iconSize, txt.height()) + margin); | - |
4771 | sz.setWidth((nullIcon ? 0 : margin) + iconSize executed (the execution status of this line is deduced): sz.setWidth((nullIcon ? 0 : margin) + iconSize | - |
4772 | + (hdr->text.isNull() ? 0 : margin) + txt.width() + margin); executed (the execution status of this line is deduced): + (hdr->text.isNull() ? 0 : margin) + txt.width() + margin); | - |
4773 | } executed: } Execution Count:24848 | 24848 |
4774 | break; executed: break; Execution Count:24848 | 24848 |
4775 | case CT_TabWidget: | - |
4776 | sz += QSize(4, 4); executed (the execution status of this line is deduced): sz += QSize(4, 4); | - |
4777 | break; executed: break; Execution Count:103 | 103 |
4778 | case CT_LineEdit: | - |
4779 | if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)) partially evaluated: const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt) yes Evaluation Count:1523 | no Evaluation Count:0 |
| 0-1523 |
4780 | sz += QSize(2*f->lineWidth, 2*f->lineWidth); executed: sz += QSize(2*f->lineWidth, 2*f->lineWidth); Execution Count:1523 | 1523 |
4781 | break; executed: break; Execution Count:1523 | 1523 |
4782 | #ifndef QT_NO_GROUPBOX | - |
4783 | case CT_GroupBox: | - |
4784 | if (const QGroupBox *grb = static_cast<const QGroupBox *>(widget)) partially evaluated: const QGroupBox *grb = static_cast<const QGroupBox *>(widget) yes Evaluation Count:42 | no Evaluation Count:0 |
| 0-42 |
4785 | sz += QSize(!grb->isFlat() ? 16 : 0, 0); executed: sz += QSize(!grb->isFlat() ? 16 : 0, 0); Execution Count:42 | 42 |
4786 | break; executed: break; Execution Count:42 | 42 |
4787 | #endif // QT_NO_GROUPBOX | - |
4788 | case CT_MdiControls: | - |
4789 | if (const QStyleOptionComplex *styleOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt)) { partially evaluated: const QStyleOptionComplex *styleOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt) yes Evaluation Count:200 | no Evaluation Count:0 |
| 0-200 |
4790 | int width = 1; executed (the execution status of this line is deduced): int width = 1; | - |
4791 | if (styleOpt->subControls & SC_MdiMinButton) partially evaluated: styleOpt->subControls & SC_MdiMinButton yes Evaluation Count:200 | no Evaluation Count:0 |
| 0-200 |
4792 | width += 16 + 1; executed: width += 16 + 1; Execution Count:200 | 200 |
4793 | if (styleOpt->subControls & SC_MdiNormalButton) partially evaluated: styleOpt->subControls & SC_MdiNormalButton yes Evaluation Count:200 | no Evaluation Count:0 |
| 0-200 |
4794 | width += 16 + 1; executed: width += 16 + 1; Execution Count:200 | 200 |
4795 | if (styleOpt->subControls & SC_MdiCloseButton) partially evaluated: styleOpt->subControls & SC_MdiCloseButton yes Evaluation Count:200 | no Evaluation Count:0 |
| 0-200 |
4796 | width += 16 + 1; executed: width += 16 + 1; Execution Count:200 | 200 |
4797 | sz = QSize(width, 16); executed (the execution status of this line is deduced): sz = QSize(width, 16); | - |
4798 | } else { executed: } Execution Count:200 | 200 |
4799 | sz = QSize(52, 16); never executed (the execution status of this line is deduced): sz = QSize(52, 16); | - |
4800 | } | 0 |
4801 | break; executed: break; Execution Count:200 | 200 |
4802 | #ifndef QT_NO_ITEMVIEWS | - |
4803 | case CT_ItemViewItem: | - |
4804 | if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { partially evaluated: const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt) yes Evaluation Count:150673 | no Evaluation Count:0 |
| 0-150673 |
4805 | QRect decorationRect, displayRect, checkRect; executed (the execution status of this line is deduced): QRect decorationRect, displayRect, checkRect; | - |
4806 | d->viewItemLayout(vopt, &checkRect, &decorationRect, &displayRect, true); executed (the execution status of this line is deduced): d->viewItemLayout(vopt, &checkRect, &decorationRect, &displayRect, true); | - |
4807 | sz = (decorationRect|displayRect|checkRect).size(); executed (the execution status of this line is deduced): sz = (decorationRect|displayRect|checkRect).size(); | - |
4808 | } executed: } Execution Count:150673 | 150673 |
4809 | break; executed: break; Execution Count:150673 | 150673 |
4810 | #endif // QT_NO_ITEMVIEWS | - |
4811 | case CT_ScrollBar: | - |
4812 | case CT_MenuBar: | - |
4813 | case CT_Menu: | - |
4814 | case CT_MenuBarItem: | - |
4815 | case CT_Slider: | - |
4816 | case CT_ProgressBar: | - |
4817 | case CT_TabBarTab: | - |
4818 | // just return the contentsSize for now | - |
4819 | // fall through intended | - |
4820 | default: | - |
4821 | break; executed: break; Execution Count:105982 | 105982 |
4822 | } | - |
4823 | return sz; executed: return sz; Execution Count:287461 | 287461 |
4824 | } | - |
4825 | | - |
4826 | | - |
4827 | /*! \reimp */ | - |
4828 | int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *widget, | - |
4829 | QStyleHintReturn *hret) const | - |
4830 | { | - |
4831 | int ret = 0; executed (the execution status of this line is deduced): int ret = 0; | - |
4832 | | - |
4833 | switch (sh) { | - |
4834 | case SH_Menu_KeyboardSearch: | - |
4835 | ret = false; executed (the execution status of this line is deduced): ret = false; | - |
4836 | break; executed: break; Execution Count:11 | 11 |
4837 | case SH_Slider_AbsoluteSetButtons: | - |
4838 | ret = Qt::MidButton; executed (the execution status of this line is deduced): ret = Qt::MidButton; | - |
4839 | break; executed: break; Execution Count:11 | 11 |
4840 | case SH_Slider_PageSetButtons: | - |
4841 | ret = Qt::LeftButton; executed (the execution status of this line is deduced): ret = Qt::LeftButton; | - |
4842 | break; executed: break; Execution Count:10 | 10 |
4843 | case SH_ScrollBar_ContextMenu: | - |
4844 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
4845 | break; executed: break; Execution Count:8 | 8 |
4846 | case SH_DialogButtons_DefaultButton: // This value not used anywhere. | - |
4847 | ret = QDialogButtonBox::AcceptRole; executed (the execution status of this line is deduced): ret = QDialogButtonBox::AcceptRole; | - |
4848 | break; executed: break; Execution Count:8 | 8 |
4849 | #ifndef QT_NO_GROUPBOX | - |
4850 | case SH_GroupBox_TextLabelVerticalAlignment: | - |
4851 | ret = Qt::AlignVCenter; executed (the execution status of this line is deduced): ret = Qt::AlignVCenter; | - |
4852 | break; executed: break; Execution Count:211 | 211 |
4853 | | - |
4854 | case SH_GroupBox_TextLabelColor: | - |
4855 | ret = opt ? int(opt->palette.color(QPalette::Text).rgba()) : 0; evaluated: opt yes Evaluation Count:1013 | yes Evaluation Count:4 |
| 4-1013 |
4856 | break; executed: break; Execution Count:1017 | 1017 |
4857 | #endif // QT_NO_GROUPBOX | - |
4858 | | - |
4859 | case SH_ListViewExpand_SelectMouseType: | - |
4860 | case SH_TabBar_SelectMouseType: | - |
4861 | ret = QEvent::MouseButtonPress; executed (the execution status of this line is deduced): ret = QEvent::MouseButtonPress; | - |
4862 | break; executed: break; Execution Count:4595 | 4595 |
4863 | | - |
4864 | | - |
4865 | case SH_TabBar_Alignment: | - |
4866 | case SH_Header_ArrowAlignment: | - |
4867 | ret = Qt::AlignLeft; executed (the execution status of this line is deduced): ret = Qt::AlignLeft; | - |
4868 | break; executed: break; Execution Count:278 | 278 |
4869 | | - |
4870 | case SH_TitleBar_AutoRaise: | - |
4871 | ret = false; executed (the execution status of this line is deduced): ret = false; | - |
4872 | break; executed: break; Execution Count:13927 | 13927 |
4873 | | - |
4874 | case SH_Menu_SubMenuPopupDelay: | - |
4875 | ret = 256; executed (the execution status of this line is deduced): ret = 256; | - |
4876 | break; executed: break; Execution Count:6 | 6 |
4877 | | - |
4878 | case SH_ProgressDialog_TextLabelAlignment: | - |
4879 | ret = Qt::AlignCenter; executed (the execution status of this line is deduced): ret = Qt::AlignCenter; | - |
4880 | break; executed: break; Execution Count:12 | 12 |
4881 | | - |
4882 | case SH_BlinkCursorWhenTextSelected: | - |
4883 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4884 | break; executed: break; Execution Count:8178 | 8178 |
4885 | | - |
4886 | case SH_Table_GridLineColor: | - |
4887 | if (opt) evaluated: opt yes Evaluation Count:373 | yes Evaluation Count:3 |
| 3-373 |
4888 | ret = opt->palette.color(QPalette::Mid).rgb(); executed: ret = opt->palette.color(QPalette::Mid).rgb(); Execution Count:373 | 373 |
4889 | else | - |
4890 | ret = -1; executed: ret = -1; Execution Count:3 | 3 |
4891 | break; executed: break; Execution Count:376 | 376 |
4892 | case SH_LineEdit_PasswordCharacter: { | - |
4893 | const QFontMetrics &fm = opt ? opt->fontMetrics evaluated: opt yes Evaluation Count:5 | yes Evaluation Count:1 |
| 1-5 |
4894 | : (widget ? widget->fontMetrics() : QFontMetrics(QFont())); never executed (the execution status of this line is deduced): : (widget ? widget->fontMetrics() : QFontMetrics(QFont())); | - |
4895 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
4896 | if (fm.inFont(QChar(0x25CF))) { partially evaluated: fm.inFont(QChar(0x25CF)) yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
4897 | ret = 0x25CF; executed (the execution status of this line is deduced): ret = 0x25CF; | - |
4898 | } else if (fm.inFont(QChar(0x2022))) { executed: } Execution Count:6 never evaluated: fm.inFont(QChar(0x2022)) | 0-6 |
4899 | ret = 0x2022; never executed (the execution status of this line is deduced): ret = 0x2022; | - |
4900 | } else { | 0 |
4901 | ret = '*'; never executed (the execution status of this line is deduced): ret = '*'; | - |
4902 | } | 0 |
4903 | break; executed: break; Execution Count:6 | 6 |
4904 | } | - |
4905 | | - |
4906 | | - |
4907 | case SH_ToolBox_SelectedPageTitleBold: | - |
4908 | ret = 1; never executed (the execution status of this line is deduced): ret = 1; | - |
4909 | break; | 0 |
4910 | | - |
4911 | case SH_UnderlineShortcut: | - |
4912 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4913 | break; executed: break; Execution Count:2508 | 2508 |
4914 | | - |
4915 | case SH_SpinBox_ClickAutoRepeatRate: | - |
4916 | ret = 150; executed (the execution status of this line is deduced): ret = 150; | - |
4917 | break; executed: break; Execution Count:403 | 403 |
4918 | | - |
4919 | case SH_SpinBox_ClickAutoRepeatThreshold: | - |
4920 | ret = 500; executed (the execution status of this line is deduced): ret = 500; | - |
4921 | break; executed: break; Execution Count:395 | 395 |
4922 | | - |
4923 | case SH_SpinBox_KeyPressAutoRepeatRate: | - |
4924 | ret = 75; executed (the execution status of this line is deduced): ret = 75; | - |
4925 | break; executed: break; Execution Count:8 | 8 |
4926 | | - |
4927 | case SH_Menu_SelectionWrap: | - |
4928 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
4929 | break; executed: break; Execution Count:8 | 8 |
4930 | | - |
4931 | case SH_Menu_FillScreenWithScroll: | - |
4932 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
4933 | break; executed: break; Execution Count:8 | 8 |
4934 | | - |
4935 | case SH_ToolTipLabel_Opacity: | - |
4936 | ret = 255; executed (the execution status of this line is deduced): ret = 255; | - |
4937 | break; executed: break; Execution Count:16 | 16 |
4938 | | - |
4939 | case SH_Button_FocusPolicy: | - |
4940 | ret = Qt::StrongFocus; executed (the execution status of this line is deduced): ret = Qt::StrongFocus; | - |
4941 | break; executed: break; Execution Count:3990 | 3990 |
4942 | | - |
4943 | case SH_MessageBox_UseBorderForButtonSpacing: | - |
4944 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4945 | break; executed: break; Execution Count:8 | 8 |
4946 | | - |
4947 | case SH_ToolButton_PopupDelay: | - |
4948 | ret = 600; executed (the execution status of this line is deduced): ret = 600; | - |
4949 | break; executed: break; Execution Count:1562 | 1562 |
4950 | | - |
4951 | case SH_FocusFrame_Mask: | - |
4952 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4953 | if (widget) { evaluated: widget yes Evaluation Count:5 | yes Evaluation Count:4 |
| 4-5 |
4954 | if(QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(hret)) { evaluated: QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(hret) yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
4955 | mask->region = widget->rect(); executed (the execution status of this line is deduced): mask->region = widget->rect(); | - |
4956 | int vmargin = proxy()->pixelMetric(QStyle::PM_FocusFrameVMargin), executed (the execution status of this line is deduced): int vmargin = proxy()->pixelMetric(QStyle::PM_FocusFrameVMargin), | - |
4957 | hmargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin); executed (the execution status of this line is deduced): hmargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin); | - |
4958 | mask->region -= QRect(widget->rect().adjusted(hmargin, vmargin, -hmargin, -vmargin)); executed (the execution status of this line is deduced): mask->region -= QRect(widget->rect().adjusted(hmargin, vmargin, -hmargin, -vmargin)); | - |
4959 | } executed: } Execution Count:1 | 1 |
4960 | } executed: } Execution Count:5 | 5 |
4961 | break; executed: break; Execution Count:9 | 9 |
4962 | #ifndef QT_NO_RUBBERBAND | - |
4963 | case SH_RubberBand_Mask: | - |
4964 | if (const QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt)) { never evaluated: const QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt) | 0 |
4965 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
4966 | if (rbOpt->shape == QRubberBand::Rectangle) { never evaluated: rbOpt->shape == QRubberBand::Rectangle | 0 |
4967 | ret = true; never executed (the execution status of this line is deduced): ret = true; | - |
4968 | if(QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(hret)) { never evaluated: QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(hret) | 0 |
4969 | mask->region = opt->rect; never executed (the execution status of this line is deduced): mask->region = opt->rect; | - |
4970 | int margin = proxy()->pixelMetric(PM_DefaultFrameWidth) * 2; never executed (the execution status of this line is deduced): int margin = proxy()->pixelMetric(PM_DefaultFrameWidth) * 2; | - |
4971 | mask->region -= opt->rect.adjusted(margin, margin, -margin, -margin); never executed (the execution status of this line is deduced): mask->region -= opt->rect.adjusted(margin, margin, -margin, -margin); | - |
4972 | } | 0 |
4973 | } | 0 |
4974 | } | 0 |
4975 | break; | 0 |
4976 | #endif // QT_NO_RUBBERBAND | - |
4977 | case SH_SpinControls_DisableOnBounds: | - |
4978 | ret = 1; executed (the execution status of this line is deduced): ret = 1; | - |
4979 | break; executed: break; Execution Count:1659 | 1659 |
4980 | | - |
4981 | case SH_Dial_BackgroundRole: | - |
4982 | ret = QPalette::Window; executed (the execution status of this line is deduced): ret = QPalette::Window; | - |
4983 | break; executed: break; Execution Count:14 | 14 |
4984 | | - |
4985 | case SH_ComboBox_LayoutDirection: | - |
4986 | ret = opt ? opt->direction : Qt::LeftToRight; evaluated: opt yes Evaluation Count:495 | yes Evaluation Count:4 |
| 4-495 |
4987 | break; executed: break; Execution Count:499 | 499 |
4988 | | - |
4989 | case SH_ItemView_EllipsisLocation: | - |
4990 | ret = Qt::AlignTrailing; executed (the execution status of this line is deduced): ret = Qt::AlignTrailing; | - |
4991 | break; executed: break; Execution Count:8 | 8 |
4992 | | - |
4993 | case SH_ItemView_ShowDecorationSelected: | - |
4994 | ret = false; never executed (the execution status of this line is deduced): ret = false; | - |
4995 | break; | 0 |
4996 | | - |
4997 | case SH_ItemView_ActivateItemOnSingleClick: | - |
4998 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
4999 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) partially evaluated: const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme() yes Evaluation Count:381 | no Evaluation Count:0 |
| 0-381 |
5000 | ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toBool() ? 1 : 0; executed: ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toBool() ? 1 : 0; Execution Count:381 partially evaluated: theme->themeHint(QPlatformTheme::ToolButtonStyle).toBool() no Evaluation Count:0 | yes Evaluation Count:381 |
| 0-381 |
5001 | break; executed: break; Execution Count:381 | 381 |
5002 | case SH_TitleBar_ModifyNotification: | - |
5003 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
5004 | break; executed: break; Execution Count:8 | 8 |
5005 | case SH_ScrollBar_RollBetweenButtons: | - |
5006 | ret = false; executed (the execution status of this line is deduced): ret = false; | - |
5007 | break; executed: break; Execution Count:8 | 8 |
5008 | case SH_TabBar_ElideMode: | - |
5009 | ret = Qt::ElideNone; executed (the execution status of this line is deduced): ret = Qt::ElideNone; | - |
5010 | break; executed: break; Execution Count:132 | 132 |
5011 | case SH_DialogButtonLayout: | - |
5012 | ret = QDialogButtonBox::WinLayout; executed (the execution status of this line is deduced): ret = QDialogButtonBox::WinLayout; | - |
5013 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) partially evaluated: const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme() yes Evaluation Count:597 | no Evaluation Count:0 |
| 0-597 |
5014 | ret = theme->themeHint(QPlatformTheme::DialogButtonBoxLayout).toInt(); executed: ret = theme->themeHint(QPlatformTheme::DialogButtonBoxLayout).toInt(); Execution Count:597 | 597 |
5015 | break; executed: break; Execution Count:597 | 597 |
5016 | case SH_ComboBox_PopupFrameStyle: | - |
5017 | ret = QFrame::StyledPanel | QFrame::Plain; executed (the execution status of this line is deduced): ret = QFrame::StyledPanel | QFrame::Plain; | - |
5018 | break; executed: break; Execution Count:349 | 349 |
5019 | case SH_MessageBox_TextInteractionFlags: | - |
5020 | ret = Qt::LinksAccessibleByMouse; executed (the execution status of this line is deduced): ret = Qt::LinksAccessibleByMouse; | - |
5021 | break; executed: break; Execution Count:49 | 49 |
5022 | case SH_DialogButtonBox_ButtonsHaveIcons: | - |
5023 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
5024 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) never evaluated: const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme() | 0 |
5025 | ret = theme->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool() ? 1 : 0; never executed: ret = theme->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool() ? 1 : 0; never evaluated: theme->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool() | 0 |
5026 | break; | 0 |
5027 | case SH_SpellCheckUnderlineStyle: | - |
5028 | ret = QTextCharFormat::WaveUnderline; executed (the execution status of this line is deduced): ret = QTextCharFormat::WaveUnderline; | - |
5029 | break; executed: break; Execution Count:8 | 8 |
5030 | case SH_MessageBox_CenterButtons: | - |
5031 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
5032 | break; executed: break; Execution Count:47 | 47 |
5033 | case SH_ItemView_MovementWithoutUpdatingSelection: | - |
5034 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
5035 | break; executed: break; Execution Count:8 | 8 |
5036 | case SH_FocusFrame_AboveWidget: | - |
5037 | ret = false; executed (the execution status of this line is deduced): ret = false; | - |
5038 | break; executed: break; Execution Count:11 | 11 |
5039 | #ifndef QT_NO_TABWIDGET | - |
5040 | case SH_TabWidget_DefaultTabPosition: | - |
5041 | ret = QTabWidget::North; executed (the execution status of this line is deduced): ret = QTabWidget::North; | - |
5042 | break; executed: break; Execution Count:39 | 39 |
5043 | #endif | - |
5044 | case SH_ToolBar_Movable: | - |
5045 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
5046 | break; executed: break; Execution Count:16 | 16 |
5047 | case SH_TextControl_FocusIndicatorTextCharFormat: | - |
5048 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
5049 | if (QStyleHintReturnVariant *vret = qstyleoption_cast<QStyleHintReturnVariant*>(hret)) { partially evaluated: QStyleHintReturnVariant *vret = qstyleoption_cast<QStyleHintReturnVariant*>(hret) no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
5050 | QPen outline(opt->palette.color(QPalette::Text), 1, Qt::DotLine); never executed (the execution status of this line is deduced): QPen outline(opt->palette.color(QPalette::Text), 1, Qt::DotLine); | - |
5051 | QTextCharFormat fmt; never executed (the execution status of this line is deduced): QTextCharFormat fmt; | - |
5052 | fmt.setProperty(QTextFormat::OutlinePen, outline); never executed (the execution status of this line is deduced): fmt.setProperty(QTextFormat::OutlinePen, outline); | - |
5053 | vret->variant = fmt; never executed (the execution status of this line is deduced): vret->variant = fmt; | - |
5054 | } | 0 |
5055 | break; executed: break; Execution Count:8 | 8 |
5056 | #ifndef QT_NO_WIZARD | - |
5057 | case SH_WizardStyle: | - |
5058 | ret = QWizard::ClassicStyle; never executed (the execution status of this line is deduced): ret = QWizard::ClassicStyle; | - |
5059 | break; | 0 |
5060 | #endif | - |
5061 | case SH_FormLayoutWrapPolicy: | - |
5062 | ret = QFormLayout::DontWrapRows; executed (the execution status of this line is deduced): ret = QFormLayout::DontWrapRows; | - |
5063 | break; executed: break; Execution Count:47 | 47 |
5064 | case SH_FormLayoutFieldGrowthPolicy: | - |
5065 | ret = QFormLayout::AllNonFixedFieldsGrow; executed (the execution status of this line is deduced): ret = QFormLayout::AllNonFixedFieldsGrow; | - |
5066 | break; executed: break; Execution Count:7 | 7 |
5067 | case SH_FormLayoutFormAlignment: | - |
5068 | ret = Qt::AlignLeft | Qt::AlignTop; executed (the execution status of this line is deduced): ret = Qt::AlignLeft | Qt::AlignTop; | - |
5069 | break; executed: break; Execution Count:29 | 29 |
5070 | case SH_FormLayoutLabelAlignment: | - |
5071 | ret = Qt::AlignLeft; executed (the execution status of this line is deduced): ret = Qt::AlignLeft; | - |
5072 | break; executed: break; Execution Count:19 | 19 |
5073 | case SH_ItemView_ArrowKeysNavigateIntoChildren: | - |
5074 | ret = false; never executed (the execution status of this line is deduced): ret = false; | - |
5075 | break; | 0 |
5076 | case SH_ItemView_DrawDelegateFrame: | - |
5077 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
5078 | break; executed: break; Execution Count:85 | 85 |
5079 | #ifndef QT_NO_TABBAR | - |
5080 | case SH_TabBar_CloseButtonPosition: | - |
5081 | ret = QTabBar::RightSide; executed (the execution status of this line is deduced): ret = QTabBar::RightSide; | - |
5082 | break; executed: break; Execution Count:4 | 4 |
5083 | #endif | - |
5084 | case SH_DockWidget_ButtonsHaveFrame: | - |
5085 | ret = true; executed (the execution status of this line is deduced): ret = true; | - |
5086 | break; executed: break; Execution Count:58 | 58 |
5087 | case SH_ToolButtonStyle: | - |
5088 | ret = 0; never executed (the execution status of this line is deduced): ret = 0; | - |
5089 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) never evaluated: const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme() | 0 |
5090 | ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toInt(); never executed: ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toInt(); | 0 |
5091 | break; | 0 |
5092 | case SH_RequestSoftwareInputPanel: | - |
5093 | ret = RSIP_OnMouseClickAndAlreadyFocused; executed (the execution status of this line is deduced): ret = RSIP_OnMouseClickAndAlreadyFocused; | - |
5094 | break; executed: break; Execution Count:10 | 10 |
5095 | case SH_ScrollBar_Transient: | - |
5096 | ret = false; executed (the execution status of this line is deduced): ret = false; | - |
5097 | break; executed: break; Execution Count:165497 | 165497 |
5098 | default: | - |
5099 | ret = 0; executed (the execution status of this line is deduced): ret = 0; | - |
5100 | break; executed: break; Execution Count:417940 | 417940 |
5101 | } | - |
5102 | | - |
5103 | return ret; executed: return ret; Execution Count:625106 | 625106 |
5104 | } | - |
5105 | | - |
5106 | /*! \reimp */ | - |
5107 | QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option, | - |
5108 | const QWidget *widget) const | - |
5109 | { | - |
5110 | const bool rtl = (option && option->direction == Qt::RightToLeft) || (!option && QApplication::isRightToLeft()); evaluated: option yes Evaluation Count:1029 | yes Evaluation Count:1295 |
evaluated: option->direction == Qt::RightToLeft yes Evaluation Count:3 | yes Evaluation Count:1026 |
evaluated: !option yes Evaluation Count:1295 | yes Evaluation Count:1026 |
evaluated: QApplication::isRightToLeft() yes Evaluation Count:3 | yes Evaluation Count:1292 |
| 3-1295 |
5111 | #ifdef QT_NO_IMAGEFORMAT_PNG | - |
5112 | Q_UNUSED(widget); | - |
5113 | Q_UNUSED(sp); | - |
5114 | #else | - |
5115 | QPixmap pixmap; executed (the execution status of this line is deduced): QPixmap pixmap; | - |
5116 | | - |
5117 | if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { partially evaluated: QApplication::desktopSettingsAware() yes Evaluation Count:2324 | no Evaluation Count:0 |
partially evaluated: !QIcon::themeName().isEmpty() no Evaluation Count:0 | yes Evaluation Count:2324 |
| 0-2324 |
5118 | switch (sp) { | - |
5119 | case SP_DialogYesButton: | - |
5120 | case SP_DialogOkButton: | - |
5121 | pixmap = QIcon::fromTheme(QLatin1String("dialog-ok")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("dialog-ok")).pixmap(16); | - |
5122 | break; | 0 |
5123 | case SP_DialogApplyButton: | - |
5124 | pixmap = QIcon::fromTheme(QLatin1String("dialog-ok-apply")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("dialog-ok-apply")).pixmap(16); | - |
5125 | break; | 0 |
5126 | case SP_DialogDiscardButton: | - |
5127 | pixmap = QIcon::fromTheme(QLatin1String("edit-delete")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("edit-delete")).pixmap(16); | - |
5128 | break; | 0 |
5129 | case SP_DialogCloseButton: | - |
5130 | pixmap = QIcon::fromTheme(QLatin1String("dialog-close")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("dialog-close")).pixmap(16); | - |
5131 | break; | 0 |
5132 | case SP_DirHomeIcon: | - |
5133 | pixmap = QIcon::fromTheme(QLatin1String("user-home")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("user-home")).pixmap(16); | - |
5134 | break; | 0 |
5135 | case SP_MessageBoxInformation: | - |
5136 | pixmap = QIcon::fromTheme(QLatin1String("messagebox_info")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("messagebox_info")).pixmap(16); | - |
5137 | break; | 0 |
5138 | case SP_MessageBoxWarning: | - |
5139 | pixmap = QIcon::fromTheme(QLatin1String("messagebox_warning")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("messagebox_warning")).pixmap(16); | - |
5140 | break; | 0 |
5141 | case SP_MessageBoxCritical: | - |
5142 | pixmap = QIcon::fromTheme(QLatin1String("messagebox_critical")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("messagebox_critical")).pixmap(16); | - |
5143 | break; | 0 |
5144 | case SP_MessageBoxQuestion: | - |
5145 | pixmap = QIcon::fromTheme(QLatin1String("help")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("help")).pixmap(16); | - |
5146 | break; | 0 |
5147 | case SP_DialogOpenButton: | - |
5148 | case SP_DirOpenIcon: | - |
5149 | pixmap = QIcon::fromTheme(QLatin1String("folder-open")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("folder-open")).pixmap(16); | - |
5150 | break; | 0 |
5151 | case SP_FileIcon: | - |
5152 | pixmap = QIcon::fromTheme(QLatin1String("text-x-generic"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("text-x-generic"), | - |
5153 | QIcon::fromTheme(QLatin1String("empty"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("empty"))).pixmap(16); | - |
5154 | break; | 0 |
5155 | case SP_DirClosedIcon: | - |
5156 | case SP_DirIcon: | - |
5157 | pixmap = QIcon::fromTheme(QLatin1String("folder")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("folder")).pixmap(16); | - |
5158 | break; | 0 |
5159 | case SP_DriveFDIcon: | - |
5160 | pixmap = QIcon::fromTheme(QLatin1String("media-floppy"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-floppy"), | - |
5161 | QIcon::fromTheme(QLatin1String("3floppy_unmount"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("3floppy_unmount"))).pixmap(16); | - |
5162 | break; | 0 |
5163 | case SP_ComputerIcon: | - |
5164 | pixmap = QIcon::fromTheme(QLatin1String("computer"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("computer"), | - |
5165 | QIcon::fromTheme(QLatin1String("system"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("system"))).pixmap(16); | - |
5166 | break; | 0 |
5167 | case SP_DesktopIcon: | - |
5168 | pixmap = QIcon::fromTheme(QLatin1String("user-desktop"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("user-desktop"), | - |
5169 | QIcon::fromTheme(QLatin1String("desktop"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("desktop"))).pixmap(16); | - |
5170 | break; | 0 |
5171 | case SP_TrashIcon: | - |
5172 | pixmap = QIcon::fromTheme(QLatin1String("user-trash"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("user-trash"), | - |
5173 | QIcon::fromTheme(QLatin1String("trashcan_empty"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("trashcan_empty"))).pixmap(16); | - |
5174 | break; | 0 |
5175 | case SP_DriveCDIcon: | - |
5176 | case SP_DriveDVDIcon: | - |
5177 | pixmap = QIcon::fromTheme(QLatin1String("media-optical"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-optical"), | - |
5178 | QIcon::fromTheme(QLatin1String("cdrom_unmount"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("cdrom_unmount"))).pixmap(16); | - |
5179 | break; | 0 |
5180 | case SP_DriveHDIcon: | - |
5181 | pixmap = QIcon::fromTheme(QLatin1String("drive-harddisk"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("drive-harddisk"), | - |
5182 | QIcon::fromTheme(QLatin1String("hdd_unmount"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("hdd_unmount"))).pixmap(16); | - |
5183 | break; | 0 |
5184 | case SP_FileDialogToParent: | - |
5185 | pixmap = QIcon::fromTheme(QLatin1String("go-up"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("go-up"), | - |
5186 | QIcon::fromTheme(QLatin1String("up"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("up"))).pixmap(16); | - |
5187 | break; | 0 |
5188 | case SP_FileDialogNewFolder: | - |
5189 | pixmap = QIcon::fromTheme(QLatin1String("folder_new")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("folder_new")).pixmap(16); | - |
5190 | break; | 0 |
5191 | case SP_ArrowUp: | - |
5192 | pixmap = QIcon::fromTheme(QLatin1String("go-up"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("go-up"), | - |
5193 | QIcon::fromTheme(QLatin1String("up"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("up"))).pixmap(16); | - |
5194 | break; | 0 |
5195 | case SP_ArrowDown: | - |
5196 | pixmap = QIcon::fromTheme(QLatin1String("go-down"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("go-down"), | - |
5197 | QIcon::fromTheme(QLatin1String("down"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("down"))).pixmap(16); | - |
5198 | break; | 0 |
5199 | case SP_ArrowRight: | - |
5200 | pixmap = QIcon::fromTheme(QLatin1String("go-next"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("go-next"), | - |
5201 | QIcon::fromTheme(QLatin1String("forward"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("forward"))).pixmap(16); | - |
5202 | break; | 0 |
5203 | case SP_ArrowLeft: | - |
5204 | pixmap = QIcon::fromTheme(QLatin1String("go-previous"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("go-previous"), | - |
5205 | QIcon::fromTheme(QLatin1String("back"))).pixmap(16); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("back"))).pixmap(16); | - |
5206 | break; | 0 |
5207 | case SP_FileDialogDetailedView: | - |
5208 | pixmap = QIcon::fromTheme(QLatin1String("view_detailed")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("view_detailed")).pixmap(16); | - |
5209 | break; | 0 |
5210 | case SP_FileDialogListView: | - |
5211 | pixmap = QIcon::fromTheme(QLatin1String("view_icon")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("view_icon")).pixmap(16); | - |
5212 | break; | 0 |
5213 | case SP_BrowserReload: | - |
5214 | pixmap = QIcon::fromTheme(QLatin1String("reload")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("reload")).pixmap(16); | - |
5215 | break; | 0 |
5216 | case SP_BrowserStop: | - |
5217 | pixmap = QIcon::fromTheme(QLatin1String("process-stop")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("process-stop")).pixmap(16); | - |
5218 | break; | 0 |
5219 | case SP_MediaPlay: | - |
5220 | pixmap = QIcon::fromTheme(QLatin1String("media-playback-start")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-playback-start")).pixmap(16); | - |
5221 | break; | 0 |
5222 | case SP_MediaPause: | - |
5223 | pixmap = QIcon::fromTheme(QLatin1String("media-playback-pause")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-playback-pause")).pixmap(16); | - |
5224 | break; | 0 |
5225 | case SP_MediaStop: | - |
5226 | pixmap = QIcon::fromTheme(QLatin1String("media-playback-stop")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-playback-stop")).pixmap(16); | - |
5227 | break; | 0 |
5228 | case SP_MediaSeekForward: | - |
5229 | pixmap = QIcon::fromTheme(QLatin1String("media-seek-forward")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-seek-forward")).pixmap(16); | - |
5230 | break; | 0 |
5231 | case SP_MediaSeekBackward: | - |
5232 | pixmap = QIcon::fromTheme(QLatin1String("media-seek-backward")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-seek-backward")).pixmap(16); | - |
5233 | break; | 0 |
5234 | case SP_MediaSkipForward: | - |
5235 | pixmap = QIcon::fromTheme(QLatin1String("media-skip-forward")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-skip-forward")).pixmap(16); | - |
5236 | break; | 0 |
5237 | case SP_MediaSkipBackward: | - |
5238 | pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16); | - |
5239 | break; | 0 |
5240 | case SP_DialogResetButton: | - |
5241 | pixmap = QIcon::fromTheme(QLatin1String("edit-clear")).pixmap(24); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("edit-clear")).pixmap(24); | - |
5242 | break; | 0 |
5243 | case SP_DialogHelpButton: | - |
5244 | pixmap = QIcon::fromTheme(QLatin1String("help-contents")).pixmap(24); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("help-contents")).pixmap(24); | - |
5245 | break; | 0 |
5246 | case SP_DialogNoButton: | - |
5247 | case SP_DialogCancelButton: | - |
5248 | pixmap = QIcon::fromTheme(QLatin1String("dialog-cancel"), never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("dialog-cancel"), | - |
5249 | QIcon::fromTheme(QLatin1String("process-stop"))).pixmap(24); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("process-stop"))).pixmap(24); | - |
5250 | break; | 0 |
5251 | case SP_DialogSaveButton: | - |
5252 | pixmap = QIcon::fromTheme(QLatin1String("document-save")).pixmap(24); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("document-save")).pixmap(24); | - |
5253 | break; | 0 |
5254 | case SP_FileLinkIcon: | - |
5255 | pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); | - |
5256 | if (!pixmap.isNull()) { never evaluated: !pixmap.isNull() | 0 |
5257 | QPixmap fileIcon = QIcon::fromTheme(QLatin1String("text-x-generic")).pixmap(16); never executed (the execution status of this line is deduced): QPixmap fileIcon = QIcon::fromTheme(QLatin1String("text-x-generic")).pixmap(16); | - |
5258 | if (fileIcon.isNull()) never evaluated: fileIcon.isNull() | 0 |
5259 | fileIcon = QIcon::fromTheme(QLatin1String("empty")).pixmap(16); never executed: fileIcon = QIcon::fromTheme(QLatin1String("empty")).pixmap(16); | 0 |
5260 | if (!fileIcon.isNull()) { never evaluated: !fileIcon.isNull() | 0 |
5261 | QPainter painter(&fileIcon); never executed (the execution status of this line is deduced): QPainter painter(&fileIcon); | - |
5262 | painter.drawPixmap(0, 0, 16, 16, pixmap); never executed (the execution status of this line is deduced): painter.drawPixmap(0, 0, 16, 16, pixmap); | - |
5263 | return fileIcon; never executed: return fileIcon; | 0 |
5264 | } | - |
5265 | } | 0 |
5266 | break; | 0 |
5267 | case SP_DirLinkIcon: | - |
5268 | pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); never executed (the execution status of this line is deduced): pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16); | - |
5269 | if (!pixmap.isNull()) { never evaluated: !pixmap.isNull() | 0 |
5270 | QPixmap dirIcon = QIcon::fromTheme(QLatin1String("folder")).pixmap(16); never executed (the execution status of this line is deduced): QPixmap dirIcon = QIcon::fromTheme(QLatin1String("folder")).pixmap(16); | - |
5271 | if (!dirIcon.isNull()) { never evaluated: !dirIcon.isNull() | 0 |
5272 | QPainter painter(&dirIcon); never executed (the execution status of this line is deduced): QPainter painter(&dirIcon); | - |
5273 | painter.drawPixmap(0, 0, 16, 16, pixmap); never executed (the execution status of this line is deduced): painter.drawPixmap(0, 0, 16, 16, pixmap); | - |
5274 | return dirIcon; never executed: return dirIcon; | 0 |
5275 | } | - |
5276 | } | 0 |
5277 | break; | 0 |
5278 | default: | - |
5279 | break; | 0 |
5280 | } | - |
5281 | } | 0 |
5282 | | - |
5283 | if (!pixmap.isNull()) partially evaluated: !pixmap.isNull() no Evaluation Count:0 | yes Evaluation Count:2324 |
| 0-2324 |
5284 | return pixmap; never executed: return pixmap; | 0 |
5285 | #endif //QT_NO_IMAGEFORMAT_PNG | - |
5286 | switch (sp) { | - |
5287 | #ifndef QT_NO_IMAGEFORMAT_XPM | - |
5288 | case SP_ToolBarHorizontalExtensionButton: | - |
5289 | if (rtl) { partially evaluated: rtl no Evaluation Count:0 | yes Evaluation Count:47 |
| 0-47 |
5290 | QImage im(tb_extension_arrow_h_xpm); never executed (the execution status of this line is deduced): QImage im(tb_extension_arrow_h_xpm); | - |
5291 | im = im.convertToFormat(QImage::Format_ARGB32).mirrored(true, false); never executed (the execution status of this line is deduced): im = im.convertToFormat(QImage::Format_ARGB32).mirrored(true, false); | - |
5292 | return QPixmap::fromImage(im); never executed: return QPixmap::fromImage(im); | 0 |
5293 | } | - |
5294 | return QPixmap(tb_extension_arrow_h_xpm); executed: return QPixmap(tb_extension_arrow_h_xpm); Execution Count:47 | 47 |
5295 | case SP_ToolBarVerticalExtensionButton: | - |
5296 | return QPixmap(tb_extension_arrow_v_xpm); never executed: return QPixmap(tb_extension_arrow_v_xpm); | 0 |
5297 | case SP_FileDialogStart: | - |
5298 | return QPixmap(filedialog_start_xpm); never executed: return QPixmap(filedialog_start_xpm); | 0 |
5299 | case SP_FileDialogEnd: | - |
5300 | return QPixmap(filedialog_end_xpm); never executed: return QPixmap(filedialog_end_xpm); | 0 |
5301 | #endif | - |
5302 | #ifndef QT_NO_IMAGEFORMAT_PNG | - |
5303 | case SP_CommandLink: | - |
5304 | case SP_ArrowForward: | - |
5305 | if (rtl) partially evaluated: rtl no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
5306 | return proxy()->standardPixmap(SP_ArrowLeft, option, widget); never executed: return proxy()->standardPixmap(SP_ArrowLeft, option, widget); | 0 |
5307 | return proxy()->standardPixmap(SP_ArrowRight, option, widget); executed: return proxy()->standardPixmap(SP_ArrowRight, option, widget); Execution Count:12 | 12 |
5308 | case SP_ArrowBack: | - |
5309 | if (rtl) | 0 |
5310 | return proxy()->standardPixmap(SP_ArrowRight, option, widget); never executed: return proxy()->standardPixmap(SP_ArrowRight, option, widget); | 0 |
5311 | return proxy()->standardPixmap(SP_ArrowLeft, option, widget); never executed: return proxy()->standardPixmap(SP_ArrowLeft, option, widget); | 0 |
5312 | case SP_ArrowLeft: | - |
5313 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png")); | 0 |
5314 | case SP_ArrowRight: | - |
5315 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png")); Execution Count:12 | 12 |
5316 | case SP_ArrowUp: | - |
5317 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png")); | 0 |
5318 | case SP_ArrowDown: | - |
5319 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png")); | 0 |
5320 | case SP_FileDialogToParent: | - |
5321 | return proxy()->standardPixmap(SP_ArrowUp, option, widget); never executed: return proxy()->standardPixmap(SP_ArrowUp, option, widget); | 0 |
5322 | case SP_FileDialogNewFolder: | - |
5323 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png")); | 0 |
5324 | case SP_FileDialogDetailedView: | - |
5325 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png")); | 0 |
5326 | case SP_FileDialogInfoView: | - |
5327 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png")); | 0 |
5328 | case SP_FileDialogContentsView: | - |
5329 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png")); | 0 |
5330 | case SP_FileDialogListView: | - |
5331 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png")); | 0 |
5332 | case SP_FileDialogBack: | - |
5333 | return proxy()->standardPixmap(SP_ArrowBack, option, widget); never executed: return proxy()->standardPixmap(SP_ArrowBack, option, widget); | 0 |
5334 | case SP_DriveHDIcon: | - |
5335 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/harddrive-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/harddrive-16.png")); Execution Count:37 | 37 |
5336 | case SP_TrashIcon: | - |
5337 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png")); Execution Count:4 | 4 |
5338 | case SP_DriveFDIcon: | - |
5339 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/floppy-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/floppy-16.png")); Execution Count:8 | 8 |
5340 | case SP_DriveNetIcon: | - |
5341 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/networkdrive-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/networkdrive-16.png")); Execution Count:9 | 9 |
5342 | case SP_DesktopIcon: | - |
5343 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/desktop-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/desktop-16.png")); Execution Count:9 | 9 |
5344 | case SP_ComputerIcon: | - |
5345 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/computer-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/computer-16.png")); Execution Count:200 | 200 |
5346 | case SP_DriveCDIcon: | - |
5347 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png")); Execution Count:4 | 4 |
5348 | case SP_DriveDVDIcon: | - |
5349 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png")); Execution Count:4 | 4 |
5350 | case SP_DirHomeIcon: | - |
5351 | case SP_DirOpenIcon: | - |
5352 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png")); Execution Count:8 | 8 |
5353 | case SP_DirIcon: | - |
5354 | case SP_DirClosedIcon: | - |
5355 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png")); Execution Count:8 | 8 |
5356 | case SP_DirLinkIcon: | - |
5357 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirlink-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirlink-16.png")); Execution Count:20 | 20 |
5358 | case SP_FileIcon: | - |
5359 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png")); Execution Count:4 | 4 |
5360 | case SP_FileLinkIcon: | - |
5361 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png")); executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png")); Execution Count:4 | 4 |
5362 | case SP_DialogOkButton: | - |
5363 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png")); | 0 |
5364 | case SP_DialogCancelButton: | - |
5365 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png")); | 0 |
5366 | case SP_DialogHelpButton: | - |
5367 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png")); | 0 |
5368 | case SP_DialogOpenButton: | - |
5369 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png")); | 0 |
5370 | case SP_DialogSaveButton: | - |
5371 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png")); | 0 |
5372 | case SP_DialogCloseButton: | - |
5373 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png")); | 0 |
5374 | case SP_DialogApplyButton: | - |
5375 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png")); | 0 |
5376 | case SP_DialogResetButton: | - |
5377 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png")); | 0 |
5378 | case SP_DialogDiscardButton: | - |
5379 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png")); | 0 |
5380 | case SP_DialogYesButton: | - |
5381 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png")); | 0 |
5382 | case SP_DialogNoButton: | - |
5383 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png")); | 0 |
5384 | case SP_BrowserReload: | - |
5385 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png")); | 0 |
5386 | case SP_BrowserStop: | - |
5387 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png")); | 0 |
5388 | case SP_MediaPlay: | - |
5389 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png")); | 0 |
5390 | case SP_MediaPause: | - |
5391 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png")); | 0 |
5392 | case SP_MediaStop: | - |
5393 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png")); | 0 |
5394 | case SP_MediaSeekForward: | - |
5395 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png")); | 0 |
5396 | case SP_MediaSeekBackward: | - |
5397 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png")); | 0 |
5398 | case SP_MediaSkipForward: | - |
5399 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png")); | 0 |
5400 | case SP_MediaSkipBackward: | - |
5401 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png")); | 0 |
5402 | case SP_MediaVolume: | - |
5403 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png")); | 0 |
5404 | case SP_MediaVolumeMuted: | - |
5405 | return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png")); never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png")); | 0 |
5406 | #endif // QT_NO_IMAGEFORMAT_PNG | - |
5407 | default: | - |
5408 | break; executed: break; Execution Count:1934 | 1934 |
5409 | } | - |
5410 | | - |
5411 | #ifndef QT_NO_IMAGEFORMAT_XPM | - |
5412 | switch (sp) { | - |
5413 | case SP_TitleBarMenuButton: | - |
5414 | return QPixmap(qt_menu_xpm); executed: return QPixmap(qt_menu_xpm); Execution Count:344 | 344 |
5415 | case SP_TitleBarShadeButton: | - |
5416 | return QPixmap(qt_shade_xpm); executed: return QPixmap(qt_shade_xpm); Execution Count:9 | 9 |
5417 | case SP_TitleBarUnshadeButton: | - |
5418 | return QPixmap(qt_unshade_xpm); executed: return QPixmap(qt_unshade_xpm); Execution Count:9 | 9 |
5419 | case SP_TitleBarNormalButton: | - |
5420 | return QPixmap(qt_normalizeup_xpm); executed: return QPixmap(qt_normalizeup_xpm); Execution Count:331 | 331 |
5421 | case SP_TitleBarMinButton: | - |
5422 | return QPixmap(qt_minimize_xpm); executed: return QPixmap(qt_minimize_xpm); Execution Count:304 | 304 |
5423 | case SP_TitleBarMaxButton: | - |
5424 | return QPixmap(qt_maximize_xpm); executed: return QPixmap(qt_maximize_xpm); Execution Count:263 | 263 |
5425 | case SP_TitleBarCloseButton: | - |
5426 | return QPixmap(qt_close_xpm); executed: return QPixmap(qt_close_xpm); Execution Count:578 | 578 |
5427 | case SP_TitleBarContextHelpButton: | - |
5428 | return QPixmap(qt_help_xpm); executed: return QPixmap(qt_help_xpm); Execution Count:9 | 9 |
5429 | case SP_DockWidgetCloseButton: | - |
5430 | return QPixmap(dock_widget_close_xpm); executed: return QPixmap(dock_widget_close_xpm); Execution Count:7 | 7 |
5431 | case SP_MessageBoxInformation: | - |
5432 | return QPixmap(information_xpm); executed: return QPixmap(information_xpm); Execution Count:25 | 25 |
5433 | case SP_MessageBoxWarning: | - |
5434 | return QPixmap(warning_xpm); executed: return QPixmap(warning_xpm); Execution Count:15 | 15 |
5435 | case SP_MessageBoxCritical: | - |
5436 | return QPixmap(critical_xpm); executed: return QPixmap(critical_xpm); Execution Count:16 | 16 |
5437 | case SP_MessageBoxQuestion: | - |
5438 | return QPixmap(question_xpm); executed: return QPixmap(question_xpm); Execution Count:16 | 16 |
5439 | default: | - |
5440 | break; executed: break; Execution Count:8 | 8 |
5441 | } | - |
5442 | #endif //QT_NO_IMAGEFORMAT_XPM | - |
5443 | | - |
5444 | | - |
5445 | return QPixmap(); executed: return QPixmap(); Execution Count:8 | 8 |
5446 | } | - |
5447 | | - |
5448 | /*! | - |
5449 | \internal | - |
5450 | */ | - |
5451 | QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, | - |
5452 | const QWidget *widget) const | - |
5453 | { | - |
5454 | QIcon icon; executed (the execution status of this line is deduced): QIcon icon; | - |
5455 | #ifdef Q_OS_WIN | - |
5456 | switch (standardIcon) { | - |
5457 | case SP_DriveCDIcon: | - |
5458 | case SP_DriveDVDIcon: | - |
5459 | case SP_DriveNetIcon: | - |
5460 | case SP_DriveHDIcon: | - |
5461 | case SP_DriveFDIcon: | - |
5462 | case SP_FileIcon: | - |
5463 | case SP_FileLinkIcon: | - |
5464 | case SP_DesktopIcon: | - |
5465 | case SP_ComputerIcon: | - |
5466 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { | - |
5467 | QPlatformTheme::StandardPixmap sp = static_cast<QPlatformTheme::StandardPixmap>(standardIcon); | - |
5468 | for (int size = 16 ; size <= 32 ; size += 16) { | - |
5469 | QPixmap pixmap = theme->standardPixmap(sp, QSizeF(size, size)); | - |
5470 | icon.addPixmap(pixmap, QIcon::Normal); | - |
5471 | } | - |
5472 | } | - |
5473 | break; | - |
5474 | case SP_DirIcon: | - |
5475 | case SP_DirLinkIcon: | - |
5476 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { | - |
5477 | QPlatformTheme::StandardPixmap spOff = static_cast<QPlatformTheme::StandardPixmap>(standardIcon); | - |
5478 | QPlatformTheme::StandardPixmap spOn = standardIcon == SP_DirIcon ? QPlatformTheme::DirOpenIcon : | - |
5479 | QPlatformTheme::DirLinkOpenIcon; | - |
5480 | for (int size = 16 ; size <= 32 ; size += 16) { | - |
5481 | QSizeF pixSize(size, size); | - |
5482 | QPixmap pixmap = theme->standardPixmap(spOff, pixSize); | - |
5483 | icon.addPixmap(pixmap, QIcon::Normal, QIcon::Off); | - |
5484 | pixmap = theme->standardPixmap(spOn, pixSize); | - |
5485 | icon.addPixmap(pixmap, QIcon::Normal, QIcon::On); | - |
5486 | } | - |
5487 | } | - |
5488 | break; | - |
5489 | case SP_VistaShield: | - |
5490 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { | - |
5491 | QPlatformTheme::StandardPixmap sp = static_cast<QPlatformTheme::StandardPixmap>(standardIcon); | - |
5492 | QPixmap pixmap = theme->standardPixmap(sp, QSizeF(32, 32)); | - |
5493 | icon.addPixmap(pixmap); | - |
5494 | } | - |
5495 | break; | - |
5496 | default: | - |
5497 | break; | - |
5498 | } | - |
5499 | if (!icon.isNull()) | - |
5500 | return icon; | - |
5501 | | - |
5502 | #endif | - |
5503 | | - |
5504 | const bool rtl = (option && option->direction == Qt::RightToLeft) || (!option && QApplication::isRightToLeft()); evaluated: option yes Evaluation Count:1017 | yes Evaluation Count:3514 |
evaluated: option->direction == Qt::RightToLeft yes Evaluation Count:3 | yes Evaluation Count:1014 |
evaluated: !option yes Evaluation Count:3514 | yes Evaluation Count:1014 |
evaluated: QApplication::isRightToLeft() yes Evaluation Count:5 | yes Evaluation Count:3509 |
| 3-3514 |
5505 | if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { partially evaluated: QApplication::desktopSettingsAware() yes Evaluation Count:4531 | no Evaluation Count:0 |
partially evaluated: !QIcon::themeName().isEmpty() no Evaluation Count:0 | yes Evaluation Count:4531 |
| 0-4531 |
5506 | switch (standardIcon) { | - |
5507 | case SP_DirHomeIcon: | - |
5508 | icon = QIcon::fromTheme(QLatin1String("user-home")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("user-home")); | - |
5509 | break; | 0 |
5510 | case SP_MessageBoxInformation: | - |
5511 | icon = QIcon::fromTheme(QLatin1String("dialog-information")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-information")); | - |
5512 | break; | 0 |
5513 | case SP_MessageBoxWarning: | - |
5514 | icon = QIcon::fromTheme(QLatin1String("dialog-warning")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-warning")); | - |
5515 | break; | 0 |
5516 | case SP_MessageBoxCritical: | - |
5517 | icon = QIcon::fromTheme(QLatin1String("dialog-error")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-error")); | - |
5518 | break; | 0 |
5519 | case SP_MessageBoxQuestion: | - |
5520 | icon = QIcon::fromTheme(QLatin1String("dialog-question")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-question")); | - |
5521 | break; | 0 |
5522 | case SP_DialogOpenButton: | - |
5523 | case SP_DirOpenIcon: | - |
5524 | icon = QIcon::fromTheme(QLatin1String("folder-open")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("folder-open")); | - |
5525 | break; | 0 |
5526 | case SP_DialogSaveButton: | - |
5527 | icon = QIcon::fromTheme(QLatin1String("document-save")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("document-save")); | - |
5528 | break; | 0 |
5529 | case SP_DialogApplyButton: | - |
5530 | icon = QIcon::fromTheme(QLatin1String("dialog-ok-apply")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-ok-apply")); | - |
5531 | break; | 0 |
5532 | case SP_DialogYesButton: | - |
5533 | case SP_DialogOkButton: | - |
5534 | icon = QIcon::fromTheme(QLatin1String("dialog-ok")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-ok")); | - |
5535 | break; | 0 |
5536 | case SP_DialogDiscardButton: | - |
5537 | icon = QIcon::fromTheme(QLatin1String("edit-delete")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("edit-delete")); | - |
5538 | break; | 0 |
5539 | case SP_DialogResetButton: | - |
5540 | icon = QIcon::fromTheme(QLatin1String("edit-clear")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("edit-clear")); | - |
5541 | break; | 0 |
5542 | case SP_DialogHelpButton: | - |
5543 | icon = QIcon::fromTheme(QLatin1String("help-contents")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("help-contents")); | - |
5544 | break; | 0 |
5545 | case SP_FileIcon: | - |
5546 | icon = QIcon::fromTheme(QLatin1String("text-x-generic")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("text-x-generic")); | - |
5547 | break; | 0 |
5548 | case SP_DirClosedIcon: | - |
5549 | case SP_DirIcon: | - |
5550 | icon = QIcon::fromTheme(QLatin1String("folder")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("folder")); | - |
5551 | break; | 0 |
5552 | case SP_DriveFDIcon: | - |
5553 | icon = QIcon::fromTheme(QLatin1String("floppy_unmount")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("floppy_unmount")); | - |
5554 | break; | 0 |
5555 | case SP_ComputerIcon: | - |
5556 | icon = QIcon::fromTheme(QLatin1String("computer"), never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("computer"), | - |
5557 | QIcon::fromTheme(QLatin1String("system"))); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("system"))); | - |
5558 | break; | 0 |
5559 | case SP_DesktopIcon: | - |
5560 | icon = QIcon::fromTheme(QLatin1String("user-desktop")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("user-desktop")); | - |
5561 | break; | 0 |
5562 | case SP_TrashIcon: | - |
5563 | icon = QIcon::fromTheme(QLatin1String("user-trash")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("user-trash")); | - |
5564 | break; | 0 |
5565 | case SP_DriveCDIcon: | - |
5566 | case SP_DriveDVDIcon: | - |
5567 | icon = QIcon::fromTheme(QLatin1String("media-optical")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-optical")); | - |
5568 | break; | 0 |
5569 | case SP_DriveHDIcon: | - |
5570 | icon = QIcon::fromTheme(QLatin1String("drive-harddisk")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("drive-harddisk")); | - |
5571 | break; | 0 |
5572 | case SP_FileDialogToParent: | - |
5573 | icon = QIcon::fromTheme(QLatin1String("go-up")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("go-up")); | - |
5574 | break; | 0 |
5575 | case SP_FileDialogNewFolder: | - |
5576 | icon = QIcon::fromTheme(QLatin1String("folder-new")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("folder-new")); | - |
5577 | break; | 0 |
5578 | case SP_ArrowUp: | - |
5579 | icon = QIcon::fromTheme(QLatin1String("go-up")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("go-up")); | - |
5580 | break; | 0 |
5581 | case SP_ArrowDown: | - |
5582 | icon = QIcon::fromTheme(QLatin1String("go-down")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("go-down")); | - |
5583 | break; | 0 |
5584 | case SP_ArrowRight: | - |
5585 | icon = QIcon::fromTheme(QLatin1String("go-next")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("go-next")); | - |
5586 | break; | 0 |
5587 | case SP_ArrowLeft: | - |
5588 | icon = QIcon::fromTheme(QLatin1String("go-previous")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("go-previous")); | - |
5589 | break; | 0 |
5590 | case SP_DialogCancelButton: | - |
5591 | icon = QIcon::fromTheme(QLatin1String("dialog-cancel"), never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("dialog-cancel"), | - |
5592 | QIcon::fromTheme(QLatin1String("process-stop"))); never executed (the execution status of this line is deduced): QIcon::fromTheme(QLatin1String("process-stop"))); | - |
5593 | break; | 0 |
5594 | case SP_DialogCloseButton: | - |
5595 | icon = QIcon::fromTheme(QLatin1String("window-close")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("window-close")); | - |
5596 | break; | 0 |
5597 | case SP_FileDialogDetailedView: | - |
5598 | icon = QIcon::fromTheme(QLatin1String("view-list-details")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("view-list-details")); | - |
5599 | break; | 0 |
5600 | case SP_FileDialogListView: | - |
5601 | icon = QIcon::fromTheme(QLatin1String("view-list-icons")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("view-list-icons")); | - |
5602 | break; | 0 |
5603 | case SP_BrowserReload: | - |
5604 | icon = QIcon::fromTheme(QLatin1String("view-refresh")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("view-refresh")); | - |
5605 | break; | 0 |
5606 | case SP_BrowserStop: | - |
5607 | icon = QIcon::fromTheme(QLatin1String("process-stop")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("process-stop")); | - |
5608 | break; | 0 |
5609 | case SP_MediaPlay: | - |
5610 | icon = QIcon::fromTheme(QLatin1String("media-playback-start")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-playback-start")); | - |
5611 | break; | 0 |
5612 | case SP_MediaPause: | - |
5613 | icon = QIcon::fromTheme(QLatin1String("media-playback-pause")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-playback-pause")); | - |
5614 | break; | 0 |
5615 | case SP_MediaStop: | - |
5616 | icon = QIcon::fromTheme(QLatin1String("media-playback-stop")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-playback-stop")); | - |
5617 | break; | 0 |
5618 | case SP_MediaSeekForward: | - |
5619 | icon = QIcon::fromTheme(QLatin1String("media-seek-forward")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-seek-forward")); | - |
5620 | break; | 0 |
5621 | case SP_MediaSeekBackward: | - |
5622 | icon = QIcon::fromTheme(QLatin1String("media-seek-backward")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-seek-backward")); | - |
5623 | break; | 0 |
5624 | case SP_MediaSkipForward: | - |
5625 | icon = QIcon::fromTheme(QLatin1String("media-skip-forward")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-skip-forward")); | - |
5626 | break; | 0 |
5627 | case SP_MediaSkipBackward: | - |
5628 | icon = QIcon::fromTheme(QLatin1String("media-skip-backward")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("media-skip-backward")); | - |
5629 | break; | 0 |
5630 | case SP_MediaVolume: | - |
5631 | icon = QIcon::fromTheme(QLatin1String("audio-volume-medium")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("audio-volume-medium")); | - |
5632 | break; | 0 |
5633 | case SP_MediaVolumeMuted: | - |
5634 | icon = QIcon::fromTheme(QLatin1String("audio-volume-muted")); never executed (the execution status of this line is deduced): icon = QIcon::fromTheme(QLatin1String("audio-volume-muted")); | - |
5635 | break; | 0 |
5636 | case SP_ArrowForward: | - |
5637 | if (rtl) | 0 |
5638 | return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); | 0 |
5639 | return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); | 0 |
5640 | case SP_ArrowBack: | - |
5641 | if (rtl) | 0 |
5642 | return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); | 0 |
5643 | return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); | 0 |
5644 | case SP_FileLinkIcon: | - |
5645 | { | - |
5646 | QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")); never executed (the execution status of this line is deduced): QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")); | - |
5647 | if (!linkIcon.isNull()) { never evaluated: !linkIcon.isNull() | 0 |
5648 | QIcon baseIcon = QCommonStyle::standardIcon(SP_FileIcon, option, widget); never executed (the execution status of this line is deduced): QIcon baseIcon = QCommonStyle::standardIcon(SP_FileIcon, option, widget); | - |
5649 | const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off); never executed (the execution status of this line is deduced): const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off); | - |
5650 | for (int i = 0 ; i < sizes.size() ; ++i) { never evaluated: i < sizes.size() | 0 |
5651 | int size = sizes[i].width(); never executed (the execution status of this line is deduced): int size = sizes[i].width(); | - |
5652 | QPixmap basePixmap = baseIcon.pixmap(size); never executed (the execution status of this line is deduced): QPixmap basePixmap = baseIcon.pixmap(size); | - |
5653 | QPixmap linkPixmap = linkIcon.pixmap(size/2); never executed (the execution status of this line is deduced): QPixmap linkPixmap = linkIcon.pixmap(size/2); | - |
5654 | QPainter painter(&basePixmap); never executed (the execution status of this line is deduced): QPainter painter(&basePixmap); | - |
5655 | painter.drawPixmap(size/2, size/2, linkPixmap); never executed (the execution status of this line is deduced): painter.drawPixmap(size/2, size/2, linkPixmap); | - |
5656 | icon.addPixmap(basePixmap); never executed (the execution status of this line is deduced): icon.addPixmap(basePixmap); | - |
5657 | } | 0 |
5658 | } | 0 |
5659 | } | - |
5660 | break; | 0 |
5661 | case SP_DirLinkIcon: | - |
5662 | { | - |
5663 | QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")); never executed (the execution status of this line is deduced): QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")); | - |
5664 | if (!linkIcon.isNull()) { never evaluated: !linkIcon.isNull() | 0 |
5665 | QIcon baseIcon = QCommonStyle::standardIcon(SP_DirIcon, option, widget); never executed (the execution status of this line is deduced): QIcon baseIcon = QCommonStyle::standardIcon(SP_DirIcon, option, widget); | - |
5666 | const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off); never executed (the execution status of this line is deduced): const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off); | - |
5667 | for (int i = 0 ; i < sizes.size() ; ++i) { never evaluated: i < sizes.size() | 0 |
5668 | int size = sizes[i].width(); never executed (the execution status of this line is deduced): int size = sizes[i].width(); | - |
5669 | QPixmap basePixmap = baseIcon.pixmap(size); never executed (the execution status of this line is deduced): QPixmap basePixmap = baseIcon.pixmap(size); | - |
5670 | QPixmap linkPixmap = linkIcon.pixmap(size/2); never executed (the execution status of this line is deduced): QPixmap linkPixmap = linkIcon.pixmap(size/2); | - |
5671 | QPainter painter(&basePixmap); never executed (the execution status of this line is deduced): QPainter painter(&basePixmap); | - |
5672 | painter.drawPixmap(size/2, size/2, linkPixmap); never executed (the execution status of this line is deduced): painter.drawPixmap(size/2, size/2, linkPixmap); | - |
5673 | icon.addPixmap(basePixmap); never executed (the execution status of this line is deduced): icon.addPixmap(basePixmap); | - |
5674 | } | 0 |
5675 | } | 0 |
5676 | } | - |
5677 | break; | 0 |
5678 | default: | - |
5679 | break; | 0 |
5680 | } | - |
5681 | } // if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) | 0 |
5682 | | - |
5683 | if (!icon.isNull()) partially evaluated: !icon.isNull() no Evaluation Count:0 | yes Evaluation Count:4531 |
| 0-4531 |
5684 | return icon; never executed: return icon; | 0 |
5685 | | - |
5686 | #if defined(Q_OS_MAC) | - |
5687 | if (QApplication::desktopSettingsAware()) { | - |
5688 | switch (standardIcon) { | - |
5689 | case SP_DirIcon: { | - |
5690 | // A rather special case | - |
5691 | QIcon closeIcon = QCommonStyle::standardIcon(SP_DirClosedIcon, option, widget); | - |
5692 | QIcon openIcon = QCommonStyle::standardIcon(SP_DirOpenIcon, option, widget); | - |
5693 | closeIcon.addPixmap(openIcon.pixmap(16, 16), QIcon::Normal, QIcon::On); | - |
5694 | closeIcon.addPixmap(openIcon.pixmap(32, 32), QIcon::Normal, QIcon::On); | - |
5695 | closeIcon.addPixmap(openIcon.pixmap(64, 64), QIcon::Normal, QIcon::On); | - |
5696 | closeIcon.addPixmap(openIcon.pixmap(128, 128), QIcon::Normal, QIcon::On); | - |
5697 | return closeIcon; | - |
5698 | } | - |
5699 | | - |
5700 | case SP_TitleBarNormalButton: | - |
5701 | case SP_TitleBarCloseButton: { | - |
5702 | QIcon titleBarIcon; | - |
5703 | if (standardIcon == SP_TitleBarCloseButton) { | - |
5704 | titleBarIcon.addFile(QLatin1String(":/qt-project.org/styles/macstyle/images/closedock-16.png")); | - |
5705 | titleBarIcon.addFile(QLatin1String(":/qt-project.org/styles/macstyle/images/closedock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On); | - |
5706 | } else { | - |
5707 | titleBarIcon.addFile(QLatin1String(":/qt-project.org/styles/macstyle/images/dockdock-16.png")); | - |
5708 | titleBarIcon.addFile(QLatin1String(":/qt-project.org/styles/macstyle/images/dockdock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On); | - |
5709 | } | - |
5710 | return titleBarIcon; | - |
5711 | } | - |
5712 | | - |
5713 | case SP_MessageBoxQuestion: | - |
5714 | case SP_MessageBoxInformation: | - |
5715 | case SP_MessageBoxWarning: | - |
5716 | case SP_MessageBoxCritical: | - |
5717 | case SP_DesktopIcon: | - |
5718 | case SP_TrashIcon: | - |
5719 | case SP_ComputerIcon: | - |
5720 | case SP_DriveFDIcon: | - |
5721 | case SP_DriveHDIcon: | - |
5722 | case SP_DriveCDIcon: | - |
5723 | case SP_DriveDVDIcon: | - |
5724 | case SP_DriveNetIcon: | - |
5725 | case SP_DirOpenIcon: | - |
5726 | case SP_DirClosedIcon: | - |
5727 | case SP_DirLinkIcon: | - |
5728 | case SP_FileLinkIcon: | - |
5729 | case SP_FileIcon: | - |
5730 | if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { | - |
5731 | QPlatformTheme::StandardPixmap sp = static_cast<QPlatformTheme::StandardPixmap>(standardIcon); | - |
5732 | QIcon retIcon; | - |
5733 | QList<int> sizes = theme->themeHint(QPlatformTheme::IconPixmapSizes).value<QList<int> >(); | - |
5734 | Q_FOREACH (int size, sizes) { | - |
5735 | QPixmap mainIcon; | - |
5736 | const QString cacheKey = QLatin1String("qt_mac_constructQIconFromIconRef") + QString::number(standardIcon) + QString::number(size); | - |
5737 | if (standardIcon >= QStyle::SP_CustomBase) { | - |
5738 | mainIcon = theme->standardPixmap(sp, QSizeF(size, size)); | - |
5739 | } else if (QPixmapCache::find(cacheKey, mainIcon) == false) { | - |
5740 | mainIcon = theme->standardPixmap(sp, QSizeF(size, size)); | - |
5741 | QPixmapCache::insert(cacheKey, mainIcon); | - |
5742 | } | - |
5743 | | - |
5744 | retIcon.addPixmap(mainIcon); | - |
5745 | } | - |
5746 | if (!retIcon.isNull()) | - |
5747 | return retIcon; | - |
5748 | } | - |
5749 | | - |
5750 | default: | - |
5751 | break; | - |
5752 | } | - |
5753 | } // if (QApplication::desktopSettingsAware()) | - |
5754 | #endif // Q_OS_MAC | - |
5755 | | - |
5756 | switch (standardIcon) { | - |
5757 | #ifndef QT_NO_IMAGEFORMAT_PNG | - |
5758 | case SP_FileDialogNewFolder: | - |
5759 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"), QSize(16, 16)); | - |
5760 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-32.png"), QSize(32, 32)); | - |
5761 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-128.png"), QSize(128, 128)); | - |
5762 | break; executed: break; Execution Count:189 | 189 |
5763 | case SP_FileDialogBack: | - |
5764 | return QCommonStyle::standardIcon(SP_ArrowBack, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowBack, option, widget); | 0 |
5765 | case SP_FileDialogToParent: | - |
5766 | return QCommonStyle::standardIcon(SP_ArrowUp, option, widget); executed: return QCommonStyle::standardIcon(SP_ArrowUp, option, widget); Execution Count:189 | 189 |
5767 | case SP_FileDialogDetailedView: | - |
5768 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png"), QSize(16, 16)); | - |
5769 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-32.png"), QSize(32, 32)); | - |
5770 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-128.png"), QSize(128, 128)); | - |
5771 | break; executed: break; Execution Count:189 | 189 |
5772 | case SP_FileDialogInfoView: | - |
5773 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png"), QSize(16, 16)); | - |
5774 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-32.png"), QSize(32, 32)); | - |
5775 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-128.png"), QSize(128, 128)); | - |
5776 | break; | 0 |
5777 | case SP_FileDialogContentsView: | - |
5778 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png"), QSize(16, 16)); | - |
5779 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-32.png"), QSize(32, 32)); | - |
5780 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-128.png"), QSize(128, 128)); | - |
5781 | break; | 0 |
5782 | case SP_FileDialogListView: | - |
5783 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png"), QSize(16, 16)); | - |
5784 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-32.png"), QSize(32, 32)); | - |
5785 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-128.png"), QSize(128, 128)); | - |
5786 | break; executed: break; Execution Count:189 | 189 |
5787 | case SP_DialogOkButton: | - |
5788 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png"), QSize(16, 16)); | - |
5789 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-32.png"), QSize(32, 32)); | - |
5790 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-128.png"), QSize(128, 128)); | - |
5791 | break; | 0 |
5792 | case SP_DialogCancelButton: | - |
5793 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png"), QSize(16, 16)); | - |
5794 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-32.png"), QSize(32, 32)); | - |
5795 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-128.png"), QSize(128, 128)); | - |
5796 | break; | 0 |
5797 | case SP_DialogHelpButton: | - |
5798 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png"), QSize(16, 16)); | - |
5799 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-32.png"), QSize(32, 32)); | - |
5800 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-128.png"), QSize(128, 128)); | - |
5801 | break; | 0 |
5802 | case SP_DialogOpenButton: | - |
5803 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png"), QSize(16, 16)); | - |
5804 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-32.png"), QSize(32, 32)); | - |
5805 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-128.png"), QSize(128, 128)); | - |
5806 | break; | 0 |
5807 | case SP_DialogSaveButton: | - |
5808 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png"), QSize(16, 16)); | - |
5809 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-32.png"), QSize(32, 32)); | - |
5810 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-128.png"), QSize(128, 128)); | - |
5811 | break; | 0 |
5812 | case SP_DialogCloseButton: | - |
5813 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png"), QSize(16, 16)); | - |
5814 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-32.png"), QSize(32, 32)); | - |
5815 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-128.png"), QSize(128, 128)); | - |
5816 | break; | 0 |
5817 | case SP_DialogApplyButton: | - |
5818 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png"), QSize(16, 16)); | - |
5819 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-32.png"), QSize(32, 32)); | - |
5820 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-128.png"), QSize(128, 128)); | - |
5821 | break; | 0 |
5822 | case SP_DialogResetButton: | - |
5823 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png"), QSize(16, 16)); | - |
5824 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-32.png"), QSize(32, 32)); | - |
5825 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-128.png"), QSize(128, 128)); | - |
5826 | break; | 0 |
5827 | case SP_DialogDiscardButton: | - |
5828 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png"), QSize(16, 16)); | - |
5829 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-32.png"), QSize(32, 32)); | - |
5830 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-128.png"), QSize(128, 128)); | - |
5831 | break; | 0 |
5832 | case SP_DialogYesButton: | - |
5833 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png"), QSize(16, 16)); | - |
5834 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-32.png"), QSize(32, 32)); | - |
5835 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-128.png"), QSize(128, 128)); | - |
5836 | break; | 0 |
5837 | case SP_DialogNoButton: | - |
5838 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png"), QSize(16, 16)); | - |
5839 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-32.png"), QSize(32, 32)); | - |
5840 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-128.png"), QSize(128, 128)); | - |
5841 | break; | 0 |
5842 | case SP_ArrowForward: | - |
5843 | if (rtl) partially evaluated: rtl no Evaluation Count:0 | yes Evaluation Count:189 |
| 0-189 |
5844 | return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); | 0 |
5845 | return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); Execution Count:189 | 189 |
5846 | case SP_ArrowBack: | - |
5847 | if (rtl) partially evaluated: rtl no Evaluation Count:0 | yes Evaluation Count:190 |
| 0-190 |
5848 | return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget); | 0 |
5849 | return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget); Execution Count:190 | 190 |
5850 | case SP_ArrowLeft: | - |
5851 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png"), QSize(16, 16)); | - |
5852 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-32.png"), QSize(32, 32)); | - |
5853 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-128.png"), QSize(128, 128)); | - |
5854 | break; executed: break; Execution Count:219 | 219 |
5855 | case SP_ArrowRight: | - |
5856 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png"), QSize(16, 16)); | - |
5857 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-32.png"), QSize(32, 32)); | - |
5858 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-128.png"), QSize(128, 128)); | - |
5859 | break; executed: break; Execution Count:218 | 218 |
5860 | case SP_ArrowUp: | - |
5861 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png"), QSize(16, 16)); | - |
5862 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-32.png"), QSize(32, 32)); | - |
5863 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-128.png"), QSize(128, 128)); | - |
5864 | break; executed: break; Execution Count:189 | 189 |
5865 | case SP_ArrowDown: | - |
5866 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png"), QSize(16, 16)); | - |
5867 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-32.png"), QSize(32, 32)); | - |
5868 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-128.png"), QSize(128, 128)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-128.png"), QSize(128, 128)); | - |
5869 | break; | 0 |
5870 | case SP_DirHomeIcon: | - |
5871 | case SP_DirIcon: | - |
5872 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png"), executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png"), | - |
5873 | QSize(), QIcon::Normal, QIcon::Off); executed (the execution status of this line is deduced): QSize(), QIcon::Normal, QIcon::Off); | - |
5874 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png"), executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png"), | - |
5875 | QSize(), QIcon::Normal, QIcon::On); executed (the execution status of this line is deduced): QSize(), QIcon::Normal, QIcon::On); | - |
5876 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-32.png"), executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-32.png"), | - |
5877 | QSize(32, 32), QIcon::Normal, QIcon::Off); executed (the execution status of this line is deduced): QSize(32, 32), QIcon::Normal, QIcon::Off); | - |
5878 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-32.png"), executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-32.png"), | - |
5879 | QSize(32, 32), QIcon::Normal, QIcon::On); executed (the execution status of this line is deduced): QSize(32, 32), QIcon::Normal, QIcon::On); | - |
5880 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-128.png"), executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-128.png"), | - |
5881 | QSize(128, 128), QIcon::Normal, QIcon::Off); executed (the execution status of this line is deduced): QSize(128, 128), QIcon::Normal, QIcon::Off); | - |
5882 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-128.png"), executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-128.png"), | - |
5883 | QSize(128, 128), QIcon::Normal, QIcon::On); executed (the execution status of this line is deduced): QSize(128, 128), QIcon::Normal, QIcon::On); | - |
5884 | break; executed: break; Execution Count:448 | 448 |
5885 | case SP_DriveCDIcon: | - |
5886 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png"), QSize(16, 16)); | - |
5887 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-32.png"), QSize(32, 32)); | - |
5888 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-128.png"), QSize(128, 128)); | - |
5889 | break; executed: break; Execution Count:4 | 4 |
5890 | case SP_DriveDVDIcon: | - |
5891 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png"), QSize(16, 16)); | - |
5892 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-32.png"), QSize(32, 32)); | - |
5893 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-128.png"), QSize(128, 128)); | - |
5894 | break; executed: break; Execution Count:5 | 5 |
5895 | case SP_FileIcon: | - |
5896 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png"), QSize(16, 16)); | - |
5897 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-32.png"), QSize(32, 32)); | - |
5898 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-128.png"), QSize(128, 128)); | - |
5899 | break; executed: break; Execution Count:93 | 93 |
5900 | case SP_FileLinkIcon: | - |
5901 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png"), QSize(16, 16)); | - |
5902 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-32.png"), QSize(32, 32)); | - |
5903 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-128.png"), QSize(128, 128)); | - |
5904 | break; executed: break; Execution Count:17 | 17 |
5905 | case SP_TrashIcon: | - |
5906 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png"), QSize(16, 16)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png"), QSize(16, 16)); | - |
5907 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-32.png"), QSize(32, 32)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-32.png"), QSize(32, 32)); | - |
5908 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-128.png"), QSize(128, 128)); executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-128.png"), QSize(128, 128)); | - |
5909 | break; executed: break; Execution Count:5 | 5 |
5910 | case SP_BrowserReload: | - |
5911 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png"), QSize(24, 24)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png"), QSize(24, 24)); | - |
5912 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-32.png"), QSize(32, 32)); | - |
5913 | break; | 0 |
5914 | case SP_BrowserStop: | - |
5915 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png"), QSize(24, 24)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png"), QSize(24, 24)); | - |
5916 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-32.png"), QSize(32, 32)); | - |
5917 | break; | 0 |
5918 | case SP_MediaPlay: | - |
5919 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-16.png"), QSize(16, 16)); | - |
5920 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png"), QSize(32, 32)); | - |
5921 | break; | 0 |
5922 | case SP_MediaPause: | - |
5923 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-16.png"), QSize(16, 16)); | - |
5924 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png"), QSize(32, 32)); | - |
5925 | break; | 0 |
5926 | case SP_MediaStop: | - |
5927 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-16.png"), QSize(16, 16)); | - |
5928 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png"), QSize(32, 32)); | - |
5929 | break; | 0 |
5930 | case SP_MediaSeekForward: | - |
5931 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-16.png"), QSize(16, 16)); | - |
5932 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png"), QSize(32, 32)); | - |
5933 | break; | 0 |
5934 | case SP_MediaSeekBackward: | - |
5935 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-16.png"), QSize(16, 16)); | - |
5936 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png"), QSize(32, 32)); | - |
5937 | break; | 0 |
5938 | case SP_MediaSkipForward: | - |
5939 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-16.png"), QSize(16, 16)); | - |
5940 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png"), QSize(32, 32)); | - |
5941 | break; | 0 |
5942 | case SP_MediaSkipBackward: | - |
5943 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-16.png"), QSize(16, 16)); | - |
5944 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png"), QSize(32, 32)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png"), QSize(32, 32)); | - |
5945 | break; | 0 |
5946 | case SP_MediaVolume: | - |
5947 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png"), QSize(16, 16)); | - |
5948 | break; | 0 |
5949 | case SP_MediaVolumeMuted: | - |
5950 | icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png"), QSize(16, 16)); never executed (the execution status of this line is deduced): icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png"), QSize(16, 16)); | - |
5951 | break; | 0 |
5952 | #endif // QT_NO_IMAGEFORMAT_PNG | - |
5953 | default: | - |
5954 | icon.addPixmap(proxy()->standardPixmap(standardIcon, option, widget)); executed (the execution status of this line is deduced): icon.addPixmap(proxy()->standardPixmap(standardIcon, option, widget)); | - |
5955 | break; executed: break; Execution Count:2198 | 2198 |
5956 | } | - |
5957 | return icon; executed: return icon; Execution Count:3963 | 3963 |
5958 | } | - |
5959 | | - |
5960 | static inline uint qt_intensity(uint r, uint g, uint b) | - |
5961 | { | - |
5962 | // 30% red, 59% green, 11% blue | - |
5963 | return (77 * r + 150 * g + 28 * b) / 255; executed: return (77 * r + 150 * g + 28 * b) / 255; Execution Count:18 | 18 |
5964 | } | - |
5965 | | - |
5966 | /*! \reimp */ | - |
5967 | QPixmap QCommonStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, | - |
5968 | const QStyleOption *opt) const | - |
5969 | { | - |
5970 | switch (iconMode) { | - |
5971 | case QIcon::Disabled: { | - |
5972 | QImage im = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); executed (the execution status of this line is deduced): QImage im = pixmap.toImage().convertToFormat(QImage::Format_ARGB32); | - |
5973 | | - |
5974 | // Create a colortable based on the background (black -> bg -> white) | - |
5975 | QColor bg = opt->palette.color(QPalette::Disabled, QPalette::Window); executed (the execution status of this line is deduced): QColor bg = opt->palette.color(QPalette::Disabled, QPalette::Window); | - |
5976 | int red = bg.red(); executed (the execution status of this line is deduced): int red = bg.red(); | - |
5977 | int green = bg.green(); executed (the execution status of this line is deduced): int green = bg.green(); | - |
5978 | int blue = bg.blue(); executed (the execution status of this line is deduced): int blue = bg.blue(); | - |
5979 | uchar reds[256], greens[256], blues[256]; executed (the execution status of this line is deduced): uchar reds[256], greens[256], blues[256]; | - |
5980 | for (int i=0; i<128; ++i) { evaluated: i<128 yes Evaluation Count:2304 | yes Evaluation Count:18 |
| 18-2304 |
5981 | reds[i] = uchar((red * (i<<1)) >> 8); executed (the execution status of this line is deduced): reds[i] = uchar((red * (i<<1)) >> 8); | - |
5982 | greens[i] = uchar((green * (i<<1)) >> 8); executed (the execution status of this line is deduced): greens[i] = uchar((green * (i<<1)) >> 8); | - |
5983 | blues[i] = uchar((blue * (i<<1)) >> 8); executed (the execution status of this line is deduced): blues[i] = uchar((blue * (i<<1)) >> 8); | - |
5984 | } executed: } Execution Count:2304 | 2304 |
5985 | for (int i=0; i<128; ++i) { evaluated: i<128 yes Evaluation Count:2304 | yes Evaluation Count:18 |
| 18-2304 |
5986 | reds[i+128] = uchar(qMin(red + (i << 1), 255)); executed (the execution status of this line is deduced): reds[i+128] = uchar(qMin(red + (i << 1), 255)); | - |
5987 | greens[i+128] = uchar(qMin(green + (i << 1), 255)); executed (the execution status of this line is deduced): greens[i+128] = uchar(qMin(green + (i << 1), 255)); | - |
5988 | blues[i+128] = uchar(qMin(blue + (i << 1), 255)); executed (the execution status of this line is deduced): blues[i+128] = uchar(qMin(blue + (i << 1), 255)); | - |
5989 | } executed: } Execution Count:2304 | 2304 |
5990 | | - |
5991 | int intensity = qt_intensity(red, green, blue); executed (the execution status of this line is deduced): int intensity = qt_intensity(red, green, blue); | - |
5992 | const int factor = 191; executed (the execution status of this line is deduced): const int factor = 191; | - |
5993 | | - |
5994 | // High intensity colors needs dark shifting in the color table, while | - |
5995 | // low intensity colors needs light shifting. This is to increase the | - |
5996 | // percieved contrast. | - |
5997 | if ((red - factor > green && red - factor > blue) partially evaluated: red - factor > green no Evaluation Count:0 | yes Evaluation Count:18 |
never evaluated: red - factor > blue | 0-18 |
5998 | || (green - factor > red && green - factor > blue) partially evaluated: green - factor > red no Evaluation Count:0 | yes Evaluation Count:18 |
never evaluated: green - factor > blue | 0-18 |
5999 | || (blue - factor > red && blue - factor > green)) partially evaluated: blue - factor > red no Evaluation Count:0 | yes Evaluation Count:18 |
never evaluated: blue - factor > green | 0-18 |
6000 | intensity = qMin(255, intensity + 91); never executed: intensity = qMin(255, intensity + 91); | 0 |
6001 | else if (intensity <= 128) partially evaluated: intensity <= 128 no Evaluation Count:0 | yes Evaluation Count:18 |
| 0-18 |
6002 | intensity -= 51; never executed: intensity -= 51; | 0 |
6003 | | - |
6004 | for (int y=0; y<im.height(); ++y) { evaluated: y<im.height() yes Evaluation Count:219 | yes Evaluation Count:18 |
| 18-219 |
6005 | QRgb *scanLine = (QRgb*)im.scanLine(y); executed (the execution status of this line is deduced): QRgb *scanLine = (QRgb*)im.scanLine(y); | - |
6006 | for (int x=0; x<im.width(); ++x) { evaluated: x<im.width() yes Evaluation Count:3643 | yes Evaluation Count:219 |
| 219-3643 |
6007 | QRgb pixel = *scanLine; executed (the execution status of this line is deduced): QRgb pixel = *scanLine; | - |
6008 | // Calculate color table index, taking intensity adjustment | - |
6009 | // and a magic offset into account. | - |
6010 | uint ci = uint(qGray(pixel)/3 + (130 - intensity / 3)); executed (the execution status of this line is deduced): uint ci = uint(qGray(pixel)/3 + (130 - intensity / 3)); | - |
6011 | *scanLine = qRgba(reds[ci], greens[ci], blues[ci], qAlpha(pixel)); executed (the execution status of this line is deduced): *scanLine = qRgba(reds[ci], greens[ci], blues[ci], qAlpha(pixel)); | - |
6012 | ++scanLine; executed (the execution status of this line is deduced): ++scanLine; | - |
6013 | } executed: } Execution Count:3643 | 3643 |
6014 | } executed: } Execution Count:219 | 219 |
6015 | | - |
6016 | return QPixmap::fromImage(im); executed: return QPixmap::fromImage(im); Execution Count:18 | 18 |
6017 | } | - |
6018 | case QIcon::Selected: { | - |
6019 | QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied); executed (the execution status of this line is deduced): QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied); | - |
6020 | QColor color = opt->palette.color(QPalette::Normal, QPalette::Highlight); executed (the execution status of this line is deduced): QColor color = opt->palette.color(QPalette::Normal, QPalette::Highlight); | - |
6021 | color.setAlphaF(qreal(0.3)); executed (the execution status of this line is deduced): color.setAlphaF(qreal(0.3)); | - |
6022 | QPainter painter(&img); executed (the execution status of this line is deduced): QPainter painter(&img); | - |
6023 | painter.setCompositionMode(QPainter::CompositionMode_SourceAtop); executed (the execution status of this line is deduced): painter.setCompositionMode(QPainter::CompositionMode_SourceAtop); | - |
6024 | painter.fillRect(0, 0, img.width(), img.height(), color); executed (the execution status of this line is deduced): painter.fillRect(0, 0, img.width(), img.height(), color); | - |
6025 | painter.end(); executed (the execution status of this line is deduced): painter.end(); | - |
6026 | return QPixmap::fromImage(img); } executed: return QPixmap::fromImage(img); Execution Count:14 | 14 |
6027 | case QIcon::Active: | - |
6028 | return pixmap; executed: return pixmap; Execution Count:13 | 13 |
6029 | default: | - |
6030 | break; executed: break; Execution Count:3 | 3 |
6031 | } | - |
6032 | return pixmap; executed: return pixmap; Execution Count:3 | 3 |
6033 | } | - |
6034 | | - |
6035 | /*! | - |
6036 | \reimp | - |
6037 | */ | - |
6038 | int QCommonStyle::layoutSpacing(QSizePolicy::ControlType /* control1 */, QSizePolicy::ControlType /* control2 */, | - |
6039 | Qt::Orientation /* orientation */, const QStyleOption * /* option */, | - |
6040 | const QWidget * /* widget */) const | - |
6041 | { | - |
6042 | return -1; never executed: return -1; | 0 |
6043 | } | - |
6044 | | - |
6045 | /*! | - |
6046 | \reimp | - |
6047 | */ | - |
6048 | void QCommonStyle::polish(QPalette &pal) | - |
6049 | { | - |
6050 | QStyle::polish(pal); executed (the execution status of this line is deduced): QStyle::polish(pal); | - |
6051 | } executed: } Execution Count:284 | 284 |
6052 | | - |
6053 | /*! | - |
6054 | \reimp | - |
6055 | */ | - |
6056 | void QCommonStyle::polish(QWidget *widget) | - |
6057 | { | - |
6058 | QStyle::polish(widget); executed (the execution status of this line is deduced): QStyle::polish(widget); | - |
6059 | } executed: } Execution Count:41006 | 41006 |
6060 | | - |
6061 | /*! | - |
6062 | \reimp | - |
6063 | */ | - |
6064 | void QCommonStyle::unpolish(QWidget *widget) | - |
6065 | { | - |
6066 | QStyle::unpolish(widget); executed (the execution status of this line is deduced): QStyle::unpolish(widget); | - |
6067 | } executed: } Execution Count:3772 | 3772 |
6068 | | - |
6069 | /*! | - |
6070 | \reimp | - |
6071 | */ | - |
6072 | void QCommonStyle::polish(QApplication *app) | - |
6073 | { | - |
6074 | QStyle::polish(app); executed (the execution status of this line is deduced): QStyle::polish(app); | - |
6075 | } executed: } Execution Count:279 | 279 |
6076 | | - |
6077 | /*! | - |
6078 | \reimp | - |
6079 | */ | - |
6080 | void QCommonStyle::unpolish(QApplication *application) | - |
6081 | { | - |
6082 | Q_D(const QCommonStyle); executed (the execution status of this line is deduced): const QCommonStylePrivate * const d = d_func(); | - |
6083 | d->tabBarcloseButtonIcon = QIcon(); executed (the execution status of this line is deduced): d->tabBarcloseButtonIcon = QIcon(); | - |
6084 | QStyle::unpolish(application); executed (the execution status of this line is deduced): QStyle::unpolish(application); | - |
6085 | } executed: } Execution Count:64 | 64 |
6086 | | - |
6087 | | - |
6088 | QT_END_NAMESPACE | - |
6089 | | - |
6090 | #include "moc_qcommonstyle.cpp" | - |
6091 | | - |
| | |