styles/qwindowsstyle.cpp

Source codeSwitch to Preprocessed file
LineSource CodeCoverage
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 "qwindowsstyle_p.h" -
43#include "qwindowsstyle_p_p.h" -
44 -
45#if !defined(QT_NO_STYLE_WINDOWS) || defined(QT_PLUGIN) -
46 -
47#include <private/qsystemlibrary_p.h> -
48#include "qapplication.h" -
49#include "qbitmap.h" -
50#include "qdrawutil.h" // for now -
51#include "qevent.h" -
52#include "qmenu.h" -
53#include "qmenubar.h" -
54#include <private/qmenubar_p.h> -
55#include "qpaintengine.h" -
56#include "qpainter.h" -
57#include "qrubberband.h" -
58#include "qstyleoption.h" -
59#include "qtabbar.h" -
60#include "qwidget.h" -
61#include "qdebug.h" -
62#include "qmainwindow.h" -
63#include "qfile.h" -
64#include "qtextstream.h" -
65#include "qpixmapcache.h" -
66#include "qwizard.h" -
67#include "qlistview.h" -
68#include <private/qmath_p.h> -
69#include <qmath.h> -
70#include <qpa/qplatformtheme.h> -
71#include <private/qguiapplication_p.h> -
72 -
73#include <private/qstylehelper_p.h> -
74#include <private/qstyleanimation_p.h> -
75 -
76QT_BEGIN_NAMESPACE -
77 -
78#if defined(Q_OS_WIN) -
79 -
80QT_BEGIN_INCLUDE_NAMESPACE -
81#include "qt_windows.h" -
82QT_END_INCLUDE_NAMESPACE -
83# ifndef COLOR_GRADIENTACTIVECAPTION -
84# define COLOR_GRADIENTACTIVECAPTION 27 -
85# endif -
86# ifndef COLOR_GRADIENTINACTIVECAPTION -
87# define COLOR_GRADIENTINACTIVECAPTION 28 -
88# endif -
89 -
90 -
91typedef struct -
92{ -
93 DWORD cbSize; -
94 HICON hIcon; -
95 int iSysImageIndex; -
96 int iIcon; -
97 WCHAR szPath[MAX_PATH]; -
98} QSHSTOCKICONINFO; -
99 -
100#define _SHGFI_SMALLICON 0x000000001 -
101#define _SHGFI_LARGEICON 0x000000000 -
102#define _SHGFI_ICON 0x000000100 -
103#define _SIID_SHIELD 77 -
104 -
105typedef HRESULT (WINAPI *PtrSHGetStockIconInfo)(int siid, int uFlags, QSHSTOCKICONINFO *psii); -
106static PtrSHGetStockIconInfo pSHGetStockIconInfo = 0; -
107 -
108Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &); -
109Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon); -
110#endif //Q_OS_WIN -
111 -
112QT_BEGIN_INCLUDE_NAMESPACE -
113#include <limits.h> -
114QT_END_INCLUDE_NAMESPACE -
115 -
116enum QSliderDirection { SlUp, SlDown, SlLeft, SlRight }; -
117 -
118/* -
119 \internal -
120*/ -
121QWindowsStylePrivate::QWindowsStylePrivate() -
122 : alt_down(false), menuBarTimer(0) -
123{ -
124#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) -
125 if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA -
126 && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))) { -
127 QSystemLibrary shellLib(QLatin1String("shell32")); -
128 pSHGetStockIconInfo = (PtrSHGetStockIconInfo)shellLib.resolve("SHGetStockIconInfo"); -
129 } -
130#endif -
131}
executed: }
Execution Count:897
897
132 -
133// Returns true if the toplevel parent of \a widget has seen the Alt-key -
134bool QWindowsStylePrivate::hasSeenAlt(const QWidget *widget) const -
135{ -
136 widget = widget->window();
never executed (the execution status of this line is deduced): widget = widget->window();
-
137 return seenAlt.contains(widget);
never executed: return seenAlt.contains(widget);
0
138} -
139 -
140/*! -
141 \reimp -
142*/ -
143bool QWindowsStyle::eventFilter(QObject *o, QEvent *e) -
144{ -
145 // Records Alt- and Focus events -
146 if (!o->isWidgetType())
never evaluated: !o->isWidgetType()
0
147 return QObject::eventFilter(o, e);
never executed: return QObject::eventFilter(o, e);
0
148 -
149 QWidget *widget = qobject_cast<QWidget*>(o);
never executed (the execution status of this line is deduced): QWidget *widget = qobject_cast<QWidget*>(o);
-
150 Q_D(QWindowsStyle);
never executed (the execution status of this line is deduced): QWindowsStylePrivate * const d = d_func();
-
151 switch(e->type()) { -
152 case QEvent::KeyPress: -
153 if (static_cast<QKeyEvent *>(e)->key() == Qt::Key_Alt) {
never evaluated: static_cast<QKeyEvent *>(e)->key() == Qt::Key_Alt
0
154 widget = widget->window();
never executed (the execution status of this line is deduced): widget = widget->window();
-
155 -
156 // Alt has been pressed - find all widgets that care -
157 QList<QWidget *> l = widget->findChildren<QWidget *>();
never executed (the execution status of this line is deduced): QList<QWidget *> l = widget->findChildren<QWidget *>();
-
158 for (int pos=0 ; pos < l.size() ; ++pos) {
never evaluated: pos < l.size()
0
159 QWidget *w = l.at(pos);
never executed (the execution status of this line is deduced): QWidget *w = l.at(pos);
-
160 if (w->isWindow() || !w->isVisible() ||
never evaluated: w->isWindow()
never evaluated: !w->isVisible()
0
161 w->style()->styleHint(SH_UnderlineShortcut, 0, w))
never evaluated: w->style()->styleHint(SH_UnderlineShortcut, 0, w)
0
162 l.removeAt(pos);
never executed: l.removeAt(pos);
0
163 }
never executed: }
0
164 // Update states before repainting -
165 d->seenAlt.append(widget);
never executed (the execution status of this line is deduced): d->seenAlt.append(widget);
-
166 d->alt_down = true;
never executed (the execution status of this line is deduced): d->alt_down = true;
-
167 -
168 // Repaint all relevant widgets -
169 for (int pos = 0; pos < l.size(); ++pos)
never evaluated: pos < l.size()
0
170 l.at(pos)->update();
never executed: l.at(pos)->update();
0
171 }
never executed: }
0
172 break;
never executed: break;
0
173 case QEvent::KeyRelease: -
174 if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Alt) {
never evaluated: static_cast<QKeyEvent*>(e)->key() == Qt::Key_Alt
0
175 widget = widget->window();
never executed (the execution status of this line is deduced): widget = widget->window();
-
176 -
177 // Update state and repaint the menu bars. -
178 d->alt_down = false;
never executed (the execution status of this line is deduced): d->alt_down = false;
-
179#ifndef QT_NO_MENUBAR -
180 QList<QMenuBar *> l = widget->findChildren<QMenuBar *>();
never executed (the execution status of this line is deduced): QList<QMenuBar *> l = widget->findChildren<QMenuBar *>();
-
181 for (int i = 0; i < l.size(); ++i)
never evaluated: i < l.size()
0
182 l.at(i)->update();
never executed: l.at(i)->update();
0
183#endif -
184 }
never executed: }
0
185 break;
never executed: break;
0
186 case QEvent::Close: -
187 // Reset widget when closing -
188 d->seenAlt.removeAll(widget);
never executed (the execution status of this line is deduced): d->seenAlt.removeAll(widget);
-
189 d->seenAlt.removeAll(widget->window());
never executed (the execution status of this line is deduced): d->seenAlt.removeAll(widget->window());
-
190 break;
never executed: break;
0
191 default: -
192 break;
never executed: break;
0
193 } -
194 return QCommonStyle::eventFilter(o, e);
never executed: return QCommonStyle::eventFilter(o, e);
0
195} -
196 -
197/*! -
198 \class QWindowsStyle -
199 \brief The QWindowsStyle class provides a Microsoft Windows-like look and feel. -
200 -
201 \ingroup appearance -
202 \inmodule QtWidgets -
203 \internal -
204 -
205 This style is Qt's default GUI style on Windows. -
206 -
207 \image qwindowsstyle.png -
208 \sa QWindowsVistaStyle, QMacStyle, QFusionStyle -
209*/ -
210 -
211/*! -
212 Constructs a QWindowsStyle object. -
213*/ -
214QWindowsStyle::QWindowsStyle() : QCommonStyle(*new QWindowsStylePrivate) -
215{ -
216}
executed: }
Execution Count:495
495
217 -
218/*! -
219 \internal -
220 -
221 Constructs a QWindowsStyle object. -
222*/ -
223QWindowsStyle::QWindowsStyle(QWindowsStylePrivate &dd) : QCommonStyle(dd) -
224{ -
225}
executed: }
Execution Count:402
402
226 -
227 -
228/*! Destroys the QWindowsStyle object. */ -
229QWindowsStyle::~QWindowsStyle() -
230{ -
231} -
232 -
233#ifdef Q_OS_WIN -
234static inline QRgb colorref2qrgb(COLORREF col) -
235{ -
236 return qRgb(GetRValue(col), GetGValue(col), GetBValue(col)); -
237} -
238#endif -
239 -
240/*! \reimp */ -
241void QWindowsStyle::polish(QApplication *app) -
242{ -
243 QCommonStyle::polish(app);
executed (the execution status of this line is deduced): QCommonStyle::polish(app);
-
244 QWindowsStylePrivate *d = const_cast<QWindowsStylePrivate*>(d_func());
executed (the execution status of this line is deduced): QWindowsStylePrivate *d = const_cast<QWindowsStylePrivate*>(d_func());
-
245 // We only need the overhead when shortcuts are sometimes hidden -
246 if (!proxy()->styleHint(SH_UnderlineShortcut, 0) && app)
partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, 0)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:278
never evaluated: app
0-278
247 app->installEventFilter(this);
never executed: app->installEventFilter(this);
0
248 -
249 d->activeCaptionColor = app->palette().highlight().color();
executed (the execution status of this line is deduced): d->activeCaptionColor = app->palette().highlight().color();
-
250 d->activeGradientCaptionColor = app->palette().highlight() .color();
executed (the execution status of this line is deduced): d->activeGradientCaptionColor = app->palette().highlight() .color();
-
251 d->inactiveCaptionColor = app->palette().dark().color();
executed (the execution status of this line is deduced): d->inactiveCaptionColor = app->palette().dark().color();
-
252 d->inactiveGradientCaptionColor = app->palette().dark().color();
executed (the execution status of this line is deduced): d->inactiveGradientCaptionColor = app->palette().dark().color();
-
253 d->inactiveCaptionText = app->palette().background().color();
executed (the execution status of this line is deduced): d->inactiveCaptionText = app->palette().background().color();
-
254 -
255#if defined(Q_OS_WIN) //fetch native title bar colors -
256 if(app->desktopSettingsAware()){ -
257 DWORD activeCaption = GetSysColor(COLOR_ACTIVECAPTION); -
258 DWORD gradientActiveCaption = GetSysColor(COLOR_GRADIENTACTIVECAPTION); -
259 DWORD inactiveCaption = GetSysColor(COLOR_INACTIVECAPTION); -
260 DWORD gradientInactiveCaption = GetSysColor(COLOR_GRADIENTINACTIVECAPTION); -
261 DWORD inactiveCaptionText = GetSysColor(COLOR_INACTIVECAPTIONTEXT); -
262 d->activeCaptionColor = colorref2qrgb(activeCaption); -
263 d->activeGradientCaptionColor = colorref2qrgb(gradientActiveCaption); -
264 d->inactiveCaptionColor = colorref2qrgb(inactiveCaption); -
265 d->inactiveGradientCaptionColor = colorref2qrgb(gradientInactiveCaption); -
266 d->inactiveCaptionText = colorref2qrgb(inactiveCaptionText); -
267 } -
268#endif -
269}
executed: }
Execution Count:278
278
270 -
271/*! \reimp */ -
272void QWindowsStyle::unpolish(QApplication *app) -
273{ -
274 QCommonStyle::unpolish(app);
executed (the execution status of this line is deduced): QCommonStyle::unpolish(app);
-
275 app->removeEventFilter(this);
executed (the execution status of this line is deduced): app->removeEventFilter(this);
-
276}
executed: }
Execution Count:64
64
277 -
278/*! \reimp */ -
279void QWindowsStyle::polish(QWidget *widget) -
280{ -
281 QCommonStyle::polish(widget);
executed (the execution status of this line is deduced): QCommonStyle::polish(widget);
-
282}
executed: }
Execution Count:39805
39805
283 -
284/*! \reimp */ -
285void QWindowsStyle::unpolish(QWidget *widget) -
286{ -
287 QCommonStyle::unpolish(widget);
executed (the execution status of this line is deduced): QCommonStyle::unpolish(widget);
-
288}
executed: }
Execution Count:3770
3770
289 -
290/*! -
291 \reimp -
292*/ -
293void QWindowsStyle::polish(QPalette &pal) -
294{ -
295 QCommonStyle::polish(pal);
executed (the execution status of this line is deduced): QCommonStyle::polish(pal);
-
296}
executed: }
Execution Count:283
283
297 -
298/*! -
299 \reimp -
300*/ -
301int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QWidget *widget) const -
302{ -
303 int ret;
executed (the execution status of this line is deduced): int ret;
-
304 -
305 switch (pm) { -
306 case PM_ButtonDefaultIndicator: -
307 case PM_ButtonShiftHorizontal: -
308 case PM_ButtonShiftVertical: -
309 case PM_MenuHMargin: -
310 case PM_MenuVMargin: -
311 ret = 1;
executed (the execution status of this line is deduced): ret = 1;
-
312 break;
executed: break;
Execution Count:4446
4446
313 case PM_DockWidgetSeparatorExtent: -
314 ret = int(QStyleHelper::dpiScaled(4.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(4.));
-
315 break;
executed: break;
Execution Count:139
139
316#ifndef QT_NO_TABBAR -
317 case PM_TabBarTabShiftHorizontal: -
318 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
319 break;
executed: break;
Execution Count:754
754
320 case PM_TabBarTabShiftVertical: -
321 ret = 2;
executed (the execution status of this line is deduced): ret = 2;
-
322 break;
executed: break;
Execution Count:754
754
323#endif -
324 case PM_MaximumDragDistance: -
325 ret = QCommonStyle::pixelMetric(PM_MaximumDragDistance);
executed (the execution status of this line is deduced): ret = QCommonStyle::pixelMetric(PM_MaximumDragDistance);
-
326 if (ret == -1)
partially evaluated: ret == -1
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
327 ret = 60;
executed: ret = 60;
Execution Count:6
6
328 break;
executed: break;
Execution Count:6
6
329 -
330#ifndef QT_NO_SLIDER -
331 case PM_SliderLength: -
332 ret = int(QStyleHelper::dpiScaled(11.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(11.));
-
333 break;
executed: break;
Execution Count:28
28
334 -
335 // Returns the number of pixels to use for the business part of the -
336 // slider (i.e., the non-tickmark portion). The remaining space is shared -
337 // equally between the tickmark regions. -
338 case PM_SliderControlThickness: -
339 if (const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
evaluated: const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)
TRUEFALSE
yes
Evaluation Count:48
yes
Evaluation Count:6
6-48
340 int space = (sl->orientation == Qt::Horizontal) ? sl->rect.height() : sl->rect.width();
evaluated: (sl->orientation == Qt::Horizontal)
TRUEFALSE
yes
Evaluation Count:21
yes
Evaluation Count:27
21-27
341 int ticks = sl->tickPosition;
executed (the execution status of this line is deduced): int ticks = sl->tickPosition;
-
342 int n = 0;
executed (the execution status of this line is deduced): int n = 0;
-
343 if (ticks & QSlider::TicksAbove)
partially evaluated: ticks & QSlider::TicksAbove
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:48
0-48
344 ++n;
never executed: ++n;
0
345 if (ticks & QSlider::TicksBelow)
partially evaluated: ticks & QSlider::TicksBelow
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:48
0-48
346 ++n;
never executed: ++n;
0
347 if (!n) {
partially evaluated: !n
TRUEFALSE
yes
Evaluation Count:48
no
Evaluation Count:0
0-48
348 ret = space;
executed (the execution status of this line is deduced): ret = space;
-
349 break;
executed: break;
Execution Count:48
48
350 } -
351 -
352 int thick = 6; // Magic constant to get 5 + 16 + 5
never executed (the execution status of this line is deduced): int thick = 6;
-
353 if (ticks != QSlider::TicksBothSides && ticks != QSlider::NoTicks)
never evaluated: ticks != QSlider::TicksBothSides
never evaluated: ticks != QSlider::NoTicks
0
354 thick += proxy()->pixelMetric(PM_SliderLength, sl, widget) / 4;
never executed: thick += proxy()->pixelMetric(PM_SliderLength, sl, widget) / 4;
0
355 -
356 space -= thick;
never executed (the execution status of this line is deduced): space -= thick;
-
357 if (space > 0)
never evaluated: space > 0
0
358 thick += (space * 2) / (n + 2);
never executed: thick += (space * 2) / (n + 2);
0
359 ret = thick;
never executed (the execution status of this line is deduced): ret = thick;
-
360 } else {
never executed: }
0
361 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
362 }
executed: }
Execution Count:6
6
363 break;
executed: break;
Execution Count:6
6
364#endif // QT_NO_SLIDER -
365 -
366#ifndef QT_NO_MENU -
367 case PM_MenuBarHMargin: -
368 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
369 break;
executed: break;
Execution Count:548
548
370 -
371 case PM_MenuBarVMargin: -
372 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
373 break;
executed: break;
Execution Count:761
761
374 -
375 case PM_MenuBarPanelWidth: -
376 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
377 break;
executed: break;
Execution Count:1710
1710
378 -
379 case PM_SmallIconSize: -
380 ret = int(QStyleHelper::dpiScaled(16.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(16.));
-
381 break;
executed: break;
Execution Count:72990
72990
382 -
383 case PM_LargeIconSize: -
384 ret = int(QStyleHelper::dpiScaled(32.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(32.));
-
385 break;
executed: break;
Execution Count:93
93
386 -
387 case PM_IconViewIconSize: -
388 ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);
executed (the execution status of this line is deduced): ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);
-
389 break;
executed: break;
Execution Count:86
86
390 -
391 case PM_DockWidgetTitleMargin: -
392 ret = int(QStyleHelper::dpiScaled(2.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(2.));
-
393 break;
executed: break;
Execution Count:2424
2424
394 case PM_DockWidgetTitleBarButtonMargin: -
395 ret = int(QStyleHelper::dpiScaled(4.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(4.));
-
396 break;
executed: break;
Execution Count:4803
4803
397#if defined(Q_WS_WIN) -
398 case PM_DockWidgetFrameWidth: -
399#if defined(Q_OS_WINCE) -
400 ret = GetSystemMetrics(SM_CXDLGFRAME); -
401#else -
402 ret = GetSystemMetrics(SM_CXFRAME); -
403#endif -
404 break; -
405#else -
406 case PM_DockWidgetFrameWidth: -
407 ret = 4;
executed (the execution status of this line is deduced): ret = 4;
-
408 break;
executed: break;
Execution Count:812
812
409#endif // Q_WS_WIN -
410 break;
dead code: break;
-
411 -
412#endif // QT_NO_MENU -
413 -
414 -
415#if defined(Q_OS_WIN) -
416 case PM_TitleBarHeight: -
417 if (widget && (widget->windowType() == Qt::Tool)) { -
418 // MS always use one less than they say -
419#if defined(Q_OS_WINCE) -
420 ret = GetSystemMetrics(SM_CYCAPTION) - 1; -
421#else -
422 ret = GetSystemMetrics(SM_CYSMCAPTION) - 1; -
423#endif -
424 } else { -
425 ret = GetSystemMetrics(SM_CYCAPTION) - 1; -
426 } -
427 -
428 break; -
429 -
430 case PM_ScrollBarExtent: -
431 { -
432#ifndef Q_OS_WINCE -
433 NONCLIENTMETRICS ncm; -
434 ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONT); -
435 if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0)) -
436 ret = qMax(ncm.iScrollHeight, ncm.iScrollWidth); -
437 else -
438#endif -
439 ret = QCommonStyle::pixelMetric(pm, opt, widget); -
440 } -
441 break; -
442#endif // Q_OS_WIN -
443 -
444 case PM_SplitterWidth: -
445 ret = qMax(4, QApplication::globalStrut().width());
executed (the execution status of this line is deduced): ret = qMax(4, QApplication::globalStrut().width());
-
446 break;
executed: break;
Execution Count:7866
7866
447 -
448#if defined(Q_OS_WIN) -
449 case PM_MdiSubWindowFrameWidth: -
450#if defined(Q_OS_WINCE) -
451 ret = GetSystemMetrics(SM_CYDLGFRAME); -
452#else -
453 ret = GetSystemMetrics(SM_CYFRAME); -
454#endif -
455 break; -
456#endif -
457 case PM_ToolBarItemMargin: -
458 ret = 1;
executed (the execution status of this line is deduced): ret = 1;
-
459 break;
executed: break;
Execution Count:22
22
460 case PM_ToolBarItemSpacing: -
461 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
462 break;
executed: break;
Execution Count:22
22
463 case PM_ToolBarHandleExtent: -
464 ret = int(QStyleHelper::dpiScaled(10.));
executed (the execution status of this line is deduced): ret = int(QStyleHelper::dpiScaled(10.));
-
465 break;
executed: break;
Execution Count:110
110
466 default: -
467 ret = QCommonStyle::pixelMetric(pm, opt, widget);
executed (the execution status of this line is deduced): ret = QCommonStyle::pixelMetric(pm, opt, widget);
-
468 break;
executed: break;
Execution Count:753122
753122
469 } -
470 -
471 return ret;
executed: return ret;
Execution Count:851550
851550
472} -
473 -
474/*! -
475 \reimp -
476 */ -
477QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, -
478 const QWidget *widget) const -
479{ -
480#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) -
481 QPixmap desktopIcon; -
482 switch(standardPixmap) { -
483 case SP_DriveCDIcon: -
484 case SP_DriveDVDIcon: -
485 case SP_DriveNetIcon: -
486 case SP_DriveHDIcon: -
487 case SP_DriveFDIcon: -
488 case SP_FileIcon: -
489 case SP_FileLinkIcon: -
490 case SP_DirLinkIcon: -
491 case SP_DirClosedIcon: -
492 case SP_DesktopIcon: -
493 case SP_ComputerIcon: -
494 case SP_DirOpenIcon: -
495 case SP_FileDialogNewFolder: -
496 case SP_DirHomeIcon: -
497 case SP_TrashIcon: -
498 case SP_VistaShield: -
499 if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { -
500 QPlatformTheme::StandardPixmap sp = static_cast<QPlatformTheme::StandardPixmap>(standardPixmap); -
501 desktopIcon = theme->standardPixmap(sp, QSizeF(16, 16)); -
502 } -
503 break; -
504 case SP_MessageBoxInformation: -
505 case SP_MessageBoxWarning: -
506 case SP_MessageBoxCritical: -
507 case SP_MessageBoxQuestion: -
508 if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { -
509 QPlatformTheme::StandardPixmap sp = static_cast<QPlatformTheme::StandardPixmap>(standardPixmap); -
510 desktopIcon = theme->standardPixmap(sp, QSizeF()); -
511 } -
512 break; -
513 default: -
514 break; -
515 } -
516 if (!desktopIcon.isNull()) { -
517 return desktopIcon; -
518 } -
519#endif -
520 return QCommonStyle::standardPixmap(standardPixmap, opt, widget);
executed: return QCommonStyle::standardPixmap(standardPixmap, opt, widget);
Execution Count:2281
2281
521} -
522 -
523/*! \reimp */ -
524int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *widget, -
525 QStyleHintReturn *returnData) const -
526{ -
527 int ret = 0;
executed (the execution status of this line is deduced): int ret = 0;
-
528 -
529 switch (hint) { -
530 case SH_EtchDisabledText: -
531 case SH_Slider_SnapToValue: -
532 case SH_PrintDialog_RightAlignButtons: -
533 case SH_FontDialog_SelectAssociatedText: -
534 case SH_Menu_AllowActiveAndDisabled: -
535 case SH_MenuBar_AltKeyNavigation: -
536 case SH_MenuBar_MouseTracking: -
537 case SH_Menu_MouseTracking: -
538 case SH_ComboBox_ListMouseTracking: -
539 case SH_ScrollBar_StopMouseOverSlider: -
540 case SH_MainWindow_SpaceBelowMenuBar: -
541 ret = 1;
executed (the execution status of this line is deduced): ret = 1;
-
542 -
543 break;
executed: break;
Execution Count:3809
3809
544 case SH_ItemView_ShowDecorationSelected: -
545#ifndef QT_NO_LISTVIEW -
546 if (qobject_cast<const QListView*>(widget))
evaluated: qobject_cast<const QListView*>(widget)
TRUEFALSE
yes
Evaluation Count:26031
yes
Evaluation Count:16905
16905-26031
547 ret = 1;
executed: ret = 1;
Execution Count:26031
26031
548#endif -
549 break;
executed: break;
Execution Count:42936
42936
550 case SH_ItemView_ChangeHighlightOnFocus: -
551 ret = 1;
executed (the execution status of this line is deduced): ret = 1;
-
552 break;
executed: break;
Execution Count:6
6
553 case SH_ToolBox_SelectedPageTitleBold: -
554 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
555 break;
executed: break;
Execution Count:6
6
556 -
557#if defined(Q_OS_WIN) -
558 case SH_UnderlineShortcut: -
559 { -
560 ret = 1; -
561 BOOL cues = false; -
562 SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &cues, 0); -
563 ret = int(cues); -
564 // Do nothing if we always paint underlines -
565 Q_D(const QWindowsStyle); -
566 if (!ret && widget && d) { -
567#ifndef QT_NO_MENUBAR -
568 const QMenuBar *menuBar = qobject_cast<const QMenuBar *>(widget); -
569 if (!menuBar && qobject_cast<const QMenu *>(widget)) { -
570 QWidget *w = QApplication::activeWindow(); -
571 if (w && w != widget) -
572 menuBar = w->findChild<QMenuBar *>(); -
573 } -
574 // If we paint a menu bar draw underlines if is in the keyboardState -
575 if (menuBar) { -
576 if (menuBar->d_func()->keyboardState || d->altDown()) -
577 ret = 1; -
578 // Otherwise draw underlines if the toplevel widget has seen an alt-press -
579 } else -
580#endif // QT_NO_MENUBAR -
581 if (d->hasSeenAlt(widget)) { -
582 ret = 1; -
583 } -
584 } -
585 break; -
586 } -
587#endif -
588#ifndef QT_NO_RUBBERBAND -
589 case SH_RubberBand_Mask: -
590 if (const QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt)) {
evaluated: const QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt)
TRUEFALSE
yes
Evaluation Count:63
yes
Evaluation Count:6
6-63
591 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
592 if (rbOpt->shape == QRubberBand::Rectangle) {
partially evaluated: rbOpt->shape == QRubberBand::Rectangle
TRUEFALSE
yes
Evaluation Count:63
no
Evaluation Count:0
0-63
593 ret = true;
executed (the execution status of this line is deduced): ret = true;
-
594 if(QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(returnData)) {
partially evaluated: QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(returnData)
TRUEFALSE
yes
Evaluation Count:63
no
Evaluation Count:0
0-63
595 mask->region = opt->rect;
executed (the execution status of this line is deduced): mask->region = opt->rect;
-
596 int size = 1;
executed (the execution status of this line is deduced): int size = 1;
-
597 if (widget && widget->isWindow())
partially evaluated: widget
TRUEFALSE
yes
Evaluation Count:63
no
Evaluation Count:0
partially evaluated: widget->isWindow()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:63
0-63
598 size = 4;
never executed: size = 4;
0
599 mask->region -= opt->rect.adjusted(size, size, -size, -size);
executed (the execution status of this line is deduced): mask->region -= opt->rect.adjusted(size, size, -size, -size);
-
600 }
executed: }
Execution Count:63
63
601 }
executed: }
Execution Count:63
63
602 }
executed: }
Execution Count:63
63
603 break;
executed: break;
Execution Count:69
69
604#endif // QT_NO_RUBBERBAND -
605 case SH_LineEdit_PasswordCharacter: -
606 { -
607#ifdef Q_OS_WIN -
608 if (widget && (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))) { -
609 const QFontMetrics &fm = widget->fontMetrics(); -
610 if (fm.inFont(QChar(0x25CF))) -
611 ret = 0x25CF; -
612 else if (fm.inFont(QChar(0x2022))) -
613 ret = 0x2022; -
614 } -
615#endif -
616 if (!ret)
partially evaluated: !ret
TRUEFALSE
yes
Evaluation Count:1102
no
Evaluation Count:0
0-1102
617 ret = '*';
executed: ret = '*';
Execution Count:1102
1102
618 } -
619 break;
executed: break;
Execution Count:1102
1102
620#ifndef QT_NO_WIZARD -
621 case SH_WizardStyle: -
622 ret = QWizard::ModernStyle;
executed (the execution status of this line is deduced): ret = QWizard::ModernStyle;
-
623 break;
executed: break;
Execution Count:63
63
624#endif -
625 case SH_ItemView_ArrowKeysNavigateIntoChildren: -
626 ret = true;
executed (the execution status of this line is deduced): ret = true;
-
627 break;
executed: break;
Execution Count:52
52
628 case SH_DialogButtonBox_ButtonsHaveIcons: -
629 ret = 0;
executed (the execution status of this line is deduced): ret = 0;
-
630 break;
executed: break;
Execution Count:1716
1716
631 default: -
632 ret = QCommonStyle::styleHint(hint, opt, widget, returnData);
executed (the execution status of this line is deduced): ret = QCommonStyle::styleHint(hint, opt, widget, returnData);
-
633 break;
executed: break;
Execution Count:612957
612957
634 } -
635 return ret;
executed: return ret;
Execution Count:662716
662716
636} -
637 -
638/*! \reimp */ -
639void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, -
640 const QWidget *w) const -
641{ -
642 // Used to restore across fallthrough cases. Currently only used in PE_IndicatorCheckBox -
643 bool doRestore = false;
executed (the execution status of this line is deduced): bool doRestore = false;
-
644 -
645 switch (pe) { -
646#ifndef QT_NO_TOOLBAR -
647 case PE_IndicatorToolBarSeparator: -
648 { -
649 QRect rect = opt->rect;
never executed (the execution status of this line is deduced): QRect rect = opt->rect;
-
650 const int margin = 2;
never executed (the execution status of this line is deduced): const int margin = 2;
-
651 QPen oldPen = p->pen();
never executed (the execution status of this line is deduced): QPen oldPen = p->pen();
-
652 if(opt->state & State_Horizontal){
never evaluated: opt->state & State_Horizontal
0
653 const int offset = rect.width()/2;
never executed (the execution status of this line is deduced): const int offset = rect.width()/2;
-
654 p->setPen(QPen(opt->palette.dark().color()));
never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color()));
-
655 p->drawLine(rect.bottomLeft().x() + offset,
never executed (the execution status of this line is deduced): p->drawLine(rect.bottomLeft().x() + offset,
-
656 rect.bottomLeft().y() - margin,
never executed (the execution status of this line is deduced): rect.bottomLeft().y() - margin,
-
657 rect.topLeft().x() + offset,
never executed (the execution status of this line is deduced): rect.topLeft().x() + offset,
-
658 rect.topLeft().y() + margin);
never executed (the execution status of this line is deduced): rect.topLeft().y() + margin);
-
659 p->setPen(QPen(opt->palette.light().color()));
never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color()));
-
660 p->drawLine(rect.bottomLeft().x() + offset + 1,
never executed (the execution status of this line is deduced): p->drawLine(rect.bottomLeft().x() + offset + 1,
-
661 rect.bottomLeft().y() - margin,
never executed (the execution status of this line is deduced): rect.bottomLeft().y() - margin,
-
662 rect.topLeft().x() + offset + 1,
never executed (the execution status of this line is deduced): rect.topLeft().x() + offset + 1,
-
663 rect.topLeft().y() + margin);
never executed (the execution status of this line is deduced): rect.topLeft().y() + margin);
-
664 }
never executed: }
0
665 else{ //Draw vertical separator -
666 const int offset = rect.height()/2;
never executed (the execution status of this line is deduced): const int offset = rect.height()/2;
-
667 p->setPen(QPen(opt->palette.dark().color()));
never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color()));
-
668 p->drawLine(rect.topLeft().x() + margin ,
never executed (the execution status of this line is deduced): p->drawLine(rect.topLeft().x() + margin ,
-
669 rect.topLeft().y() + offset,
never executed (the execution status of this line is deduced): rect.topLeft().y() + offset,
-
670 rect.topRight().x() - margin,
never executed (the execution status of this line is deduced): rect.topRight().x() - margin,
-
671 rect.topRight().y() + offset);
never executed (the execution status of this line is deduced): rect.topRight().y() + offset);
-
672 p->setPen(QPen(opt->palette.light().color()));
never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color()));
-
673 p->drawLine(rect.topLeft().x() + margin ,
never executed (the execution status of this line is deduced): p->drawLine(rect.topLeft().x() + margin ,
-
674 rect.topLeft().y() + offset + 1,
never executed (the execution status of this line is deduced): rect.topLeft().y() + offset + 1,
-
675 rect.topRight().x() - margin,
never executed (the execution status of this line is deduced): rect.topRight().x() - margin,
-
676 rect.topRight().y() + offset + 1);
never executed (the execution status of this line is deduced): rect.topRight().y() + offset + 1);
-
677 }
never executed: }
0
678 p->setPen(oldPen);
never executed (the execution status of this line is deduced): p->setPen(oldPen);
-
679 } -
680 break;
never executed: break;
0
681 case PE_IndicatorToolBarHandle: -
682 p->save();
executed (the execution status of this line is deduced): p->save();
-
683 p->translate(opt->rect.x(), opt->rect.y());
executed (the execution status of this line is deduced): p->translate(opt->rect.x(), opt->rect.y());
-
684 if (opt->state & State_Horizontal) {
partially evaluated: opt->state & State_Horizontal
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
685 int x = opt->rect.width() / 2 - 4;
executed (the execution status of this line is deduced): int x = opt->rect.width() / 2 - 4;
-
686 if (opt->direction == Qt::RightToLeft)
partially evaluated: opt->direction == Qt::RightToLeft
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-6
687 x -= 2;
never executed: x -= 2;
0
688 if (opt->rect.height() > 4) {
partially evaluated: opt->rect.height() > 4
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
689 qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4,
executed (the execution status of this line is deduced): qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4,
-
690 opt->palette, false, 1, 0);
executed (the execution status of this line is deduced): opt->palette, false, 1, 0);
-
691 qDrawShadePanel(p, x + 3, 2, 3, opt->rect.height() - 4,
executed (the execution status of this line is deduced): qDrawShadePanel(p, x + 3, 2, 3, opt->rect.height() - 4,
-
692 opt->palette, false, 1, 0);
executed (the execution status of this line is deduced): opt->palette, false, 1, 0);
-
693 }
executed: }
Execution Count:6
6
694 } else {
executed: }
Execution Count:6
6
695 if (opt->rect.width() > 4) {
never evaluated: opt->rect.width() > 4
0
696 int y = opt->rect.height() / 2 - 4;
never executed (the execution status of this line is deduced): int y = opt->rect.height() / 2 - 4;
-
697 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,
-
698 opt->palette, false, 1, 0);
never executed (the execution status of this line is deduced): opt->palette, false, 1, 0);
-
699 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,
-
700 opt->palette, false, 1, 0);
never executed (the execution status of this line is deduced): opt->palette, false, 1, 0);
-
701 }
never executed: }
0
702 }
never executed: }
0
703 p->restore();
executed (the execution status of this line is deduced): p->restore();
-
704 break;
executed: break;
Execution Count:6
6
705 -
706#endif // QT_NO_TOOLBAR -
707 case PE_FrameButtonTool: -
708 case PE_PanelButtonTool: { -
709 QPen oldPen = p->pen();
executed (the execution status of this line is deduced): QPen oldPen = p->pen();
-
710#ifndef QT_NO_DOCKWIDGET -
711 if (w && w->inherits("QDockWidgetTitleButton")) {
partially evaluated: w
TRUEFALSE
yes
Evaluation Count:689
no
Evaluation Count:0
evaluated: w->inherits("QDockWidgetTitleButton")
TRUEFALSE
yes
Evaluation Count:58
yes
Evaluation Count:631
0-689
712 if (const QWidget *dw = w->parentWidget())
partially evaluated: const QWidget *dw = w->parentWidget()
TRUEFALSE
yes
Evaluation Count:58
no
Evaluation Count:0
0-58
713 if (dw->isWindow()){
evaluated: dw->isWindow()
TRUEFALSE
yes
Evaluation Count:22
yes
Evaluation Count:36
22-36
714 qDrawWinButton(p, opt->rect.adjusted(1, 1, 0, 0), opt->palette, opt->state & (State_Sunken | State_On),
executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect.adjusted(1, 1, 0, 0), opt->palette, opt->state & (State_Sunken | State_On),
-
715 &opt->palette.button());
executed (the execution status of this line is deduced): &opt->palette.button());
-
716 -
717 return;
executed: return;
Execution Count:22
22
718 } -
719 }
executed: }
Execution Count:36
36
720#endif // QT_NO_DOCKWIDGET -
721 QBrush fill;
executed (the execution status of this line is deduced): QBrush fill;
-
722 bool stippled;
executed (the execution status of this line is deduced): bool stippled;
-
723 bool panel = (pe == PE_PanelButtonTool);
executed (the execution status of this line is deduced): bool panel = (pe == PE_PanelButtonTool);
-
724 if ((!(opt->state & State_Sunken ))
evaluated: (!(opt->state & State_Sunken ))
TRUEFALSE
yes
Evaluation Count:613
yes
Evaluation Count:54
54-613
725 && (!(opt->state & State_Enabled)
evaluated: !(opt->state & State_Enabled)
TRUEFALSE
yes
Evaluation Count:568
yes
Evaluation Count:45
45-568
726 || !(opt->state & State_MouseOver && opt->state & State_AutoRaise))
evaluated: opt->state & State_MouseOver
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:43
partially evaluated: opt->state & State_AutoRaise
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-43
727 && (opt->state & State_On)) {
partially evaluated: (opt->state & State_On)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:611
0-611
728 fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
never executed (the execution status of this line is deduced): fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
-
729 stippled = true;
never executed (the execution status of this line is deduced): stippled = true;
-
730 } else {
never executed: }
0
731 fill = opt->palette.brush(QPalette::Button);
executed (the execution status of this line is deduced): fill = opt->palette.brush(QPalette::Button);
-
732 stippled = false;
executed (the execution status of this line is deduced): stippled = false;
-
733 }
executed: }
Execution Count:667
667
734 -
735 if (opt->state & (State_Raised | State_Sunken | State_On)) {
evaluated: opt->state & (State_Raised | State_Sunken | State_On)
TRUEFALSE
yes
Evaluation Count:631
yes
Evaluation Count:36
36-631
736 if (opt->state & State_AutoRaise) {
evaluated: opt->state & State_AutoRaise
TRUEFALSE
yes
Evaluation Count:53
yes
Evaluation Count:578
53-578
737 if(opt->state & (State_Enabled | State_Sunken | State_On)){
partially evaluated: opt->state & (State_Enabled | State_Sunken | State_On)
TRUEFALSE
yes
Evaluation Count:53
no
Evaluation Count:0
0-53
738 if (panel)
partially evaluated: panel
TRUEFALSE
yes
Evaluation Count:53
no
Evaluation Count:0
0-53
739 qDrawShadePanel(p, opt->rect, opt->palette,
executed: qDrawShadePanel(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On), 1, &fill);
Execution Count:53
53
740 opt->state & (State_Sunken | State_On), 1, &fill);
executed: qDrawShadePanel(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On), 1, &fill);
Execution Count:53
53
741 else -
742 qDrawShadeRect(p, opt->rect, opt->palette,
never executed: qDrawShadeRect(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On), 1);
0
743 opt->state & (State_Sunken | State_On), 1);
never executed: qDrawShadeRect(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On), 1);
0
744 } -
745 if (stippled) {
partially evaluated: stippled
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:53
0-53
746 p->setPen(opt->palette.button().color());
never executed (the execution status of this line is deduced): p->setPen(opt->palette.button().color());
-
747 p->drawRect(opt->rect.adjusted(1,1,-2,-2));
never executed (the execution status of this line is deduced): p->drawRect(opt->rect.adjusted(1,1,-2,-2));
-
748 }
never executed: }
0
749 } else {
executed: }
Execution Count:53
53
750 qDrawWinButton(p, opt->rect, opt->palette,
executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect, opt->palette,
-
751 opt->state & (State_Sunken | State_On), panel ? &fill : 0);
executed (the execution status of this line is deduced): opt->state & (State_Sunken | State_On), panel ? &fill : 0);
-
752 }
executed: }
Execution Count:578
578
753 } else { -
754 p->fillRect(opt->rect, fill);
executed (the execution status of this line is deduced): p->fillRect(opt->rect, fill);
-
755 }
executed: }
Execution Count:36
36
756 p->setPen(oldPen);
executed (the execution status of this line is deduced): p->setPen(oldPen);
-
757 break; }
executed: break;
Execution Count:667
667
758 case PE_PanelButtonCommand: -
759 if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
TRUEFALSE
yes
Evaluation Count:848
no
Evaluation Count:0
0-848
760 QBrush fill;
executed (the execution status of this line is deduced): QBrush fill;
-
761 State flags = opt->state;
executed (the execution status of this line is deduced): State flags = opt->state;
-
762 QPalette pal = opt->palette;
executed (the execution status of this line is deduced): QPalette pal = opt->palette;
-
763 QRect r = opt->rect;
executed (the execution status of this line is deduced): QRect r = opt->rect;
-
764 if (! (flags & State_Sunken) && (flags & State_On))
evaluated: ! (flags & State_Sunken)
TRUEFALSE
yes
Evaluation Count:776
yes
Evaluation Count:72
partially evaluated: (flags & State_On)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:776
0-776
765 fill = QBrush(pal.light().color(), Qt::Dense4Pattern);
never executed: fill = QBrush(pal.light().color(), Qt::Dense4Pattern);
0
766 else -
767 fill = pal.brush(QPalette::Button);
executed: fill = pal.brush(QPalette::Button);
Execution Count:848
848
768 -
769 if (btn->features & QStyleOptionButton::DefaultButton && flags & State_Sunken) {
evaluated: btn->features & QStyleOptionButton::DefaultButton
TRUEFALSE
yes
Evaluation Count:222
yes
Evaluation Count:626
evaluated: flags & State_Sunken
TRUEFALSE
yes
Evaluation Count:20
yes
Evaluation Count:202
20-626
770 p->setPen(pal.dark().color());
executed (the execution status of this line is deduced): p->setPen(pal.dark().color());
-
771 p->setBrush(fill);
executed (the execution status of this line is deduced): p->setBrush(fill);
-
772 p->drawRect(r.adjusted(0, 0, -1, -1));
executed (the execution status of this line is deduced): p->drawRect(r.adjusted(0, 0, -1, -1));
-
773 } else if (flags & (State_Raised | State_On | State_Sunken)) {
executed: }
Execution Count:20
partially evaluated: flags & (State_Raised | State_On | State_Sunken)
TRUEFALSE
yes
Evaluation Count:828
no
Evaluation Count:0
0-828
774 qDrawWinButton(p, r, pal, flags & (State_Sunken | State_On),
executed (the execution status of this line is deduced): qDrawWinButton(p, r, pal, flags & (State_Sunken | State_On),
-
775 &fill);
executed (the execution status of this line is deduced): &fill);
-
776 } else {
executed: }
Execution Count:828
828
777 p->fillRect(r, fill);
never executed (the execution status of this line is deduced): p->fillRect(r, fill);
-
778 }
never executed: }
0
779 } -
780 break;
executed: break;
Execution Count:848
848
781 case PE_FrameDefaultButton: { -
782 QPen oldPen = p->pen();
executed (the execution status of this line is deduced): QPen oldPen = p->pen();
-
783 p->setPen(opt->palette.shadow().color());
executed (the execution status of this line is deduced): p->setPen(opt->palette.shadow().color());
-
784 QRect rect = opt->rect;
executed (the execution status of this line is deduced): QRect rect = opt->rect;
-
785 rect.adjust(0, 0, -1, -1);
executed (the execution status of this line is deduced): rect.adjust(0, 0, -1, -1);
-
786 p->drawRect(rect);
executed (the execution status of this line is deduced): p->drawRect(rect);
-
787 p->setPen(oldPen);
executed (the execution status of this line is deduced): p->setPen(oldPen);
-
788 break;
executed: break;
Execution Count:222
222
789 } -
790 case PE_IndicatorCheckBox: { -
791 QBrush fill;
executed (the execution status of this line is deduced): QBrush fill;
-
792 if (opt->state & State_NoChange)
evaluated: opt->state & State_NoChange
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:18
2-18
793 fill = QBrush(opt->palette.base().color(), Qt::Dense4Pattern);
executed: fill = QBrush(opt->palette.base().color(), Qt::Dense4Pattern);
Execution Count:2
2
794 else if (opt->state & State_Sunken)
evaluated: opt->state & State_Sunken
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:16
2-16
795 fill = opt->palette.button();
executed: fill = opt->palette.button();
Execution Count:2
2
796 else if (opt->state & State_Enabled)
partially evaluated: opt->state & State_Enabled
TRUEFALSE
yes
Evaluation Count:16
no
Evaluation Count:0
0-16
797 fill = opt->palette.base();
executed: fill = opt->palette.base();
Execution Count:16
16
798 else -
799 fill = opt->palette.background();
never executed: fill = opt->palette.background();
0
800 p->save();
executed (the execution status of this line is deduced): p->save();
-
801 doRestore = true;
executed (the execution status of this line is deduced): doRestore = true;
-
802 qDrawWinPanel(p, opt->rect, opt->palette, true, &fill);
executed (the execution status of this line is deduced): qDrawWinPanel(p, opt->rect, opt->palette, true, &fill);
-
803 if (opt->state & State_NoChange)
evaluated: opt->state & State_NoChange
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:18
2-18
804 p->setPen(opt->palette.dark().color());
executed: p->setPen(opt->palette.dark().color());
Execution Count:2
2
805 else -
806 p->setPen(opt->palette.text().color());
executed: p->setPen(opt->palette.text().color());
Execution Count:18
18
807 } // Fall through! -
808 case PE_IndicatorViewItemCheck:
code before this statement executed: case PE_IndicatorViewItemCheck:
Execution Count:20
20
809 if (!doRestore) {
evaluated: !doRestore
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:20
20-30
810 p->save();
executed (the execution status of this line is deduced): p->save();
-
811 doRestore = true;
executed (the execution status of this line is deduced): doRestore = true;
-
812 }
executed: }
Execution Count:30
30
813 if (pe == PE_IndicatorViewItemCheck) {
evaluated: pe == PE_IndicatorViewItemCheck
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:20
20-30
814 const QStyleOptionViewItem *itemViewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt);
executed (the execution status of this line is deduced): const QStyleOptionViewItem *itemViewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt);
-
815 p->setPen(itemViewOpt
executed (the execution status of this line is deduced): p->setPen(itemViewOpt
-
816 && itemViewOpt->showDecorationSelected
executed (the execution status of this line is deduced): && itemViewOpt->showDecorationSelected
-
817 && opt->state & State_Selected
executed (the execution status of this line is deduced): && opt->state & State_Selected
-
818 ? opt->palette.highlightedText().color()
executed (the execution status of this line is deduced): ? opt->palette.highlightedText().color()
-
819 : opt->palette.text().color());
executed (the execution status of this line is deduced): : opt->palette.text().color());
-
820 if (opt->state & State_NoChange)
partially evaluated: opt->state & State_NoChange
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:30
0-30
821 p->setBrush(opt->palette.brush(QPalette::Button));
never executed: p->setBrush(opt->palette.brush(QPalette::Button));
0
822 p->drawRect(opt->rect.x() + 1, opt->rect.y() + 1, 11, 11);
executed (the execution status of this line is deduced): p->drawRect(opt->rect.x() + 1, opt->rect.y() + 1, 11, 11);
-
823 }
executed: }
Execution Count:30
30
824 if (!(opt->state & State_Off)) {
evaluated: !(opt->state & State_Off)
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:33
17-33
825 QLineF lines[7];
executed (the execution status of this line is deduced): QLineF lines[7];
-
826 int i, xx, yy;
executed (the execution status of this line is deduced): int i, xx, yy;
-
827 xx = opt->rect.x() + 3;
executed (the execution status of this line is deduced): xx = opt->rect.x() + 3;
-
828 yy = opt->rect.y() + 5;
executed (the execution status of this line is deduced): yy = opt->rect.y() + 5;
-
829 for (i = 0; i < 3; ++i) {
evaluated: i < 3
TRUEFALSE
yes
Evaluation Count:51
yes
Evaluation Count:17
17-51
830 lines[i] = QLineF(xx, yy, xx, yy + 2);
executed (the execution status of this line is deduced): lines[i] = QLineF(xx, yy, xx, yy + 2);
-
831 ++xx;
executed (the execution status of this line is deduced): ++xx;
-
832 ++yy;
executed (the execution status of this line is deduced): ++yy;
-
833 }
executed: }
Execution Count:51
51
834 yy -= 2;
executed (the execution status of this line is deduced): yy -= 2;
-
835 for (i = 3; i < 7; ++i) {
evaluated: i < 7
TRUEFALSE
yes
Evaluation Count:68
yes
Evaluation Count:17
17-68
836 lines[i] = QLineF(xx, yy, xx, yy + 2);
executed (the execution status of this line is deduced): lines[i] = QLineF(xx, yy, xx, yy + 2);
-
837 ++xx;
executed (the execution status of this line is deduced): ++xx;
-
838 --yy;
executed (the execution status of this line is deduced): --yy;
-
839 }
executed: }
Execution Count:68
68
840 p->drawLines(lines, 7);
executed (the execution status of this line is deduced): p->drawLines(lines, 7);
-
841 }
executed: }
Execution Count:17
17
842 if (doRestore)
partially evaluated: doRestore
TRUEFALSE
yes
Evaluation Count:50
no
Evaluation Count:0
0-50
843 p->restore();
executed: p->restore();
Execution Count:50
50
844 break;
executed: break;
Execution Count:50
50
845 case PE_FrameFocusRect: -
846 if (const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt)) {
partially evaluated: const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt)
TRUEFALSE
yes
Evaluation Count:1386
no
Evaluation Count:0
0-1386
847 //### check for d->alt_down -
848 if (!(fropt->state & State_KeyboardFocusChange) && !proxy()->styleHint(SH_UnderlineShortcut, opt))
evaluated: !(fropt->state & State_KeyboardFocusChange)
TRUEFALSE
yes
Evaluation Count:277
yes
Evaluation Count:1109
partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, opt)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:277
0-1109
849 return;
never executed: return;
0
850 QRect r = opt->rect;
executed (the execution status of this line is deduced): QRect r = opt->rect;
-
851 p->save();
executed (the execution status of this line is deduced): p->save();
-
852 p->setBackgroundMode(Qt::TransparentMode);
executed (the execution status of this line is deduced): p->setBackgroundMode(Qt::TransparentMode);
-
853 QColor bg_col = fropt->backgroundColor;
executed (the execution status of this line is deduced): QColor bg_col = fropt->backgroundColor;
-
854 if (!bg_col.isValid())
evaluated: !bg_col.isValid()
TRUEFALSE
yes
Evaluation Count:277
yes
Evaluation Count:1109
277-1109
855 bg_col = p->background().color();
executed: bg_col = p->background().color();
Execution Count:277
277
856 // Create an "XOR" color. -
857 QColor patternCol((bg_col.red() ^ 0xff) & 0xff,
executed (the execution status of this line is deduced): QColor patternCol((bg_col.red() ^ 0xff) & 0xff,
-
858 (bg_col.green() ^ 0xff) & 0xff,
executed (the execution status of this line is deduced): (bg_col.green() ^ 0xff) & 0xff,
-
859 (bg_col.blue() ^ 0xff) & 0xff);
executed (the execution status of this line is deduced): (bg_col.blue() ^ 0xff) & 0xff);
-
860 p->setBrush(QBrush(patternCol, Qt::Dense4Pattern));
executed (the execution status of this line is deduced): p->setBrush(QBrush(patternCol, Qt::Dense4Pattern));
-
861 p->setBrushOrigin(r.topLeft());
executed (the execution status of this line is deduced): p->setBrushOrigin(r.topLeft());
-
862 p->setPen(Qt::NoPen);
executed (the execution status of this line is deduced): p->setPen(Qt::NoPen);
-
863 p->drawRect(r.left(), r.top(), r.width(), 1); // Top
executed (the execution status of this line is deduced): p->drawRect(r.left(), r.top(), r.width(), 1);
-
864 p->drawRect(r.left(), r.bottom(), r.width(), 1); // Bottom
executed (the execution status of this line is deduced): p->drawRect(r.left(), r.bottom(), r.width(), 1);
-
865 p->drawRect(r.left(), r.top(), 1, r.height()); // Left
executed (the execution status of this line is deduced): p->drawRect(r.left(), r.top(), 1, r.height());
-
866 p->drawRect(r.right(), r.top(), 1, r.height()); // Right
executed (the execution status of this line is deduced): p->drawRect(r.right(), r.top(), 1, r.height());
-
867 p->restore();
executed (the execution status of this line is deduced): p->restore();
-
868 }
executed: }
Execution Count:1386
1386
869 break;
executed: break;
Execution Count:1386
1386
870 case PE_IndicatorRadioButton: -
871 { -
872#define PTSARRLEN(x) sizeof(x)/(sizeof(QPoint)) -
873 static const QPoint pts1[] = { // dark lines -
874 QPoint(1, 9), QPoint(1, 8), QPoint(0, 7), QPoint(0, 4), QPoint(1, 3), QPoint(1, 2), -
875 QPoint(2, 1), QPoint(3, 1), QPoint(4, 0), QPoint(7, 0), QPoint(8, 1), QPoint(9, 1) -
876 }; -
877 static const QPoint pts2[] = { // black lines -
878 QPoint(2, 8), QPoint(1, 7), QPoint(1, 4), QPoint(2, 3), QPoint(2, 2), QPoint(3, 2), -
879 QPoint(4, 1), QPoint(7, 1), QPoint(8, 2), QPoint(9, 2) -
880 }; -
881 static const QPoint pts3[] = { // background lines -
882 QPoint(2, 9), QPoint(3, 9), QPoint(4, 10), QPoint(7, 10), QPoint(8, 9), QPoint(9, 9), -
883 QPoint(9, 8), QPoint(10, 7), QPoint(10, 4), QPoint(9, 3) -
884 }; -
885 static const QPoint pts4[] = { // white lines -
886 QPoint(2, 10), QPoint(3, 10), QPoint(4, 11), QPoint(7, 11), QPoint(8, 10), -
887 QPoint(9, 10), QPoint(10, 9), QPoint(10, 8), QPoint(11, 7), QPoint(11, 4), -
888 QPoint(10, 3), QPoint(10, 2) -
889 }; -
890 static const QPoint pts5[] = { // inner fill -
891 QPoint(4, 2), QPoint(7, 2), QPoint(9, 4), QPoint(9, 7), QPoint(7, 9), QPoint(4, 9), -
892 QPoint(2, 7), QPoint(2, 4) -
893 }; -
894 -
895 // make sure the indicator is square -
896 QRect ir = opt->rect;
executed (the execution status of this line is deduced): QRect ir = opt->rect;
-
897 -
898 if (opt->rect.width() < opt->rect.height()) {
partially evaluated: opt->rect.width() < opt->rect.height()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
0-26
899 ir.setTop(opt->rect.top() + (opt->rect.height() - opt->rect.width()) / 2);
never executed (the execution status of this line is deduced): ir.setTop(opt->rect.top() + (opt->rect.height() - opt->rect.width()) / 2);
-
900 ir.setHeight(opt->rect.width());
never executed (the execution status of this line is deduced): ir.setHeight(opt->rect.width());
-
901 } else if (opt->rect.height() < opt->rect.width()) {
never executed: }
partially evaluated: opt->rect.height() < opt->rect.width()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
0-26
902 ir.setLeft(opt->rect.left() + (opt->rect.width() - opt->rect.height()) / 2);
never executed (the execution status of this line is deduced): ir.setLeft(opt->rect.left() + (opt->rect.width() - opt->rect.height()) / 2);
-
903 ir.setWidth(opt->rect.height());
never executed (the execution status of this line is deduced): ir.setWidth(opt->rect.height());
-
904 }
never executed: }
0
905 -
906 p->save();
executed (the execution status of this line is deduced): p->save();
-
907 p->setRenderHint(QPainter::Qt4CompatiblePainting);
executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting);
-
908 bool down = opt->state & State_Sunken;
executed (the execution status of this line is deduced): bool down = opt->state & State_Sunken;
-
909 bool enabled = opt->state & State_Enabled;
executed (the execution status of this line is deduced): bool enabled = opt->state & State_Enabled;
-
910 bool on = opt->state & State_On;
executed (the execution status of this line is deduced): bool on = opt->state & State_On;
-
911 QPolygon a;
executed (the execution status of this line is deduced): QPolygon a;
-
912 -
913 //center when rect is larger than indicator size -
914 int xOffset = 0;
executed (the execution status of this line is deduced): int xOffset = 0;
-
915 int yOffset = 0;
executed (the execution status of this line is deduced): int yOffset = 0;
-
916 int indicatorWidth = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth);
executed (the execution status of this line is deduced): int indicatorWidth = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth);
-
917 int indicatorHeight = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth);
executed (the execution status of this line is deduced): int indicatorHeight = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth);
-
918 if (ir.width() > indicatorWidth)
partially evaluated: ir.width() > indicatorWidth
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
0-26
919 xOffset += (ir.width() - indicatorWidth)/2;
never executed: xOffset += (ir.width() - indicatorWidth)/2;
0
920 if (ir.height() > indicatorHeight)
partially evaluated: ir.height() > indicatorHeight
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
0-26
921 yOffset += (ir.height() - indicatorHeight)/2;
never executed: yOffset += (ir.height() - indicatorHeight)/2;
0
922 p->translate(xOffset, yOffset);
executed (the execution status of this line is deduced): p->translate(xOffset, yOffset);
-
923 -
924 p->translate(ir.x(), ir.y());
executed (the execution status of this line is deduced): p->translate(ir.x(), ir.y());
-
925 -
926 p->setPen(opt->palette.dark().color());
executed (the execution status of this line is deduced): p->setPen(opt->palette.dark().color());
-
927 p->drawPolyline(pts1, PTSARRLEN(pts1));
executed (the execution status of this line is deduced): p->drawPolyline(pts1, sizeof(pts1)/(sizeof(QPoint)));
-
928 -
929 p->setPen(opt->palette.shadow().color());
executed (the execution status of this line is deduced): p->setPen(opt->palette.shadow().color());
-
930 p->drawPolyline(pts2, PTSARRLEN(pts2));
executed (the execution status of this line is deduced): p->drawPolyline(pts2, sizeof(pts2)/(sizeof(QPoint)));
-
931 -
932 p->setPen(opt->palette.midlight().color());
executed (the execution status of this line is deduced): p->setPen(opt->palette.midlight().color());
-
933 p->drawPolyline(pts3, PTSARRLEN(pts3));
executed (the execution status of this line is deduced): p->drawPolyline(pts3, sizeof(pts3)/(sizeof(QPoint)));
-
934 -
935 p->setPen(opt->palette.light().color());
executed (the execution status of this line is deduced): p->setPen(opt->palette.light().color());
-
936 p->drawPolyline(pts4, PTSARRLEN(pts4));
executed (the execution status of this line is deduced): p->drawPolyline(pts4, sizeof(pts4)/(sizeof(QPoint)));
-
937 -
938 QColor fillColor = (down || !enabled)
evaluated: down
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:25
partially evaluated: !enabled
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:25
0-25
939 ? opt->palette.button().color()
executed (the execution status of this line is deduced): ? opt->palette.button().color()
-
940 : opt->palette.base().color();
executed (the execution status of this line is deduced): : opt->palette.base().color();
-
941 p->setPen(fillColor);
executed (the execution status of this line is deduced): p->setPen(fillColor);
-
942 p->setBrush(fillColor) ;
executed (the execution status of this line is deduced): p->setBrush(fillColor) ;
-
943 p->drawPolygon(pts5, PTSARRLEN(pts5));
executed (the execution status of this line is deduced): p->drawPolygon(pts5, sizeof(pts5)/(sizeof(QPoint)));
-
944 -
945 p->translate(-ir.x(), -ir.y()); // restore translate
executed (the execution status of this line is deduced): p->translate(-ir.x(), -ir.y());
-
946 -
947 if (on) {
evaluated: on
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:23
3-23
948 p->setPen(Qt::NoPen);
executed (the execution status of this line is deduced): p->setPen(Qt::NoPen);
-
949 p->setBrush(opt->palette.text());
executed (the execution status of this line is deduced): p->setBrush(opt->palette.text());
-
950 p->drawRect(ir.x() + 5, ir.y() + 4, 2, 4);
executed (the execution status of this line is deduced): p->drawRect(ir.x() + 5, ir.y() + 4, 2, 4);
-
951 p->drawRect(ir.x() + 4, ir.y() + 5, 4, 2);
executed (the execution status of this line is deduced): p->drawRect(ir.x() + 4, ir.y() + 5, 4, 2);
-
952 }
executed: }
Execution Count:3
3
953 p->restore();
executed (the execution status of this line is deduced): p->restore();
-
954 break;
executed: break;
Execution Count:26
26
955 } -
956#ifndef QT_NO_FRAME -
957 case PE_Frame: -
958 case PE_FrameMenu: -
959 if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
evaluated: const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)
TRUEFALSE
yes
Evaluation Count:2077
yes
Evaluation Count:1
1-2077
960 if (frame->lineWidth == 2 || pe == PE_Frame) {
evaluated: frame->lineWidth == 2
TRUEFALSE
yes
Evaluation Count:683
yes
Evaluation Count:1394
partially evaluated: pe == PE_Frame
TRUEFALSE
yes
Evaluation Count:1394
no
Evaluation Count:0
0-1394
961 QPalette popupPal = frame->palette;
executed (the execution status of this line is deduced): QPalette popupPal = frame->palette;
-
962 if (pe == PE_FrameMenu) {
evaluated: pe == PE_FrameMenu
TRUEFALSE
yes
Evaluation Count:39
yes
Evaluation Count:2038
39-2038
963 popupPal.setColor(QPalette::Light, frame->palette.background().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Light, frame->palette.background().color());
-
964 popupPal.setColor(QPalette::Midlight, frame->palette.light().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Midlight, frame->palette.light().color());
-
965 }
executed: }
Execution Count:39
39
966 if (pe == PE_Frame && (frame->state & State_Raised))
evaluated: pe == PE_Frame
TRUEFALSE
yes
Evaluation Count:2038
yes
Evaluation Count:39
partially evaluated: (frame->state & State_Raised)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2038
0-2038
967 qDrawWinButton(p, frame->rect, popupPal, frame->state & State_Sunken);
never executed: qDrawWinButton(p, frame->rect, popupPal, frame->state & State_Sunken);
0
968 else if (pe == PE_Frame && (frame->state & State_Sunken))
evaluated: pe == PE_Frame
TRUEFALSE
yes
Evaluation Count:2038
yes
Evaluation Count:39
evaluated: (frame->state & State_Sunken)
TRUEFALSE
yes
Evaluation Count:1846
yes
Evaluation Count:192
39-2038
969 { -
970 popupPal.setColor(QPalette::Midlight, frame->palette.background().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Midlight, frame->palette.background().color());
-
971 qDrawWinPanel(p, frame->rect, popupPal, frame->state & State_Sunken);
executed (the execution status of this line is deduced): qDrawWinPanel(p, frame->rect, popupPal, frame->state & State_Sunken);
-
972 }
executed: }
Execution Count:1846
1846
973 else -
974 qDrawWinPanel(p, frame->rect, popupPal, frame->state & State_Sunken);
executed: qDrawWinPanel(p, frame->rect, popupPal, frame->state & State_Sunken);
Execution Count:231
231
975 } else { -
976 QCommonStyle::drawPrimitive(pe, opt, p, w);
never executed (the execution status of this line is deduced): QCommonStyle::drawPrimitive(pe, opt, p, w);
-
977 }
never executed: }
0
978 } else { -
979 QPalette popupPal = opt->palette;
executed (the execution status of this line is deduced): QPalette popupPal = opt->palette;
-
980 popupPal.setColor(QPalette::Light, opt->palette.background().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Light, opt->palette.background().color());
-
981 popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
-
982 qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
executed (the execution status of this line is deduced): qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
-
983 }
executed: }
Execution Count:1
1
984 break;
executed: break;
Execution Count:2078
2078
985#endif // QT_NO_FRAME -
986 case PE_FrameButtonBevel: -
987 case PE_PanelButtonBevel: { -
988 QBrush fill;
never executed (the execution status of this line is deduced): QBrush fill;
-
989 bool panel = pe != PE_FrameButtonBevel;
never executed (the execution status of this line is deduced): bool panel = pe != PE_FrameButtonBevel;
-
990 p->setBrushOrigin(opt->rect.topLeft());
never executed (the execution status of this line is deduced): p->setBrushOrigin(opt->rect.topLeft());
-
991 if (!(opt->state & State_Sunken) && (opt->state & State_On))
never evaluated: !(opt->state & State_Sunken)
never evaluated: (opt->state & State_On)
0
992 fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
never executed: fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
0
993 else -
994 fill = opt->palette.brush(QPalette::Button);
never executed: fill = opt->palette.brush(QPalette::Button);
0
995 -
996 if (opt->state & (State_Raised | State_On | State_Sunken)) {
never evaluated: opt->state & (State_Raised | State_On | State_Sunken)
0
997 qDrawWinButton(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On),
never executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect, opt->palette, opt->state & (State_Sunken | State_On),
-
998 panel ? &fill : 0);
never executed (the execution status of this line is deduced): panel ? &fill : 0);
-
999 } else {
never executed: }
0
1000 if (panel)
never evaluated: panel
0
1001 p->fillRect(opt->rect, fill);
never executed: p->fillRect(opt->rect, fill);
0
1002 else -
1003 p->drawRect(opt->rect);
never executed: p->drawRect(opt->rect);
0
1004 } -
1005 break; }
never executed: break;
0
1006 case PE_FrameWindow: { -
1007 QPalette popupPal = opt->palette;
executed (the execution status of this line is deduced): QPalette popupPal = opt->palette;
-
1008 popupPal.setColor(QPalette::Light, opt->palette.background().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Light, opt->palette.background().color());
-
1009 popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
executed (the execution status of this line is deduced): popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
-
1010 qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
executed (the execution status of this line is deduced): qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
-
1011 break; }
executed: break;
Execution Count:220
220
1012#ifndef QT_NO_DOCKWIDGET -
1013 case PE_IndicatorDockWidgetResizeHandle: -
1014 break;
executed: break;
Execution Count:3
3
1015 case PE_FrameDockWidget: -
1016 if (qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
partially evaluated: qstyleoption_cast<const QStyleOptionFrame *>(opt)
TRUEFALSE
yes
Evaluation Count:12
no
Evaluation Count:0
0-12
1017 proxy()->drawPrimitive(QStyle::PE_FrameWindow, opt, p, w);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(QStyle::PE_FrameWindow, opt, p, w);
-
1018 }
executed: }
Execution Count:12
12
1019 break;
executed: break;
Execution Count:12
12
1020#endif // QT_NO_DOCKWIDGET -
1021 -
1022 case PE_FrameStatusBarItem: -
1023 qDrawShadePanel(p, opt->rect, opt->palette, true, 1, 0);
executed (the execution status of this line is deduced): qDrawShadePanel(p, opt->rect, opt->palette, true, 1, 0);
-
1024 break;
executed: break;
Execution Count:1
1
1025 -
1026 case PE_IndicatorProgressChunk: -
1027 { -
1028 bool vertical = false, inverted = false;
executed (the execution status of this line is deduced): bool vertical = false, inverted = false;
-
1029 if (const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt)) {
partially evaluated: const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt)
TRUEFALSE
yes
Evaluation Count:284
no
Evaluation Count:0
0-284
1030 vertical = (pb2->orientation == Qt::Vertical);
executed (the execution status of this line is deduced): vertical = (pb2->orientation == Qt::Vertical);
-
1031 inverted = pb2->invertedAppearance;
executed (the execution status of this line is deduced): inverted = pb2->invertedAppearance;
-
1032 }
executed: }
Execution Count:284
284
1033 -
1034 int space = 2;
executed (the execution status of this line is deduced): int space = 2;
-
1035 int chunksize = proxy()->pixelMetric(PM_ProgressBarChunkWidth, opt, w) - space;
executed (the execution status of this line is deduced): int chunksize = proxy()->pixelMetric(PM_ProgressBarChunkWidth, opt, w) - space;
-
1036 if (!vertical) {
partially evaluated: !vertical
TRUEFALSE
yes
Evaluation Count:284
no
Evaluation Count:0
0-284
1037 if (opt->rect.width() <= chunksize)
partially evaluated: opt->rect.width() <= chunksize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:284
0-284
1038 space = 0;
never executed: space = 0;
0
1039 -
1040 if (inverted)
partially evaluated: inverted
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:284
0-284
1041 p->fillRect(opt->rect.x() + space, opt->rect.y(), opt->rect.width() - space, opt->rect.height(),
never executed: p->fillRect(opt->rect.x() + space, opt->rect.y(), opt->rect.width() - space, opt->rect.height(), opt->palette.brush(QPalette::Highlight));
0
1042 opt->palette.brush(QPalette::Highlight));
never executed: p->fillRect(opt->rect.x() + space, opt->rect.y(), opt->rect.width() - space, opt->rect.height(), opt->palette.brush(QPalette::Highlight));
0
1043 else -
1044 p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width() - space, opt->rect.height(),
executed: p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width() - space, opt->rect.height(), opt->palette.brush(QPalette::Highlight));
Execution Count:284
284
1045 opt->palette.brush(QPalette::Highlight));
executed: p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width() - space, opt->rect.height(), opt->palette.brush(QPalette::Highlight));
Execution Count:284
284
1046 } else { -
1047 if (opt->rect.height() <= chunksize)
never evaluated: opt->rect.height() <= chunksize
0
1048 space = 0;
never executed: space = 0;
0
1049 -
1050 if (inverted)
never evaluated: inverted
0
1051 p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height() - space,
never executed: p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height() - space, opt->palette.brush(QPalette::Highlight));
0
1052 opt->palette.brush(QPalette::Highlight));
never executed: p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height() - space, opt->palette.brush(QPalette::Highlight));
0
1053 else -
1054 p->fillRect(opt->rect.x(), opt->rect.y() + space, opt->rect.width(), opt->rect.height() - space,
never executed: p->fillRect(opt->rect.x(), opt->rect.y() + space, opt->rect.width(), opt->rect.height() - space, opt->palette.brush(QPalette::Highlight));
0
1055 opt->palette.brush(QPalette::Highlight));
never executed: p->fillRect(opt->rect.x(), opt->rect.y() + space, opt->rect.width(), opt->rect.height() - space, opt->palette.brush(QPalette::Highlight));
0
1056 } -
1057 } -
1058 break;
executed: break;
Execution Count:284
284
1059 -
1060 case PE_FrameTabWidget: { -
1061 qDrawWinButton(p, opt->rect, opt->palette, false, 0);
executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect, opt->palette, false, 0);
-
1062 break;
executed: break;
Execution Count:32
32
1063 } -
1064 default: -
1065 QCommonStyle::drawPrimitive(pe, opt, p, w);
executed (the execution status of this line is deduced): QCommonStyle::drawPrimitive(pe, opt, p, w);
-
1066 }
executed: }
Execution Count:36907
36907
1067}
executed: }
Execution Count:42742
42742
1068 -
1069/*! \reimp */ -
1070void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, -
1071 const QWidget *widget) const -
1072{ -
1073 switch (ce) { -
1074#ifndef QT_NO_RUBBERBAND -
1075 case CE_RubberBand: -
1076 if (qstyleoption_cast<const QStyleOptionRubberBand *>(opt)) {
evaluated: qstyleoption_cast<const QStyleOptionRubberBand *>(opt)
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:3
3
1077 // ### workaround for slow general painter path -
1078 QPixmap tiledPixmap(16, 16);
executed (the execution status of this line is deduced): QPixmap tiledPixmap(16, 16);
-
1079 QPainter pixmapPainter(&tiledPixmap);
executed (the execution status of this line is deduced): QPainter pixmapPainter(&tiledPixmap);
-
1080 pixmapPainter.setPen(Qt::NoPen);
executed (the execution status of this line is deduced): pixmapPainter.setPen(Qt::NoPen);
-
1081 pixmapPainter.setBrush(Qt::Dense4Pattern);
executed (the execution status of this line is deduced): pixmapPainter.setBrush(Qt::Dense4Pattern);
-
1082 pixmapPainter.setBackground(Qt::white);
executed (the execution status of this line is deduced): pixmapPainter.setBackground(Qt::white);
-
1083 pixmapPainter.setBackgroundMode(Qt::OpaqueMode);
executed (the execution status of this line is deduced): pixmapPainter.setBackgroundMode(Qt::OpaqueMode);
-
1084 pixmapPainter.drawRect(0, 0, tiledPixmap.width(), tiledPixmap.height());
executed (the execution status of this line is deduced): pixmapPainter.drawRect(0, 0, tiledPixmap.width(), tiledPixmap.height());
-
1085 pixmapPainter.end();
executed (the execution status of this line is deduced): pixmapPainter.end();
-
1086 tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage());
executed (the execution status of this line is deduced): tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage());
-
1087 p->save();
executed (the execution status of this line is deduced): p->save();
-
1088 QRect r = opt->rect;
executed (the execution status of this line is deduced): QRect r = opt->rect;
-
1089 QStyleHintReturnMask mask;
executed (the execution status of this line is deduced): QStyleHintReturnMask mask;
-
1090 if (proxy()->styleHint(QStyle::SH_RubberBand_Mask, opt, widget, &mask))
partially evaluated: proxy()->styleHint(QStyle::SH_RubberBand_Mask, opt, widget, &mask)
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
1091 p->setClipRegion(mask.region);
executed: p->setClipRegion(mask.region);
Execution Count:3
3
1092 p->drawTiledPixmap(r.x(), r.y(), r.width(), r.height(), tiledPixmap);
executed (the execution status of this line is deduced): p->drawTiledPixmap(r.x(), r.y(), r.width(), r.height(), tiledPixmap);
-
1093 p->restore();
executed (the execution status of this line is deduced): p->restore();
-
1094 return;
executed: return;
Execution Count:3
3
1095 } -
1096 break;
executed: break;
Execution Count:3
3
1097#endif // QT_NO_RUBBERBAND -
1098 -
1099#if !defined(QT_NO_MENU) && !defined(QT_NO_MAINWINDOW) -
1100 case CE_MenuBarEmptyArea: -
1101 if (widget && qobject_cast<const QMainWindow *>(widget->parentWidget())) {
evaluated: widget
TRUEFALSE
yes
Evaluation Count:52
yes
Evaluation Count:3
evaluated: qobject_cast<const QMainWindow *>(widget->parentWidget())
TRUEFALSE
yes
Evaluation Count:43
yes
Evaluation Count:9
3-52
1102 p->fillRect(opt->rect, opt->palette.button());
executed (the execution status of this line is deduced): p->fillRect(opt->rect, opt->palette.button());
-
1103 QPen oldPen = p->pen();
executed (the execution status of this line is deduced): QPen oldPen = p->pen();
-
1104 p->setPen(QPen(opt->palette.dark().color()));
executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color()));
-
1105 p->drawLine(opt->rect.bottomLeft(), opt->rect.bottomRight());
executed (the execution status of this line is deduced): p->drawLine(opt->rect.bottomLeft(), opt->rect.bottomRight());
-
1106 p->setPen(oldPen);
executed (the execution status of this line is deduced): p->setPen(oldPen);
-
1107 }
executed: }
Execution Count:43
43
1108 break;
executed: break;
Execution Count:55
55
1109#endif -
1110#ifndef QT_NO_MENU -
1111 case CE_MenuItem: -
1112 if (const QStyleOptionMenuItem *menuitem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
evaluated: const QStyleOptionMenuItem *menuitem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
TRUEFALSE
yes
Evaluation Count:87
yes
Evaluation Count:3
3-87
1113 int x, y, w, h;
executed (the execution status of this line is deduced): int x, y, w, h;
-
1114 menuitem->rect.getRect(&x, &y, &w, &h);
executed (the execution status of this line is deduced): menuitem->rect.getRect(&x, &y, &w, &h);
-
1115 int tab = menuitem->tabWidth;
executed (the execution status of this line is deduced): int tab = menuitem->tabWidth;
-
1116 bool dis = !(menuitem->state & State_Enabled);
executed (the execution status of this line is deduced): bool dis = !(menuitem->state & State_Enabled);
-
1117 bool checked = menuitem->checkType != QStyleOptionMenuItem::NotCheckable
evaluated: menuitem->checkType != QStyleOptionMenuItem::NotCheckable
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:82
5-82
1118 ? menuitem->checked : false;
executed (the execution status of this line is deduced): ? menuitem->checked : false;
-
1119 bool act = menuitem->state & State_Selected;
executed (the execution status of this line is deduced): bool act = menuitem->state & State_Selected;
-
1120 -
1121 // windows always has a check column, regardless whether we have an icon or not -
1122 int checkcol = qMax<int>(menuitem->maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth);
executed (the execution status of this line is deduced): int checkcol = qMax<int>(menuitem->maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth);
-
1123 -
1124 QBrush fill = menuitem->palette.brush(act ? QPalette::Highlight : QPalette::Button);
executed (the execution status of this line is deduced): QBrush fill = menuitem->palette.brush(act ? QPalette::Highlight : QPalette::Button);
-
1125 p->fillRect(menuitem->rect.adjusted(0, 0, -1, 0), fill);
executed (the execution status of this line is deduced): p->fillRect(menuitem->rect.adjusted(0, 0, -1, 0), fill);
-
1126 -
1127 if (menuitem->menuItemType == QStyleOptionMenuItem::Separator){
evaluated: menuitem->menuItemType == QStyleOptionMenuItem::Separator
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:78
9-78
1128 int yoff = y-1 + h / 2;
executed (the execution status of this line is deduced): int yoff = y-1 + h / 2;
-
1129 p->setPen(menuitem->palette.dark().color());
executed (the execution status of this line is deduced): p->setPen(menuitem->palette.dark().color());
-
1130 p->drawLine(x + 2, yoff, x + w - 4, yoff);
executed (the execution status of this line is deduced): p->drawLine(x + 2, yoff, x + w - 4, yoff);
-
1131 p->setPen(menuitem->palette.light().color());
executed (the execution status of this line is deduced): p->setPen(menuitem->palette.light().color());
-
1132 p->drawLine(x + 2, yoff + 1, x + w - 4, yoff + 1);
executed (the execution status of this line is deduced): p->drawLine(x + 2, yoff + 1, x + w - 4, yoff + 1);
-
1133 return;
executed: return;
Execution Count:9
9
1134 } -
1135 -
1136 QRect vCheckRect = visualRect(opt->direction, menuitem->rect, QRect(menuitem->rect.x(), menuitem->rect.y(), checkcol, menuitem->rect.height()));
executed (the execution status of this line is deduced): QRect vCheckRect = visualRect(opt->direction, menuitem->rect, QRect(menuitem->rect.x(), menuitem->rect.y(), checkcol, menuitem->rect.height()));
-
1137 if (!menuitem->icon.isNull() && checked) {
evaluated: !menuitem->icon.isNull()
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:66
partially evaluated: checked
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
0-66
1138 if (act) {
never evaluated: act
0
1139 qDrawShadePanel(p, vCheckRect,
never executed (the execution status of this line is deduced): qDrawShadePanel(p, vCheckRect,
-
1140 menuitem->palette, true, 1,
never executed (the execution status of this line is deduced): menuitem->palette, true, 1,
-
1141 &menuitem->palette.brush(QPalette::Button));
never executed (the execution status of this line is deduced): &menuitem->palette.brush(QPalette::Button));
-
1142 } else {
never executed: }
0
1143 QBrush fill(menuitem->palette.light().color(), Qt::Dense4Pattern);
never executed (the execution status of this line is deduced): QBrush fill(menuitem->palette.light().color(), Qt::Dense4Pattern);
-
1144 qDrawShadePanel(p, vCheckRect, menuitem->palette, true, 1, &fill);
never executed (the execution status of this line is deduced): qDrawShadePanel(p, vCheckRect, menuitem->palette, true, 1, &fill);
-
1145 }
never executed: }
0
1146 } else if (!act) {
evaluated: !act
TRUEFALSE
yes
Evaluation Count:74
yes
Evaluation Count:4
4-74
1147 p->fillRect(vCheckRect, menuitem->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): p->fillRect(vCheckRect, menuitem->palette.brush(QPalette::Button));
-
1148 }
executed: }
Execution Count:74
74
1149 -
1150 // On Windows Style, if we have a checkable item and an icon we -
1151 // draw the icon recessed to indicate an item is checked. If we -
1152 // have no icon, we draw a checkmark instead. -
1153 if (!menuitem->icon.isNull()) {
evaluated: !menuitem->icon.isNull()
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:66
12-66
1154 QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal;
evaluated: dis
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:10
2-10
1155 if (act && !dis)
partially evaluated: act
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
never evaluated: !dis
0-12
1156 mode = QIcon::Active;
never executed: mode = QIcon::Active;
0
1157 QPixmap pixmap;
executed (the execution status of this line is deduced): QPixmap pixmap;
-
1158 if (checked)
partially evaluated: checked
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
0-12
1159 pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode, QIcon::On);
never executed: pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode, QIcon::On);
0
1160 else -
1161 pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode);
executed: pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode);
Execution Count:12
12
1162 int pixw = pixmap.width();
executed (the execution status of this line is deduced): int pixw = pixmap.width();
-
1163 int pixh = pixmap.height();
executed (the execution status of this line is deduced): int pixh = pixmap.height();
-
1164 if (act && !dis && !checked)
partially evaluated: act
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
never evaluated: !dis
never evaluated: !checked
0-12
1165 qDrawShadePanel(p, vCheckRect, menuitem->palette, false, 1,
never executed: qDrawShadePanel(p, vCheckRect, menuitem->palette, false, 1, &menuitem->palette.brush(QPalette::Button));
0
1166 &menuitem->palette.brush(QPalette::Button));
never executed: qDrawShadePanel(p, vCheckRect, menuitem->palette, false, 1, &menuitem->palette.brush(QPalette::Button));
0
1167 QRect pmr(0, 0, pixw, pixh);
executed (the execution status of this line is deduced): QRect pmr(0, 0, pixw, pixh);
-
1168 pmr.moveCenter(vCheckRect.center());
executed (the execution status of this line is deduced): pmr.moveCenter(vCheckRect.center());
-
1169 p->setPen(menuitem->palette.text().color());
executed (the execution status of this line is deduced): p->setPen(menuitem->palette.text().color());
-
1170 p->drawPixmap(pmr.topLeft(), pixmap);
executed (the execution status of this line is deduced): p->drawPixmap(pmr.topLeft(), pixmap);
-
1171 } else if (checked) {
executed: }
Execution Count:12
partially evaluated: checked
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:66
0-66
1172 QStyleOptionMenuItem newMi = *menuitem;
never executed (the execution status of this line is deduced): QStyleOptionMenuItem newMi = *menuitem;
-
1173 newMi.state = State_None;
never executed (the execution status of this line is deduced): newMi.state = State_None;
-
1174 if (!dis)
never evaluated: !dis
0
1175 newMi.state |= State_Enabled;
never executed: newMi.state |= State_Enabled;
0
1176 if (act)
never evaluated: act
0
1177 newMi.state |= State_On;
never executed: newMi.state |= State_On;
0
1178 newMi.rect = visualRect(opt->direction, menuitem->rect, QRect(menuitem->rect.x() + QWindowsStylePrivate::windowsItemFrame,
never executed (the execution status of this line is deduced): newMi.rect = visualRect(opt->direction, menuitem->rect, QRect(menuitem->rect.x() + QWindowsStylePrivate::windowsItemFrame,
-
1179 menuitem->rect.y() + QWindowsStylePrivate::windowsItemFrame,
never executed (the execution status of this line is deduced): menuitem->rect.y() + QWindowsStylePrivate::windowsItemFrame,
-
1180 checkcol - 2 * QWindowsStylePrivate::windowsItemFrame,
never executed (the execution status of this line is deduced): checkcol - 2 * QWindowsStylePrivate::windowsItemFrame,
-
1181 menuitem->rect.height() - 2 * QWindowsStylePrivate::windowsItemFrame));
never executed (the execution status of this line is deduced): menuitem->rect.height() - 2 * QWindowsStylePrivate::windowsItemFrame));
-
1182 proxy()->drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, widget);
never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, widget);
-
1183 }
never executed: }
0
1184 p->setPen(act ? menuitem->palette.highlightedText().color() : menuitem->palette.buttonText().color());
executed (the execution status of this line is deduced): p->setPen(act ? menuitem->palette.highlightedText().color() : menuitem->palette.buttonText().color());
-
1185 -
1186 QColor discol;
executed (the execution status of this line is deduced): QColor discol;
-
1187 if (dis) {
evaluated: dis
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:66
12-66
1188 discol = menuitem->palette.text().color();
executed (the execution status of this line is deduced): discol = menuitem->palette.text().color();
-
1189 p->setPen(discol);
executed (the execution status of this line is deduced): p->setPen(discol);
-
1190 }
executed: }
Execution Count:12
12
1191 -
1192 int xm = int(QWindowsStylePrivate::windowsItemFrame) + checkcol + int(QWindowsStylePrivate::windowsItemHMargin);
executed (the execution status of this line is deduced): int xm = int(QWindowsStylePrivate::windowsItemFrame) + checkcol + int(QWindowsStylePrivate::windowsItemHMargin);
-
1193 int xpos = menuitem->rect.x() + xm;
executed (the execution status of this line is deduced): int xpos = menuitem->rect.x() + xm;
-
1194 QRect textRect(xpos, y + QWindowsStylePrivate::windowsItemVMargin,
executed (the execution status of this line is deduced): QRect textRect(xpos, y + QWindowsStylePrivate::windowsItemVMargin,
-
1195 w - xm - QWindowsStylePrivate::windowsRightBorder - tab + 1, h - 2 * QWindowsStylePrivate::windowsItemVMargin);
executed (the execution status of this line is deduced): w - xm - QWindowsStylePrivate::windowsRightBorder - tab + 1, h - 2 * QWindowsStylePrivate::windowsItemVMargin);
-
1196 QRect vTextRect = visualRect(opt->direction, menuitem->rect, textRect);
executed (the execution status of this line is deduced): QRect vTextRect = visualRect(opt->direction, menuitem->rect, textRect);
-
1197 QString s = menuitem->text;
executed (the execution status of this line is deduced): QString s = menuitem->text;
-
1198 if (!s.isEmpty()) { // draw text
partially evaluated: !s.isEmpty()
TRUEFALSE
yes
Evaluation Count:78
no
Evaluation Count:0
0-78
1199 p->save();
executed (the execution status of this line is deduced): p->save();
-
1200 int t = s.indexOf(QLatin1Char('\t'));
executed (the execution status of this line is deduced): int t = s.indexOf(QLatin1Char('\t'));
-
1201 int text_flags = Qt::AlignVCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine;
executed (the execution status of this line is deduced): int text_flags = Qt::AlignVCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine;
-
1202 if (!proxy()->styleHint(SH_UnderlineShortcut, menuitem, widget))
partially evaluated: !proxy()->styleHint(SH_UnderlineShortcut, menuitem, widget)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:78
0-78
1203 text_flags |= Qt::TextHideMnemonic;
never executed: text_flags |= Qt::TextHideMnemonic;
0
1204 text_flags |= Qt::AlignLeft;
executed (the execution status of this line is deduced): text_flags |= Qt::AlignLeft;
-
1205 if (t >= 0) {
evaluated: t >= 0
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:65
13-65
1206 QRect vShortcutRect = visualRect(opt->direction, menuitem->rect,
executed (the execution status of this line is deduced): QRect vShortcutRect = visualRect(opt->direction, menuitem->rect,
-
1207 QRect(textRect.topRight(), QPoint(menuitem->rect.right(), textRect.bottom())));
executed (the execution status of this line is deduced): QRect(textRect.topRight(), QPoint(menuitem->rect.right(), textRect.bottom())));
-
1208 if (dis && !act && proxy()->styleHint(SH_EtchDisabledText, opt, widget)) {
evaluated: dis
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:7
partially evaluated: !act
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
partially evaluated: proxy()->styleHint(SH_EtchDisabledText, opt, widget)
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-7
1209 p->setPen(menuitem->palette.light().color());
executed (the execution status of this line is deduced): p->setPen(menuitem->palette.light().color());
-
1210 p->drawText(vShortcutRect.adjusted(1,1,1,1), text_flags, s.mid(t + 1));
executed (the execution status of this line is deduced): p->drawText(vShortcutRect.adjusted(1,1,1,1), text_flags, s.mid(t + 1));
-
1211 p->setPen(discol);
executed (the execution status of this line is deduced): p->setPen(discol);
-
1212 }
executed: }
Execution Count:6
6
1213 p->drawText(vShortcutRect, text_flags, s.mid(t + 1));
executed (the execution status of this line is deduced): p->drawText(vShortcutRect, text_flags, s.mid(t + 1));
-
1214 s = s.left(t);
executed (the execution status of this line is deduced): s = s.left(t);
-
1215 }
executed: }
Execution Count:13
13
1216 QFont font = menuitem->font;
executed (the execution status of this line is deduced): QFont font = menuitem->font;
-
1217 if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem)
partially evaluated: menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:78
0-78
1218 font.setBold(true);
never executed: font.setBold(true);
0
1219 p->setFont(font);
executed (the execution status of this line is deduced): p->setFont(font);
-
1220 if (dis && !act && proxy()->styleHint(SH_EtchDisabledText, opt, widget)) {
evaluated: dis
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:66
partially evaluated: !act
TRUEFALSE
yes
Evaluation Count:12
no
Evaluation Count:0
partially evaluated: proxy()->styleHint(SH_EtchDisabledText, opt, widget)
TRUEFALSE
yes
Evaluation Count:12
no
Evaluation Count:0
0-66
1221 p->setPen(menuitem->palette.light().color());
executed (the execution status of this line is deduced): p->setPen(menuitem->palette.light().color());
-
1222 p->drawText(vTextRect.adjusted(1,1,1,1), text_flags, s.left(t));
executed (the execution status of this line is deduced): p->drawText(vTextRect.adjusted(1,1,1,1), text_flags, s.left(t));
-
1223 p->setPen(discol);
executed (the execution status of this line is deduced): p->setPen(discol);
-
1224 }
executed: }
Execution Count:12
12
1225 p->drawText(vTextRect, text_flags, s.left(t));
executed (the execution status of this line is deduced): p->drawText(vTextRect, text_flags, s.left(t));
-
1226 p->restore();
executed (the execution status of this line is deduced): p->restore();
-
1227 }
executed: }
Execution Count:78
78
1228 if (menuitem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
evaluated: menuitem->menuItemType == QStyleOptionMenuItem::SubMenu
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:68
10-68
1229 int dim = (h - 2 * QWindowsStylePrivate::windowsItemFrame) / 2;
executed (the execution status of this line is deduced): int dim = (h - 2 * QWindowsStylePrivate::windowsItemFrame) / 2;
-
1230 PrimitiveElement arrow;
executed (the execution status of this line is deduced): PrimitiveElement arrow;
-
1231 arrow = (opt->direction == Qt::RightToLeft) ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight;
partially evaluated: (opt->direction == Qt::RightToLeft)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10
0-10
1232 xpos = x + w - QWindowsStylePrivate::windowsArrowHMargin - QWindowsStylePrivate::windowsItemFrame - dim;
executed (the execution status of this line is deduced): xpos = x + w - QWindowsStylePrivate::windowsArrowHMargin - QWindowsStylePrivate::windowsItemFrame - dim;
-
1233 QRect vSubMenuRect = visualRect(opt->direction, menuitem->rect, QRect(xpos, y + h / 2 - dim / 2, dim, dim));
executed (the execution status of this line is deduced): QRect vSubMenuRect = visualRect(opt->direction, menuitem->rect, QRect(xpos, y + h / 2 - dim / 2, dim, dim));
-
1234 QStyleOptionMenuItem newMI = *menuitem;
executed (the execution status of this line is deduced): QStyleOptionMenuItem newMI = *menuitem;
-
1235 newMI.rect = vSubMenuRect;
executed (the execution status of this line is deduced): newMI.rect = vSubMenuRect;
-
1236 newMI.state = dis ? State_None : State_Enabled;
partially evaluated: dis
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10
0-10
1237 if (act)
evaluated: act
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:7
3-7
1238 newMI.palette.setColor(QPalette::ButtonText,
executed: newMI.palette.setColor(QPalette::ButtonText, newMI.palette.highlightedText().color());
Execution Count:3
3
1239 newMI.palette.highlightedText().color());
executed: newMI.palette.setColor(QPalette::ButtonText, newMI.palette.highlightedText().color());
Execution Count:3
3
1240 proxy()->drawPrimitive(arrow, &newMI, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(arrow, &newMI, p, widget);
-
1241 }
executed: }
Execution Count:10
10
1242 -
1243 }
executed: }
Execution Count:78
78
1244 break;
executed: break;
Execution Count:81
81
1245#endif // QT_NO_MENU -
1246#ifndef QT_NO_MENUBAR -
1247 case CE_MenuBarItem: -
1248 if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
evaluated: const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
TRUEFALSE
yes
Evaluation Count:46
yes
Evaluation Count:3
3-46
1249 bool active = mbi->state & State_Selected;
executed (the execution status of this line is deduced): bool active = mbi->state & State_Selected;
-
1250 bool hasFocus = mbi->state & State_HasFocus;
executed (the execution status of this line is deduced): bool hasFocus = mbi->state & State_HasFocus;
-
1251 bool down = mbi->state & State_Sunken;
executed (the execution status of this line is deduced): bool down = mbi->state & State_Sunken;
-
1252 QStyleOptionMenuItem newMbi = *mbi;
executed (the execution status of this line is deduced): QStyleOptionMenuItem newMbi = *mbi;
-
1253 p->fillRect(mbi->rect, mbi->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): p->fillRect(mbi->rect, mbi->palette.brush(QPalette::Button));
-
1254 if (active || hasFocus) {
evaluated: active
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:35
evaluated: hasFocus
TRUEFALSE
yes
Evaluation Count:14
yes
Evaluation Count:21
11-35
1255 QBrush b = mbi->palette.brush(QPalette::Button);
executed (the execution status of this line is deduced): QBrush b = mbi->palette.brush(QPalette::Button);
-
1256 if (active && down)
evaluated: active
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:14
evaluated: down
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:1
1-14
1257 p->setBrushOrigin(p->brushOrigin() + QPoint(1, 1));
executed: p->setBrushOrigin(p->brushOrigin() + QPoint(1, 1));
Execution Count:10
10
1258 if (active && hasFocus)
evaluated: active
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:14
partially evaluated: hasFocus
TRUEFALSE
yes
Evaluation Count:11
no
Evaluation Count:0
0-14
1259 qDrawShadeRect(p, mbi->rect.x(), mbi->rect.y(), mbi->rect.width(),
executed: qDrawShadeRect(p, mbi->rect.x(), mbi->rect.y(), mbi->rect.width(), mbi->rect.height(), mbi->palette, active && down, 1, 0, &b);
Execution Count:11
11
1260 mbi->rect.height(), mbi->palette, active && down, 1, 0, &b);
executed: qDrawShadeRect(p, mbi->rect.x(), mbi->rect.y(), mbi->rect.width(), mbi->rect.height(), mbi->palette, active && down, 1, 0, &b);
Execution Count:11
11
1261 if (active && down) {
evaluated: active
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:14
evaluated: down
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:1
1-14
1262 newMbi.rect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, mbi, widget),
executed (the execution status of this line is deduced): newMbi.rect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, mbi, widget),
-
1263 proxy()->pixelMetric(PM_ButtonShiftVertical, mbi, widget));
executed (the execution status of this line is deduced): proxy()->pixelMetric(PM_ButtonShiftVertical, mbi, widget));
-
1264 p->setBrushOrigin(p->brushOrigin() - QPoint(1, 1));
executed (the execution status of this line is deduced): p->setBrushOrigin(p->brushOrigin() - QPoint(1, 1));
-
1265 }
executed: }
Execution Count:10
10
1266 }
executed: }
Execution Count:25
25
1267 QCommonStyle::drawControl(ce, &newMbi, p, widget);
executed (the execution status of this line is deduced): QCommonStyle::drawControl(ce, &newMbi, p, widget);
-
1268 }
executed: }
Execution Count:46
46
1269 break;
executed: break;
Execution Count:49
49
1270#endif // QT_NO_MENUBAR -
1271#ifndef QT_NO_TABBAR -
1272 case CE_TabBarTabShape: -
1273 if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
evaluated: const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
TRUEFALSE
yes
Evaluation Count:39
yes
Evaluation Count:3
3-39
1274 bool rtlHorTabs = (tab->direction == Qt::RightToLeft
partially evaluated: tab->direction == Qt::RightToLeft
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:39
0-39
1275 && (tab->shape == QTabBar::RoundedNorth
never evaluated: tab->shape == QTabBar::RoundedNorth
0
1276 || tab->shape == QTabBar::RoundedSouth));
never evaluated: tab->shape == QTabBar::RoundedSouth
0
1277 bool selected = tab->state & State_Selected;
executed (the execution status of this line is deduced): bool selected = tab->state & State_Selected;
-
1278 bool lastTab = ((!rtlHorTabs && tab->position == QStyleOptionTab::End)
partially evaluated: !rtlHorTabs
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
evaluated: tab->position == QStyleOptionTab::End
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:26
0-39
1279 || (rtlHorTabs
partially evaluated: rtlHorTabs
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
0-26
1280 && tab->position == QStyleOptionTab::Beginning));
never evaluated: tab->position == QStyleOptionTab::Beginning
0
1281 bool firstTab = ((!rtlHorTabs
partially evaluated: !rtlHorTabs
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
0-39
1282 && tab->position == QStyleOptionTab::Beginning)
evaluated: tab->position == QStyleOptionTab::Beginning
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:26
13-26
1283 || (rtlHorTabs
partially evaluated: rtlHorTabs
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
0-26
1284 && tab->position == QStyleOptionTab::End));
never evaluated: tab->position == QStyleOptionTab::End
0
1285 bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab;
executed (the execution status of this line is deduced): bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab;
-
1286 bool previousSelected =
executed (the execution status of this line is deduced): bool previousSelected =
-
1287 ((!rtlHorTabs
partially evaluated: !rtlHorTabs
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
0-39
1288 && tab->selectedPosition == QStyleOptionTab::PreviousIsSelected)
evaluated: tab->selectedPosition == QStyleOptionTab::PreviousIsSelected
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:29
10-29
1289 || (rtlHorTabs
partially evaluated: rtlHorTabs
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:29
0-29
1290 && tab->selectedPosition == QStyleOptionTab::NextIsSelected));
never evaluated: tab->selectedPosition == QStyleOptionTab::NextIsSelected
0
1291 bool nextSelected =
executed (the execution status of this line is deduced): bool nextSelected =
-
1292 ((!rtlHorTabs
partially evaluated: !rtlHorTabs
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
0-39
1293 && tab->selectedPosition == QStyleOptionTab::NextIsSelected)
evaluated: tab->selectedPosition == QStyleOptionTab::NextIsSelected
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:36
3-36
1294 || (rtlHorTabs
partially evaluated: rtlHorTabs
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:36
0-36
1295 && tab->selectedPosition
never evaluated: tab->selectedPosition == QStyleOptionTab::PreviousIsSelected
0
1296 == QStyleOptionTab::PreviousIsSelected));
never evaluated: tab->selectedPosition == QStyleOptionTab::PreviousIsSelected
0
1297 int tabBarAlignment = proxy()->styleHint(SH_TabBar_Alignment, tab, widget);
executed (the execution status of this line is deduced): int tabBarAlignment = proxy()->styleHint(SH_TabBar_Alignment, tab, widget);
-
1298 bool leftAligned = (!rtlHorTabs && tabBarAlignment == Qt::AlignLeft)
partially evaluated: !rtlHorTabs
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
partially evaluated: tabBarAlignment == Qt::AlignLeft
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
0-39
1299 || (rtlHorTabs
never evaluated: rtlHorTabs
0
1300 && tabBarAlignment == Qt::AlignRight);
never evaluated: tabBarAlignment == Qt::AlignRight
0
1301 -
1302 bool rightAligned = (!rtlHorTabs && tabBarAlignment == Qt::AlignRight)
partially evaluated: !rtlHorTabs
TRUEFALSE
yes
Evaluation Count:39
no
Evaluation Count:0
partially evaluated: tabBarAlignment == Qt::AlignRight
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:39
0-39
1303 || (rtlHorTabs
partially evaluated: rtlHorTabs
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:39
0-39
1304 && tabBarAlignment == Qt::AlignLeft);
never evaluated: tabBarAlignment == Qt::AlignLeft
0
1305 -
1306 QColor light = tab->palette.light().color();
executed (the execution status of this line is deduced): QColor light = tab->palette.light().color();
-
1307 QColor dark = tab->palette.dark().color();
executed (the execution status of this line is deduced): QColor dark = tab->palette.dark().color();
-
1308 QColor shadow = tab->palette.shadow().color();
executed (the execution status of this line is deduced): QColor shadow = tab->palette.shadow().color();
-
1309 int borderThinkness = proxy()->pixelMetric(PM_TabBarBaseOverlap, tab, widget);
executed (the execution status of this line is deduced): int borderThinkness = proxy()->pixelMetric(PM_TabBarBaseOverlap, tab, widget);
-
1310 if (selected)
evaluated: selected
TRUEFALSE
yes
Evaluation Count:26
yes
Evaluation Count:13
13-26
1311 borderThinkness /= 2;
executed: borderThinkness /= 2;
Execution Count:26
26
1312 QRect r2(opt->rect);
executed (the execution status of this line is deduced): QRect r2(opt->rect);
-
1313 int x1 = r2.left();
executed (the execution status of this line is deduced): int x1 = r2.left();
-
1314 int x2 = r2.right();
executed (the execution status of this line is deduced): int x2 = r2.right();
-
1315 int y1 = r2.top();
executed (the execution status of this line is deduced): int y1 = r2.top();
-
1316 int y2 = r2.bottom();
executed (the execution status of this line is deduced): int y2 = r2.bottom();
-
1317 switch (tab->shape) { -
1318 default: -
1319 QCommonStyle::drawControl(ce, tab, p, widget);
never executed (the execution status of this line is deduced): QCommonStyle::drawControl(ce, tab, p, widget);
-
1320 break;
never executed: break;
0
1321 case QTabBar::RoundedNorth: { -
1322 if (!selected) {
evaluated: !selected
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:18
11-18
1323 y1 += 2;
executed (the execution status of this line is deduced): y1 += 2;
-
1324 x1 += onlyOne || firstTab ? borderThinkness : 0;
partially evaluated: onlyOne
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:11
evaluated: firstTab
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:10
0-11
1325 x2 -= onlyOne || lastTab ? borderThinkness : 0;
partially evaluated: onlyOne
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:11
evaluated: lastTab
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:1
0-11
1326 }
executed: }
Execution Count:11
11
1327 -
1328 p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 2), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 2), tab->palette.background());
-
1329 -
1330 // Delete border -
1331 if (selected) {
evaluated: selected
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:11
11-18
1332 p->fillRect(QRect(x1,y2-1,x2-x1,1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1,y2-1,x2-x1,1), tab->palette.background());
-
1333 p->fillRect(QRect(x1,y2,x2-x1,1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1,y2,x2-x1,1), tab->palette.background());
-
1334 }
executed: }
Execution Count:18
18
1335 // Left -
1336 if (firstTab || selected || onlyOne || !previousSelected) {
evaluated: firstTab
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:18
evaluated: selected
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:10
partially evaluated: onlyOne
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10
partially evaluated: !previousSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10
0-18
1337 p->setPen(light);
executed (the execution status of this line is deduced): p->setPen(light);
-
1338 p->drawLine(x1, y1 + 2, x1, y2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
executed (the execution status of this line is deduced): p->drawLine(x1, y1 + 2, x1, y2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
-
1339 p->drawPoint(x1 + 1, y1 + 1);
executed (the execution status of this line is deduced): p->drawPoint(x1 + 1, y1 + 1);
-
1340 }
executed: }
Execution Count:19
19
1341 // Top -
1342 { -
1343 int beg = x1 + (previousSelected ? 0 : 2);
evaluated: previousSelected
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:19
10-19
1344 int end = x2 - (nextSelected ? 0 : 2);
evaluated: nextSelected
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:28
1-28
1345 p->setPen(light);
executed (the execution status of this line is deduced): p->setPen(light);
-
1346 p->drawLine(beg, y1, end, y1);
executed (the execution status of this line is deduced): p->drawLine(beg, y1, end, y1);
-
1347 } -
1348 // Right -
1349 if (lastTab || selected || onlyOne || !nextSelected) {
evaluated: lastTab
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:18
evaluated: selected
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:1
partially evaluated: onlyOne
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
partially evaluated: !nextSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-18
1350 p->setPen(shadow);
executed (the execution status of this line is deduced): p->setPen(shadow);
-
1351 p->drawLine(x2, y1 + 2, x2, y2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
executed (the execution status of this line is deduced): p->drawLine(x2, y1 + 2, x2, y2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
-
1352 p->drawPoint(x2 - 1, y1 + 1);
executed (the execution status of this line is deduced): p->drawPoint(x2 - 1, y1 + 1);
-
1353 p->setPen(dark);
executed (the execution status of this line is deduced): p->setPen(dark);
-
1354 p->drawLine(x2 - 1, y1 + 2, x2 - 1, y2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
executed (the execution status of this line is deduced): p->drawLine(x2 - 1, y1 + 2, x2 - 1, y2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
-
1355 }
executed: }
Execution Count:28
28
1356 break; }
executed: break;
Execution Count:29
29
1357 case QTabBar::RoundedSouth: { -
1358 if (!selected) {
evaluated: !selected
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4
2-4
1359 y2 -= 2;
executed (the execution status of this line is deduced): y2 -= 2;
-
1360 x1 += firstTab ? borderThinkness : 0;
partially evaluated: firstTab
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
1361 x2 -= lastTab ? borderThinkness : 0;
partially evaluated: lastTab
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1362 }
executed: }
Execution Count:2
2
1363 -
1364 p->fillRect(QRect(x1 + 1, y1 + 2, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1 + 1, y1 + 2, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.background());
-
1365 -
1366 // Delete border -
1367 if (selected) {
evaluated: selected
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:2
2-4
1368 p->fillRect(QRect(x1, y1 + 1, (x2 - 1)-x1, 1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1, y1 + 1, (x2 - 1)-x1, 1), tab->palette.background());
-
1369 p->fillRect(QRect(x1, y1, (x2 - 1)-x1, 1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1, y1, (x2 - 1)-x1, 1), tab->palette.background());
-
1370 }
executed: }
Execution Count:4
4
1371 // Left -
1372 if (firstTab || selected || onlyOne || !previousSelected) {
evaluated: firstTab
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
never evaluated: onlyOne
never evaluated: !previousSelected
0-4
1373 p->setPen(light);
executed (the execution status of this line is deduced): p->setPen(light);
-
1374 p->drawLine(x1, y2 - 2, x1, y1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
executed (the execution status of this line is deduced): p->drawLine(x1, y2 - 2, x1, y1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness));
-
1375 p->drawPoint(x1 + 1, y2 - 1);
executed (the execution status of this line is deduced): p->drawPoint(x1 + 1, y2 - 1);
-
1376 }
executed: }
Execution Count:6
6
1377 // Bottom -
1378 { -
1379 int beg = x1 + (previousSelected ? 0 : 2);
partially evaluated: previousSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-6
1380 int end = x2 - (nextSelected ? 0 : 2);
evaluated: nextSelected
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4
2-4
1381 p->setPen(shadow);
executed (the execution status of this line is deduced): p->setPen(shadow);
-
1382 p->drawLine(beg, y2, end, y2);
executed (the execution status of this line is deduced): p->drawLine(beg, y2, end, y2);
-
1383 p->setPen(dark);
executed (the execution status of this line is deduced): p->setPen(dark);
-
1384 p->drawLine(beg, y2 - 1, end, y2 - 1);
executed (the execution status of this line is deduced): p->drawLine(beg, y2 - 1, end, y2 - 1);
-
1385 } -
1386 // Right -
1387 if (lastTab || selected || onlyOne || !nextSelected) {
evaluated: lastTab
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4
evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
partially evaluated: onlyOne
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: !nextSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-4
1388 p->setPen(shadow);
executed (the execution status of this line is deduced): p->setPen(shadow);
-
1389 p->drawLine(x2, y2 - 2, x2, y1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
executed (the execution status of this line is deduced): p->drawLine(x2, y2 - 2, x2, y1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
-
1390 p->drawPoint(x2 - 1, y2 - 1);
executed (the execution status of this line is deduced): p->drawPoint(x2 - 1, y2 - 1);
-
1391 p->setPen(dark);
executed (the execution status of this line is deduced): p->setPen(dark);
-
1392 p->drawLine(x2 - 1, y2 - 2, x2 - 1, y1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
executed (the execution status of this line is deduced): p->drawLine(x2 - 1, y2 - 2, x2 - 1, y1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness));
-
1393 }
executed: }
Execution Count:4
4
1394 break; }
executed: break;
Execution Count:6
6
1395 case QTabBar::RoundedWest: { -
1396 if (!selected) {
partially evaluated: !selected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1397 x1 += 2;
never executed (the execution status of this line is deduced): x1 += 2;
-
1398 y1 += firstTab ? borderThinkness : 0;
never evaluated: firstTab
0
1399 y2 -= lastTab ? borderThinkness : 0;
never evaluated: lastTab
0
1400 }
never executed: }
0
1401 -
1402 p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 2, (y2 - y1) - 1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 2, (y2 - y1) - 1), tab->palette.background());
-
1403 -
1404 // Delete border -
1405 if (selected) {
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
1406 p->fillRect(QRect(x2 - 1, y1, 1, y2-y1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x2 - 1, y1, 1, y2-y1), tab->palette.background());
-
1407 p->fillRect(QRect(x2, y1, 1, y2-y1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x2, y1, 1, y2-y1), tab->palette.background());
-
1408 }
executed: }
Execution Count:2
2
1409 // Top -
1410 if (firstTab || selected || onlyOne || !previousSelected) {
partially evaluated: firstTab
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
never evaluated: onlyOne
never evaluated: !previousSelected
0-2
1411 p->setPen(light);
executed (the execution status of this line is deduced): p->setPen(light);
-
1412 p->drawLine(x1 + 2, y1, x2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1);
executed (the execution status of this line is deduced): p->drawLine(x1 + 2, y1, x2 - ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1);
-
1413 p->drawPoint(x1 + 1, y1 + 1);
executed (the execution status of this line is deduced): p->drawPoint(x1 + 1, y1 + 1);
-
1414 }
executed: }
Execution Count:2
2
1415 // Left -
1416 { -
1417 int beg = y1 + (previousSelected ? 0 : 2);
partially evaluated: previousSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1418 int end = y2 - (nextSelected ? 0 : 2);
partially evaluated: nextSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1419 p->setPen(light);
executed (the execution status of this line is deduced): p->setPen(light);
-
1420 p->drawLine(x1, beg, x1, end);
executed (the execution status of this line is deduced): p->drawLine(x1, beg, x1, end);
-
1421 } -
1422 // Bottom -
1423 if (lastTab || selected || onlyOne || !nextSelected) {
partially evaluated: lastTab
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
never evaluated: onlyOne
never evaluated: !nextSelected
0-2
1424 p->setPen(shadow);
executed (the execution status of this line is deduced): p->setPen(shadow);
-
1425 p->drawLine(x1 + 3, y2, x2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2);
executed (the execution status of this line is deduced): p->drawLine(x1 + 3, y2, x2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2);
-
1426 p->drawPoint(x1 + 2, y2 - 1);
executed (the execution status of this line is deduced): p->drawPoint(x1 + 2, y2 - 1);
-
1427 p->setPen(dark);
executed (the execution status of this line is deduced): p->setPen(dark);
-
1428 p->drawLine(x1 + 3, y2 - 1, x2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2 - 1);
executed (the execution status of this line is deduced): p->drawLine(x1 + 3, y2 - 1, x2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2 - 1);
-
1429 p->drawPoint(x1 + 1, y2 - 1);
executed (the execution status of this line is deduced): p->drawPoint(x1 + 1, y2 - 1);
-
1430 p->drawPoint(x1 + 2, y2);
executed (the execution status of this line is deduced): p->drawPoint(x1 + 2, y2);
-
1431 }
executed: }
Execution Count:2
2
1432 break; }
executed: break;
Execution Count:2
2
1433 case QTabBar::RoundedEast: { -
1434 if (!selected) {
partially evaluated: !selected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1435 x2 -= 2;
never executed (the execution status of this line is deduced): x2 -= 2;
-
1436 y1 += firstTab ? borderThinkness : 0;
never evaluated: firstTab
0
1437 y2 -= lastTab ? borderThinkness : 0;
never evaluated: lastTab
0
1438 }
never executed: }
0
1439 -
1440 p->fillRect(QRect(x1 + 2, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1 + 2, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.background());
-
1441 -
1442 // Delete border -
1443 if (selected) {
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
1444 p->fillRect(QRect(x1 + 1, y1, 1, (y2 - 1)-y1),tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1 + 1, y1, 1, (y2 - 1)-y1),tab->palette.background());
-
1445 p->fillRect(QRect(x1, y1, 1, (y2-1)-y1), tab->palette.background());
executed (the execution status of this line is deduced): p->fillRect(QRect(x1, y1, 1, (y2-1)-y1), tab->palette.background());
-
1446 }
executed: }
Execution Count:2
2
1447 // Top -
1448 if (firstTab || selected || onlyOne || !previousSelected) {
partially evaluated: firstTab
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
never evaluated: onlyOne
never evaluated: !previousSelected
0-2
1449 p->setPen(light);
executed (the execution status of this line is deduced): p->setPen(light);
-
1450 p->drawLine(x2 - 2, y1, x1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1);
executed (the execution status of this line is deduced): p->drawLine(x2 - 2, y1, x1 + ((onlyOne || firstTab) && selected && leftAligned ? 0 : borderThinkness), y1);
-
1451 p->drawPoint(x2 - 1, y1 + 1);
executed (the execution status of this line is deduced): p->drawPoint(x2 - 1, y1 + 1);
-
1452 }
executed: }
Execution Count:2
2
1453 // Right -
1454 { -
1455 int beg = y1 + (previousSelected ? 0 : 2);
partially evaluated: previousSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1456 int end = y2 - (nextSelected ? 0 : 2);
partially evaluated: nextSelected
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1457 p->setPen(shadow);
executed (the execution status of this line is deduced): p->setPen(shadow);
-
1458 p->drawLine(x2, beg, x2, end);
executed (the execution status of this line is deduced): p->drawLine(x2, beg, x2, end);
-
1459 p->setPen(dark);
executed (the execution status of this line is deduced): p->setPen(dark);
-
1460 p->drawLine(x2 - 1, beg, x2 - 1, end);
executed (the execution status of this line is deduced): p->drawLine(x2 - 1, beg, x2 - 1, end);
-
1461 } -
1462 // Bottom -
1463 if (lastTab || selected || onlyOne || !nextSelected) {
partially evaluated: lastTab
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: selected
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
never evaluated: onlyOne
never evaluated: !nextSelected
0-2
1464 p->setPen(shadow);
executed (the execution status of this line is deduced): p->setPen(shadow);
-
1465 p->drawLine(x2 - 2, y2, x1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2);
executed (the execution status of this line is deduced): p->drawLine(x2 - 2, y2, x1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2);
-
1466 p->drawPoint(x2 - 1, y2 - 1);
executed (the execution status of this line is deduced): p->drawPoint(x2 - 1, y2 - 1);
-
1467 p->setPen(dark);
executed (the execution status of this line is deduced): p->setPen(dark);
-
1468 p->drawLine(x2 - 2, y2 - 1, x1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2 - 1);
executed (the execution status of this line is deduced): p->drawLine(x2 - 2, y2 - 1, x1 + ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness), y2 - 1);
-
1469 }
executed: }
Execution Count:2
2
1470 break; }
executed: break;
Execution Count:2
2
1471 } -
1472 }
executed: }
Execution Count:39
39
1473 break;
executed: break;
Execution Count:42
42
1474#endif // QT_NO_TABBAR -
1475 case CE_ToolBoxTabShape: -
1476 qDrawShadePanel(p, opt->rect, opt->palette,
executed (the execution status of this line is deduced): qDrawShadePanel(p, opt->rect, opt->palette,
-
1477 opt->state & (State_Sunken | State_On), 1,
executed (the execution status of this line is deduced): opt->state & (State_Sunken | State_On), 1,
-
1478 &opt->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): &opt->palette.brush(QPalette::Button));
-
1479 break;
executed: break;
Execution Count:3
3
1480#ifndef QT_NO_SPLITTER -
1481 case CE_Splitter: -
1482 p->eraseRect(opt->rect);
executed (the execution status of this line is deduced): p->eraseRect(opt->rect);
-
1483 break;
executed: break;
Execution Count:53
53
1484#endif // QT_NO_SPLITTER -
1485#ifndef QT_NO_SCROLLBAR -
1486 case CE_ScrollBarSubLine: -
1487 case CE_ScrollBarAddLine: { -
1488 if ((opt->state & State_Sunken)) {
evaluated: (opt->state & State_Sunken)
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:5887
1-5887
1489 p->setPen(opt->palette.dark().color());
executed (the execution status of this line is deduced): p->setPen(opt->palette.dark().color());
-
1490 p->setBrush(opt->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): p->setBrush(opt->palette.brush(QPalette::Button));
-
1491 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));
-
1492 } else {
executed: }
Execution Count:1
1
1493 QStyleOption buttonOpt = *opt;
executed (the execution status of this line is deduced): QStyleOption buttonOpt = *opt;
-
1494 if (!(buttonOpt.state & State_Sunken))
partially evaluated: !(buttonOpt.state & State_Sunken)
TRUEFALSE
yes
Evaluation Count:5887
no
Evaluation Count:0
0-5887
1495 buttonOpt.state |= State_Raised;
executed: buttonOpt.state |= State_Raised;
Execution Count:5887
5887
1496 QPalette pal(opt->palette);
executed (the execution status of this line is deduced): QPalette pal(opt->palette);
-
1497 pal.setColor(QPalette::Button, opt->palette.light().color());
executed (the execution status of this line is deduced): pal.setColor(QPalette::Button, opt->palette.light().color());
-
1498 pal.setColor(QPalette::Light, opt->palette.button().color());
executed (the execution status of this line is deduced): pal.setColor(QPalette::Light, opt->palette.button().color());
-
1499 qDrawWinButton(p, opt->rect, pal, opt->state & (State_Sunken | State_On),
executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect, pal, opt->state & (State_Sunken | State_On),
-
1500 &opt->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): &opt->palette.brush(QPalette::Button));
-
1501 }
executed: }
Execution Count:5887
5887
1502 PrimitiveElement arrow;
executed (the execution status of this line is deduced): PrimitiveElement arrow;
-
1503 if (opt->state & State_Horizontal) {
evaluated: opt->state & State_Horizontal
TRUEFALSE
yes
Evaluation Count:2656
yes
Evaluation Count:3232
2656-3232
1504 if (ce == CE_ScrollBarAddLine)
evaluated: ce == CE_ScrollBarAddLine
TRUEFALSE
yes
Evaluation Count:1328
yes
Evaluation Count:1328
1328
1505 arrow = opt->direction == Qt::LeftToRight ? PE_IndicatorArrowRight : PE_IndicatorArrowLeft;
executed: arrow = opt->direction == Qt::LeftToRight ? PE_IndicatorArrowRight : PE_IndicatorArrowLeft;
Execution Count:1328
evaluated: opt->direction == Qt::LeftToRight
TRUEFALSE
yes
Evaluation Count:1324
yes
Evaluation Count:4
4-1328
1506 else -
1507 arrow = opt->direction == Qt::LeftToRight ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight;
executed: arrow = opt->direction == Qt::LeftToRight ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight;
Execution Count:1328
evaluated: opt->direction == Qt::LeftToRight
TRUEFALSE
yes
Evaluation Count:1324
yes
Evaluation Count:4
4-1328
1508 } else { -
1509 if (ce == CE_ScrollBarAddLine)
evaluated: ce == CE_ScrollBarAddLine
TRUEFALSE
yes
Evaluation Count:1616
yes
Evaluation Count:1616
1616
1510 arrow = PE_IndicatorArrowDown;
executed: arrow = PE_IndicatorArrowDown;
Execution Count:1616
1616
1511 else -
1512 arrow = PE_IndicatorArrowUp;
executed: arrow = PE_IndicatorArrowUp;
Execution Count:1616
1616
1513 } -
1514 QStyleOption arrowOpt = *opt;
executed (the execution status of this line is deduced): QStyleOption arrowOpt = *opt;
-
1515 arrowOpt.rect = opt->rect.adjusted(4, 4, -4, -4);
executed (the execution status of this line is deduced): arrowOpt.rect = opt->rect.adjusted(4, 4, -4, -4);
-
1516 proxy()->drawPrimitive(arrow, &arrowOpt, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(arrow, &arrowOpt, p, widget);
-
1517 break; }
executed: break;
Execution Count:5888
5888
1518 case CE_ScrollBarAddPage: -
1519 case CE_ScrollBarSubPage: { -
1520 QBrush br;
executed (the execution status of this line is deduced): QBrush br;
-
1521 QBrush bg = p->background();
executed (the execution status of this line is deduced): QBrush bg = p->background();
-
1522 Qt::BGMode bg_mode = p->backgroundMode();
executed (the execution status of this line is deduced): Qt::BGMode bg_mode = p->backgroundMode();
-
1523 p->setPen(Qt::NoPen);
executed (the execution status of this line is deduced): p->setPen(Qt::NoPen);
-
1524 p->setBackgroundMode(Qt::OpaqueMode);
executed (the execution status of this line is deduced): p->setBackgroundMode(Qt::OpaqueMode);
-
1525 -
1526 if (opt->state & State_Sunken) {
partially evaluated: opt->state & State_Sunken
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5015
0-5015
1527 br = QBrush(opt->palette.shadow().color(), Qt::Dense4Pattern);
never executed (the execution status of this line is deduced): br = QBrush(opt->palette.shadow().color(), Qt::Dense4Pattern);
-
1528 p->setBackground(opt->palette.dark().color());
never executed (the execution status of this line is deduced): p->setBackground(opt->palette.dark().color());
-
1529 p->setBrush(br);
never executed (the execution status of this line is deduced): p->setBrush(br);
-
1530 } else {
never executed: }
0
1531 QPixmap pm = opt->palette.brush(QPalette::Light).texture();
executed (the execution status of this line is deduced): QPixmap pm = opt->palette.brush(QPalette::Light).texture();
-
1532 br = !pm.isNull() ? QBrush(pm) : QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
partially evaluated: !pm.isNull()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5015
0-5015
1533 p->setBackground(opt->palette.background().color());
executed (the execution status of this line is deduced): p->setBackground(opt->palette.background().color());
-
1534 p->setBrush(br);
executed (the execution status of this line is deduced): p->setBrush(br);
-
1535 }
executed: }
Execution Count:5015
5015
1536 p->drawRect(opt->rect);
executed (the execution status of this line is deduced): p->drawRect(opt->rect);
-
1537 p->setBackground(bg);
executed (the execution status of this line is deduced): p->setBackground(bg);
-
1538 p->setBackgroundMode(bg_mode);
executed (the execution status of this line is deduced): p->setBackgroundMode(bg_mode);
-
1539 break; }
executed: break;
Execution Count:5015
5015
1540 case CE_ScrollBarSlider: -
1541 if (!(opt->state & State_Enabled)) {
evaluated: !(opt->state & State_Enabled)
TRUEFALSE
yes
Evaluation Count:147
yes
Evaluation Count:2785
147-2785
1542 QPixmap pm = opt->palette.brush(QPalette::Light).texture();
executed (the execution status of this line is deduced): QPixmap pm = opt->palette.brush(QPalette::Light).texture();
-
1543 QBrush br = !pm.isNull() ? QBrush(pm) : QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
partially evaluated: !pm.isNull()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:147
0-147
1544 p->setPen(Qt::NoPen);
executed (the execution status of this line is deduced): p->setPen(Qt::NoPen);
-
1545 p->setBrush(br);
executed (the execution status of this line is deduced): p->setBrush(br);
-
1546 p->setBackgroundMode(Qt::OpaqueMode);
executed (the execution status of this line is deduced): p->setBackgroundMode(Qt::OpaqueMode);
-
1547 p->drawRect(opt->rect);
executed (the execution status of this line is deduced): p->drawRect(opt->rect);
-
1548 } else {
executed: }
Execution Count:147
147
1549 QStyleOptionButton buttonOpt;
executed (the execution status of this line is deduced): QStyleOptionButton buttonOpt;
-
1550 buttonOpt.QStyleOption::operator=(*opt);
executed (the execution status of this line is deduced): buttonOpt.QStyleOption::operator=(*opt);
-
1551 buttonOpt.state = State_Enabled | State_Raised;
executed (the execution status of this line is deduced): buttonOpt.state = State_Enabled | State_Raised;
-
1552 -
1553 QPalette pal(opt->palette);
executed (the execution status of this line is deduced): QPalette pal(opt->palette);
-
1554 pal.setColor(QPalette::Button, opt->palette.light().color());
executed (the execution status of this line is deduced): pal.setColor(QPalette::Button, opt->palette.light().color());
-
1555 pal.setColor(QPalette::Light, opt->palette.button().color());
executed (the execution status of this line is deduced): pal.setColor(QPalette::Light, opt->palette.button().color());
-
1556 qDrawWinButton(p, opt->rect, pal, false, &opt->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect, pal, false, &opt->palette.brush(QPalette::Button));
-
1557 }
executed: }
Execution Count:2785
2785
1558 break;
executed: break;
Execution Count:2932
2932
1559#endif // QT_NO_SCROLLBAR -
1560 case CE_HeaderSection: { -
1561 QBrush fill;
executed (the execution status of this line is deduced): QBrush fill;
-
1562 if (opt->state & State_On)
evaluated: opt->state & State_On
TRUEFALSE
yes
Evaluation Count:475
yes
Evaluation Count:1631
475-1631
1563 fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
executed: fill = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
Execution Count:475
475
1564 else -
1565 fill = opt->palette.brush(QPalette::Button);
executed: fill = opt->palette.brush(QPalette::Button);
Execution Count:1631
1631
1566 -
1567 if (opt->state & (State_Raised | State_Sunken)) {
evaluated: opt->state & (State_Raised | State_Sunken)
TRUEFALSE
yes
Evaluation Count:2005
yes
Evaluation Count:101
101-2005
1568 qDrawWinButton(p, opt->rect, opt->palette, opt->state & State_Sunken, &fill);
executed (the execution status of this line is deduced): qDrawWinButton(p, opt->rect, opt->palette, opt->state & State_Sunken, &fill);
-
1569 } else {
executed: }
Execution Count:2005
2005
1570 p->fillRect(opt->rect, fill);
executed (the execution status of this line is deduced): p->fillRect(opt->rect, fill);
-
1571 }
executed: }
Execution Count:101
101
1572 break; }
executed: break;
Execution Count:2106
2106
1573#ifndef QT_NO_TOOLBAR -
1574 case CE_ToolBar: -
1575 if (const QStyleOptionToolBar *toolbar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
evaluated: const QStyleOptionToolBar *toolbar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:3
3-7
1576 // Reserve the beveled appearance only for mainwindow toolbars -
1577 if (!(widget && qobject_cast<const QMainWindow*> (widget->parentWidget())))
partially evaluated: widget
TRUEFALSE
yes
Evaluation Count:7
no
Evaluation Count:0
evaluated: qobject_cast<const QMainWindow*> (widget->parentWidget())
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:1
0-7
1578 break;
executed: break;
Execution Count:1
1
1579 -
1580 QRect rect = opt->rect;
executed (the execution status of this line is deduced): QRect rect = opt->rect;
-
1581 bool paintLeftBorder = true;
executed (the execution status of this line is deduced): bool paintLeftBorder = true;
-
1582 bool paintRightBorder = true;
executed (the execution status of this line is deduced): bool paintRightBorder = true;
-
1583 bool paintBottomBorder = true;
executed (the execution status of this line is deduced): bool paintBottomBorder = true;
-
1584 -
1585 switch (toolbar->toolBarArea){ -
1586 case Qt::BottomToolBarArea : -
1587 switch(toolbar->positionOfLine){ -
1588 case QStyleOptionToolBar::Beginning: -
1589 case QStyleOptionToolBar::OnlyOne: -
1590 paintBottomBorder = false;
never executed (the execution status of this line is deduced): paintBottomBorder = false;
-
1591 default: -
1592 break;
never executed: break;
0
1593 } -
1594 case Qt::TopToolBarArea :
code before this statement never executed: case Qt::TopToolBarArea :
0
1595 switch(toolbar->positionWithinLine){ -
1596 case QStyleOptionToolBar::Beginning: -
1597 paintLeftBorder = false;
never executed (the execution status of this line is deduced): paintLeftBorder = false;
-
1598 break;
never executed: break;
0
1599 case QStyleOptionToolBar::End: -
1600 paintRightBorder = false;
never executed (the execution status of this line is deduced): paintRightBorder = false;
-
1601 break;
never executed: break;
0
1602 case QStyleOptionToolBar::OnlyOne: -
1603 paintRightBorder = false;
executed (the execution status of this line is deduced): paintRightBorder = false;
-
1604 paintLeftBorder = false;
executed (the execution status of this line is deduced): paintLeftBorder = false;
-
1605 default: -
1606 break;
executed: break;
Execution Count:6
6
1607 } -
1608 if(opt->direction == Qt::RightToLeft){ //reverse layout changes the order of Beginning/end
partially evaluated: opt->direction == Qt::RightToLeft
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-6
1609 bool tmp = paintLeftBorder;
never executed (the execution status of this line is deduced): bool tmp = paintLeftBorder;
-
1610 paintRightBorder=paintLeftBorder;
never executed (the execution status of this line is deduced): paintRightBorder=paintLeftBorder;
-
1611 paintLeftBorder=tmp;
never executed (the execution status of this line is deduced): paintLeftBorder=tmp;
-
1612 }
never executed: }
0
1613 break;
executed: break;
Execution Count:6
6
1614 case Qt::RightToolBarArea : -
1615 switch (toolbar->positionOfLine){ -
1616 case QStyleOptionToolBar::Beginning: -
1617 case QStyleOptionToolBar::OnlyOne: -
1618 paintRightBorder = false;
never executed (the execution status of this line is deduced): paintRightBorder = false;
-
1619 break;
never executed: break;
0
1620 default: -
1621 break;
never executed: break;
0
1622 } -
1623 break;
never executed: break;
0
1624 case Qt::LeftToolBarArea : -
1625 switch (toolbar->positionOfLine){ -
1626 case QStyleOptionToolBar::Beginning: -
1627 case QStyleOptionToolBar::OnlyOne: -
1628 paintLeftBorder = false;
never executed (the execution status of this line is deduced): paintLeftBorder = false;
-
1629 break;
never executed: break;
0
1630 default: -
1631 break;
never executed: break;
0
1632 } -
1633 break;
never executed: break;
0
1634 default: -
1635 break;
never executed: break;
0
1636 } -
1637 -
1638 -
1639 //draw top border -
1640 p->setPen(QPen(opt->palette.light().color()));
executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color()));
-
1641 p->drawLine(rect.topLeft().x(),
executed (the execution status of this line is deduced): p->drawLine(rect.topLeft().x(),
-
1642 rect.topLeft().y(),
executed (the execution status of this line is deduced): rect.topLeft().y(),
-
1643 rect.topRight().x(),
executed (the execution status of this line is deduced): rect.topRight().x(),
-
1644 rect.topRight().y());
executed (the execution status of this line is deduced): rect.topRight().y());
-
1645 -
1646 if (paintLeftBorder){
partially evaluated: paintLeftBorder
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-6
1647 p->setPen(QPen(opt->palette.light().color()));
never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.light().color()));
-
1648 p->drawLine(rect.topLeft().x(),
never executed (the execution status of this line is deduced): p->drawLine(rect.topLeft().x(),
-
1649 rect.topLeft().y(),
never executed (the execution status of this line is deduced): rect.topLeft().y(),
-
1650 rect.bottomLeft().x(),
never executed (the execution status of this line is deduced): rect.bottomLeft().x(),
-
1651 rect.bottomLeft().y());
never executed (the execution status of this line is deduced): rect.bottomLeft().y());
-
1652 }
never executed: }
0
1653 -
1654 if (paintRightBorder){
partially evaluated: paintRightBorder
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-6
1655 p->setPen(QPen(opt->palette.dark().color()));
never executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color()));
-
1656 p->drawLine(rect.topRight().x(),
never executed (the execution status of this line is deduced): p->drawLine(rect.topRight().x(),
-
1657 rect.topRight().y(),
never executed (the execution status of this line is deduced): rect.topRight().y(),
-
1658 rect.bottomRight().x(),
never executed (the execution status of this line is deduced): rect.bottomRight().x(),
-
1659 rect.bottomRight().y());
never executed (the execution status of this line is deduced): rect.bottomRight().y());
-
1660 }
never executed: }
0
1661 -
1662 if (paintBottomBorder){
partially evaluated: paintBottomBorder
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
1663 p->setPen(QPen(opt->palette.dark().color()));
executed (the execution status of this line is deduced): p->setPen(QPen(opt->palette.dark().color()));
-
1664 p->drawLine(rect.bottomLeft().x(),
executed (the execution status of this line is deduced): p->drawLine(rect.bottomLeft().x(),
-
1665 rect.bottomLeft().y(),
executed (the execution status of this line is deduced): rect.bottomLeft().y(),
-
1666 rect.bottomRight().x(),
executed (the execution status of this line is deduced): rect.bottomRight().x(),
-
1667 rect.bottomRight().y());
executed (the execution status of this line is deduced): rect.bottomRight().y());
-
1668 }
executed: }
Execution Count:6
6
1669 }
executed: }
Execution Count:6
6
1670 break;
executed: break;
Execution Count:9
9
1671 -
1672 -
1673#endif // QT_NO_TOOLBAR -
1674 -
1675 case CE_ProgressBarContents: -
1676 if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
evaluated: const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
TRUEFALSE
yes
Evaluation Count:61
yes
Evaluation Count:3
3-61
1677 QRect rect = pb->rect;
executed (the execution status of this line is deduced): QRect rect = pb->rect;
-
1678 if (!rect.isValid())
evaluated: !rect.isValid()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:60
1-60
1679 return;
executed: return;
Execution Count:1
1
1680 -
1681 bool vertical = false;
executed (the execution status of this line is deduced): bool vertical = false;
-
1682 bool inverted = false;
executed (the execution status of this line is deduced): bool inverted = false;
-
1683 -
1684 // Get extra style options if version 2 -
1685 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);
-
1686 if (pb2) {
partially evaluated: pb2
TRUEFALSE
yes
Evaluation Count:60
no
Evaluation Count:0
0-60
1687 vertical = (pb2->orientation == Qt::Vertical);
executed (the execution status of this line is deduced): vertical = (pb2->orientation == Qt::Vertical);
-
1688 inverted = pb2->invertedAppearance;
executed (the execution status of this line is deduced): inverted = pb2->invertedAppearance;
-
1689 }
executed: }
Execution Count:60
60
1690 QMatrix m;
executed (the execution status of this line is deduced): QMatrix m;
-
1691 if (vertical) {
partially evaluated: vertical
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:60
0-60
1692 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());
-
1693 m.rotate(90);
never executed (the execution status of this line is deduced): m.rotate(90);
-
1694 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));
-
1695 }
never executed: }
0
1696 QPalette pal2 = pb->palette;
executed (the execution status of this line is deduced): QPalette pal2 = pb->palette;
-
1697 // Correct the highlight color if it is the same as the background -
1698 if (pal2.highlight() == pal2.background())
partially evaluated: pal2.highlight() == pal2.background()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:60
0-60
1699 pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active,
never executed: pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, QPalette::Highlight));
0
1700 QPalette::Highlight));
never executed: pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, QPalette::Highlight));
0
1701 bool reverse = ((!vertical && (pb->direction == Qt::RightToLeft)) || vertical);
partially evaluated: !vertical
TRUEFALSE
yes
Evaluation Count:60
no
Evaluation Count:0
partially evaluated: (pb->direction == Qt::RightToLeft)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:60
partially evaluated: vertical
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:60
0-60
1702 if (inverted)
partially evaluated: inverted
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:60
0-60
1703 reverse = !reverse;
never executed: reverse = !reverse;
0
1704 int w = rect.width();
executed (the execution status of this line is deduced): int w = rect.width();
-
1705 Q_D(const QWindowsStyle);
executed (the execution status of this line is deduced): const QWindowsStylePrivate * const d = d_func();
-
1706 if (pb->minimum == 0 && pb->maximum == 0) {
evaluated: pb->minimum == 0
TRUEFALSE
yes
Evaluation Count:43
yes
Evaluation Count:17
evaluated: pb->maximum == 0
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:26
17-43
1707 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);
-
1708 QStyleOptionProgressBarV2 pbBits = *pb;
executed (the execution status of this line is deduced): QStyleOptionProgressBarV2 pbBits = *pb;
-
1709 Q_ASSERT(unit_width >0);
executed (the execution status of this line is deduced): qt_noop();
-
1710 -
1711 pbBits.rect = rect;
executed (the execution status of this line is deduced): pbBits.rect = rect;
-
1712 pbBits.palette = pal2;
executed (the execution status of this line is deduced): pbBits.palette = pal2;
-
1713 -
1714 int step = 0;
executed (the execution status of this line is deduced): int step = 0;
-
1715 int chunkCount = w / unit_width + 1;
executed (the execution status of this line is deduced): int chunkCount = w / unit_width + 1;
-
1716 if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject)))
evaluated: QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject))
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:2
2-15
1717 step = (animation->animationStep() / 3) % chunkCount;
executed: step = (animation->animationStep() / 3) % chunkCount;
Execution Count:15
15
1718 else -
1719 d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
executed: d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
Execution Count:2
2
1720 int chunksInRow = 5;
executed (the execution status of this line is deduced): int chunksInRow = 5;
-
1721 int myY = pbBits.rect.y();
executed (the execution status of this line is deduced): int myY = pbBits.rect.y();
-
1722 int myHeight = pbBits.rect.height();
executed (the execution status of this line is deduced): int myHeight = pbBits.rect.height();
-
1723 int chunksToDraw = chunksInRow;
executed (the execution status of this line is deduced): int chunksToDraw = chunksInRow;
-
1724 -
1725 if(step > chunkCount - 5)chunksToDraw = (chunkCount - step);
never executed: chunksToDraw = (chunkCount - step);
partially evaluated: step > chunkCount - 5
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:17
0-17
1726 p->save();
executed (the execution status of this line is deduced): p->save();
-
1727 p->setClipRect(m.mapRect(QRectF(rect)).toRect());
executed (the execution status of this line is deduced): p->setClipRect(m.mapRect(QRectF(rect)).toRect());
-
1728 -
1729 int x0 = reverse ? rect.left() + rect.width() - unit_width*(step) - unit_width : rect.left() + unit_width * step;
partially evaluated: reverse
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:17
0-17
1730 int x = 0;
executed (the execution status of this line is deduced): int x = 0;
-
1731 -
1732 for (int i = 0; i < chunksToDraw ; ++i) {
evaluated: i < chunksToDraw
TRUEFALSE
yes
Evaluation Count:85
yes
Evaluation Count:17
17-85
1733 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);
-
1734 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();
-
1735 proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget);
-
1736 x += reverse ? -unit_width : unit_width;
partially evaluated: reverse
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:85
0-85
1737 }
executed: }
Execution Count:85
85
1738 //Draw wrap-around chunks -
1739 if( step > chunkCount-5){
partially evaluated: step > chunkCount-5
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:17
0-17
1740 x0 = reverse ? rect.left() + rect.width() - unit_width : rect.left() ;
never evaluated: reverse
0
1741 x = 0;
never executed (the execution status of this line is deduced): x = 0;
-
1742 int chunksToDraw = step - (chunkCount - chunksInRow);
never executed (the execution status of this line is deduced): int chunksToDraw = step - (chunkCount - chunksInRow);
-
1743 for (int i = 0; i < chunksToDraw ; ++i) {
never evaluated: i < chunksToDraw
0
1744 pbBits.rect.setRect(x0 + x, myY, unit_width, myHeight);
never executed (the execution status of this line is deduced): pbBits.rect.setRect(x0 + x, myY, unit_width, myHeight);
-
1745 pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect();
never executed (the execution status of this line is deduced): pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect();
-
1746 proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget);
never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget);
-
1747 x += reverse ? -unit_width : unit_width;
never evaluated: reverse
0
1748 }
never executed: }
0
1749 }
never executed: }
0
1750 p->restore(); //restore state
executed (the execution status of this line is deduced): p->restore();
-
1751 }
executed: }
Execution Count:17
17
1752 else { -
1753 d->stopAnimation(opt->styleObject);
executed (the execution status of this line is deduced): d->stopAnimation(opt->styleObject);
-
1754 QCommonStyle::drawControl(ce, opt, p, widget);
executed (the execution status of this line is deduced): QCommonStyle::drawControl(ce, opt, p, widget);
-
1755 }
executed: }
Execution Count:43
43
1756 } -
1757 break;
executed: break;
Execution Count:63
63
1758 -
1759#ifndef QT_NO_DOCKWIDGET -
1760 case CE_DockWidgetTitle: -
1761 -
1762 if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
evaluated: const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:3
3-30
1763 Q_D(const QWindowsStyle);
executed (the execution status of this line is deduced): const QWindowsStylePrivate * const d = d_func();
-
1764 -
1765 const QStyleOptionDockWidgetV2 *v2
executed (the execution status of this line is deduced): const QStyleOptionDockWidgetV2 *v2
-
1766 = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt);
executed (the execution status of this line is deduced): = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt);
-
1767 bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar;
partially evaluated: v2 == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:30
0-30
1768 -
1769 QRect rect = dwOpt->rect;
executed (the execution status of this line is deduced): QRect rect = dwOpt->rect;
-
1770 QRect r = rect;
executed (the execution status of this line is deduced): QRect r = rect;
-
1771 -
1772 if (verticalTitleBar) {
partially evaluated: verticalTitleBar
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:30
0-30
1773 QSize s = r.size();
never executed (the execution status of this line is deduced): QSize s = r.size();
-
1774 s.transpose();
never executed (the execution status of this line is deduced): s.transpose();
-
1775 r.setSize(s);
never executed (the execution status of this line is deduced): r.setSize(s);
-
1776 -
1777 p->save();
never executed (the execution status of this line is deduced): p->save();
-
1778 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());
-
1779 p->rotate(-90);
never executed (the execution status of this line is deduced): p->rotate(-90);
-
1780 p->translate(-r.left(), -r.top());
never executed (the execution status of this line is deduced): p->translate(-r.left(), -r.top());
-
1781 }
never executed: }
0
1782 -
1783 bool floating = false;
executed (the execution status of this line is deduced): bool floating = false;
-
1784 bool active = dwOpt->state & State_Active;
executed (the execution status of this line is deduced): bool active = dwOpt->state & State_Active;
-
1785 QColor inactiveCaptionTextColor = d->inactiveCaptionText;
executed (the execution status of this line is deduced): QColor inactiveCaptionTextColor = d->inactiveCaptionText;
-
1786 if (dwOpt->movable) {
partially evaluated: dwOpt->movable
TRUEFALSE
yes
Evaluation Count:30
no
Evaluation Count:0
0-30
1787 QColor left, right;
executed (the execution status of this line is deduced): QColor left, right;
-
1788 -
1789 //Titlebar gradient -
1790 if (widget && widget->isWindow()) {
partially evaluated: widget
TRUEFALSE
yes
Evaluation Count:30
no
Evaluation Count:0
evaluated: widget->isWindow()
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:18
0-30
1791 floating = true;
executed (the execution status of this line is deduced): floating = true;
-
1792 if (active) {
evaluated: active
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:7
5-7
1793 left = d->activeCaptionColor;
executed (the execution status of this line is deduced): left = d->activeCaptionColor;
-
1794 right = d->activeGradientCaptionColor;
executed (the execution status of this line is deduced): right = d->activeGradientCaptionColor;
-
1795 } else {
executed: }
Execution Count:5
5
1796 left = d->inactiveCaptionColor;
executed (the execution status of this line is deduced): left = d->inactiveCaptionColor;
-
1797 right = d->inactiveGradientCaptionColor;
executed (the execution status of this line is deduced): right = d->inactiveGradientCaptionColor;
-
1798 }
executed: }
Execution Count:7
7
1799 QBrush fillBrush(left);
executed (the execution status of this line is deduced): QBrush fillBrush(left);
-
1800 if (left != right) {
partially evaluated: left != right
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
0-12
1801 QPoint p1(r.x(), r.top() + r.height()/2);
never executed (the execution status of this line is deduced): QPoint p1(r.x(), r.top() + r.height()/2);
-
1802 QPoint p2(rect.right(), r.top() + r.height()/2);
never executed (the execution status of this line is deduced): QPoint p2(rect.right(), r.top() + r.height()/2);
-
1803 QLinearGradient lg(p1, p2);
never executed (the execution status of this line is deduced): QLinearGradient lg(p1, p2);
-
1804 lg.setColorAt(0, left);
never executed (the execution status of this line is deduced): lg.setColorAt(0, left);
-
1805 lg.setColorAt(1, right);
never executed (the execution status of this line is deduced): lg.setColorAt(1, right);
-
1806 fillBrush = lg;
never executed (the execution status of this line is deduced): fillBrush = lg;
-
1807 }
never executed: }
0
1808 p->fillRect(r.adjusted(0, 0, 0, -3), fillBrush);
executed (the execution status of this line is deduced): p->fillRect(r.adjusted(0, 0, 0, -3), fillBrush);
-
1809 }
executed: }
Execution Count:12
12
1810 }
executed: }
Execution Count:30
30
1811 if (!dwOpt->title.isEmpty()) {
evaluated: !dwOpt->title.isEmpty()
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:22
8-22
1812 QFont oldFont = p->font();
executed (the execution status of this line is deduced): QFont oldFont = p->font();
-
1813 if (floating) {
evaluated: floating
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:4
4
1814 QFont font = oldFont;
executed (the execution status of this line is deduced): QFont font = oldFont;
-
1815 font.setBold(true);
executed (the execution status of this line is deduced): font.setBold(true);
-
1816 p->setFont(font);
executed (the execution status of this line is deduced): p->setFont(font);
-
1817 }
executed: }
Execution Count:4
4
1818 QPalette palette = dwOpt->palette;
executed (the execution status of this line is deduced): QPalette palette = dwOpt->palette;
-
1819 palette.setColor(QPalette::Window, inactiveCaptionTextColor);
executed (the execution status of this line is deduced): palette.setColor(QPalette::Window, inactiveCaptionTextColor);
-
1820 QRect titleRect = subElementRect(SE_DockWidgetTitleBarText, opt, widget);
executed (the execution status of this line is deduced): QRect titleRect = subElementRect(SE_DockWidgetTitleBarText, opt, widget);
-
1821 if (verticalTitleBar) {
partially evaluated: verticalTitleBar
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
1822 titleRect = QRect(r.left() + rect.bottom()
never executed (the execution status of this line is deduced): titleRect = QRect(r.left() + rect.bottom()
-
1823 - titleRect.bottom(),
never executed (the execution status of this line is deduced): - titleRect.bottom(),
-
1824 r.top() + titleRect.left() - rect.left(),
never executed (the execution status of this line is deduced): r.top() + titleRect.left() - rect.left(),
-
1825 titleRect.height(), titleRect.width());
never executed (the execution status of this line is deduced): titleRect.height(), titleRect.width());
-
1826 }
never executed: }
0
1827 proxy()->drawItemText(p, titleRect,
executed (the execution status of this line is deduced): proxy()->drawItemText(p, titleRect,
-
1828 Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, palette,
executed (the execution status of this line is deduced): Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, palette,
-
1829 dwOpt->state & State_Enabled, dwOpt->title,
executed (the execution status of this line is deduced): dwOpt->state & State_Enabled, dwOpt->title,
-
1830 floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
executed (the execution status of this line is deduced): floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
-
1831 p->setFont(oldFont);
executed (the execution status of this line is deduced): p->setFont(oldFont);
-
1832 }
executed: }
Execution Count:8
8
1833 if (verticalTitleBar)
partially evaluated: verticalTitleBar
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:30
0-30
1834 p->restore();
never executed: p->restore();
0
1835 }
executed: }
Execution Count:30
30
1836 return;
executed: return;
Execution Count:33
33
1837#endif // QT_NO_DOCKWIDGET -
1838 default: -
1839 QCommonStyle::drawControl(ce, opt, p, widget);
executed (the execution status of this line is deduced): QCommonStyle::drawControl(ce, opt, p, widget);
-
1840 }
executed: }
Execution Count:23443
23443
1841}
executed: }
Execution Count:39743
39743
1842 -
1843/*! \reimp */ -
1844QRect QWindowsStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *w) const -
1845{ -
1846 QRect r;
executed (the execution status of this line is deduced): QRect r;
-
1847 switch (sr) { -
1848 case SE_SliderFocusRect: -
1849 case SE_ToolBoxTabContents: -
1850 r = visualRect(opt->direction, opt->rect, opt->rect);
never executed (the execution status of this line is deduced): r = visualRect(opt->direction, opt->rect, opt->rect);
-
1851 break;
never executed: break;
0
1852 case SE_DockWidgetTitleBarText: { -
1853 r = QCommonStyle::subElementRect(sr, opt, w);
executed (the execution status of this line is deduced): r = QCommonStyle::subElementRect(sr, opt, w);
-
1854 const QStyleOptionDockWidgetV2 *v2
executed (the execution status of this line is deduced): const QStyleOptionDockWidgetV2 *v2
-
1855 = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt);
executed (the execution status of this line is deduced): = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(opt);
-
1856 bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar;
partially evaluated: v2 == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
1857 int m = proxy()->pixelMetric(PM_DockWidgetTitleMargin, opt, w);
executed (the execution status of this line is deduced): int m = proxy()->pixelMetric(PM_DockWidgetTitleMargin, opt, w);
-
1858 if (verticalTitleBar) {
partially evaluated: verticalTitleBar
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
1859 r.adjust(0, 0, 0, -m);
never executed (the execution status of this line is deduced): r.adjust(0, 0, 0, -m);
-
1860 } else {
never executed: }
0
1861 if (opt->direction == Qt::LeftToRight)
partially evaluated: opt->direction == Qt::LeftToRight
TRUEFALSE
yes
Evaluation Count:8
no
Evaluation Count:0
0-8
1862 r.adjust(m, 0, 0, 0);
executed: r.adjust(m, 0, 0, 0);
Execution Count:8
8
1863 else -
1864 r.adjust(0, 0, -m, 0);
never executed: r.adjust(0, 0, -m, 0);
0
1865 } -
1866 break;
executed: break;
Execution Count:8
8
1867 } -
1868 case SE_ProgressBarContents: -
1869 r = QCommonStyle::subElementRect(SE_ProgressBarGroove, opt, w);
executed (the execution status of this line is deduced): r = QCommonStyle::subElementRect(SE_ProgressBarGroove, opt, w);
-
1870 r.adjust(3, 3, -3, -3);
executed (the execution status of this line is deduced): r.adjust(3, 3, -3, -3);
-
1871 break;
executed: break;
Execution Count:61
61
1872 default: -
1873 r = QCommonStyle::subElementRect(sr, opt, w);
executed (the execution status of this line is deduced): r = QCommonStyle::subElementRect(sr, opt, w);
-
1874 }
executed: }
Execution Count:113395
113395
1875 return r;
executed: return r;
Execution Count:113464
113464
1876} -
1877 -
1878 -
1879/*! \reimp */ -
1880void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, -
1881 QPainter *p, const QWidget *widget) const -
1882{ -
1883 switch (cc) { -
1884#ifndef QT_NO_SLIDER -
1885 case CC_Slider: -
1886 if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
partially evaluated: const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
1887 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);
-
1888 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);
-
1889 int ticks = slider->tickPosition;
executed (the execution status of this line is deduced): int ticks = slider->tickPosition;
-
1890 QRect groove = proxy()->subControlRect(CC_Slider, slider, SC_SliderGroove, widget);
executed (the execution status of this line is deduced): QRect groove = proxy()->subControlRect(CC_Slider, slider, SC_SliderGroove, widget);
-
1891 QRect handle = proxy()->subControlRect(CC_Slider, slider, SC_SliderHandle, widget);
executed (the execution status of this line is deduced): QRect handle = proxy()->subControlRect(CC_Slider, slider, SC_SliderHandle, widget);
-
1892 -
1893 if ((slider->subControls & SC_SliderGroove) && groove.isValid()) {
partially evaluated: (slider->subControls & SC_SliderGroove)
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
partially evaluated: groove.isValid()
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
1894 int mid = thickness / 2;
executed (the execution status of this line is deduced): int mid = thickness / 2;
-
1895 -
1896 if (ticks & QSlider::TicksAbove)
partially evaluated: ticks & QSlider::TicksAbove
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4
0-4
1897 mid += len / 8;
never executed: mid += len / 8;
0
1898 if (ticks & QSlider::TicksBelow)
partially evaluated: ticks & QSlider::TicksBelow
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4
0-4
1899 mid -= len / 8;
never executed: mid -= len / 8;
0
1900 -
1901 p->setPen(slider->palette.shadow().color());
executed (the execution status of this line is deduced): p->setPen(slider->palette.shadow().color());
-
1902 if (slider->orientation == Qt::Horizontal) {
evaluated: slider->orientation == Qt::Horizontal
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:1
1-3
1903 qDrawWinPanel(p, groove.x(), groove.y() + mid - 2,
executed (the execution status of this line is deduced): qDrawWinPanel(p, groove.x(), groove.y() + mid - 2,
-
1904 groove.width(), 4, slider->palette, true);
executed (the execution status of this line is deduced): groove.width(), 4, slider->palette, true);
-
1905 p->drawLine(groove.x() + 1, groove.y() + mid - 1,
executed (the execution status of this line is deduced): p->drawLine(groove.x() + 1, groove.y() + mid - 1,
-
1906 groove.x() + groove.width() - 3, groove.y() + mid - 1);
executed (the execution status of this line is deduced): groove.x() + groove.width() - 3, groove.y() + mid - 1);
-
1907 } else {
executed: }
Execution Count:3
3
1908 qDrawWinPanel(p, groove.x() + mid - 2, groove.y(),
executed (the execution status of this line is deduced): qDrawWinPanel(p, groove.x() + mid - 2, groove.y(),
-
1909 4, groove.height(), slider->palette, true);
executed (the execution status of this line is deduced): 4, groove.height(), slider->palette, true);
-
1910 p->drawLine(groove.x() + mid - 1, groove.y() + 1,
executed (the execution status of this line is deduced): p->drawLine(groove.x() + mid - 1, groove.y() + 1,
-
1911 groove.x() + mid - 1, groove.y() + groove.height() - 3);
executed (the execution status of this line is deduced): groove.x() + mid - 1, groove.y() + groove.height() - 3);
-
1912 }
executed: }
Execution Count:1
1
1913 } -
1914 -
1915 if (slider->subControls & SC_SliderTickmarks) {
evaluated: slider->subControls & SC_SliderTickmarks
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:1
1-3
1916 QStyleOptionSlider tmpSlider = *slider;
executed (the execution status of this line is deduced): QStyleOptionSlider tmpSlider = *slider;
-
1917 tmpSlider.subControls = SC_SliderTickmarks;
executed (the execution status of this line is deduced): tmpSlider.subControls = SC_SliderTickmarks;
-
1918 QCommonStyle::drawComplexControl(cc, &tmpSlider, p, widget);
executed (the execution status of this line is deduced): QCommonStyle::drawComplexControl(cc, &tmpSlider, p, widget);
-
1919 }
executed: }
Execution Count:3
3
1920 -
1921 if (slider->subControls & SC_SliderHandle) {
partially evaluated: slider->subControls & SC_SliderHandle
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
1922 // 4444440 -
1923 // 4333310 -
1924 // 4322210 -
1925 // 4322210 -
1926 // 4322210 -
1927 // 4322210 -
1928 // *43210* -
1929 // **410** -
1930 // ***0*** -
1931 const QColor c0 = slider->palette.shadow().color();
executed (the execution status of this line is deduced): const QColor c0 = slider->palette.shadow().color();
-
1932 const QColor c1 = slider->palette.dark().color();
executed (the execution status of this line is deduced): const QColor c1 = slider->palette.dark().color();
-
1933 // const QColor c2 = g.button(); -
1934 const QColor c3 = slider->palette.midlight().color();
executed (the execution status of this line is deduced): const QColor c3 = slider->palette.midlight().color();
-
1935 const QColor c4 = slider->palette.light().color();
executed (the execution status of this line is deduced): const QColor c4 = slider->palette.light().color();
-
1936 QBrush handleBrush;
executed (the execution status of this line is deduced): QBrush handleBrush;
-
1937 -
1938 if (slider->state & State_Enabled) {
partially evaluated: slider->state & State_Enabled
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
1939 handleBrush = slider->palette.color(QPalette::Button);
executed (the execution status of this line is deduced): handleBrush = slider->palette.color(QPalette::Button);
-
1940 } else {
executed: }
Execution Count:4
4
1941 handleBrush = QBrush(slider->palette.color(QPalette::Button),
never executed (the execution status of this line is deduced): handleBrush = QBrush(slider->palette.color(QPalette::Button),
-
1942 Qt::Dense4Pattern);
never executed (the execution status of this line is deduced): Qt::Dense4Pattern);
-
1943 }
never executed: }
0
1944 -
1945 -
1946 int x = handle.x(), y = handle.y(),
executed (the execution status of this line is deduced): int x = handle.x(), y = handle.y(),
-
1947 wi = handle.width(), he = handle.height();
executed (the execution status of this line is deduced): wi = handle.width(), he = handle.height();
-
1948 -
1949 int x1 = x;
executed (the execution status of this line is deduced): int x1 = x;
-
1950 int x2 = x+wi-1;
executed (the execution status of this line is deduced): int x2 = x+wi-1;
-
1951 int y1 = y;
executed (the execution status of this line is deduced): int y1 = y;
-
1952 int y2 = y+he-1;
executed (the execution status of this line is deduced): int y2 = y+he-1;
-
1953 -
1954 Qt::Orientation orient = slider->orientation;
executed (the execution status of this line is deduced): Qt::Orientation orient = slider->orientation;
-
1955 bool tickAbove = slider->tickPosition == QSlider::TicksAbove;
executed (the execution status of this line is deduced): bool tickAbove = slider->tickPosition == QSlider::TicksAbove;
-
1956 bool tickBelow = slider->tickPosition == QSlider::TicksBelow;
executed (the execution status of this line is deduced): bool tickBelow = slider->tickPosition == QSlider::TicksBelow;
-
1957 -
1958 if (slider->state & State_HasFocus) {
partially evaluated: slider->state & State_HasFocus
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4
0-4
1959 QStyleOptionFocusRect fropt;
never executed (the execution status of this line is deduced): QStyleOptionFocusRect fropt;
-
1960 fropt.QStyleOption::operator=(*slider);
never executed (the execution status of this line is deduced): fropt.QStyleOption::operator=(*slider);
-
1961 fropt.rect = subElementRect(SE_SliderFocusRect, slider, widget);
never executed (the execution status of this line is deduced): fropt.rect = subElementRect(SE_SliderFocusRect, slider, widget);
-
1962 proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);
never executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);
-
1963 }
never executed: }
0
1964 -
1965 if ((tickAbove && tickBelow) || (!tickAbove && !tickBelow)) {
partially evaluated: tickAbove
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4
never evaluated: tickBelow
partially evaluated: !tickAbove
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
partially evaluated: !tickBelow
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
1966 Qt::BGMode oldMode = p->backgroundMode();
executed (the execution status of this line is deduced): Qt::BGMode oldMode = p->backgroundMode();
-
1967 p->setBackgroundMode(Qt::OpaqueMode);
executed (the execution status of this line is deduced): p->setBackgroundMode(Qt::OpaqueMode);
-
1968 qDrawWinButton(p, QRect(x, y, wi, he), slider->palette, false,
executed (the execution status of this line is deduced): qDrawWinButton(p, QRect(x, y, wi, he), slider->palette, false,
-
1969 &handleBrush);
executed (the execution status of this line is deduced): &handleBrush);
-
1970 p->setBackgroundMode(oldMode);
executed (the execution status of this line is deduced): p->setBackgroundMode(oldMode);
-
1971 return;
executed: return;
Execution Count:4
4
1972 } -
1973 -
1974 QSliderDirection dir;
never executed (the execution status of this line is deduced): QSliderDirection dir;
-
1975 -
1976 if (orient == Qt::Horizontal)
never evaluated: orient == Qt::Horizontal
0
1977 if (tickAbove)
never evaluated: tickAbove
0
1978 dir = SlUp;
never executed: dir = SlUp;
0
1979 else -
1980 dir = SlDown;
never executed: dir = SlDown;
0
1981 else -
1982 if (tickAbove)
never evaluated: tickAbove
0
1983 dir = SlLeft;
never executed: dir = SlLeft;
0
1984 else -
1985 dir = SlRight;
never executed: dir = SlRight;
0
1986 -
1987 QPolygon a;
never executed (the execution status of this line is deduced): QPolygon a;
-
1988 -
1989 int d = 0;
never executed (the execution status of this line is deduced): int d = 0;
-
1990 switch (dir) { -
1991 case SlUp: -
1992 y1 = y1 + wi/2;
never executed (the execution status of this line is deduced): y1 = y1 + wi/2;
-
1993 d = (wi + 1) / 2 - 1;
never executed (the execution status of this line is deduced): d = (wi + 1) / 2 - 1;
-
1994 a.setPoints(5, x1,y1, x1,y2, x2,y2, x2,y1, x1+d,y1-d);
never executed (the execution status of this line is deduced): a.setPoints(5, x1,y1, x1,y2, x2,y2, x2,y1, x1+d,y1-d);
-
1995 break;
never executed: break;
0
1996 case SlDown: -
1997 y2 = y2 - wi/2;
never executed (the execution status of this line is deduced): y2 = y2 - wi/2;
-
1998 d = (wi + 1) / 2 - 1;
never executed (the execution status of this line is deduced): d = (wi + 1) / 2 - 1;
-
1999 a.setPoints(5, x1,y1, x1,y2, x1+d,y2+d, x2,y2, x2,y1);
never executed (the execution status of this line is deduced): a.setPoints(5, x1,y1, x1,y2, x1+d,y2+d, x2,y2, x2,y1);
-
2000 break;
never executed: break;
0
2001 case SlLeft: -
2002 d = (he + 1) / 2 - 1;
never executed (the execution status of this line is deduced): d = (he + 1) / 2 - 1;
-
2003 x1 = x1 + he/2;
never executed (the execution status of this line is deduced): x1 = x1 + he/2;
-
2004 a.setPoints(5, x1,y1, x1-d,y1+d, x1,y2, x2,y2, x2,y1);
never executed (the execution status of this line is deduced): a.setPoints(5, x1,y1, x1-d,y1+d, x1,y2, x2,y2, x2,y1);
-
2005 break;
never executed: break;
0
2006 case SlRight: -
2007 d = (he + 1) / 2 - 1;
never executed (the execution status of this line is deduced): d = (he + 1) / 2 - 1;
-
2008 x2 = x2 - he/2;
never executed (the execution status of this line is deduced): x2 = x2 - he/2;
-
2009 a.setPoints(5, x1,y1, x1,y2, x2,y2, x2+d,y1+d, x2,y1);
never executed (the execution status of this line is deduced): a.setPoints(5, x1,y1, x1,y2, x2,y2, x2+d,y1+d, x2,y1);
-
2010 break;
never executed: break;
0
2011 } -
2012 -
2013 QBrush oldBrush = p->brush();
never executed (the execution status of this line is deduced): QBrush oldBrush = p->brush();
-
2014 bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);
never executed (the execution status of this line is deduced): bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);
-
2015 p->setPen(Qt::NoPen);
never executed (the execution status of this line is deduced): p->setPen(Qt::NoPen);
-
2016 p->setBrush(handleBrush);
never executed (the execution status of this line is deduced): p->setBrush(handleBrush);
-
2017 p->setRenderHint(QPainter::Qt4CompatiblePainting);
never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting);
-
2018 Qt::BGMode oldMode = p->backgroundMode();
never executed (the execution status of this line is deduced): Qt::BGMode oldMode = p->backgroundMode();
-
2019 p->setBackgroundMode(Qt::OpaqueMode);
never executed (the execution status of this line is deduced): p->setBackgroundMode(Qt::OpaqueMode);
-
2020 p->drawRect(x1, y1, x2-x1+1, y2-y1+1);
never executed (the execution status of this line is deduced): p->drawRect(x1, y1, x2-x1+1, y2-y1+1);
-
2021 p->drawPolygon(a);
never executed (the execution status of this line is deduced): p->drawPolygon(a);
-
2022 p->setBrush(oldBrush);
never executed (the execution status of this line is deduced): p->setBrush(oldBrush);
-
2023 p->setBackgroundMode(oldMode);
never executed (the execution status of this line is deduced): p->setBackgroundMode(oldMode);
-
2024 -
2025 if (dir != SlUp) {
never evaluated: dir != SlUp
0
2026 p->setPen(c4);
never executed (the execution status of this line is deduced): p->setPen(c4);
-
2027 p->drawLine(x1, y1, x2, y1);
never executed (the execution status of this line is deduced): p->drawLine(x1, y1, x2, y1);
-
2028 p->setPen(c3);
never executed (the execution status of this line is deduced): p->setPen(c3);
-
2029 p->drawLine(x1, y1+1, x2, y1+1);
never executed (the execution status of this line is deduced): p->drawLine(x1, y1+1, x2, y1+1);
-
2030 }
never executed: }
0
2031 if (dir != SlLeft) {
never evaluated: dir != SlLeft
0
2032 p->setPen(c3);
never executed (the execution status of this line is deduced): p->setPen(c3);
-
2033 p->drawLine(x1+1, y1+1, x1+1, y2);
never executed (the execution status of this line is deduced): p->drawLine(x1+1, y1+1, x1+1, y2);
-
2034 p->setPen(c4);
never executed (the execution status of this line is deduced): p->setPen(c4);
-
2035 p->drawLine(x1, y1, x1, y2);
never executed (the execution status of this line is deduced): p->drawLine(x1, y1, x1, y2);
-
2036 }
never executed: }
0
2037 if (dir != SlRight) {
never evaluated: dir != SlRight
0
2038 p->setPen(c0);
never executed (the execution status of this line is deduced): p->setPen(c0);
-
2039 p->drawLine(x2, y1, x2, y2);
never executed (the execution status of this line is deduced): p->drawLine(x2, y1, x2, y2);
-
2040 p->setPen(c1);
never executed (the execution status of this line is deduced): p->setPen(c1);
-
2041 p->drawLine(x2-1, y1+1, x2-1, y2-1);
never executed (the execution status of this line is deduced): p->drawLine(x2-1, y1+1, x2-1, y2-1);
-
2042 }
never executed: }
0
2043 if (dir != SlDown) {
never evaluated: dir != SlDown
0
2044 p->setPen(c0);
never executed (the execution status of this line is deduced): p->setPen(c0);
-
2045 p->drawLine(x1, y2, x2, y2);
never executed (the execution status of this line is deduced): p->drawLine(x1, y2, x2, y2);
-
2046 p->setPen(c1);
never executed (the execution status of this line is deduced): p->setPen(c1);
-
2047 p->drawLine(x1+1, y2-1, x2-1, y2-1);
never executed (the execution status of this line is deduced): p->drawLine(x1+1, y2-1, x2-1, y2-1);
-
2048 }
never executed: }
0
2049 -
2050 switch (dir) { -
2051 case SlUp: -
2052 p->setPen(c4);
never executed (the execution status of this line is deduced): p->setPen(c4);
-
2053 p->drawLine(x1, y1, x1+d, y1-d);
never executed (the execution status of this line is deduced): p->drawLine(x1, y1, x1+d, y1-d);
-
2054 p->setPen(c0);
never executed (the execution status of this line is deduced): p->setPen(c0);
-
2055 d = wi - d - 1;
never executed (the execution status of this line is deduced): d = wi - d - 1;
-
2056 p->drawLine(x2, y1, x2-d, y1-d);
never executed (the execution status of this line is deduced): p->drawLine(x2, y1, x2-d, y1-d);
-
2057 d--;
never executed (the execution status of this line is deduced): d--;
-
2058 p->setPen(c3);
never executed (the execution status of this line is deduced): p->setPen(c3);
-
2059 p->drawLine(x1+1, y1, x1+1+d, y1-d);
never executed (the execution status of this line is deduced): p->drawLine(x1+1, y1, x1+1+d, y1-d);
-
2060 p->setPen(c1);
never executed (the execution status of this line is deduced): p->setPen(c1);
-
2061 p->drawLine(x2-1, y1, x2-1-d, y1-d);
never executed (the execution status of this line is deduced): p->drawLine(x2-1, y1, x2-1-d, y1-d);
-
2062 break;
never executed: break;
0
2063 case SlDown: -
2064 p->setPen(c4);
never executed (the execution status of this line is deduced): p->setPen(c4);
-
2065 p->drawLine(x1, y2, x1+d, y2+d);
never executed (the execution status of this line is deduced): p->drawLine(x1, y2, x1+d, y2+d);
-
2066 p->setPen(c0);
never executed (the execution status of this line is deduced): p->setPen(c0);
-
2067 d = wi - d - 1;
never executed (the execution status of this line is deduced): d = wi - d - 1;
-
2068 p->drawLine(x2, y2, x2-d, y2+d);
never executed (the execution status of this line is deduced): p->drawLine(x2, y2, x2-d, y2+d);
-
2069 d--;
never executed (the execution status of this line is deduced): d--;
-
2070 p->setPen(c3);
never executed (the execution status of this line is deduced): p->setPen(c3);
-
2071 p->drawLine(x1+1, y2, x1+1+d, y2+d);
never executed (the execution status of this line is deduced): p->drawLine(x1+1, y2, x1+1+d, y2+d);
-
2072 p->setPen(c1);
never executed (the execution status of this line is deduced): p->setPen(c1);
-
2073 p->drawLine(x2-1, y2, x2-1-d, y2+d);
never executed (the execution status of this line is deduced): p->drawLine(x2-1, y2, x2-1-d, y2+d);
-
2074 break;
never executed: break;
0
2075 case SlLeft: -
2076 p->setPen(c4);
never executed (the execution status of this line is deduced): p->setPen(c4);
-
2077 p->drawLine(x1, y1, x1-d, y1+d);
never executed (the execution status of this line is deduced): p->drawLine(x1, y1, x1-d, y1+d);
-
2078 p->setPen(c0);
never executed (the execution status of this line is deduced): p->setPen(c0);
-
2079 d = he - d - 1;
never executed (the execution status of this line is deduced): d = he - d - 1;
-
2080 p->drawLine(x1, y2, x1-d, y2-d);
never executed (the execution status of this line is deduced): p->drawLine(x1, y2, x1-d, y2-d);
-
2081 d--;
never executed (the execution status of this line is deduced): d--;
-
2082 p->setPen(c3);
never executed (the execution status of this line is deduced): p->setPen(c3);
-
2083 p->drawLine(x1, y1+1, x1-d, y1+1+d);
never executed (the execution status of this line is deduced): p->drawLine(x1, y1+1, x1-d, y1+1+d);
-
2084 p->setPen(c1);
never executed (the execution status of this line is deduced): p->setPen(c1);
-
2085 p->drawLine(x1, y2-1, x1-d, y2-1-d);
never executed (the execution status of this line is deduced): p->drawLine(x1, y2-1, x1-d, y2-1-d);
-
2086 break;
never executed: break;
0
2087 case SlRight: -
2088 p->setPen(c4);
never executed (the execution status of this line is deduced): p->setPen(c4);
-
2089 p->drawLine(x2, y1, x2+d, y1+d);
never executed (the execution status of this line is deduced): p->drawLine(x2, y1, x2+d, y1+d);
-
2090 p->setPen(c0);
never executed (the execution status of this line is deduced): p->setPen(c0);
-
2091 d = he - d - 1;
never executed (the execution status of this line is deduced): d = he - d - 1;
-
2092 p->drawLine(x2, y2, x2+d, y2-d);
never executed (the execution status of this line is deduced): p->drawLine(x2, y2, x2+d, y2-d);
-
2093 d--;
never executed (the execution status of this line is deduced): d--;
-
2094 p->setPen(c3);
never executed (the execution status of this line is deduced): p->setPen(c3);
-
2095 p->drawLine(x2, y1+1, x2+d, y1+1+d);
never executed (the execution status of this line is deduced): p->drawLine(x2, y1+1, x2+d, y1+1+d);
-
2096 p->setPen(c1);
never executed (the execution status of this line is deduced): p->setPen(c1);
-
2097 p->drawLine(x2, y2-1, x2+d, y2-1-d);
never executed (the execution status of this line is deduced): p->drawLine(x2, y2-1, x2+d, y2-1-d);
-
2098 break;
never executed: break;
0
2099 } -
2100 p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting);
never executed (the execution status of this line is deduced): p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting);
-
2101 }
never executed: }
0
2102 }
never executed: }
0
2103 break;
never executed: break;
0
2104#endif // QT_NO_SLIDER -
2105#ifndef QT_NO_SCROLLBAR -
2106 case CC_ScrollBar: -
2107 if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
partially evaluated: const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)
TRUEFALSE
yes
Evaluation Count:2941
no
Evaluation Count:0
0-2941
2108 QStyleOptionSlider newScrollbar = *scrollbar;
executed (the execution status of this line is deduced): QStyleOptionSlider newScrollbar = *scrollbar;
-
2109 if (scrollbar->minimum == scrollbar->maximum)
evaluated: scrollbar->minimum == scrollbar->maximum
TRUEFALSE
yes
Evaluation Count:148
yes
Evaluation Count:2793
148-2793
2110 newScrollbar.state &= ~State_Enabled; //do not draw the slider.
executed: newScrollbar.state &= ~State_Enabled;
Execution Count:148
148
2111 QCommonStyle::drawComplexControl(cc, &newScrollbar, p, widget);
executed (the execution status of this line is deduced): QCommonStyle::drawComplexControl(cc, &newScrollbar, p, widget);
-
2112 }
executed: }
Execution Count:2941
2941
2113 break;
executed: break;
Execution Count:2941
2941
2114#endif // QT_NO_SCROLLBAR -
2115#ifndef QT_NO_COMBOBOX -
2116 case CC_ComboBox: -
2117 if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
partially evaluated: const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
TRUEFALSE
yes
Evaluation Count:120
no
Evaluation Count:0
0-120
2118 QBrush editBrush = cmb->palette.brush(QPalette::Base);
executed (the execution status of this line is deduced): QBrush editBrush = cmb->palette.brush(QPalette::Base);
-
2119 if ((cmb->subControls & SC_ComboBoxFrame)) {
partially evaluated: (cmb->subControls & SC_ComboBoxFrame)
TRUEFALSE
yes
Evaluation Count:120
no
Evaluation Count:0
0-120
2120 if (cmb->frame) {
evaluated: cmb->frame
TRUEFALSE
yes
Evaluation Count:117
yes
Evaluation Count:3
3-117
2121 QPalette shadePal = opt->palette;
executed (the execution status of this line is deduced): QPalette shadePal = opt->palette;
-
2122 shadePal.setColor(QPalette::Midlight, shadePal.button().color());
executed (the execution status of this line is deduced): shadePal.setColor(QPalette::Midlight, shadePal.button().color());
-
2123 qDrawWinPanel(p, opt->rect, shadePal, true, &editBrush);
executed (the execution status of this line is deduced): qDrawWinPanel(p, opt->rect, shadePal, true, &editBrush);
-
2124 }
executed: }
Execution Count:117
117
2125 else { -
2126 p->fillRect(opt->rect, editBrush);
executed (the execution status of this line is deduced): p->fillRect(opt->rect, editBrush);
-
2127 }
executed: }
Execution Count:3
3
2128 } -
2129 if (cmb->subControls & SC_ComboBoxArrow) {
partially evaluated: cmb->subControls & SC_ComboBoxArrow
TRUEFALSE
yes
Evaluation Count:120
no
Evaluation Count:0
0-120
2130 State flags = State_None;
executed (the execution status of this line is deduced): State flags = State_None;
-
2131 -
2132 QRect ar = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxArrow, widget);
executed (the execution status of this line is deduced): QRect ar = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxArrow, widget);
-
2133 bool sunkenArrow = cmb->activeSubControls == SC_ComboBoxArrow
partially evaluated: cmb->activeSubControls == SC_ComboBoxArrow
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:120
0-120
2134 && cmb->state & State_Sunken;
never evaluated: cmb->state & State_Sunken
0
2135 if (sunkenArrow) {
partially evaluated: sunkenArrow
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:120
0-120
2136 p->setPen(cmb->palette.dark().color());
never executed (the execution status of this line is deduced): p->setPen(cmb->palette.dark().color());
-
2137 p->setBrush(cmb->palette.brush(QPalette::Button));
never executed (the execution status of this line is deduced): p->setBrush(cmb->palette.brush(QPalette::Button));
-
2138 p->drawRect(ar.adjusted(0,0,-1,-1));
never executed (the execution status of this line is deduced): p->drawRect(ar.adjusted(0,0,-1,-1));
-
2139 } else {
never executed: }
0
2140 // Make qDrawWinButton use the right colors for drawing the shade of the button -
2141 QPalette pal(cmb->palette);
executed (the execution status of this line is deduced): QPalette pal(cmb->palette);
-
2142 pal.setColor(QPalette::Button, cmb->palette.light().color());
executed (the execution status of this line is deduced): pal.setColor(QPalette::Button, cmb->palette.light().color());
-
2143 pal.setColor(QPalette::Light, cmb->palette.button().color());
executed (the execution status of this line is deduced): pal.setColor(QPalette::Light, cmb->palette.button().color());
-
2144 qDrawWinButton(p, ar, pal, false,
executed (the execution status of this line is deduced): qDrawWinButton(p, ar, pal, false,
-
2145 &cmb->palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): &cmb->palette.brush(QPalette::Button));
-
2146 }
executed: }
Execution Count:120
120
2147 -
2148 ar.adjust(2, 2, -2, -2);
executed (the execution status of this line is deduced): ar.adjust(2, 2, -2, -2);
-
2149 if (opt->state & State_Enabled)
evaluated: opt->state & State_Enabled
TRUEFALSE
yes
Evaluation Count:119
yes
Evaluation Count:1
1-119
2150 flags |= State_Enabled;
executed: flags |= State_Enabled;
Execution Count:119
119
2151 if (opt->state & State_HasFocus)
evaluated: opt->state & State_HasFocus
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:111
9-111
2152 flags |= State_HasFocus;
executed: flags |= State_HasFocus;
Execution Count:9
9
2153 -
2154 if (sunkenArrow)
partially evaluated: sunkenArrow
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:120
0-120
2155 flags |= State_Sunken;
never executed: flags |= State_Sunken;
0
2156 QStyleOption arrowOpt(0);
executed (the execution status of this line is deduced): QStyleOption arrowOpt(0);
-
2157 arrowOpt.rect = ar.adjusted(1, 1, -1, -1);
executed (the execution status of this line is deduced): arrowOpt.rect = ar.adjusted(1, 1, -1, -1);
-
2158 arrowOpt.palette = cmb->palette;
executed (the execution status of this line is deduced): arrowOpt.palette = cmb->palette;
-
2159 arrowOpt.state = flags;
executed (the execution status of this line is deduced): arrowOpt.state = flags;
-
2160 proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, p, widget);
-
2161 }
executed: }
Execution Count:120
120
2162 -
2163 if (cmb->subControls & SC_ComboBoxEditField) {
partially evaluated: cmb->subControls & SC_ComboBoxEditField
TRUEFALSE
yes
Evaluation Count:120
no
Evaluation Count:0
0-120
2164 QRect re = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxEditField, widget);
executed (the execution status of this line is deduced): QRect re = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxEditField, widget);
-
2165 if (cmb->state & State_HasFocus && !cmb->editable)
evaluated: cmb->state & State_HasFocus
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:111
evaluated: !cmb->editable
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:4
4-111
2166 p->fillRect(re.x(), re.y(), re.width(), re.height(),
executed: p->fillRect(re.x(), re.y(), re.width(), re.height(), cmb->palette.brush(QPalette::Highlight));
Execution Count:5
5
2167 cmb->palette.brush(QPalette::Highlight));
executed: p->fillRect(re.x(), re.y(), re.width(), re.height(), cmb->palette.brush(QPalette::Highlight));
Execution Count:5
5
2168 -
2169 if (cmb->state & State_HasFocus) {
evaluated: cmb->state & State_HasFocus
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:111
9-111
2170 p->setPen(cmb->palette.highlightedText().color());
executed (the execution status of this line is deduced): p->setPen(cmb->palette.highlightedText().color());
-
2171 p->setBackground(cmb->palette.highlight());
executed (the execution status of this line is deduced): p->setBackground(cmb->palette.highlight());
-
2172 -
2173 } else {
executed: }
Execution Count:9
9
2174 p->setPen(cmb->palette.text().color());
executed (the execution status of this line is deduced): p->setPen(cmb->palette.text().color());
-
2175 p->setBackground(cmb->palette.background());
executed (the execution status of this line is deduced): p->setBackground(cmb->palette.background());
-
2176 }
executed: }
Execution Count:111
111
2177 -
2178 if (cmb->state & State_HasFocus && !cmb->editable) {
evaluated: cmb->state & State_HasFocus
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:111
evaluated: !cmb->editable
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:4
4-111
2179 QStyleOptionFocusRect focus;
executed (the execution status of this line is deduced): QStyleOptionFocusRect focus;
-
2180 focus.QStyleOption::operator=(*cmb);
executed (the execution status of this line is deduced): focus.QStyleOption::operator=(*cmb);
-
2181 focus.rect = subElementRect(SE_ComboBoxFocusRect, cmb, widget);
executed (the execution status of this line is deduced): focus.rect = subElementRect(SE_ComboBoxFocusRect, cmb, widget);
-
2182 focus.state |= State_FocusAtBorder;
executed (the execution status of this line is deduced): focus.state |= State_FocusAtBorder;
-
2183 focus.backgroundColor = cmb->palette.highlight().color();
executed (the execution status of this line is deduced): focus.backgroundColor = cmb->palette.highlight().color();
-
2184 proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget);
-
2185 }
executed: }
Execution Count:5
5
2186 }
executed: }
Execution Count:120
120
2187 }
executed: }
Execution Count:120
120
2188 break;
executed: break;
Execution Count:120
120
2189#endif // QT_NO_COMBOBOX -
2190#ifndef QT_NO_SPINBOX -
2191 case CC_SpinBox: -
2192 if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
partially evaluated: const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
TRUEFALSE
yes
Evaluation Count:197
no
Evaluation Count:0
0-197
2193 QStyleOptionSpinBox copy = *sb;
executed (the execution status of this line is deduced): QStyleOptionSpinBox copy = *sb;
-
2194 PrimitiveElement pe;
executed (the execution status of this line is deduced): PrimitiveElement pe;
-
2195 bool enabled = opt->state & State_Enabled;
executed (the execution status of this line is deduced): bool enabled = opt->state & State_Enabled;
-
2196 if (sb->frame && (sb->subControls & SC_SpinBoxFrame)) {
evaluated: sb->frame
TRUEFALSE
yes
Evaluation Count:184
yes
Evaluation Count:13
partially evaluated: (sb->subControls & SC_SpinBoxFrame)
TRUEFALSE
yes
Evaluation Count:184
no
Evaluation Count:0
0-184
2197 QBrush editBrush = sb->palette.brush(QPalette::Base);
executed (the execution status of this line is deduced): QBrush editBrush = sb->palette.brush(QPalette::Base);
-
2198 QRect r = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxFrame, widget);
executed (the execution status of this line is deduced): QRect r = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxFrame, widget);
-
2199 QPalette shadePal = sb->palette;
executed (the execution status of this line is deduced): QPalette shadePal = sb->palette;
-
2200 shadePal.setColor(QPalette::Midlight, shadePal.button().color());
executed (the execution status of this line is deduced): shadePal.setColor(QPalette::Midlight, shadePal.button().color());
-
2201 qDrawWinPanel(p, r, shadePal, true, &editBrush);
executed (the execution status of this line is deduced): qDrawWinPanel(p, r, shadePal, true, &editBrush);
-
2202 }
executed: }
Execution Count:184
184
2203 -
2204 QPalette shadePal(opt->palette);
executed (the execution status of this line is deduced): QPalette shadePal(opt->palette);
-
2205 shadePal.setColor(QPalette::Button, opt->palette.light().color());
executed (the execution status of this line is deduced): shadePal.setColor(QPalette::Button, opt->palette.light().color());
-
2206 shadePal.setColor(QPalette::Light, opt->palette.button().color());
executed (the execution status of this line is deduced): shadePal.setColor(QPalette::Light, opt->palette.button().color());
-
2207 -
2208 if (sb->subControls & SC_SpinBoxUp) {
partially evaluated: sb->subControls & SC_SpinBoxUp
TRUEFALSE
yes
Evaluation Count:197
no
Evaluation Count:0
0-197
2209 copy.subControls = SC_SpinBoxUp;
executed (the execution status of this line is deduced): copy.subControls = SC_SpinBoxUp;
-
2210 QPalette pal2 = sb->palette;
executed (the execution status of this line is deduced): QPalette pal2 = sb->palette;
-
2211 if (!(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)) {
evaluated: !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:184
13-184
2212 pal2.setCurrentColorGroup(QPalette::Disabled);
executed (the execution status of this line is deduced): pal2.setCurrentColorGroup(QPalette::Disabled);
-
2213 copy.state &= ~State_Enabled;
executed (the execution status of this line is deduced): copy.state &= ~State_Enabled;
-
2214 }
executed: }
Execution Count:13
13
2215 -
2216 copy.palette = pal2;
executed (the execution status of this line is deduced): copy.palette = pal2;
-
2217 -
2218 if (sb->activeSubControls == SC_SpinBoxUp && (sb->state & State_Sunken)) {
partially evaluated: sb->activeSubControls == SC_SpinBoxUp
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:197
never evaluated: (sb->state & State_Sunken)
0-197
2219 copy.state |= State_On;
never executed (the execution status of this line is deduced): copy.state |= State_On;
-
2220 copy.state |= State_Sunken;
never executed (the execution status of this line is deduced): copy.state |= State_Sunken;
-
2221 } else {
never executed: }
0
2222 copy.state |= State_Raised;
executed (the execution status of this line is deduced): copy.state |= State_Raised;
-
2223 copy.state &= ~State_Sunken;
executed (the execution status of this line is deduced): copy.state &= ~State_Sunken;
-
2224 }
executed: }
Execution Count:197
197
2225 pe = (sb->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinPlus
partially evaluated: sb->buttonSymbols == QAbstractSpinBox::PlusMinus
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:197
0-197
2226 : PE_IndicatorSpinUp);
executed (the execution status of this line is deduced): : PE_IndicatorSpinUp);
-
2227 -
2228 copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget);
executed (the execution status of this line is deduced): copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget);
-
2229 qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
executed (the execution status of this line is deduced): qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
-
2230 &copy.palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): &copy.palette.brush(QPalette::Button));
-
2231 copy.rect.adjust(4, 1, -5, -1);
executed (the execution status of this line is deduced): copy.rect.adjust(4, 1, -5, -1);
-
2232 if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled))
partially evaluated: !enabled
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:197
evaluated: !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:184
0-197
2233 && proxy()->styleHint(SH_EtchDisabledText, opt, widget) )
partially evaluated: proxy()->styleHint(SH_EtchDisabledText, opt, widget)
TRUEFALSE
yes
Evaluation Count:13
no
Evaluation Count:0
0-13
2234 { -
2235 QStyleOptionSpinBox lightCopy = copy;
executed (the execution status of this line is deduced): QStyleOptionSpinBox lightCopy = copy;
-
2236 lightCopy.rect.adjust(1, 1, 1, 1);
executed (the execution status of this line is deduced): lightCopy.rect.adjust(1, 1, 1, 1);
-
2237 lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
executed (the execution status of this line is deduced): lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
-
2238 proxy()->drawPrimitive(pe, &lightCopy, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(pe, &lightCopy, p, widget);
-
2239 }
executed: }
Execution Count:13
13
2240 proxy()->drawPrimitive(pe, &copy, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(pe, &copy, p, widget);
-
2241 }
executed: }
Execution Count:197
197
2242 -
2243 if (sb->subControls & SC_SpinBoxDown) {
partially evaluated: sb->subControls & SC_SpinBoxDown
TRUEFALSE
yes
Evaluation Count:197
no
Evaluation Count:0
0-197
2244 copy.subControls = SC_SpinBoxDown;
executed (the execution status of this line is deduced): copy.subControls = SC_SpinBoxDown;
-
2245 copy.state = sb->state;
executed (the execution status of this line is deduced): copy.state = sb->state;
-
2246 QPalette pal2 = sb->palette;
executed (the execution status of this line is deduced): QPalette pal2 = sb->palette;
-
2247 if (!(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)) {
evaluated: !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)
TRUEFALSE
yes
Evaluation Count:160
yes
Evaluation Count:37
37-160
2248 pal2.setCurrentColorGroup(QPalette::Disabled);
executed (the execution status of this line is deduced): pal2.setCurrentColorGroup(QPalette::Disabled);
-
2249 copy.state &= ~State_Enabled;
executed (the execution status of this line is deduced): copy.state &= ~State_Enabled;
-
2250 }
executed: }
Execution Count:160
160
2251 copy.palette = pal2;
executed (the execution status of this line is deduced): copy.palette = pal2;
-
2252 -
2253 if (sb->activeSubControls == SC_SpinBoxDown && (sb->state & State_Sunken)) {
partially evaluated: sb->activeSubControls == SC_SpinBoxDown
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:197
never evaluated: (sb->state & State_Sunken)
0-197
2254 copy.state |= State_On;
never executed (the execution status of this line is deduced): copy.state |= State_On;
-
2255 copy.state |= State_Sunken;
never executed (the execution status of this line is deduced): copy.state |= State_Sunken;
-
2256 } else {
never executed: }
0
2257 copy.state |= State_Raised;
executed (the execution status of this line is deduced): copy.state |= State_Raised;
-
2258 copy.state &= ~State_Sunken;
executed (the execution status of this line is deduced): copy.state &= ~State_Sunken;
-
2259 }
executed: }
Execution Count:197
197
2260 pe = (sb->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinMinus
partially evaluated: sb->buttonSymbols == QAbstractSpinBox::PlusMinus
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:197
0-197
2261 : PE_IndicatorSpinDown);
executed (the execution status of this line is deduced): : PE_IndicatorSpinDown);
-
2262 -
2263 copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget);
executed (the execution status of this line is deduced): copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget);
-
2264 qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
executed (the execution status of this line is deduced): qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
-
2265 &copy.palette.brush(QPalette::Button));
executed (the execution status of this line is deduced): &copy.palette.brush(QPalette::Button));
-
2266 copy.rect.adjust(4, 0, -5, -1);
executed (the execution status of this line is deduced): copy.rect.adjust(4, 0, -5, -1);
-
2267 if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled))
partially evaluated: !enabled
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:197
evaluated: !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)
TRUEFALSE
yes
Evaluation Count:160
yes
Evaluation Count:37
0-197
2268 && proxy()->styleHint(SH_EtchDisabledText, opt, widget) )
partially evaluated: proxy()->styleHint(SH_EtchDisabledText, opt, widget)
TRUEFALSE
yes
Evaluation Count:160
no
Evaluation Count:0
0-160
2269 { -
2270 QStyleOptionSpinBox lightCopy = copy;
executed (the execution status of this line is deduced): QStyleOptionSpinBox lightCopy = copy;
-
2271 lightCopy.rect.adjust(1, 1, 1, 1);
executed (the execution status of this line is deduced): lightCopy.rect.adjust(1, 1, 1, 1);
-
2272 lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
executed (the execution status of this line is deduced): lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
-
2273 proxy()->drawPrimitive(pe, &lightCopy, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(pe, &lightCopy, p, widget);
-
2274 }
executed: }
Execution Count:160
160
2275 proxy()->drawPrimitive(pe, &copy, p, widget);
executed (the execution status of this line is deduced): proxy()->drawPrimitive(pe, &copy, p, widget);
-
2276 }
executed: }
Execution Count:197
197
2277 }
executed: }
Execution Count:197
197
2278 break;
executed: break;
Execution Count:197
197
2279#endif // QT_NO_SPINBOX -
2280 -
2281 default: -
2282 QCommonStyle::drawComplexControl(cc, opt, p, widget);
executed (the execution status of this line is deduced): QCommonStyle::drawComplexControl(cc, opt, p, widget);
-
2283 }
executed: }
Execution Count:723
723
2284}
executed: }
Execution Count:3981
3981
2285 -
2286/*! \reimp */ -
2287QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, -
2288 const QSize &csz, const QWidget *widget) const -
2289{ -
2290 QSize sz(csz);
executed (the execution status of this line is deduced): QSize sz(csz);
-
2291 switch (ct) { -
2292 case CT_PushButton: -
2293 if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
partially evaluated: const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
TRUEFALSE
yes
Evaluation Count:1110
no
Evaluation Count:0
0-1110
2294 sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
executed (the execution status of this line is deduced): sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
-
2295 int w = sz.width(),
executed (the execution status of this line is deduced): int w = sz.width(),
-
2296 h = sz.height();
executed (the execution status of this line is deduced): h = sz.height();
-
2297 int defwidth = 0;
executed (the execution status of this line is deduced): int defwidth = 0;
-
2298 if (btn->features & QStyleOptionButton::AutoDefaultButton)
evaluated: btn->features & QStyleOptionButton::AutoDefaultButton
TRUEFALSE
yes
Evaluation Count:860
yes
Evaluation Count:250
250-860
2299 defwidth = 2 * proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);
executed: defwidth = 2 * proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);
Execution Count:860
860
2300 int minwidth = int(QStyleHelper::dpiScaled(75.));
executed (the execution status of this line is deduced): int minwidth = int(QStyleHelper::dpiScaled(75.));
-
2301 int minheight = int(QStyleHelper::dpiScaled(23.));
executed (the execution status of this line is deduced): int minheight = int(QStyleHelper::dpiScaled(23.));
-
2302 -
2303#ifndef QT_QWS_SMALL_PUSHBUTTON -
2304 if (w < minwidth + defwidth && !btn->text.isEmpty())
evaluated: w < minwidth + defwidth
TRUEFALSE
yes
Evaluation Count:1084
yes
Evaluation Count:26
evaluated: !btn->text.isEmpty()
TRUEFALSE
yes
Evaluation Count:910
yes
Evaluation Count:174
26-1084
2305 w = minwidth + defwidth;
executed: w = minwidth + defwidth;
Execution Count:910
910
2306 if (h < minheight + defwidth)
evaluated: h < minheight + defwidth
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:1109
1-1109
2307 h = minheight + defwidth;
executed: h = minheight + defwidth;
Execution Count:1
1
2308#endif -
2309 sz = QSize(w, h);
executed (the execution status of this line is deduced): sz = QSize(w, h);
-
2310 }
executed: }
Execution Count:1110
1110
2311 break;
executed: break;
Execution Count:1110
1110
2312#ifndef QT_NO_MENU -
2313 case CT_MenuItem: -
2314 if (const QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
partially evaluated: const QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
TRUEFALSE
yes
Evaluation Count:1915
no
Evaluation Count:0
0-1915
2315 int w = sz.width();
executed (the execution status of this line is deduced): int w = sz.width();
-
2316 sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
executed (the execution status of this line is deduced): sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
-
2317 -
2318 if (mi->menuItemType == QStyleOptionMenuItem::Separator) {
evaluated: mi->menuItemType == QStyleOptionMenuItem::Separator
TRUEFALSE
yes
Evaluation Count:50
yes
Evaluation Count:1865
50-1865
2319 sz = QSize(10, QWindowsStylePrivate::windowsSepHeight);
executed (the execution status of this line is deduced): sz = QSize(10, QWindowsStylePrivate::windowsSepHeight);
-
2320 }
executed: }
Execution Count:50
50
2321 else if (mi->icon.isNull()) {
evaluated: mi->icon.isNull()
TRUEFALSE
yes
Evaluation Count:1837
yes
Evaluation Count:28
28-1837
2322 sz.setHeight(sz.height() - 2);
executed (the execution status of this line is deduced): sz.setHeight(sz.height() - 2);
-
2323 w -= 6;
executed (the execution status of this line is deduced): w -= 6;
-
2324 }
executed: }
Execution Count:1837
1837
2325 -
2326 if (mi->menuItemType != QStyleOptionMenuItem::Separator && !mi->icon.isNull()) {
evaluated: mi->menuItemType != QStyleOptionMenuItem::Separator
TRUEFALSE
yes
Evaluation Count:1865
yes
Evaluation Count:50
evaluated: !mi->icon.isNull()
TRUEFALSE
yes
Evaluation Count:28
yes
Evaluation Count:1837
28-1865
2327 int iconExtent = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);
executed (the execution status of this line is deduced): int iconExtent = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);
-
2328 sz.setHeight(qMax(sz.height(),
executed (the execution status of this line is deduced): sz.setHeight(qMax(sz.height(),
-
2329 mi->icon.actualSize(QSize(iconExtent, iconExtent)).height()
executed (the execution status of this line is deduced): mi->icon.actualSize(QSize(iconExtent, iconExtent)).height()
-
2330 + 2 * QWindowsStylePrivate::windowsItemFrame));
executed (the execution status of this line is deduced): + 2 * QWindowsStylePrivate::windowsItemFrame));
-
2331 }
executed: }
Execution Count:28
28
2332 int maxpmw = mi->maxIconWidth;
executed (the execution status of this line is deduced): int maxpmw = mi->maxIconWidth;
-
2333 int tabSpacing = 20;
executed (the execution status of this line is deduced): int tabSpacing = 20;
-
2334 if (mi->text.contains(QLatin1Char('\t')))
evaluated: mi->text.contains(QLatin1Char('\t'))
TRUEFALSE
yes
Evaluation Count:119
yes
Evaluation Count:1796
119-1796
2335 w += tabSpacing;
executed: w += tabSpacing;
Execution Count:119
119
2336 else if (mi->menuItemType == QStyleOptionMenuItem::SubMenu)
evaluated: mi->menuItemType == QStyleOptionMenuItem::SubMenu
TRUEFALSE
yes
Evaluation Count:95
yes
Evaluation Count:1701
95-1701
2337 w += 2 * QWindowsStylePrivate::windowsArrowHMargin;
executed: w += 2 * QWindowsStylePrivate::windowsArrowHMargin;
Execution Count:95
95
2338 else if (mi->menuItemType == QStyleOptionMenuItem::DefaultItem) {
partially evaluated: mi->menuItemType == QStyleOptionMenuItem::DefaultItem
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1701
0-1701
2339 // adjust the font and add the difference in size. -
2340 // it would be better if the font could be adjusted in the initStyleOption qmenu func!! -
2341 QFontMetrics fm(mi->font);
never executed (the execution status of this line is deduced): QFontMetrics fm(mi->font);
-
2342 QFont fontBold = mi->font;
never executed (the execution status of this line is deduced): QFont fontBold = mi->font;
-
2343 fontBold.setBold(true);
never executed (the execution status of this line is deduced): fontBold.setBold(true);
-
2344 QFontMetrics fmBold(fontBold);
never executed (the execution status of this line is deduced): QFontMetrics fmBold(fontBold);
-
2345 w += fmBold.width(mi->text) - fm.width(mi->text);
never executed (the execution status of this line is deduced): w += fmBold.width(mi->text) - fm.width(mi->text);
-
2346 }
never executed: }
0
2347 -
2348 int checkcol = qMax<int>(maxpmw, QWindowsStylePrivate::windowsCheckMarkWidth); // Windows always shows a check column
executed (the execution status of this line is deduced): int checkcol = qMax<int>(maxpmw, QWindowsStylePrivate::windowsCheckMarkWidth);
-
2349 w += checkcol;
executed (the execution status of this line is deduced): w += checkcol;
-
2350 w += int(QWindowsStylePrivate::windowsRightBorder) + 10;
executed (the execution status of this line is deduced): w += int(QWindowsStylePrivate::windowsRightBorder) + 10;
-
2351 sz.setWidth(w);
executed (the execution status of this line is deduced): sz.setWidth(w);
-
2352 }
executed: }
Execution Count:1915
1915
2353 break;
executed: break;
Execution Count:1915
1915
2354#endif // QT_NO_MENU -
2355#ifndef QT_NO_MENUBAR -
2356 case CT_MenuBarItem: -
2357 if (!sz.isEmpty())
evaluated: !sz.isEmpty()
TRUEFALSE
yes
Evaluation Count:327
yes
Evaluation Count:1
1-327
2358 sz += QSize(QWindowsStylePrivate::windowsItemHMargin * 4, QWindowsStylePrivate::windowsItemVMargin * 2);
executed: sz += QSize(QWindowsStylePrivate::windowsItemHMargin * 4, QWindowsStylePrivate::windowsItemVMargin * 2);
Execution Count:327
327
2359 break;
executed: break;
Execution Count:328
328
2360#endif -
2361 // Otherwise, fall through -
2362 case CT_ToolButton: -
2363 if (qstyleoption_cast<const QStyleOptionToolButton *>(opt))
partially evaluated: qstyleoption_cast<const QStyleOptionToolButton *>(opt)
TRUEFALSE
yes
Evaluation Count:1252
no
Evaluation Count:0
0-1252
2364 return sz += QSize(7, 6);
executed: return sz += QSize(7, 6);
Execution Count:1252
1252
2365 // Otherwise, fall through -
2366 -
2367 default:
code before this statement never executed: default:
0
2368 sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
executed (the execution status of this line is deduced): sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
-
2369 }
executed: }
Execution Count:281929
281929
2370 return sz;
executed: return sz;
Execution Count:285282
285282
2371} -
2372 -
2373/*! -
2374 \reimp -
2375*/ -
2376QIcon QWindowsStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, -
2377 const QWidget *widget) const -
2378{ -
2379 return QCommonStyle::standardIcon(standardIcon, option, widget);
executed: return QCommonStyle::standardIcon(standardIcon, option, widget);
Execution Count:3935
3935
2380} -
2381 -
2382 -
2383 -
2384QT_END_NAMESPACE -
2385 -
2386#endif // QT_NO_STYLE_WINDOWS -
2387 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial