| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstylesheetstyle.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | using namespace QCss; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | class QStyleSheetStylePrivate : public QWindowsStylePrivate | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | inline QStyleSheetStyle* q_func() { return static_cast<QStyleSheetStyle *>(q_ptr); } inline const QStyleSheetStyle* q_func() const { return static_cast<const QStyleSheetStyle *>(q_ptr); } friend class QStyleSheetStyle; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | public: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | QStyleSheetStylePrivate() { } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | static QStyleSheetStyleCaches *styleSheetCaches = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | static const QStyleSheetStyle *globalStyleSheetStyle = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | class QStyleSheetStyleRecursionGuard | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | public: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | QStyleSheetStyleRecursionGuard(const QStyleSheetStyle *that) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | : guarded(globalStyleSheetStyle == 0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | if (guarded
never executed: globalStyleSheetStyle = that; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | ~QStyleSheetStyleRecursionGuard() { if (guarded
never executed: }globalStyleSheetStyle = 0;never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | bool guarded; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | enum PseudoElement { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | PseudoElement_None, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | PseudoElement_DownArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | PseudoElement_UpArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | PseudoElement_LeftArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | PseudoElement_RightArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | PseudoElement_Indicator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | PseudoElement_ExclusiveIndicator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | PseudoElement_PushButtonMenuIndicator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | PseudoElement_ComboBoxDropDown, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | PseudoElement_ComboBoxArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | PseudoElement_Item, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | PseudoElement_SpinBoxUpButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | PseudoElement_SpinBoxUpArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | PseudoElement_SpinBoxDownButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | PseudoElement_SpinBoxDownArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | PseudoElement_GroupBoxTitle, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | PseudoElement_GroupBoxIndicator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | PseudoElement_ToolButtonMenu, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | PseudoElement_ToolButtonMenuArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | PseudoElement_ToolButtonDownArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | PseudoElement_ToolBoxTab, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | PseudoElement_ScrollBarSlider, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | PseudoElement_ScrollBarAddPage, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | PseudoElement_ScrollBarSubPage, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | PseudoElement_ScrollBarAddLine, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | PseudoElement_ScrollBarSubLine, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | PseudoElement_ScrollBarFirst, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | PseudoElement_ScrollBarLast, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | PseudoElement_ScrollBarUpArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | PseudoElement_ScrollBarDownArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | PseudoElement_ScrollBarLeftArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | PseudoElement_ScrollBarRightArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | PseudoElement_SplitterHandle, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | PseudoElement_ToolBarHandle, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | PseudoElement_ToolBarSeparator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | PseudoElement_MenuScroller, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | PseudoElement_MenuTearoff, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | PseudoElement_MenuCheckMark, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | PseudoElement_MenuSeparator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | PseudoElement_MenuIcon, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | PseudoElement_MenuRightArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | PseudoElement_TreeViewBranch, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | PseudoElement_HeaderViewSection, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | PseudoElement_HeaderViewUpArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | PseudoElement_HeaderViewDownArrow, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | PseudoElement_ProgressBarChunk, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | PseudoElement_TabBarTab, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | PseudoElement_TabBarScroller, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | PseudoElement_TabBarTear, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | PseudoElement_SliderGroove, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | PseudoElement_SliderHandle, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | PseudoElement_SliderAddPage, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | PseudoElement_SliderSubPage, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | PseudoElement_SliderTickmark, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | PseudoElement_TabWidgetPane, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | PseudoElement_TabWidgetTabBar, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | PseudoElement_TabWidgetLeftCorner, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | PseudoElement_TabWidgetRightCorner, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | PseudoElement_DockWidgetTitle, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | PseudoElement_DockWidgetCloseButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | PseudoElement_DockWidgetFloatButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | PseudoElement_DockWidgetSeparator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | PseudoElement_MdiCloseButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | PseudoElement_MdiMinButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | PseudoElement_MdiNormalButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | PseudoElement_TitleBar, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | PseudoElement_TitleBarCloseButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | PseudoElement_TitleBarMinButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | PseudoElement_TitleBarMaxButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | PseudoElement_TitleBarShadeButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | PseudoElement_TitleBarUnshadeButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | PseudoElement_TitleBarNormalButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | PseudoElement_TitleBarContextHelpButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | PseudoElement_TitleBarSysMenu, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | PseudoElement_ViewItem, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | PseudoElement_ViewItemIcon, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | PseudoElement_ViewItemText, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | PseudoElement_ViewItemIndicator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | PseudoElement_ScrollAreaCorner, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | PseudoElement_TabBarTabCloseButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | NumPseudoElements | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | struct PseudoElementInfo { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | QStyle::SubControl subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | const char name[19]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | static const PseudoElementInfo knownPseudoElements[NumPseudoElements] = { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | { QStyle::SC_None, "" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | { QStyle::SC_None, "down-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | { QStyle::SC_None, "up-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | { QStyle::SC_None, "left-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | { QStyle::SC_None, "right-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | { QStyle::SC_None, "indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | { QStyle::SC_None, "indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | { QStyle::SC_None, "menu-indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | { QStyle::SC_ComboBoxArrow, "drop-down" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | { QStyle::SC_ComboBoxArrow, "down-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | { QStyle::SC_None, "item" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | { QStyle::SC_SpinBoxUp, "up-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | { QStyle::SC_SpinBoxUp, "up-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | { QStyle::SC_SpinBoxDown, "down-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | { QStyle::SC_SpinBoxDown, "down-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | { QStyle::SC_GroupBoxLabel, "title" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | { QStyle::SC_GroupBoxCheckBox, "indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | { QStyle::SC_ToolButtonMenu, "menu-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | { QStyle::SC_ToolButtonMenu, "menu-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | { QStyle::SC_None, "menu-indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | { QStyle::SC_None, "tab" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | { QStyle::SC_ScrollBarSlider, "handle" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | { QStyle::SC_ScrollBarAddPage, "add-page" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | { QStyle::SC_ScrollBarSubPage, "sub-page" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | { QStyle::SC_ScrollBarAddLine, "add-line" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | { QStyle::SC_ScrollBarSubLine, "sub-line" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | { QStyle::SC_ScrollBarFirst, "first" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | { QStyle::SC_ScrollBarLast, "last" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | { QStyle::SC_ScrollBarSubLine, "up-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | { QStyle::SC_ScrollBarAddLine, "down-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | { QStyle::SC_ScrollBarSubLine, "left-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | { QStyle::SC_ScrollBarAddLine, "right-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | { QStyle::SC_None, "handle" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | { QStyle::SC_None, "handle" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | { QStyle::SC_None, "separator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | { QStyle::SC_None, "scroller" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | { QStyle::SC_None, "tearoff" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | { QStyle::SC_None, "indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | { QStyle::SC_None, "separator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | { QStyle::SC_None, "icon" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | { QStyle::SC_None, "right-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | { QStyle::SC_None, "branch" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | { QStyle::SC_None, "section" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | { QStyle::SC_None, "down-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | { QStyle::SC_None, "up-arrow" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | { QStyle::SC_None, "chunk" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | { QStyle::SC_None, "tab" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | { QStyle::SC_None, "scroller" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | { QStyle::SC_None, "tear" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | { QStyle::SC_SliderGroove, "groove" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | { QStyle::SC_SliderHandle, "handle" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | { QStyle::SC_None, "add-page" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | { QStyle::SC_None, "sub-page"}, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | { QStyle::SC_SliderTickmarks, "tick-mark" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | { QStyle::SC_None, "pane" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | { QStyle::SC_None, "tab-bar" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | { QStyle::SC_None, "left-corner" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | { QStyle::SC_None, "right-corner" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | { QStyle::SC_None, "title" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | { QStyle::SC_None, "close-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | { QStyle::SC_None, "float-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | { QStyle::SC_None, "separator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | { QStyle::SC_MdiCloseButton, "close-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | { QStyle::SC_MdiMinButton, "minimize-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | { QStyle::SC_MdiNormalButton, "normal-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | { QStyle::SC_TitleBarLabel, "title" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | { QStyle::SC_TitleBarCloseButton, "close-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | { QStyle::SC_TitleBarMinButton, "minimize-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | { QStyle::SC_TitleBarMaxButton, "maximize-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | { QStyle::SC_TitleBarShadeButton, "shade-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | { QStyle::SC_TitleBarUnshadeButton, "unshade-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | { QStyle::SC_TitleBarNormalButton, "normal-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | { QStyle::SC_TitleBarContextHelpButton, "contexthelp-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | { QStyle::SC_TitleBarSysMenu, "sys-menu" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | { QStyle::SC_None, "item" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | { QStyle::SC_None, "icon" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | { QStyle::SC_None, "text" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | { QStyle::SC_None, "indicator" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | { QStyle::SC_None, "corner" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | { QStyle::SC_None, "close-button" }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | struct QStyleSheetBorderImageData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | QStyleSheetBorderImageData() | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | : horizStretch(QCss::TileMode_Unknown), vertStretch(QCss::TileMode_Unknown) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | cuts[i] = -1; never executed: cuts[i] = -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | int cuts[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | QPixmap pixmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | QImage image; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | QCss::TileMode horizStretch, vertStretch; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | struct QStyleSheetBackgroundData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | QStyleSheetBackgroundData(const QBrush& b, const QPixmap& p, QCss::Repeat r, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | Qt::Alignment a, QCss::Origin o, Attachment t, QCss::Origin c) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | : brush(b), pixmap(p), repeat(r), position(a), origin(o), attachment(t), clip(c) { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | bool isTransparent() const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | if (brush.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | return never executed: !brush.isOpaque();return !brush.isOpaque();never executed: return !brush.isOpaque(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | return never executed: pixmap.isNull() ? false : pixmap.hasAlpha();return pixmap.isNull() ? false : pixmap.hasAlpha();never executed: return pixmap.isNull() ? false : pixmap.hasAlpha(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | QBrush brush; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | QPixmap pixmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | QCss::Repeat repeat; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | Qt::Alignment position; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | QCss::Origin origin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | QCss::Attachment attachment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | QCss::Origin clip; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | struct QStyleSheetBorderData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | QStyleSheetBorderData() : bi(0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | borders[i] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | styles[i] = QCss::BorderStyle_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | QStyleSheetBorderData(int *b, QBrush *c, QCss::BorderStyle *s, QSize *r) : bi(0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | borders[i] = b[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | styles[i] = s[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | colors[i] = c[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | radii[i] = r[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | int borders[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | QBrush colors[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | QCss::BorderStyle styles[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | QSize radii[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | const QStyleSheetBorderImageData *borderImage() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | { return never executed: bi;return bi;never executed: }return bi; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | bool hasBorderImage() const { return never executed: bi!=0;return bi!=0;never executed: }return bi!=0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | QSharedDataPointer<QStyleSheetBorderImageData> bi; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | bool isOpaque() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | if (styles[i] == QCss::BorderStyle_Native
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | if (styles[i] >= QCss::BorderStyle_Dotted
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | && styles[i] != BorderStyle_Solid
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | if (!colors[i].isOpaque()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | if (!radii[i].isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | if (bi != 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | struct QStyleSheetOutlineData : public QStyleSheetBorderData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | QStyleSheetOutlineData() | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | offsets[i] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | QStyleSheetOutlineData(int *b, QBrush *c, QCss::BorderStyle *s, QSize *r, int *o) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | : QStyleSheetBorderData(b, c, s, r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | offsets[i] = o[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | int offsets[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | struct QStyleSheetBoxData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | QStyleSheetBoxData(int *m, int *p, int s) : spacing(s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | margins[i] = m[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | paddings[i] = p[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | int margins[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | int paddings[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | int spacing; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | struct QStyleSheetPaletteData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | QStyleSheetPaletteData(const QBrush &fg, const QBrush &sfg, const QBrush &sbg, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | const QBrush &abg) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | : foreground(fg), selectionForeground(sfg), selectionBackground(sbg), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | alternateBackground(abg) { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | QBrush foreground; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | QBrush selectionForeground; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | QBrush selectionBackground; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | QBrush alternateBackground; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | struct QStyleSheetGeometryData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | QStyleSheetGeometryData(int w, int h, int minw, int minh, int maxw, int maxh) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | : minWidth(minw), minHeight(minh), width(w), height(h), maxWidth(maxw), maxHeight(maxh) { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | int minWidth, minHeight, width, height, maxWidth, maxHeight; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | struct QStyleSheetPositionData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | QStyleSheetPositionData(int l, int t, int r, int b, Origin o, Qt::Alignment p, QCss::PositionMode m, Qt::Alignment a = 0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | : left(l), top(t), bottom(b), right(r), origin(o), position(p), mode(m), textAlignment(a) { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | int left, top, bottom, right; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | Origin origin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | Qt::Alignment position; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | QCss::PositionMode mode; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | Qt::Alignment textAlignment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | struct QStyleSheetImageData : public QSharedData | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | QStyleSheetImageData(const QIcon &i, Qt::Alignment a, const QSize &sz) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | : icon(i), alignment(a), size(sz) { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | QIcon icon; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | Qt::Alignment alignment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | QSize size; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | class QRenderRule | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | public: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | QRenderRule() : features(0), hasFont(false), pal(0), b(0), bg(0), bd(0), ou(0), geo(0), p(0), img(0), clipset(0) { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | QRenderRule(const QVector<QCss::Declaration> &, const QObject *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | QRect borderRect(const QRect &r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | QRect outlineRect(const QRect &r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | QRect paddingRect(const QRect &r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | QRect contentsRect(const QRect &r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | enum { Margin = 1, Border = 2, Padding = 4, All=Margin|Border|Padding }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | QRect boxRect(const QRect &r, int flags = All) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | QSize boxSize(const QSize &s, int flags = All) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | QRect originRect(const QRect &rect, Origin origin) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | QPainterPath borderClip(QRect rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | void drawBorder(QPainter *, const QRect&); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | void drawOutline(QPainter *, const QRect&); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | void drawBorderImage(QPainter *, const QRect&); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | void drawBackground(QPainter *, const QRect&, const QPoint& = QPoint(0, 0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | void drawBackgroundImage(QPainter *, const QRect&, QPoint = QPoint(0, 0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | void drawFrame(QPainter *, const QRect&); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | void drawImage(QPainter *p, const QRect &rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | void drawRule(QPainter *, const QRect&); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | void configurePalette(QPalette *, QPalette::ColorGroup, const QWidget *, bool); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | void configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette::ColorRole br); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | const QStyleSheetPaletteData *palette() const { return never executed: pal;return pal;never executed: }return pal; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | const QStyleSheetBoxData *box() const { return never executed: b;return b;never executed: }return b; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | const QStyleSheetBackgroundData *background() const { return never executed: bg;return bg;never executed: }return bg; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | const QStyleSheetBorderData *border() const { return never executed: bd;return bd;never executed: }return bd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | const QStyleSheetOutlineData *outline() const { return never executed: ou;return ou;never executed: }return ou; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | const QStyleSheetGeometryData *geometry() const { return never executed: geo;return geo;never executed: }return geo; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | const QStyleSheetPositionData *position() const { return never executed: p;return p;never executed: }return p; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | bool hasPalette() const { return never executed: pal != 0;return pal != 0;never executed: }return pal != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | bool hasBackground() const { return never executed: bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush);return bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush);never executed: }return bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | bool hasGradientBackground() const { return never executed: bg && bg->brush.style() >= Qt::LinearGradientPatternreturn bg && bg->brush.style() >= Qt::LinearGradientPattern && bg->brush.style() <= Qt::ConicalGradientPattern;never executed: return bg && bg->brush.style() >= Qt::LinearGradientPattern && bg->brush.style() <= Qt::ConicalGradientPattern; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | && bg->brush.style() <= Qt::ConicalGradientPattern; never executed: }return bg && bg->brush.style() >= Qt::LinearGradientPattern && bg->brush.style() <= Qt::ConicalGradientPattern; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | bool hasNativeBorder() const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | return never executed: bd == 0return bd == 0 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native);never executed: return bd == 0 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native); never executed: return bd == 0 || (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | bool hasNativeOutline() const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | return never executed: (ou == 0return (ou == 0 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native));never executed: return (ou == 0 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native)); never executed: return (ou == 0 || (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | bool baseStyleCanDraw() const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | if (!hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | if (bg
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | if (hasGradientBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | return never executed: features & StyleFeature_BackgroundGradient;return features & StyleFeature_BackgroundGradient;never executed: return features & StyleFeature_BackgroundGradient; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | return never executed: features & StyleFeature_BackgroundColor;return features & StyleFeature_BackgroundColor;never executed: return features & StyleFeature_BackgroundColor; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | bool hasBox() const { return never executed: b != 0;return b != 0;never executed: }return b != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | bool hasBorder() const { return never executed: bd != 0;return bd != 0;never executed: }return bd != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | bool hasOutline() const { return never executed: ou != 0;return ou != 0;never executed: }return ou != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | bool hasPosition() const { return never executed: p != 0;return p != 0;never executed: }return p != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | bool hasGeometry() const { return never executed: geo != 0;return geo != 0;never executed: }return geo != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | bool hasDrawable() const { return never executed: !hasNativeBorder() || hasBackground() || hasImage();return !hasNativeBorder() || hasBackground() || hasImage();never executed: }return !hasNativeBorder() || hasBackground() || hasImage(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | bool hasImage() const { return never executed: img != 0;return img != 0;never executed: }return img != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | QSize minimumContentsSize() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | { return never executed: geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0);return geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0);never executed: }return geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | QSize minimumSize() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | { return never executed: boxSize(minimumContentsSize());return boxSize(minimumContentsSize());never executed: }return boxSize(minimumContentsSize()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | QSize contentsSize() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | { return never executed: geo ? QSize(geo->width, geo->height)return geo ? QSize(geo->width, geo->height) : ((img && img->size.isValid()) ? img->size : QSize());never executed: return geo ? QSize(geo->width, geo->height) : ((img && img->size.isValid()) ? img->size : QSize()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | : ((img && img->size.isValid()) ? img->size : QSize()); never executed: }return geo ? QSize(geo->width, geo->height) : ((img && img->size.isValid()) ? img->size : QSize()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | QSize contentsSize(const QSize &sz) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | QSize csz = contentsSize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | if (csz.width() == -1
never executed: csz.setWidth(sz.width()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | if (csz.height() == -1
never executed: csz.setHeight(sz.height()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | return never executed: csz;return csz;never executed: return csz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | bool hasContentsSize() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | { return never executed: (geo && (geo->width != -1 || geo->height != -1)) || (img && img->size.isValid());return (geo && (geo->width != -1 || geo->height != -1)) || (img && img->size.isValid());never executed: }return (geo && (geo->width != -1 || geo->height != -1)) || (img && img->size.isValid()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | QSize size() const { return never executed: boxSize(contentsSize());return boxSize(contentsSize());never executed: }return boxSize(contentsSize()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | QSize size(const QSize &sz) const { return never executed: boxSize(contentsSize(sz));return boxSize(contentsSize(sz));never executed: }return boxSize(contentsSize(sz)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | QSize adjustSize(const QSize &sz) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | if (!geo
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | return never executed: sz;return sz;never executed: return sz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | QSize csz = contentsSize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | if (csz.width() == -1
never executed: csz.setWidth(sz.width()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | if (csz.height() == -1
never executed: csz.setHeight(sz.height()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | if (geo->maxWidth != -1
never executed: csz.setWidth(geo->maxWidth); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | if (geo->maxHeight != -1
never executed: csz.setHeight(geo->maxHeight); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | csz=csz.expandedTo(QSize(geo->minWidth, geo->minHeight)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | return never executed: csz;return csz;never executed: return csz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | bool hasStyleHint(const QString &sh) const { return never executed: styleHints.contains(sh);return styleHints.contains(sh);never executed: }return styleHints.contains(sh); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | QVariant styleHint(const QString &sh) const { return never executed: styleHints.value(sh);return styleHints.value(sh);never executed: }return styleHints.value(sh); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | void fixupBorder(int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | void setClip(QPainter *p, const QRect &rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | void unsetClip(QPainter *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | public: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | int features; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | QBrush defaultBackground; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | QFont font; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | bool hasFont; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | QHash<QString, QVariant> styleHints; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | QSharedDataPointer<QStyleSheetPaletteData> pal; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | QSharedDataPointer<QStyleSheetBoxData> b; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | QSharedDataPointer<QStyleSheetBackgroundData> bg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | QSharedDataPointer<QStyleSheetBorderData> bd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | QSharedDataPointer<QStyleSheetOutlineData> ou; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | QSharedDataPointer<QStyleSheetGeometryData> geo; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | QSharedDataPointer<QStyleSheetPositionData> p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | QSharedDataPointer<QStyleSheetImageData> img; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | int clipset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | QPainterPath clipPath; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | template<> class QTypeInfo<QRenderRule > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_MOVABLE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QRenderRule)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QRenderRule >::value, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QRenderRule) }; static inline const char *name() { return "QRenderRule"; } }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | static const char knownStyleHints[][45] = { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | "activate-on-singleclick", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | "alignment", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | "arrow-keys-navigate-into-children", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | "backward-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | "button-layout", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | "cd-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | "combobox-list-mousetracking", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | "combobox-popup", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | "computer-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | "desktop-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | "dialog-apply-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | "dialog-cancel-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | "dialog-close-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | "dialog-discard-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | "dialog-help-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | "dialog-no-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | "dialog-ok-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | "dialog-open-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | "dialog-reset-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | "dialog-save-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | "dialog-yes-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | "dialogbuttonbox-buttons-have-icons", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | "directory-closed-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | "directory-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | "directory-link-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | "directory-open-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | "dither-disable-text", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | "dockwidget-close-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | "downarrow-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | "dvd-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | "etch-disabled-text", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | "file-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | "file-link-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | "filedialog-backward-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | "filedialog-contentsview-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | "filedialog-detailedview-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | "filedialog-end-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | "filedialog-infoview-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | "filedialog-listview-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | "filedialog-new-directory-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | "filedialog-parent-directory-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | "filedialog-start-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | "floppy-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | "forward-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | "gridline-color", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | "harddisk-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | "home-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | "icon-size", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | "leftarrow-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | "lineedit-password-character", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | "lineedit-password-mask-delay", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | "mdi-fill-space-on-maximize", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | "menu-scrollable", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | "menubar-altkey-navigation", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | "menubar-separator", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | "messagebox-critical-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | "messagebox-information-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | "messagebox-question-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | "messagebox-text-interaction-flags", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | "messagebox-warning-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | "mouse-tracking", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | "network-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | "opacity", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | "paint-alternating-row-colors-for-empty-area", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | "rightarrow-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | "scrollbar-contextmenu", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | "scrollbar-leftclick-absolute-position", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | "scrollbar-middleclick-absolute-position", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | "scrollbar-roll-between-buttons", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | "scrollbar-scroll-when-pointer-leaves-control", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | "scrollview-frame-around-contents", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | "show-decoration-selected", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | "spinbox-click-autorepeat-rate", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | "spincontrol-disable-on-bounds", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | "tabbar-elide-mode", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | "tabbar-prefer-no-arrows", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | "titlebar-close-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | "titlebar-contexthelp-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | "titlebar-maximize-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | "titlebar-menu-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | "titlebar-minimize-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | "titlebar-normal-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | "titlebar-shade-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | "titlebar-unshade-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | "toolbutton-popup-delay", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | "trash-icon", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | "uparrow-icon" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | static const int numKnownStyleHints = sizeof(knownStyleHints)/sizeof(knownStyleHints[0]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | static QList<QVariant> subControlLayout(const QString& layout) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | QList<QVariant> buttons; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | for (int i = 0; i < layout.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | int button = layout[i].toLatin1(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | switch (button) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | case never executed: 'm':case 'm':never executed: case 'm': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | buttons.append(PseudoElement_MdiMinButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | buttons.append(PseudoElement_TitleBarMinButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | case never executed: 'M':case 'M':never executed: case 'M': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | buttons.append(PseudoElement_TitleBarMaxButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | case never executed: 'X':case 'X':never executed: case 'X': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | buttons.append(PseudoElement_MdiCloseButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | buttons.append(PseudoElement_TitleBarCloseButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | case never executed: 'N':case 'N':never executed: case 'N': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | buttons.append(PseudoElement_MdiNormalButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | buttons.append(PseudoElement_TitleBarNormalButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | case never executed: 'I':case 'I':never executed: case 'I': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | buttons.append(PseudoElement_TitleBarSysMenu); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | case never executed: 'T':case 'T':never executed: case 'T': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | buttons.append(PseudoElement_TitleBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | case never executed: 'H':case 'H':never executed: case 'H': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | buttons.append(PseudoElement_TitleBarContextHelpButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | case never executed: 'S':case 'S':never executed: case 'S': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | buttons.append(PseudoElement_TitleBarShadeButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | buttons.append(button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | return never executed: buttons;return buttons;never executed: return buttons; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | namespace { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | struct ButtonInfo { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | QRenderRule rule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | int element; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | int offset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | int where; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | int width; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | template <> class QTypeInfo<ButtonInfo> : public QTypeInfoMerger<ButtonInfo, QRenderRule, int> {}; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | QHash<QStyle::SubControl, QRect> QStyleSheetStyle::titleBarLayout(const QWidget *w, const QStyleOptionTitleBar *tb) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | QHash<QStyle::SubControl, QRect> layoutRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 656 | const bool isMinimized = tb->titleBarState & Qt::WindowMinimized; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 657 | const bool isMaximized = tb->titleBarState & Qt::WindowMaximized; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | QRenderRule subRule = renderRule(w, tb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | QRect cr = subRule.contentsRect(tb->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 660 | QList<QVariant> layout = subRule.styleHint(QLatin1String("button-layout")).toList(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 661 | if (layout.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | layout = subControlLayout(QLatin1String("I(T)HSmMX")); never executed: layout = subControlLayout(QLatin1String("I(T)HSmMX")); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 664 | int offsets[3] = { 0, 0, 0 }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 665 | enum Where { Left, Right, Center, NoWhere } where = Left; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 666 | QVector<ButtonInfo> infos; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 667 | const int numLayouts = layout.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 668 | infos.reserve(numLayouts); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | for (int i = 0; i < numLayouts
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | const int element = layout[i].toInt(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 671 | if (element == '('
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 672 | where = Center; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 673 | } never executed: else if (element == ')'end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | where = Right; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 676 | ButtonInfo info; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | info.element = element; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | switch (element) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | case never executed: PseudoElement_TitleBar:case PseudoElement_TitleBar:never executed: case PseudoElement_TitleBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 680 | if (!(tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 682 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | case never executed: PseudoElement_TitleBarContextHelpButton:case PseudoElement_TitleBarContextHelpButton:never executed: case PseudoElement_TitleBarContextHelpButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | if (!(tb->titleBarFlags & Qt::WindowContextHelpButtonHint)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 685 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | case never executed: PseudoElement_TitleBarMinButton:case PseudoElement_TitleBarMinButton:never executed: case PseudoElement_TitleBarMinButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | if (!(tb->titleBarFlags & Qt::WindowMinimizeButtonHint)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 689 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | if (isMinimized
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | info.element = PseudoElement_TitleBarNormalButton; never executed: info.element = PseudoElement_TitleBarNormalButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 692 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | case never executed: PseudoElement_TitleBarMaxButton:case PseudoElement_TitleBarMaxButton:never executed: case PseudoElement_TitleBarMaxButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | if (!(tb->titleBarFlags & Qt::WindowMaximizeButtonHint)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 695 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | if (isMaximized
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | info.element = PseudoElement_TitleBarNormalButton; never executed: info.element = PseudoElement_TitleBarNormalButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | case never executed: PseudoElement_TitleBarShadeButton:case PseudoElement_TitleBarShadeButton:never executed: case PseudoElement_TitleBarShadeButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | if (!(tb->titleBarFlags & Qt::WindowShadeButtonHint)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | if (isMinimized
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | info.element = PseudoElement_TitleBarUnshadeButton; never executed: info.element = PseudoElement_TitleBarUnshadeButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | case never executed: PseudoElement_TitleBarCloseButton:case PseudoElement_TitleBarCloseButton:never executed: case PseudoElement_TitleBarCloseButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | case never executed: PseudoElement_TitleBarSysMenu:case PseudoElement_TitleBarSysMenu:never executed: case PseudoElement_TitleBarSysMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | if (!(tb->titleBarFlags & Qt::WindowSystemMenuHint)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | if (info.element == PseudoElement_TitleBar
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 714 | info.width = tb->fontMetrics.width(tb->text) + 6; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | subRule.geo = new QStyleSheetGeometryData(info.width, tb->fontMetrics.height(), -1, -1, -1, -1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 716 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | subRule = renderRule(w, tb, info.element); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | info.width = subRule.size().width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | info.rule = subRule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | info.offset = offsets[where]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | info.where = where; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | infos.append(std::move(info)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | offsets[where] += info.width; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 727 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 729 | for (int i = 0; i < infos.size()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 730 | const ButtonInfo &info = infos[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | QRect lr = cr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | switch (info.where) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 733 | case never executed: Center:case Center:never executed: {case Center: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 734 | lr.setLeft(cr.left() + offsets[Left]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | lr.setRight(cr.right() - offsets[Right]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | QRect r(0, 0, offsets[Center], lr.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 737 | r.moveCenter(lr.center()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 738 | r.setLeft(r.left()+info.offset); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 739 | r.setWidth(info.width); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 740 | lr = r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 741 | break; never executed: }break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | case never executed: Left:case Left:never executed: case Left: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | lr.translate(info.offset, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 744 | lr.setWidth(info.width); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 745 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 746 | case never executed: Right:case Right:never executed: case Right: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | lr.moveLeft(cr.right() + 1 - offsets[Right] + info.offset); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 748 | lr.setWidth(info.width); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 751 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 753 | QStyle::SubControl control = knownPseudoElements[info.element].subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 754 | layoutRects[control] = positionRect(w, info.rule, info.element, lr, tb->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | return never executed: layoutRects;return layoutRects;never executed: return layoutRects; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | static QStyle::StandardPixmap subControlIcon(int pe) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | switch (pe) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | case never executed: PseudoElement_MdiCloseButton:case PseudoElement_MdiCloseButton:never executed: returncase PseudoElement_MdiCloseButton:never executed: QStyle::SP_TitleBarCloseButton;return QStyle::SP_TitleBarCloseButton;never executed: return QStyle::SP_TitleBarCloseButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 764 | case never executed: PseudoElement_MdiMinButton:case PseudoElement_MdiMinButton:never executed: returncase PseudoElement_MdiMinButton:never executed: QStyle::SP_TitleBarMinButton;return QStyle::SP_TitleBarMinButton;never executed: return QStyle::SP_TitleBarMinButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | case never executed: PseudoElement_MdiNormalButton:case PseudoElement_MdiNormalButton:never executed: returncase PseudoElement_MdiNormalButton:never executed: QStyle::SP_TitleBarNormalButton;return QStyle::SP_TitleBarNormalButton;never executed: return QStyle::SP_TitleBarNormalButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | case never executed: PseudoElement_TitleBarCloseButton:case PseudoElement_TitleBarCloseButton:never executed: returncase PseudoElement_TitleBarCloseButton:never executed: QStyle::SP_TitleBarCloseButton;return QStyle::SP_TitleBarCloseButton;never executed: return QStyle::SP_TitleBarCloseButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 767 | case never executed: PseudoElement_TitleBarMinButton:case PseudoElement_TitleBarMinButton:never executed: returncase PseudoElement_TitleBarMinButton:never executed: QStyle::SP_TitleBarMinButton;return QStyle::SP_TitleBarMinButton;never executed: return QStyle::SP_TitleBarMinButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | case never executed: PseudoElement_TitleBarMaxButton:case PseudoElement_TitleBarMaxButton:never executed: returncase PseudoElement_TitleBarMaxButton:never executed: QStyle::SP_TitleBarMaxButton;return QStyle::SP_TitleBarMaxButton;never executed: return QStyle::SP_TitleBarMaxButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | case never executed: PseudoElement_TitleBarShadeButton:case PseudoElement_TitleBarShadeButton:never executed: returncase PseudoElement_TitleBarShadeButton:never executed: QStyle::SP_TitleBarShadeButton;return QStyle::SP_TitleBarShadeButton;never executed: return QStyle::SP_TitleBarShadeButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 770 | case never executed: PseudoElement_TitleBarUnshadeButton:case PseudoElement_TitleBarUnshadeButton:never executed: returncase PseudoElement_TitleBarUnshadeButton:never executed: QStyle::SP_TitleBarUnshadeButton;return QStyle::SP_TitleBarUnshadeButton;never executed: return QStyle::SP_TitleBarUnshadeButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | case never executed: PseudoElement_TitleBarNormalButton:case PseudoElement_TitleBarNormalButton:never executed: returncase PseudoElement_TitleBarNormalButton:never executed: QStyle::SP_TitleBarNormalButton;return QStyle::SP_TitleBarNormalButton;never executed: return QStyle::SP_TitleBarNormalButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | case never executed: PseudoElement_TitleBarContextHelpButton:case PseudoElement_TitleBarContextHelpButton:never executed: returncase PseudoElement_TitleBarContextHelpButton:never executed: QStyle::SP_TitleBarContextHelpButton;return QStyle::SP_TitleBarContextHelpButton;never executed: return QStyle::SP_TitleBarContextHelpButton; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | default never executed: :default:never executed: break;default:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | return never executed: QStyle::SP_CustomBase;return QStyle::SP_CustomBase;never executed: return QStyle::SP_CustomBase; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject *object) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | : features(0), hasFont(false), pal(0), b(0), bg(0), bd(0), ou(0), geo(0), p(0), img(0), clipset(0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | QPalette palette = QApplication::palette(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | ValueExtractor v(declarations, palette); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | features = v.extractStyleFeatures(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | int w = -1, h = -1, minw = -1, minh = -1, maxw = -1, maxh = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | if (v.extractGeometry(&w, &h, &minw, &minh, &maxw, &maxh)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 787 | geo = new QStyleSheetGeometryData(w, h, minw, minh, maxw, maxh); never executed: geo = new QStyleSheetGeometryData(w, h, minw, minh, maxw, maxh); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 788 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 789 | int left = 0, top = 0, right = 0, bottom = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 790 | Origin origin = Origin_Unknown; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 791 | Qt::Alignment position = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | QCss::PositionMode mode = PositionMode_Unknown; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | Qt::Alignment textAlignment = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | if (v.extractPosition(&left, &top, &right, &bottom, &origin, &position, &mode, &textAlignment)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 795 | p = new QStyleSheetPositionData(left, top, right, bottom, origin, position, mode, textAlignment); never executed: p = new QStyleSheetPositionData(left, top, right, bottom, origin, position, mode, textAlignment); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 796 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 797 | int margins[4], paddings[4], spacing = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 799 | margins[i] = paddings[i] = 0; never executed: margins[i] = paddings[i] = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | if (v.extractBox(margins, paddings, &spacing)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | b = new QStyleSheetBoxData(margins, paddings, spacing); never executed: b = new QStyleSheetBoxData(margins, paddings, spacing); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | int borders[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 804 | QBrush colors[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | QCss::BorderStyle styles[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | QSize radii[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | borders[i] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | styles[i] = BorderStyle_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | if (v.extractBorder(borders, colors, styles, radii)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | bd = new QStyleSheetBorderData(borders, colors, styles, radii); never executed: bd = new QStyleSheetBorderData(borders, colors, styles, radii); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | int offsets[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | borders[i] = offsets[i] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | styles[i] = BorderStyle_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 819 | if (v.extractOutline(borders, colors, styles, radii, offsets)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 820 | ou = new QStyleSheetOutlineData(borders, colors, styles, radii, offsets); never executed: ou = new QStyleSheetOutlineData(borders, colors, styles, radii, offsets); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 821 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 822 | QBrush brush; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 823 | QString uri; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 824 | Repeat repeat = Repeat_XY; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | Qt::Alignment alignment = Qt::AlignTop | Qt::AlignLeft; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 826 | Attachment attachment = Attachment_Scroll; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | origin = Origin_Padding; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | Origin clip = Origin_Border; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 829 | if (v.extractBackground(&brush, &uri, &repeat, &alignment, &origin, &attachment, &clip)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | bg = new QStyleSheetBackgroundData(brush, QPixmap(uri), repeat, alignment, origin, attachment, clip); never executed: bg = new QStyleSheetBackgroundData(brush, QPixmap(uri), repeat, alignment, origin, attachment, clip); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | QBrush sfg, fg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | QBrush sbg, abg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 834 | if (v.extractPalette(&fg, &sfg, &sbg, &abg)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | pal = new QStyleSheetPaletteData(fg, sfg, sbg, abg); never executed: pal = new QStyleSheetPaletteData(fg, sfg, sbg, abg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | QIcon icon; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | alignment = Qt::AlignCenter; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | QSize size; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | if (v.extractImage(&icon, &alignment, &size)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 841 | img = new QStyleSheetImageData(icon, alignment, size); never executed: img = new QStyleSheetImageData(icon, alignment, size); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 842 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 843 | int adj = -255; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 844 | hasFont = v.extractFont(&font, &adj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 845 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 846 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | if (object
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 848 | palette = QToolTip::palette(); never executed: palette = QToolTip::palette(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 851 | for (int i = 0; i < declarations.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | const Declaration& decl = declarations.at(i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | if (decl.d->propertyId == BorderImage
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | QString uri; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | QCss::TileMode horizStretch, vertStretch; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 856 | int cuts[4]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | decl.borderImageValue(&uri, cuts, &horizStretch, &vertStretch); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | if (uri.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | if (bd
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | bd->bi->pixmap = QPixmap(); never executed: bd->bi->pixmap = QPixmap(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | if (!bd
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | bd = new QStyleSheetBorderData; never executed: bd = new QStyleSheetBorderData; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | if (!bd->bi
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | bd->bi = new QStyleSheetBorderImageData; never executed: bd->bi = new QStyleSheetBorderImageData; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | QStyleSheetBorderImageData *bi = bd->bi; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | bi->pixmap = QPixmap(uri); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | bi->cuts[i] = cuts[i]; never executed: bi->cuts[i] = cuts[i]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | bi->horizStretch = horizStretch; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | bi->vertStretch = vertStretch; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | } else if (decl.d->propertyId == QtBackgroundRole
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | if (bg
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | int role = decl.d->values.at(0).variant.toInt(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | if (role >= Value_FirstColorRole
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | defaultBackground = palette.color((QPalette::ColorRole)(role-Value_FirstColorRole)); never executed: defaultBackground = palette.color((QPalette::ColorRole)(role-Value_FirstColorRole)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 881 | } never executed: else if (decl.d->property.startsWith(QLatin1String("qproperty-"), Qt::CaseInsensitive)end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 882 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | } never executed: else if (decl.d->propertyId == UnknownPropertyend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | bool knownStyleHint = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | for (int i = 0; i < numKnownStyleHints
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 886 | QLatin1String styleHint(knownStyleHints[i]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | if (decl.d->property.compare(styleHint) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 888 | QString hintName = QString(styleHint); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | QVariant hintValue; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 890 | if (hintName.endsWith(QLatin1String("alignment"))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | hintValue = (int) decl.alignmentValue(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | } never executed: else if (hintName.endsWith(QLatin1String("color"))end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 893 | hintValue = (int) decl.colorValue().rgba(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | } never executed: else if (hintName.endsWith(QLatin1String("size"))end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | hintValue = decl.sizeValue(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | } never executed: else if (hintName.endsWith(QLatin1String("icon"))end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | hintValue = decl.iconValue(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 898 | } never executed: else if (hintName == QLatin1String("button-layout")end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 899 | && decl.d->values.count() != 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 900 | hintValue = subControlLayout(decl.d->values.at(0).variant.toString()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 901 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 902 | int integer; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 903 | decl.intValue(&integer); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 904 | hintValue = integer; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 905 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 906 | styleHints[decl.d->property] = hintValue; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 907 | knownStyleHint = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 908 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 909 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 910 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 911 | if (!knownStyleHint
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 912 | QMessageLogger(__FILE__, 1001, __PRETTY_FUNCTION__).debug("Unknown property %s", QString(decl.d->property).toLocal8Bit().constData()); never executed: QMessageLogger(__FILE__, 1001, __PRETTY_FUNCTION__).debug("Unknown property %s", QString(decl.d->property).toLocal8Bit().constData()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 913 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 914 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 915 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 916 | if (hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 917 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 918 | QStyleSheetStyle *style = const_cast<QStyleSheetStyle *>(globalStyleSheetStyle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 919 | if (!style
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 920 | style = qobject_cast<QStyleSheetStyle *>(widget->style()); never executed: style = qobject_cast<QStyleSheetStyle *>(widget->style()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 921 | if (style
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 922 | fixupBorder(style->nativeFrameWidth(widget)); never executed: fixupBorder(style->nativeFrameWidth(widget)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 923 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 924 | if (border()->hasBorderImage()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 925 | defaultBackground = QBrush(); never executed: defaultBackground = QBrush(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 926 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 927 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 928 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 929 | QRect QRenderRule::borderRect(const QRect& r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 930 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 931 | if (!hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 932 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 933 | const int* m = box()->margins; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 934 | return never executed: r.adjusted(m[LeftEdge], m[TopEdge], -m[RightEdge], -m[BottomEdge]);return r.adjusted(m[LeftEdge], m[TopEdge], -m[RightEdge], -m[BottomEdge]);never executed: return r.adjusted(m[LeftEdge], m[TopEdge], -m[RightEdge], -m[BottomEdge]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 935 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 936 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 937 | QRect QRenderRule::outlineRect(const QRect& r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 938 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 939 | QRect br = borderRect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 940 | if (!hasOutline()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 941 | return never executed: br;return br;never executed: return br; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 942 | const int *b = outline()->borders; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 943 | return never executed: r.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);return r.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);never executed: return r.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 944 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 945 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 946 | QRect QRenderRule::paddingRect(const QRect& r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 947 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 948 | QRect br = borderRect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 949 | if (!hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 950 | return never executed: br;return br;never executed: return br; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 951 | const int *b = border()->borders; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 952 | return never executed: br.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);return br.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]);never executed: return br.adjusted(b[LeftEdge], b[TopEdge], -b[RightEdge], -b[BottomEdge]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 953 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 954 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 955 | QRect QRenderRule::contentsRect(const QRect& r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 956 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 957 | QRect pr = paddingRect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 958 | if (!hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 959 | return never executed: pr;return pr;never executed: return pr; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 960 | const int *p = box()->paddings; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 961 | return never executed: pr.adjusted(p[LeftEdge], p[TopEdge], -p[RightEdge], -p[BottomEdge]);return pr.adjusted(p[LeftEdge], p[TopEdge], -p[RightEdge], -p[BottomEdge]);never executed: return pr.adjusted(p[LeftEdge], p[TopEdge], -p[RightEdge], -p[BottomEdge]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 962 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 963 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 964 | QRect QRenderRule::boxRect(const QRect& cr, int flags) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 965 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 966 | QRect r = cr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 967 | if (hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 968 | if (flags & Margin
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 969 | const int *m = box()->margins; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 970 | r.adjust(-m[LeftEdge], -m[TopEdge], m[RightEdge], m[BottomEdge]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 971 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 972 | if (flags & Padding
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 973 | const int *p = box()->paddings; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 974 | r.adjust(-p[LeftEdge], -p[TopEdge], p[RightEdge], p[BottomEdge]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 975 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 976 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 977 | if (hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 978 | const int *b = border()->borders; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 979 | r.adjust(-b[LeftEdge], -b[TopEdge], b[RightEdge], b[BottomEdge]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 980 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 981 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 982 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 983 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 984 | QSize QRenderRule::boxSize(const QSize &cs, int flags) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 985 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 986 | QSize bs = boxRect(QRect(QPoint(0, 0), cs), flags).size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 987 | if (cs.width() < 0
never executed: bs.setWidth(-1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 988 | if (cs.height() < 0
never executed: bs.setHeight(-1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 989 | return never executed: bs;return bs;never executed: return bs; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 990 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 991 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 992 | void QRenderRule::fixupBorder(int nativeWidth) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 993 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 994 | if (bd == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 995 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 996 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 997 | if (!bd->hasBorderImage()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 998 | bd->bi = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 999 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1000 | QBrush color = pal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1001 | const bool hasRadius = bd->radii[0].isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1002 | || bd->radii[2].isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1003 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1004 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1005 | bd->styles[i] = BorderStyle_None; never executed: bd->styles[i] = BorderStyle_None; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1006 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1007 | switch (bd->styles[i]) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1008 | case never executed: BorderStyle_None:case BorderStyle_None:never executed: case BorderStyle_None: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1009 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1010 | bd->colors[i] = QBrush(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1011 | bd->borders[i] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1012 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1013 | case never executed: BorderStyle_Native:case BorderStyle_Native:never executed: case BorderStyle_Native: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1014 | if (bd->borders[i] == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1015 | bd->borders[i] = nativeWidth; never executed: bd->borders[i] = nativeWidth; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1016 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1017 | default never executed: :default:never executed: default:code before this statement never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1018 | if (bd->colors[i].style() == Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1019 | bd->colors[i] = color; never executed: bd->colors[i] = color; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1020 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1021 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1022 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1024 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1025 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1026 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1028 | QStyleSheetBorderImageData *bi = bd->bi; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1029 | if (bi->cuts[0] == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1030 | for (int i = 0; i < 4
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1031 | bi->cuts[i] = int(border()->borders[i]); never executed: bi->cuts[i] = int(border()->borders[i]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1032 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1033 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1034 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1035 | void QRenderRule::drawBorderImage(QPainter *p, const QRect& rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1036 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1037 | setClip(p, rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1038 | static const Qt::TileRule tileMode2TileRule[] = { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1039 | Qt::StretchTile, Qt::RoundTile, Qt::StretchTile, Qt::RepeatTile, Qt::StretchTile }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1041 | const QStyleSheetBorderImageData *borderImageData = border()->borderImage(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1042 | const int *targetBorders = border()->borders; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1043 | const int *sourceBorders = borderImageData->cuts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1044 | QMargins sourceMargins(sourceBorders[LeftEdge], sourceBorders[TopEdge], | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1045 | sourceBorders[RightEdge], sourceBorders[BottomEdge]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1046 | QMargins targetMargins(targetBorders[LeftEdge], targetBorders[TopEdge], | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1047 | targetBorders[RightEdge], targetBorders[BottomEdge]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1048 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1049 | bool wasSmoothPixmapTransform = p->renderHints() & QPainter::SmoothPixmapTransform; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1050 | p->setRenderHint(QPainter::SmoothPixmapTransform); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1051 | qDrawBorderPixmap(p, rect, targetMargins, borderImageData->pixmap, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1052 | QRect(QPoint(), borderImageData->pixmap.size()), sourceMargins, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1053 | QTileRules(tileMode2TileRule[borderImageData->horizStretch], tileMode2TileRule[borderImageData->vertStretch])); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1054 | p->setRenderHint(QPainter::SmoothPixmapTransform, wasSmoothPixmapTransform); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1055 | unsetClip(p); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1056 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1057 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1058 | QRect QRenderRule::originRect(const QRect &rect, Origin origin) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1059 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1060 | switch (origin) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1061 | case never executed: Origin_Padding:case Origin_Padding:never executed: case Origin_Padding: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1062 | return never executed: paddingRect(rect);return paddingRect(rect);never executed: return paddingRect(rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1063 | case never executed: Origin_Border:case Origin_Border:never executed: case Origin_Border: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1064 | return never executed: borderRect(rect);return borderRect(rect);never executed: return borderRect(rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1065 | case never executed: Origin_Content:case Origin_Content:never executed: case Origin_Content: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1066 | return never executed: contentsRect(rect);return contentsRect(rect);never executed: return contentsRect(rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1067 | case never executed: Origin_Margin:case Origin_Margin:never executed: case Origin_Margin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1068 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1069 | return never executed: rect;return rect;never executed: return rect; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1070 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1071 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1072 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1073 | void QRenderRule::drawBackgroundImage(QPainter *p, const QRect &rect, QPoint off) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1074 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1075 | if (!hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1076 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1077 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1078 | const QPixmap& bgp = background()->pixmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1079 | if (bgp.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1080 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1081 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1082 | setClip(p, borderRect(rect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1083 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1084 | if (background()->origin != background()->clip
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1085 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1086 | p->setClipRect(originRect(rect, background()->clip), Qt::IntersectClip); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1087 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1088 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1089 | if (background()->attachment == Attachment_Fixed
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1090 | off = QPoint(0, 0); never executed: off = QPoint(0, 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1091 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1092 | QRect r = originRect(rect, background()->origin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1093 | QRect aligned = QStyle::alignedRect(Qt::LeftToRight, background()->position, bgp.size(), r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1094 | QRect inter = aligned.translated(-off).intersected(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1095 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1096 | switch (background()->repeat) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1097 | case never executed: Repeat_Y:case Repeat_Y:never executed: case Repeat_Y: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1098 | p->drawTiledPixmap(inter.x(), r.y(), inter.width(), r.height(), bgp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1099 | inter.x() - aligned.x() + off.x(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1100 | bgp.height() - int(aligned.y() - r.y()) % bgp.height() + off.y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1101 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1102 | case never executed: Repeat_X:case Repeat_X:never executed: case Repeat_X: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1103 | p->drawTiledPixmap(r.x(), inter.y(), r.width(), inter.height(), bgp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1104 | bgp.width() - int(aligned.x() - r.x())%bgp.width() + off.x(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1105 | inter.y() - aligned.y() + off.y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1106 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1107 | case never executed: Repeat_XY:case Repeat_XY:never executed: case Repeat_XY: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1108 | p->drawTiledPixmap(r, bgp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1109 | QPoint(bgp.width() - int(aligned.x() - r.x())% bgp.width() + off.x(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1110 | bgp.height() - int(aligned.y() - r.y())%bgp.height() + off.y())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1111 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1112 | case never executed: Repeat_None:case Repeat_None:never executed: case Repeat_None: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1113 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1114 | p->drawPixmap(inter.x(), inter.y(), bgp, inter.x() - aligned.x() + off.x(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1115 | inter.y() - aligned.y() + off.y(), inter.width(), inter.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1116 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1117 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1118 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1119 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1120 | if (background()->origin != background()->clip
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1121 | p->restore(); never executed: p->restore(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1123 | unsetClip(p); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1124 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1125 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1126 | void QRenderRule::drawOutline(QPainter *p, const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1127 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1128 | if (!hasOutline()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1129 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1130 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1131 | bool wasAntialiased = p->renderHints() & QPainter::Antialiasing; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1132 | p->setRenderHint(QPainter::Antialiasing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1133 | qDrawBorder(p, rect, ou->styles, ou->borders, ou->colors, ou->radii); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1134 | p->setRenderHint(QPainter::Antialiasing, wasAntialiased); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1135 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1136 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1137 | void QRenderRule::drawBorder(QPainter *p, const QRect& rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1138 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1139 | if (!hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1140 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1141 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1142 | if (border()->hasBorderImage()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1143 | drawBorderImage(p, rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1144 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1145 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1147 | bool wasAntialiased = p->renderHints() & QPainter::Antialiasing; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1148 | p->setRenderHint(QPainter::Antialiasing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1149 | qDrawBorder(p, rect, bd->styles, bd->borders, bd->colors, bd->radii); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1150 | p->setRenderHint(QPainter::Antialiasing, wasAntialiased); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1151 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1152 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1153 | QPainterPath QRenderRule::borderClip(QRect r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1154 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1155 | if (!hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1156 | return never executed: QPainterPath();return QPainterPath();never executed: return QPainterPath(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1157 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1158 | QSize tlr, trr, blr, brr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1159 | qNormalizeRadii(r, bd->radii, &tlr, &trr, &blr, &brr); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1160 | if (tlr.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1161 | return never executed: QPainterPath();return QPainterPath();never executed: return QPainterPath(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1163 | const QRectF rect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1164 | const int *borders = border()->borders; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1165 | QPainterPath path; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1166 | qreal curY = rect.y() + borders[TopEdge]/2.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1167 | path.moveTo(rect.x() + tlr.width(), curY); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1168 | path.lineTo(rect.right() - trr.width(), curY); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1169 | qreal curX = rect.right() - borders[RightEdge]/2.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1170 | path.arcTo(curX - 2*trr.width() + borders[RightEdge], curY, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1171 | trr.width()*2 - borders[RightEdge], trr.height()*2 - borders[TopEdge], 90, -90); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1172 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1173 | path.lineTo(curX, rect.bottom() - brr.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1174 | curY = rect.bottom() - borders[BottomEdge]/2.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1175 | path.arcTo(curX - 2*brr.width() + borders[RightEdge], curY - 2*brr.height() + borders[BottomEdge], | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1176 | brr.width()*2 - borders[RightEdge], brr.height()*2 - borders[BottomEdge], 0, -90); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1178 | path.lineTo(rect.x() + blr.width(), curY); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1179 | curX = rect.left() + borders[LeftEdge]/2.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1180 | path.arcTo(curX, rect.bottom() - 2*blr.height() + borders[BottomEdge]/2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1181 | blr.width()*2 - borders[LeftEdge], blr.height()*2 - borders[BottomEdge], 270, -90); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1182 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1183 | path.lineTo(curX, rect.top() + tlr.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1184 | path.arcTo(curX, rect.top() + borders[TopEdge]/2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1185 | tlr.width()*2 - borders[LeftEdge], tlr.height()*2 - borders[TopEdge], 180, -90); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1186 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1187 | path.closeSubpath(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1188 | return never executed: path;return path;never executed: return path; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1189 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1194 | void QRenderRule::setClip(QPainter *p, const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1195 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1196 | if (clipset++
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1197 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1198 | clipPath = borderClip(rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1199 | if (!clipPath.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1200 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1201 | p->setClipPath(clipPath, Qt::IntersectClip); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1202 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1203 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1204 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1205 | void QRenderRule::unsetClip(QPainter *p) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1206 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1207 | if (--
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1208 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1209 | if (!clipPath.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1210 | p->restore(); never executed: p->restore(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1211 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1212 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1213 | void QRenderRule::drawBackground(QPainter *p, const QRect& rect, const QPoint& off) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1214 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1215 | QBrush brush = hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1216 | if (brush.style() == Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1217 | brush = defaultBackground; never executed: brush = defaultBackground; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1218 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1219 | if (brush.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1220 | Origin origin = hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1222 | const QPainterPath &borderPath = borderClip(originRect(rect, origin)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1223 | if (!borderPath.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1224 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1225 | bool wasAntialiased = p->renderHints() & QPainter::Antialiasing; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1226 | p->setRenderHint(QPainter::Antialiasing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1227 | p->fillPath(borderPath, brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1228 | p->setRenderHint(QPainter::Antialiasing, wasAntialiased); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1229 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1230 | p->fillRect(originRect(rect, origin), brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1231 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1232 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1233 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1234 | drawBackgroundImage(p, rect, off); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1235 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1236 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1237 | void QRenderRule::drawFrame(QPainter *p, const QRect& rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1238 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1239 | drawBackground(p, rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1240 | if (hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1241 | drawBorder(p, borderRect(rect)); never executed: drawBorder(p, borderRect(rect)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1242 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1243 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1244 | void QRenderRule::drawImage(QPainter *p, const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1245 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1246 | if (!hasImage()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1247 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1248 | img->icon.paint(p, rect, img->alignment); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1249 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1250 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1251 | void QRenderRule::drawRule(QPainter *p, const QRect& rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1252 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1253 | drawFrame(p, rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1254 | drawImage(p, contentsRect(rect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1255 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1257 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1258 | void QRenderRule::configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette::ColorRole br) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1259 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1260 | if (bg
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1261 | if (br != QPalette::NoRole
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1262 | p->setBrush(br, bg->brush); never executed: p->setBrush(br, bg->brush); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1263 | p->setBrush(QPalette::Window, bg->brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1264 | if (bg->brush.style() == Qt::SolidPattern
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1265 | p->setBrush(QPalette::Light, bg->brush.color().lighter(115)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1266 | p->setBrush(QPalette::Midlight, bg->brush.color().lighter(107)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1267 | p->setBrush(QPalette::Dark, bg->brush.color().darker(150)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1268 | p->setBrush(QPalette::Shadow, bg->brush.color().darker(300)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1269 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1270 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1272 | if (!hasPalette()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1273 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1275 | if (pal->foreground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1276 | if (fr != QPalette::NoRole
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1277 | p->setBrush(fr, pal->foreground); never executed: p->setBrush(fr, pal->foreground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1278 | p->setBrush(QPalette::WindowText, pal->foreground); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1279 | p->setBrush(QPalette::Text, pal->foreground); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1280 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1281 | if (pal->selectionBackground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1282 | p->setBrush(QPalette::Highlight, pal->selectionBackground); never executed: p->setBrush(QPalette::Highlight, pal->selectionBackground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1283 | if (pal->selectionForeground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1284 | p->setBrush(QPalette::HighlightedText, pal->selectionForeground); never executed: p->setBrush(QPalette::HighlightedText, pal->selectionForeground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1285 | if (pal->alternateBackground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1286 | p->setBrush(QPalette::AlternateBase, pal->alternateBackground); never executed: p->setBrush(QPalette::AlternateBase, pal->alternateBackground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1287 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1288 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1289 | void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const QWidget *w, bool embedded) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1290 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1291 | if (bg
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1292 | p->setBrush(cg, QPalette::Base, bg->brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1293 | p->setBrush(cg, QPalette::Button, bg->brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1294 | p->setBrush(cg, w->backgroundRole(), bg->brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1295 | p->setBrush(cg, QPalette::Window, bg->brush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1296 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1298 | if (embedded
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1299 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1300 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1301 | if ((hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1302 | || (hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1303 | p->setBrush(cg, w->backgroundRole(), Qt::NoBrush); never executed: p->setBrush(cg, w->backgroundRole(), Qt::NoBrush); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1304 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1305 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1306 | if (!hasPalette()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1307 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1308 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1309 | if (pal->foreground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1310 | p->setBrush(cg, QPalette::ButtonText, pal->foreground); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1311 | p->setBrush(cg, w->foregroundRole(), pal->foreground); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1312 | p->setBrush(cg, QPalette::WindowText, pal->foreground); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1313 | p->setBrush(cg, QPalette::Text, pal->foreground); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1314 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1315 | if (pal->selectionBackground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1316 | p->setBrush(cg, QPalette::Highlight, pal->selectionBackground); never executed: p->setBrush(cg, QPalette::Highlight, pal->selectionBackground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1317 | if (pal->selectionForeground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1318 | p->setBrush(cg, QPalette::HighlightedText, pal->selectionForeground); never executed: p->setBrush(cg, QPalette::HighlightedText, pal->selectionForeground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1319 | if (pal->alternateBackground.style() != Qt::NoBrush
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1320 | p->setBrush(cg, QPalette::AlternateBase, pal->alternateBackground); never executed: p->setBrush(cg, QPalette::AlternateBase, pal->alternateBackground); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1321 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1322 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1326 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1327 | static inline QObject *parentObject(const QObject *obj) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1328 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1329 | if (qobject_cast<const QLabel *>(obj)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1330 | QObject *p = qvariant_cast<QObject *>(obj->property("_q_stylesheet_parent")); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1331 | if (p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1332 | return never executed: p;return p;never executed: return p; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1333 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1334 | return never executed: obj->parent();return obj->parent();never executed: return obj->parent(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1335 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1336 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1337 | class QStyleSheetStyleSelector : public StyleSelector | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1338 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1339 | public: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1340 | QStyleSheetStyleSelector() { } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1341 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1342 | QStringList nodeNames(NodePtr node) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1343 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1344 | if (isNullNode(node)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1345 | return never executed: QStringList();return QStringList();never executed: return QStringList(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1346 | const QMetaObject *metaObject = (static_cast<QObject *>(node.ptr))->metaObject(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1348 | if (qstrcmp(metaObject->className(), "QTipLabel") == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1349 | return never executed: QStringList(QLatin1String("QToolTip"));return QStringList(QLatin1String("QToolTip"));never executed: return QStringList(QLatin1String("QToolTip")); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1350 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1351 | QStringList result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1352 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1353 | result += QString::fromLatin1(metaObject->className()).replace(QLatin1Char(':'), QLatin1Char('-')); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1354 | metaObject = metaObject->superClass(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1355 | } never executed: while (metaObject != 0end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1356 | return never executed: result;return result;never executed: return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1357 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1358 | QString attribute(NodePtr node, const QString& name) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1359 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1360 | if (isNullNode(node)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1361 | return never executed: QString();return QString();never executed: return QString(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1363 | QHash<QString, QString> &cache = m_attributeCache[(static_cast<QObject *>(node.ptr))]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1364 | QHash<QString, QString>::const_iterator cacheIt = cache.constFind(name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1365 | if (cacheIt != cache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1366 | return never executed: cacheIt.value();return cacheIt.value();never executed: return cacheIt.value(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1367 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1368 | QObject *obj = (static_cast<QObject *>(node.ptr)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1369 | QVariant value = obj->property(name.toLatin1()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1370 | if (!value.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1371 | if (name == QLatin1String("class")
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1372 | QString className = QString::fromLatin1(obj->metaObject()->className()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1373 | if (className.contains(QLatin1Char(':'))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1374 | className.replace(QLatin1Char(':'), QLatin1Char('-')); never executed: className.replace(QLatin1Char(':'), QLatin1Char('-')); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1375 | cache[name] = className; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1376 | return never executed: className;return className;never executed: return className; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1377 | } else if (name == QLatin1String("style")
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1378 | QWidget *w = qobject_cast<QWidget *>(obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1379 | QStyleSheetStyle *proxy = w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1380 | if (proxy
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1381 | QString styleName = QString::fromLatin1(proxy->baseStyle()->metaObject()->className()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1382 | cache[name] = styleName; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1383 | return never executed: styleName;return styleName;never executed: return styleName; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1384 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1385 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1386 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1387 | QString valueStr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1388 | if(value.type() == QVariant::StringList
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1389 | valueStr = value.toStringList().join(QLatin1Char(' ')); never executed: valueStr = value.toStringList().join(QLatin1Char(' ')); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1390 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1391 | valueStr = value.toString(); never executed: valueStr = value.toString(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1392 | cache[name] = valueStr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1393 | return never executed: valueStr;return valueStr;never executed: return valueStr; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1394 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1395 | bool nodeNameEquals(NodePtr node, const QString& nodeName) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1396 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1397 | if (isNullNode(node)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1398 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1399 | const QMetaObject *metaObject = (static_cast<QObject *>(node.ptr))->metaObject(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1400 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1401 | if (qstrcmp(metaObject->className(), "QTipLabel") == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1402 | return never executed: nodeName == QLatin1String("QToolTip");return nodeName == QLatin1String("QToolTip");never executed: return nodeName == QLatin1String("QToolTip"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1404 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1405 | const ushort *uc = (const ushort *)nodeName.constData(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1406 | const ushort *e = uc + nodeName.length(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1407 | const uchar *c = (const uchar *)metaObject->className(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1408 | while (*
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1409 | ++uc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1410 | ++c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1411 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1412 | if (uc == e
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1413 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1414 | metaObject = metaObject->superClass(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1415 | } never executed: while (metaObject != 0end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1416 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1417 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1418 | bool hasAttributes(NodePtr) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1419 | { return never executed: true;return true;never executed: }return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1420 | QStringList nodeIds(NodePtr node) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1421 | { return never executed: isNullNode(node) ? QStringList() : QStringList((static_cast<QObject *>(node.ptr))->objectName());return isNullNode(node) ? QStringList() : QStringList((static_cast<QObject *>(node.ptr))->objectName());never executed: }return isNullNode(node) ? QStringList() : QStringList((static_cast<QObject *>(node.ptr))->objectName()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1422 | bool isNullNode(NodePtr node) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1423 | { return never executed: node.ptr == 0;return node.ptr == 0;never executed: }return node.ptr == 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1424 | NodePtr parentNode(NodePtr node) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1425 | { NodePtr n; n.ptr = isNullNode(node)
never executed: n;return n;never executed: }return n; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1426 | NodePtr previousSiblingNode(NodePtr) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1427 | { NodePtr n; n.ptr = 0; return never executed: n;return n;never executed: }return n; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1428 | NodePtr duplicateNode(NodePtr node) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1429 | { return never executed: node;return node;never executed: }return node; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1430 | void freeNode(NodePtr) const override | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1431 | { } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1432 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1433 | private: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1434 | mutable QHash<const QObject *, QHash<QString, QString> > m_attributeCache; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1435 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1436 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1437 | QVector<QCss::StyleRule> QStyleSheetStyle::styleRules(const QObject *obj) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1438 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1439 | QHash<const QObject *, QVector<StyleRule> >::const_iterator cacheIt = styleSheetCaches->styleRulesCache.constFind(obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1440 | if (cacheIt != styleSheetCaches->styleRulesCache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1441 | return never executed: cacheIt.value();return cacheIt.value();never executed: return cacheIt.value(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1443 | if (!initObject(obj)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1444 | return never executed: QVector<StyleRule>();return QVector<StyleRule>();never executed: return QVector<StyleRule>(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1445 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1446 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1447 | QStyleSheetStyleSelector styleSelector; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1449 | StyleSheet defaultSs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1450 | QHash<const void *, StyleSheet>::const_iterator defaultCacheIt = styleSheetCaches->styleSheetCache.constFind(baseStyle()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1451 | if (defaultCacheIt == styleSheetCaches->styleSheetCache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1452 | defaultSs = getDefaultStyleSheet(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1453 | QStyle *bs = baseStyle(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1454 | styleSheetCaches->styleSheetCache.insert(bs, defaultSs); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1455 | QObject::connect(bs, qFlagLocation("2""destroyed(QObject*)" "\0" __FILE__ ":" "1544"), styleSheetCaches, qFlagLocation("1""styleDestroyed(QObject*)" "\0" __FILE__ ":" "1544"), Qt::UniqueConnection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1456 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1457 | defaultSs = defaultCacheIt.value(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1458 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1459 | styleSelector.styleSheets += defaultSs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1460 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1461 | if (!(static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet().isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1462 | StyleSheet appSs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1463 | QHash<const void *, StyleSheet>::const_iterator appCacheIt = styleSheetCaches->styleSheetCache.constFind((static_cast<QApplication *>(QCoreApplication::instance()))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1464 | if (appCacheIt == styleSheetCaches->styleSheetCache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1465 | QString ss = (static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1466 | if (ss.startsWith(QLatin1String("file:///"))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1467 | ss.remove(0, 8); never executed: ss.remove(0, 8); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1468 | parser.init(ss, (static_cast<QApplication *>(QCoreApplication::instance()))->styleSheet() != ss); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1469 | if (__builtin_expect(!!(!parser.parse(&appSs)), false)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1470 | QMessageLogger(__FILE__, 1559, __PRETTY_FUNCTION__).warning("Could not parse application stylesheet"); never executed: QMessageLogger(__FILE__, 1559, __PRETTY_FUNCTION__).warning("Could not parse application stylesheet"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1471 | appSs.origin = StyleSheetOrigin_Inline; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1472 | appSs.depth = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1473 | styleSheetCaches->styleSheetCache.insert((static_cast<QApplication *>(QCoreApplication::instance())), appSs); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1474 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1475 | appSs = appCacheIt.value(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1476 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1477 | styleSelector.styleSheets += appSs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1478 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1480 | QVector<QCss::StyleSheet> objectSs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1481 | for (const QObject *o = obj; o
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1482 | QString styleSheet = o->property("styleSheet").toString(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1483 | if (styleSheet.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1484 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1485 | StyleSheet ss; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1486 | QHash<const void *, StyleSheet>::const_iterator objCacheIt = styleSheetCaches->styleSheetCache.constFind(o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1487 | if (objCacheIt == styleSheetCaches->styleSheetCache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1488 | parser.init(styleSheet); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1489 | if (!parser.parse(&ss)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1490 | parser.init(QLatin1String("* {") + styleSheet + QLatin1Char('}')); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1491 | if (__builtin_expect(!!(!parser.parse(&ss)), false)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1492 | QMessageLogger(__FILE__, 1581, __PRETTY_FUNCTION__).warning("Could not parse stylesheet of object %p", o); never executed: QMessageLogger(__FILE__, 1581, __PRETTY_FUNCTION__).warning("Could not parse stylesheet of object %p", o); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1493 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1494 | ss.origin = StyleSheetOrigin_Inline; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1495 | styleSheetCaches->styleSheetCache.insert(o, ss); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1496 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1497 | ss = objCacheIt.value(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1498 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1499 | objectSs.append(ss); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1500 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1502 | for (int i = 0; i < objectSs.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1503 | objectSs[i].depth = objectSs.count() - i + 2; never executed: objectSs[i].depth = objectSs.count() - i + 2; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1504 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1505 | styleSelector.styleSheets += objectSs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1506 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1507 | StyleSelector::NodePtr n; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1508 | n.ptr = const_cast<QObject *>(obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1509 | QVector<QCss::StyleRule> rules = styleSelector.styleRulesForNode(n); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1510 | styleSheetCaches->styleRulesCache.insert(obj, rules); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1511 | return never executed: rules;return rules;never executed: return rules; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1512 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1516 | static QVector<Declaration> declarations(const QVector<StyleRule> &styleRules, const QString &part, quint64 pseudoClass = PseudoClass_Unspecified) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1517 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1518 | QVector<Declaration> decls; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1519 | for (int i = 0; i < styleRules.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1520 | const Selector& selector = styleRules.at(i).selectors.at(0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1523 | if (part.compare(selector.pseudoElement(), Qt::CaseInsensitive) != 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1524 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1525 | quint64 negated = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1526 | quint64 cssClass = selector.pseudoClass(&negated); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1527 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1528 | || ((((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1529 | decls += styleRules.at(i).declarations; never executed: decls += styleRules.at(i).declarations; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1530 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1531 | return never executed: decls;return decls;never executed: return decls; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1532 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1534 | int QStyleSheetStyle::nativeFrameWidth(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1535 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1536 | QStyle *base = baseStyle(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1537 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1538 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1539 | if (qobject_cast<const QAbstractSpinBox *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1540 | return never executed: base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);never executed: return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1541 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1542 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1544 | if (qobject_cast<const QComboBox *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1545 | return never executed: base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);never executed: return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1547 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1549 | if (qobject_cast<const QMenu *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1550 | return never executed: base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w);return base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w);never executed: return base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1551 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1553 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1554 | if (qobject_cast<const QMenuBar *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1555 | return never executed: base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w);return base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w);never executed: return base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1556 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1557 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1558 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1559 | if (frame->frameShape() == QFrame::NoFrame
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1560 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1561 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1562 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1563 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1564 | if (qstrcmp(w->metaObject()->className(), "QTipLabel") == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1565 | return never executed: base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w);return base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w);never executed: return base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1567 | return never executed: base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w);return base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w);never executed: return base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1568 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1569 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1570 | static quint64 pseudoClass(QStyle::State state) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1571 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1572 | quint64 pc = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1573 | if (state & QStyle::State_Enabled
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1574 | pc |= PseudoClass_Enabled; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1575 | if (state & QStyle::State_MouseOver
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1576 | pc |= PseudoClass_Hover; never executed: pc |= PseudoClass_Hover; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1577 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1578 | pc |= PseudoClass_Disabled; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1579 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1580 | if (state & QStyle::State_Active
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1581 | pc |= PseudoClass_Active; never executed: pc |= PseudoClass_Active; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1582 | if (state & QStyle::State_Window
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1583 | pc |= PseudoClass_Window; never executed: pc |= PseudoClass_Window; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1584 | if (state & QStyle::State_Sunken
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1585 | pc |= PseudoClass_Pressed; never executed: pc |= PseudoClass_Pressed; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1586 | if (state & QStyle::State_HasFocus
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1587 | pc |= PseudoClass_Focus; never executed: pc |= PseudoClass_Focus; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1588 | if (state & QStyle::State_On
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1589 | pc |= (PseudoClass_On | PseudoClass_Checked); never executed: pc |= (PseudoClass_On | PseudoClass_Checked); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1590 | if (state & QStyle::State_Off
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1591 | pc |= (PseudoClass_Off | PseudoClass_Unchecked); never executed: pc |= (PseudoClass_Off | PseudoClass_Unchecked); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1592 | if (state & QStyle::State_NoChange
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1593 | pc |= PseudoClass_Indeterminate; never executed: pc |= PseudoClass_Indeterminate; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1594 | if (state & QStyle::State_Selected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1595 | pc |= PseudoClass_Selected; never executed: pc |= PseudoClass_Selected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1596 | if (state & QStyle::State_Horizontal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1597 | pc |= PseudoClass_Horizontal; never executed: pc |= PseudoClass_Horizontal; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1598 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1599 | pc |= PseudoClass_Vertical; never executed: pc |= PseudoClass_Vertical; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1600 | if (state & (QStyle::State_Open | QStyle::State_On | QStyle::State_Sunken)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1601 | pc |= PseudoClass_Open; never executed: pc |= PseudoClass_Open; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1602 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1603 | pc |= PseudoClass_Closed; never executed: pc |= PseudoClass_Closed; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1604 | if (state & QStyle::State_Children
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1605 | pc |= PseudoClass_Children; never executed: pc |= PseudoClass_Children; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1606 | if (state & QStyle::State_Sibling
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1607 | pc |= PseudoClass_Sibling; never executed: pc |= PseudoClass_Sibling; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1608 | if (state & QStyle::State_ReadOnly
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1609 | pc |= PseudoClass_ReadOnly; never executed: pc |= PseudoClass_ReadOnly; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1610 | if (state & QStyle::State_Item
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1611 | pc |= PseudoClass_Item; never executed: pc |= PseudoClass_Item; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1612 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1613 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1614 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1615 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1616 | return never executed: pc;return pc;never executed: return pc; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1617 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1618 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1619 | static void qt_check_if_internal_object(const QObject **obj, int *element) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1620 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1621 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1622 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1624 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1625 | if (*
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1626 | if ((*
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1627 | *element = PseudoElement_DockWidgetCloseButton; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1628 | } never executed: else if ((*end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1629 | *element = PseudoElement_DockWidgetFloatButton; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1630 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1631 | *obj = (*obj)->parent(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1632 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1633 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1634 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1635 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1636 | QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, int element, quint64 state) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1637 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1638 | qt_check_if_internal_object(&obj, &element); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1639 | QHash<quint64, QRenderRule> &cache = styleSheetCaches->renderRulesCache[obj][element]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1640 | QHash<quint64, QRenderRule>::const_iterator cacheIt = cache.constFind(state); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1641 | if (cacheIt != cache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1642 | return never executed: cacheIt.value();return cacheIt.value();never executed: return cacheIt.value(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1644 | if (!initObject(obj)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1645 | return never executed: QRenderRule();return QRenderRule();never executed: return QRenderRule(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1646 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1647 | quint64 stateMask = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1648 | const QVector<StyleRule> rules = styleRules(obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1649 | for (int i = 0; i < rules.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1650 | const Selector& selector = rules.at(i).selectors.at(0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1651 | quint64 negated = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1652 | stateMask |= selector.pseudoClass(&negated); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1653 | stateMask |= negated; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1654 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1655 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1656 | cacheIt = cache.constFind(state & stateMask); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1657 | if (cacheIt != cache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1658 | const QRenderRule &newRule = cacheIt.value(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1659 | cache[state] = newRule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1660 | return never executed: newRule;return newRule;never executed: return newRule; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1661 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1662 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1664 | const QString part = QLatin1String(knownPseudoElements[element].name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1665 | QVector<Declaration> decls = declarations(rules, part, state); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1666 | QRenderRule newRule(decls, obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1667 | cache[state] = newRule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1668 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1669 | cache[state&stateMask] = newRule; never executed: cache[state&stateMask] = newRule; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1670 | return never executed: newRule;return newRule;never executed: return newRule; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1671 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1673 | QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption *opt, int pseudoElement) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1674 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1675 | quint64 extraClass = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1676 | QStyle::State state = opt
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1677 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1678 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1679 | if (pseudoElement != PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1680 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1681 | QStyle::SubControl subControl = knownPseudoElements[pseudoElement].subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1682 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1683 | if (!(complex->activeSubControls & subControl)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1684 | state &= (QStyle::State_Enabled | QStyle::State_Horizontal | QStyle::State_HasFocus); never executed: state &= (QStyle::State_Enabled | QStyle::State_Horizontal | QStyle::State_HasFocus); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1685 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1687 | switch (pseudoElement) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1688 | case never executed: PseudoElement_ComboBoxDropDown:case PseudoElement_ComboBoxDropDown:never executed: case PseudoElement_ComboBoxDropDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1689 | case never executed: PseudoElement_ComboBoxArrow:case PseudoElement_ComboBoxArrow:never executed: case PseudoElement_ComboBoxArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1690 | state |= (complex->state & (QStyle::State_On|QStyle::State_ReadOnly)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1691 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1692 | case never executed: PseudoElement_SpinBoxUpButton:case PseudoElement_SpinBoxUpButton:never executed: case PseudoElement_SpinBoxUpButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1693 | case never executed: PseudoElement_SpinBoxDownButton:case PseudoElement_SpinBoxDownButton:never executed: case PseudoElement_SpinBoxDownButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1694 | case never executed: PseudoElement_SpinBoxUpArrow:case PseudoElement_SpinBoxUpArrow:never executed: case PseudoElement_SpinBoxUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1695 | case never executed: PseudoElement_SpinBoxDownArrow:case PseudoElement_SpinBoxDownArrow:never executed: case PseudoElement_SpinBoxDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1696 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1697 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1698 | bool on = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1699 | bool up = pseudoElement == PseudoElement_SpinBoxUpButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1700 | || pseudoElement == PseudoElement_SpinBoxUpArrow
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1701 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1702 | on = true; never executed: on = true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1703 | else if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1704 | on = true; never executed: on = true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1705 | state |= (on
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1706 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1707 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1708 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1709 | case never executed: PseudoElement_GroupBoxTitle:case PseudoElement_GroupBoxTitle:never executed: case PseudoElement_GroupBoxTitle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1710 | state |= (complex->state & (QStyle::State_MouseOver | QStyle::State_Sunken)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1711 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1712 | case never executed: PseudoElement_ToolButtonMenu:case PseudoElement_ToolButtonMenu:never executed: case PseudoElement_ToolButtonMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1713 | case never executed: PseudoElement_ToolButtonMenuArrow:case PseudoElement_ToolButtonMenuArrow:never executed: case PseudoElement_ToolButtonMenuArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1714 | case never executed: PseudoElement_ToolButtonDownArrow:case PseudoElement_ToolButtonDownArrow:never executed: case PseudoElement_ToolButtonDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1715 | state |= complex->state & QStyle::State_MouseOver; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1716 | if (complex->state & QStyle::State_Sunken
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1717 | complex->activeSubControls & QStyle::SC_ToolButtonMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1718 | state |= QStyle::State_Sunken; never executed: state |= QStyle::State_Sunken; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1719 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1720 | case never executed: PseudoElement_SliderGroove:case PseudoElement_SliderGroove:never executed: case PseudoElement_SliderGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1721 | state |= complex->state & QStyle::State_MouseOver; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1722 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1723 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1724 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1725 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1726 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1727 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1728 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1729 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1730 | if (pseudoElement == PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1731 | && (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1732 | && (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1733 | state |= QStyle::State_Sunken; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1734 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1735 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1736 | if (!combo->frame
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1737 | extraClass |= PseudoClass_Frameless; never executed: extraClass |= PseudoClass_Frameless; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1738 | if (!combo->editable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1739 | extraClass |= PseudoClass_ReadOnly; never executed: extraClass |= PseudoClass_ReadOnly; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1740 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1741 | extraClass |= PseudoClass_Editable; never executed: extraClass |= PseudoClass_Editable; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1742 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1743 | } else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1744 | if (!spin->frame
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1745 | extraClass |= PseudoClass_Frameless; never executed: extraClass |= PseudoClass_Frameless; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1746 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1747 | } never executed: else if (constend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1748 | if (gb->features & QStyleOptionFrame::Flat
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1749 | extraClass |= PseudoClass_Flat; never executed: extraClass |= PseudoClass_Flat; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1750 | if (gb->lineWidth == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1751 | extraClass |= PseudoClass_Frameless; never executed: extraClass |= PseudoClass_Frameless; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1752 | } never executed: else if (constend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1753 | if (tb->titleBarState & Qt::WindowMinimized
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1754 | extraClass |= PseudoClass_Minimized; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1755 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1756 | else if (tb->titleBarState & Qt::WindowMaximized
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1757 | extraClass |= PseudoClass_Maximized; never executed: extraClass |= PseudoClass_Maximized; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1758 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1759 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1761 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1762 | if (mi->menuItemType == QStyleOptionMenuItem::DefaultItem
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1763 | extraClass |= PseudoClass_Default; never executed: extraClass |= PseudoClass_Default; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1764 | if (mi->checkType == QStyleOptionMenuItem::Exclusive
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1765 | extraClass |= PseudoClass_Exclusive; never executed: extraClass |= PseudoClass_Exclusive; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1766 | else if (mi->checkType == QStyleOptionMenuItem::NonExclusive
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1767 | extraClass |= PseudoClass_NonExclusive; never executed: extraClass |= PseudoClass_NonExclusive; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1768 | if (mi->checkType != QStyleOptionMenuItem::NotCheckable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1769 | extraClass |= (
never executed: extraClass |= (mi->checked) ? (PseudoClass_On|PseudoClass_Checked) : (PseudoClass_Off|PseudoClass_Unchecked); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1770 | : (PseudoClass_Off|PseudoClass_Unchecked); never executed: extraClass |= (mi->checked) ? (PseudoClass_On|PseudoClass_Checked) : (PseudoClass_Off|PseudoClass_Unchecked); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1771 | } never executed: else if (constend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1772 | if (hdr->position == QStyleOptionHeader::OnlyOneSection
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1773 | extraClass |= PseudoClass_OnlyOne; never executed: extraClass |= PseudoClass_OnlyOne; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1774 | else if (hdr->position == QStyleOptionHeader::Beginning
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1775 | extraClass |= PseudoClass_First; never executed: extraClass |= PseudoClass_First; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1776 | else if (hdr->position == QStyleOptionHeader::End
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1777 | extraClass |= PseudoClass_Last; never executed: extraClass |= PseudoClass_Last; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1778 | else if (hdr->position == QStyleOptionHeader::Middle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1779 | extraClass |= PseudoClass_Middle; never executed: extraClass |= PseudoClass_Middle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1780 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1781 | if (hdr->selectedPosition == QStyleOptionHeader::NextAndPreviousAreSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1782 | extraClass |= (PseudoClass_NextSelected | PseudoClass_PreviousSelected); never executed: extraClass |= (PseudoClass_NextSelected | PseudoClass_PreviousSelected); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1783 | else if (hdr->selectedPosition == QStyleOptionHeader::NextIsSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1784 | extraClass |= PseudoClass_NextSelected; never executed: extraClass |= PseudoClass_NextSelected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1785 | else if (hdr->selectedPosition == QStyleOptionHeader::PreviousIsSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1786 | extraClass |= PseudoClass_PreviousSelected; never executed: extraClass |= PseudoClass_PreviousSelected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1787 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1788 | } never executed: else if (constend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1789 | switch (tab->shape) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1790 | case never executed: QTabBar::RoundedNorth:case QTabBar::RoundedNorth:never executed: case QTabBar::RoundedNorth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1791 | case never executed: QTabBar::TriangularNorth:case QTabBar::TriangularNorth:never executed: case QTabBar::TriangularNorth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1792 | extraClass |= PseudoClass_Top; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1793 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1794 | case never executed: QTabBar::RoundedSouth:case QTabBar::RoundedSouth:never executed: case QTabBar::RoundedSouth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1795 | case never executed: QTabBar::TriangularSouth:case QTabBar::TriangularSouth:never executed: case QTabBar::TriangularSouth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1796 | extraClass |= PseudoClass_Bottom; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1797 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1798 | case never executed: QTabBar::RoundedEast:case QTabBar::RoundedEast:never executed: case QTabBar::RoundedEast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1799 | case never executed: QTabBar::TriangularEast:case QTabBar::TriangularEast:never executed: case QTabBar::TriangularEast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1800 | extraClass |= PseudoClass_Left; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1801 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1802 | case never executed: QTabBar::RoundedWest:case QTabBar::RoundedWest:never executed: case QTabBar::RoundedWest: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1803 | case never executed: QTabBar::TriangularWest:case QTabBar::TriangularWest:never executed: case QTabBar::TriangularWest: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1804 | extraClass |= PseudoClass_Right; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1805 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1806 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1807 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1808 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1809 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1811 | } else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1812 | if (tab->position == QStyleOptionTab::OnlyOneTab
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1813 | extraClass |= PseudoClass_OnlyOne; never executed: extraClass |= PseudoClass_OnlyOne; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1814 | else if (tab->position == QStyleOptionTab::Beginning
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1815 | extraClass |= PseudoClass_First; never executed: extraClass |= PseudoClass_First; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1816 | else if (tab->position == QStyleOptionTab::End
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1817 | extraClass |= PseudoClass_Last; never executed: extraClass |= PseudoClass_Last; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1818 | else if (tab->position == QStyleOptionTab::Middle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1819 | extraClass |= PseudoClass_Middle; never executed: extraClass |= PseudoClass_Middle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1820 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1821 | if (tab->selectedPosition == QStyleOptionTab::NextIsSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1822 | extraClass |= PseudoClass_NextSelected; never executed: extraClass |= PseudoClass_NextSelected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1823 | else if (tab->selectedPosition == QStyleOptionTab::PreviousIsSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1824 | extraClass |= PseudoClass_PreviousSelected; never executed: extraClass |= PseudoClass_PreviousSelected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1825 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1826 | switch (tab->shape) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1827 | case never executed: QTabBar::RoundedNorth:case QTabBar::RoundedNorth:never executed: case QTabBar::RoundedNorth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1828 | case never executed: QTabBar::TriangularNorth:case QTabBar::TriangularNorth:never executed: case QTabBar::TriangularNorth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1829 | extraClass |= PseudoClass_Top; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1830 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1831 | case never executed: QTabBar::RoundedSouth:case QTabBar::RoundedSouth:never executed: case QTabBar::RoundedSouth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1832 | case never executed: QTabBar::TriangularSouth:case QTabBar::TriangularSouth:never executed: case QTabBar::TriangularSouth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1833 | extraClass |= PseudoClass_Bottom; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1834 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1835 | case never executed: QTabBar::RoundedEast:case QTabBar::RoundedEast:never executed: case QTabBar::RoundedEast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1836 | case never executed: QTabBar::TriangularEast:case QTabBar::TriangularEast:never executed: case QTabBar::TriangularEast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1837 | extraClass |= PseudoClass_Left; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1838 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1839 | case never executed: QTabBar::RoundedWest:case QTabBar::RoundedWest:never executed: case QTabBar::RoundedWest: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1840 | case never executed: QTabBar::TriangularWest:case QTabBar::TriangularWest:never executed: case QTabBar::TriangularWest: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1841 | extraClass |= PseudoClass_Right; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1842 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1843 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1844 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1845 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1846 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1847 | } else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1848 | if (btn->features & QStyleOptionButton::Flat
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1849 | extraClass |= PseudoClass_Flat; never executed: extraClass |= PseudoClass_Flat; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1850 | if (btn->features & QStyleOptionButton::DefaultButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1851 | extraClass |= PseudoClass_Default; never executed: extraClass |= PseudoClass_Default; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1852 | } never executed: else if (constend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1853 | if (frm->lineWidth == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1854 | extraClass |= PseudoClass_Frameless; never executed: extraClass |= PseudoClass_Frameless; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1855 | if (frm->features & QStyleOptionFrame::Flat
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1856 | extraClass |= PseudoClass_Flat; never executed: extraClass |= PseudoClass_Flat; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1857 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1858 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1859 | else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1860 | if (tb->toolBarArea == Qt::LeftToolBarArea
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1861 | extraClass |= PseudoClass_Left; never executed: extraClass |= PseudoClass_Left; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1862 | else if (tb->toolBarArea == Qt::RightToolBarArea
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1863 | extraClass |= PseudoClass_Right; never executed: extraClass |= PseudoClass_Right; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1864 | else if (tb->toolBarArea == Qt::TopToolBarArea
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1865 | extraClass |= PseudoClass_Top; never executed: extraClass |= PseudoClass_Top; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1866 | else if (tb->toolBarArea == Qt::BottomToolBarArea
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1867 | extraClass |= PseudoClass_Bottom; never executed: extraClass |= PseudoClass_Bottom; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1868 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1869 | if (tb->positionWithinLine == QStyleOptionToolBar::Beginning
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1870 | extraClass |= PseudoClass_First; never executed: extraClass |= PseudoClass_First; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1871 | else if (tb->positionWithinLine == QStyleOptionToolBar::Middle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1872 | extraClass |= PseudoClass_Middle; never executed: extraClass |= PseudoClass_Middle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1873 | else if (tb->positionWithinLine == QStyleOptionToolBar::End
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1874 | extraClass |= PseudoClass_Last; never executed: extraClass |= PseudoClass_Last; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1875 | else if (tb->positionWithinLine == QStyleOptionToolBar::OnlyOne
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1876 | extraClass |= PseudoClass_OnlyOne; never executed: extraClass |= PseudoClass_OnlyOne; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1877 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1878 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1879 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1880 | else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1881 | if (tb->position == QStyleOptionToolBox::OnlyOneTab
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1882 | extraClass |= PseudoClass_OnlyOne; never executed: extraClass |= PseudoClass_OnlyOne; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1883 | else if (tb->position == QStyleOptionToolBox::Beginning
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1884 | extraClass |= PseudoClass_First; never executed: extraClass |= PseudoClass_First; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1885 | else if (tb->position == QStyleOptionToolBox::End
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1886 | extraClass |= PseudoClass_Last; never executed: extraClass |= PseudoClass_Last; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1887 | else if (tb->position == QStyleOptionToolBox::Middle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1888 | extraClass |= PseudoClass_Middle; never executed: extraClass |= PseudoClass_Middle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1889 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1890 | if (tb->selectedPosition == QStyleOptionToolBox::NextIsSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1891 | extraClass |= PseudoClass_NextSelected; never executed: extraClass |= PseudoClass_NextSelected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1892 | else if (tb->selectedPosition == QStyleOptionToolBox::PreviousIsSelected
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1893 | extraClass |= PseudoClass_PreviousSelected; never executed: extraClass |= PseudoClass_PreviousSelected; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1894 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1895 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1896 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1897 | else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1898 | if (dw->verticalTitleBar
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1899 | extraClass |= PseudoClass_Vertical; never executed: extraClass |= PseudoClass_Vertical; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1900 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1901 | extraClass |= PseudoClass_Horizontal; never executed: extraClass |= PseudoClass_Horizontal; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1902 | if (dw->closable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1903 | extraClass |= PseudoClass_Closable; never executed: extraClass |= PseudoClass_Closable; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1904 | if (dw->floatable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1905 | extraClass |= PseudoClass_Floatable; never executed: extraClass |= PseudoClass_Floatable; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1906 | if (dw->movable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1907 | extraClass |= PseudoClass_Movable; never executed: extraClass |= PseudoClass_Movable; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1908 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1909 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1910 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1911 | else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1912 | if (vopt->features & QStyleOptionViewItem::Alternate
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1913 | extraClass |= PseudoClass_Alternate; never executed: extraClass |= PseudoClass_Alternate; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1914 | if (vopt->viewItemPosition == QStyleOptionViewItem::OnlyOne
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1915 | extraClass |= PseudoClass_OnlyOne; never executed: extraClass |= PseudoClass_OnlyOne; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1916 | else if (vopt->viewItemPosition == QStyleOptionViewItem::Beginning
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1917 | extraClass |= PseudoClass_First; never executed: extraClass |= PseudoClass_First; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1918 | else if (vopt->viewItemPosition == QStyleOptionViewItem::End
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1919 | extraClass |= PseudoClass_Last; never executed: extraClass |= PseudoClass_Last; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1920 | else if (vopt->viewItemPosition == QStyleOptionViewItem::Middle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1921 | extraClass |= PseudoClass_Middle; never executed: extraClass |= PseudoClass_Middle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1922 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1923 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1924 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1925 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1926 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1927 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1928 | state &= ~QStyle::State_Sunken; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1929 | if (lineEdit->hasFrame()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1930 | extraClass &= ~PseudoClass_Frameless; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1931 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1932 | extraClass |= PseudoClass_Frameless; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1933 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1934 | } else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1936 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1937 | if (frm->lineWidth() == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1938 | extraClass |= PseudoClass_Frameless; never executed: extraClass |= PseudoClass_Frameless; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1939 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1940 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1942 | return never executed: renderRule(obj, pseudoElement, pseudoClass(state) | extraClass);return renderRule(obj, pseudoElement, pseudoClass(state) | extraClass);never executed: return renderRule(obj, pseudoElement, pseudoClass(state) | extraClass); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1943 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1944 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1945 | bool QStyleSheetStyle::hasStyleRule(const QObject *obj, int part) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1946 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1947 | QHash<int, bool> &cache = styleSheetCaches->hasStyleRuleCache[obj]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1948 | QHash<int, bool>::const_iterator cacheIt = cache.constFind(part); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1949 | if (cacheIt != cache.constEnd()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1950 | return never executed: cacheIt.value();return cacheIt.value();never executed: return cacheIt.value(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1951 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1952 | if (!initObject(obj)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1953 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1954 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1955 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1956 | const QVector<StyleRule> &rules = styleRules(obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1957 | if (part == PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1958 | bool result = obj
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1959 | cache[part] = result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1960 | return never executed: result;return result;never executed: return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1961 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1963 | QString pseudoElement = QLatin1String(knownPseudoElements[part].name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1964 | for (int i = 0; i < rules.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1965 | const Selector& selector = rules.at(i).selectors.at(0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1966 | if (pseudoElement.compare(selector.pseudoElement(), Qt::CaseInsensitive) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1967 | cache[part] = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1968 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1969 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1970 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1971 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1972 | cache[part] = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1973 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1974 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1975 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1976 | static Origin defaultOrigin(int pe) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1977 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1978 | switch (pe) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1979 | case never executed: PseudoElement_ScrollBarAddPage:case PseudoElement_ScrollBarAddPage:never executed: case PseudoElement_ScrollBarAddPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1980 | case never executed: PseudoElement_ScrollBarSubPage:case PseudoElement_ScrollBarSubPage:never executed: case PseudoElement_ScrollBarSubPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1981 | case never executed: PseudoElement_ScrollBarAddLine:case PseudoElement_ScrollBarAddLine:never executed: case PseudoElement_ScrollBarAddLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1982 | case never executed: PseudoElement_ScrollBarSubLine:case PseudoElement_ScrollBarSubLine:never executed: case PseudoElement_ScrollBarSubLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1983 | case never executed: PseudoElement_ScrollBarFirst:case PseudoElement_ScrollBarFirst:never executed: case PseudoElement_ScrollBarFirst: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1984 | case never executed: PseudoElement_ScrollBarLast:case PseudoElement_ScrollBarLast:never executed: case PseudoElement_ScrollBarLast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1985 | case never executed: PseudoElement_GroupBoxTitle:case PseudoElement_GroupBoxTitle:never executed: case PseudoElement_GroupBoxTitle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1986 | case never executed: PseudoElement_GroupBoxIndicator:case PseudoElement_GroupBoxIndicator:never executed: case PseudoElement_GroupBoxIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1987 | case never executed: PseudoElement_ToolButtonMenu:case PseudoElement_ToolButtonMenu:never executed: case PseudoElement_ToolButtonMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1988 | case never executed: PseudoElement_SliderAddPage:case PseudoElement_SliderAddPage:never executed: case PseudoElement_SliderAddPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1989 | case never executed: PseudoElement_SliderSubPage:case PseudoElement_SliderSubPage:never executed: case PseudoElement_SliderSubPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1990 | return never executed: Origin_Border;return Origin_Border;never executed: return Origin_Border; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1991 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1992 | case never executed: PseudoElement_SpinBoxUpButton:case PseudoElement_SpinBoxUpButton:never executed: case PseudoElement_SpinBoxUpButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1993 | case never executed: PseudoElement_SpinBoxDownButton:case PseudoElement_SpinBoxDownButton:never executed: case PseudoElement_SpinBoxDownButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1994 | case never executed: PseudoElement_PushButtonMenuIndicator:case PseudoElement_PushButtonMenuIndicator:never executed: case PseudoElement_PushButtonMenuIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1995 | case never executed: PseudoElement_ComboBoxDropDown:case PseudoElement_ComboBoxDropDown:never executed: case PseudoElement_ComboBoxDropDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1996 | case never executed: PseudoElement_ToolButtonDownArrow:case PseudoElement_ToolButtonDownArrow:never executed: case PseudoElement_ToolButtonDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1997 | case never executed: PseudoElement_MenuCheckMark:case PseudoElement_MenuCheckMark:never executed: case PseudoElement_MenuCheckMark: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1998 | case never executed: PseudoElement_MenuIcon:case PseudoElement_MenuIcon:never executed: case PseudoElement_MenuIcon: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1999 | case never executed: PseudoElement_MenuRightArrow:case PseudoElement_MenuRightArrow:never executed: case PseudoElement_MenuRightArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2000 | return never executed: Origin_Padding;return Origin_Padding;never executed: return Origin_Padding; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2001 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2002 | case never executed: PseudoElement_Indicator:case PseudoElement_Indicator:never executed: case PseudoElement_Indicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2003 | case never executed: PseudoElement_ExclusiveIndicator:case PseudoElement_ExclusiveIndicator:never executed: case PseudoElement_ExclusiveIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2004 | case never executed: PseudoElement_ComboBoxArrow:case PseudoElement_ComboBoxArrow:never executed: case PseudoElement_ComboBoxArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2005 | case never executed: PseudoElement_ScrollBarSlider:case PseudoElement_ScrollBarSlider:never executed: case PseudoElement_ScrollBarSlider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2006 | case never executed: PseudoElement_ScrollBarUpArrow:case PseudoElement_ScrollBarUpArrow:never executed: case PseudoElement_ScrollBarUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2007 | case never executed: PseudoElement_ScrollBarDownArrow:case PseudoElement_ScrollBarDownArrow:never executed: case PseudoElement_ScrollBarDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2008 | case never executed: PseudoElement_ScrollBarLeftArrow:case PseudoElement_ScrollBarLeftArrow:never executed: case PseudoElement_ScrollBarLeftArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2009 | case never executed: PseudoElement_ScrollBarRightArrow:case PseudoElement_ScrollBarRightArrow:never executed: case PseudoElement_ScrollBarRightArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2010 | case never executed: PseudoElement_SpinBoxUpArrow:case PseudoElement_SpinBoxUpArrow:never executed: case PseudoElement_SpinBoxUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2011 | case never executed: PseudoElement_SpinBoxDownArrow:case PseudoElement_SpinBoxDownArrow:never executed: case PseudoElement_SpinBoxDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2012 | case never executed: PseudoElement_ToolButtonMenuArrow:case PseudoElement_ToolButtonMenuArrow:never executed: case PseudoElement_ToolButtonMenuArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2013 | case never executed: PseudoElement_HeaderViewUpArrow:case PseudoElement_HeaderViewUpArrow:never executed: case PseudoElement_HeaderViewUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2014 | case never executed: PseudoElement_HeaderViewDownArrow:case PseudoElement_HeaderViewDownArrow:never executed: case PseudoElement_HeaderViewDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2015 | case never executed: PseudoElement_SliderGroove:case PseudoElement_SliderGroove:never executed: case PseudoElement_SliderGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2016 | case never executed: PseudoElement_SliderHandle:case PseudoElement_SliderHandle:never executed: case PseudoElement_SliderHandle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2017 | return never executed: Origin_Content;return Origin_Content;never executed: return Origin_Content; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2018 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2019 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2020 | return never executed: Origin_Margin;return Origin_Margin;never executed: return Origin_Margin; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2021 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2022 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2024 | static Qt::Alignment defaultPosition(int pe) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2025 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2026 | switch (pe) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2027 | case never executed: PseudoElement_Indicator:case PseudoElement_Indicator:never executed: case PseudoElement_Indicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2028 | case never executed: PseudoElement_ExclusiveIndicator:case PseudoElement_ExclusiveIndicator:never executed: case PseudoElement_ExclusiveIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2029 | case never executed: PseudoElement_MenuCheckMark:case PseudoElement_MenuCheckMark:never executed: case PseudoElement_MenuCheckMark: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2030 | case never executed: PseudoElement_MenuIcon:case PseudoElement_MenuIcon:never executed: case PseudoElement_MenuIcon: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2031 | return never executed: Qt::AlignLeft | Qt::AlignVCenter;return Qt::AlignLeft | Qt::AlignVCenter;never executed: return Qt::AlignLeft | Qt::AlignVCenter; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2032 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2033 | case never executed: PseudoElement_ScrollBarAddLine:case PseudoElement_ScrollBarAddLine:never executed: case PseudoElement_ScrollBarAddLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2034 | case never executed: PseudoElement_ScrollBarLast:case PseudoElement_ScrollBarLast:never executed: case PseudoElement_ScrollBarLast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2035 | case never executed: PseudoElement_SpinBoxDownButton:case PseudoElement_SpinBoxDownButton:never executed: case PseudoElement_SpinBoxDownButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2036 | case never executed: PseudoElement_PushButtonMenuIndicator:case PseudoElement_PushButtonMenuIndicator:never executed: case PseudoElement_PushButtonMenuIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2037 | case never executed: PseudoElement_ToolButtonDownArrow:case PseudoElement_ToolButtonDownArrow:never executed: case PseudoElement_ToolButtonDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2038 | return never executed: Qt::AlignRight | Qt::AlignBottom;return Qt::AlignRight | Qt::AlignBottom;never executed: return Qt::AlignRight | Qt::AlignBottom; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2039 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2040 | case never executed: PseudoElement_ScrollBarSubLine:case PseudoElement_ScrollBarSubLine:never executed: case PseudoElement_ScrollBarSubLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2041 | case never executed: PseudoElement_ScrollBarFirst:case PseudoElement_ScrollBarFirst:never executed: case PseudoElement_ScrollBarFirst: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2042 | case never executed: PseudoElement_SpinBoxUpButton:case PseudoElement_SpinBoxUpButton:never executed: case PseudoElement_SpinBoxUpButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2043 | case never executed: PseudoElement_ComboBoxDropDown:case PseudoElement_ComboBoxDropDown:never executed: case PseudoElement_ComboBoxDropDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2044 | case never executed: PseudoElement_ToolButtonMenu:case PseudoElement_ToolButtonMenu:never executed: case PseudoElement_ToolButtonMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2045 | case never executed: PseudoElement_DockWidgetCloseButton:case PseudoElement_DockWidgetCloseButton:never executed: case PseudoElement_DockWidgetCloseButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2046 | case never executed: PseudoElement_DockWidgetFloatButton:case PseudoElement_DockWidgetFloatButton:never executed: case PseudoElement_DockWidgetFloatButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2047 | return never executed: Qt::AlignRight | Qt::AlignTop;return Qt::AlignRight | Qt::AlignTop;never executed: return Qt::AlignRight | Qt::AlignTop; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2048 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2049 | case never executed: PseudoElement_ScrollBarUpArrow:case PseudoElement_ScrollBarUpArrow:never executed: case PseudoElement_ScrollBarUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2050 | case never executed: PseudoElement_ScrollBarDownArrow:case PseudoElement_ScrollBarDownArrow:never executed: case PseudoElement_ScrollBarDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2051 | case never executed: PseudoElement_ScrollBarLeftArrow:case PseudoElement_ScrollBarLeftArrow:never executed: case PseudoElement_ScrollBarLeftArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2052 | case never executed: PseudoElement_ScrollBarRightArrow:case PseudoElement_ScrollBarRightArrow:never executed: case PseudoElement_ScrollBarRightArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2053 | case never executed: PseudoElement_SpinBoxUpArrow:case PseudoElement_SpinBoxUpArrow:never executed: case PseudoElement_SpinBoxUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2054 | case never executed: PseudoElement_SpinBoxDownArrow:case PseudoElement_SpinBoxDownArrow:never executed: case PseudoElement_SpinBoxDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2055 | case never executed: PseudoElement_ComboBoxArrow:case PseudoElement_ComboBoxArrow:never executed: case PseudoElement_ComboBoxArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2056 | case never executed: PseudoElement_DownArrow:case PseudoElement_DownArrow:never executed: case PseudoElement_DownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2057 | case never executed: PseudoElement_ToolButtonMenuArrow:case PseudoElement_ToolButtonMenuArrow:never executed: case PseudoElement_ToolButtonMenuArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2058 | case never executed: PseudoElement_SliderGroove:case PseudoElement_SliderGroove:never executed: case PseudoElement_SliderGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2059 | return never executed: Qt::AlignCenter;return Qt::AlignCenter;never executed: return Qt::AlignCenter; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2060 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2061 | case never executed: PseudoElement_GroupBoxTitle:case PseudoElement_GroupBoxTitle:never executed: case PseudoElement_GroupBoxTitle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2062 | case never executed: PseudoElement_GroupBoxIndicator:case PseudoElement_GroupBoxIndicator:never executed: case PseudoElement_GroupBoxIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2063 | return never executed: Qt::AlignLeft | Qt::AlignTop;return Qt::AlignLeft | Qt::AlignTop;never executed: return Qt::AlignLeft | Qt::AlignTop; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2064 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2065 | case never executed: PseudoElement_HeaderViewUpArrow:case PseudoElement_HeaderViewUpArrow:never executed: case PseudoElement_HeaderViewUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2066 | case never executed: PseudoElement_HeaderViewDownArrow:case PseudoElement_HeaderViewDownArrow:never executed: case PseudoElement_HeaderViewDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2067 | case never executed: PseudoElement_MenuRightArrow:case PseudoElement_MenuRightArrow:never executed: case PseudoElement_MenuRightArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2068 | return never executed: Qt::AlignRight | Qt::AlignVCenter;return Qt::AlignRight | Qt::AlignVCenter;never executed: return Qt::AlignRight | Qt::AlignVCenter; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2069 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2070 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2071 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2072 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2073 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2074 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2075 | QSize QStyleSheetStyle::defaultSize(const QWidget *w, QSize sz, const QRect& rect, int pe) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2076 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2077 | QStyle *base = baseStyle(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2078 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2079 | switch (pe) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2080 | case never executed: PseudoElement_Indicator:case PseudoElement_Indicator:never executed: case PseudoElement_Indicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2081 | case never executed: PseudoElement_MenuCheckMark:case PseudoElement_MenuCheckMark:never executed: case PseudoElement_MenuCheckMark: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2082 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2083 | sz.setWidth(base->pixelMetric(PM_IndicatorWidth, 0, w)); never executed: sz.setWidth(base->pixelMetric(PM_IndicatorWidth, 0, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2084 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2085 | sz.setHeight(base->pixelMetric(PM_IndicatorHeight, 0, w)); never executed: sz.setHeight(base->pixelMetric(PM_IndicatorHeight, 0, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2086 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2087 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2088 | case never executed: PseudoElement_ExclusiveIndicator:case PseudoElement_ExclusiveIndicator:never executed: case PseudoElement_ExclusiveIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2089 | case never executed: PseudoElement_GroupBoxIndicator:case PseudoElement_GroupBoxIndicator:never executed: case PseudoElement_GroupBoxIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2090 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2091 | sz.setWidth(base->pixelMetric(PM_ExclusiveIndicatorWidth, 0, w)); never executed: sz.setWidth(base->pixelMetric(PM_ExclusiveIndicatorWidth, 0, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2092 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2093 | sz.setHeight(base->pixelMetric(PM_ExclusiveIndicatorHeight, 0, w)); never executed: sz.setHeight(base->pixelMetric(PM_ExclusiveIndicatorHeight, 0, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2094 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2095 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2096 | case never executed: PseudoElement_PushButtonMenuIndicator:case PseudoElement_PushButtonMenuIndicator:never executed: {case PseudoElement_PushButtonMenuIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2097 | int pm = base->pixelMetric(PM_MenuButtonIndicator, 0, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2098 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2099 | sz.setWidth(pm); never executed: sz.setWidth(pm); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2100 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2101 | sz.setHeight(pm); never executed: sz.setHeight(pm); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2102 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2103 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2104 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2105 | case never executed: PseudoElement_ComboBoxDropDown:case PseudoElement_ComboBoxDropDown:never executed: case PseudoElement_ComboBoxDropDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2106 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2107 | sz.setWidth(16); never executed: sz.setWidth(16); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2108 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2109 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2110 | case never executed: PseudoElement_ComboBoxArrow:case PseudoElement_ComboBoxArrow:never executed: case PseudoElement_ComboBoxArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2111 | case never executed: PseudoElement_DownArrow:case PseudoElement_DownArrow:never executed: case PseudoElement_DownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2112 | case never executed: PseudoElement_ToolButtonMenuArrow:case PseudoElement_ToolButtonMenuArrow:never executed: case PseudoElement_ToolButtonMenuArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2113 | case never executed: PseudoElement_ToolButtonDownArrow:case PseudoElement_ToolButtonDownArrow:never executed: case PseudoElement_ToolButtonDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2114 | case never executed: PseudoElement_MenuRightArrow:case PseudoElement_MenuRightArrow:never executed: case PseudoElement_MenuRightArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2115 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2116 | sz.setWidth(13); never executed: sz.setWidth(13); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2117 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2118 | sz.setHeight(13); never executed: sz.setHeight(13); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2119 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2121 | case never executed: PseudoElement_SpinBoxUpButton:case PseudoElement_SpinBoxUpButton:never executed: case PseudoElement_SpinBoxUpButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2122 | case never executed: PseudoElement_SpinBoxDownButton:case PseudoElement_SpinBoxDownButton:never executed: case PseudoElement_SpinBoxDownButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2123 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2124 | sz.setWidth(16); never executed: sz.setWidth(16); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2125 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2126 | sz.setHeight(rect.height()/2); never executed: sz.setHeight(rect.height()/2); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2127 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2128 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2129 | case never executed: PseudoElement_ToolButtonMenu:case PseudoElement_ToolButtonMenu:never executed: case PseudoElement_ToolButtonMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2130 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2131 | sz.setWidth(base->pixelMetric(PM_MenuButtonIndicator, 0, w)); never executed: sz.setWidth(base->pixelMetric(PM_MenuButtonIndicator, 0, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2132 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2134 | case never executed: PseudoElement_HeaderViewUpArrow:case PseudoElement_HeaderViewUpArrow:never executed: case PseudoElement_HeaderViewUpArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2135 | case never executed: PseudoElement_HeaderViewDownArrow:case PseudoElement_HeaderViewDownArrow:never executed: {case PseudoElement_HeaderViewDownArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2136 | int pm = base->pixelMetric(PM_HeaderMargin, 0, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2137 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2138 | sz.setWidth(pm); never executed: sz.setWidth(pm); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2139 | if (sz.height() == 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2140 | sz.setHeight(pm); never executed: sz.setHeight(pm); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2141 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2142 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2143 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2144 | case never executed: PseudoElement_ScrollBarFirst:case PseudoElement_ScrollBarFirst:never executed: case PseudoElement_ScrollBarFirst: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2145 | case never executed: PseudoElement_ScrollBarLast:case PseudoElement_ScrollBarLast:never executed: case PseudoElement_ScrollBarLast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2146 | case never executed: PseudoElement_ScrollBarAddLine:case PseudoElement_ScrollBarAddLine:never executed: case PseudoElement_ScrollBarAddLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2147 | case never executed: PseudoElement_ScrollBarSubLine:case PseudoElement_ScrollBarSubLine:never executed: case PseudoElement_ScrollBarSubLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2148 | case never executed: PseudoElement_ScrollBarSlider:case PseudoElement_ScrollBarSlider:never executed: {case PseudoElement_ScrollBarSlider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2149 | int pm = pixelMetric(QStyle::PM_ScrollBarExtent, 0, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2150 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2151 | sz.setWidth(pm); never executed: sz.setWidth(pm); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2152 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2153 | sz.setHeight(pm); never executed: sz.setHeight(pm); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2154 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2155 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2156 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2157 | case never executed: PseudoElement_DockWidgetCloseButton:case PseudoElement_DockWidgetCloseButton:never executed: case PseudoElement_DockWidgetCloseButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2158 | case never executed: PseudoElement_DockWidgetFloatButton:case PseudoElement_DockWidgetFloatButton:never executed: {case PseudoElement_DockWidgetFloatButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2159 | int iconSize = pixelMetric(PM_SmallIconSize, 0, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2160 | return never executed: QSize(iconSize, iconSize);return QSize(iconSize, iconSize);never executed: return QSize(iconSize, iconSize); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2161 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2163 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2164 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2165 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2166 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2168 | if (sz.height() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2169 | sz.setHeight(rect.height()); never executed: sz.setHeight(rect.height()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2170 | if (sz.width() == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2171 | sz.setWidth(rect.width()); never executed: sz.setWidth(rect.width()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2172 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2173 | return never executed: sz;return sz;never executed: return sz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2174 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2176 | static PositionMode defaultPositionMode(int pe) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2177 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2178 | switch (pe) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2179 | case never executed: PseudoElement_ScrollBarFirst:case PseudoElement_ScrollBarFirst:never executed: case PseudoElement_ScrollBarFirst: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2180 | case never executed: PseudoElement_ScrollBarLast:case PseudoElement_ScrollBarLast:never executed: case PseudoElement_ScrollBarLast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2181 | case never executed: PseudoElement_ScrollBarAddLine:case PseudoElement_ScrollBarAddLine:never executed: case PseudoElement_ScrollBarAddLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2182 | case never executed: PseudoElement_ScrollBarSubLine:case PseudoElement_ScrollBarSubLine:never executed: case PseudoElement_ScrollBarSubLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2183 | case never executed: PseudoElement_ScrollBarAddPage:case PseudoElement_ScrollBarAddPage:never executed: case PseudoElement_ScrollBarAddPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2184 | case never executed: PseudoElement_ScrollBarSubPage:case PseudoElement_ScrollBarSubPage:never executed: case PseudoElement_ScrollBarSubPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2185 | case never executed: PseudoElement_ScrollBarSlider:case PseudoElement_ScrollBarSlider:never executed: case PseudoElement_ScrollBarSlider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2186 | case never executed: PseudoElement_SliderGroove:case PseudoElement_SliderGroove:never executed: case PseudoElement_SliderGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2187 | case never executed: PseudoElement_SliderHandle:case PseudoElement_SliderHandle:never executed: case PseudoElement_SliderHandle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2188 | case never executed: PseudoElement_TabWidgetPane:case PseudoElement_TabWidgetPane:never executed: case PseudoElement_TabWidgetPane: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2189 | return never executed: PositionMode_Absolute;return PositionMode_Absolute;never executed: return PositionMode_Absolute; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2190 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2191 | return never executed: PositionMode_Static;return PositionMode_Static;never executed: return PositionMode_Static; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2192 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2193 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2194 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2195 | QRect QStyleSheetStyle::positionRect(const QWidget *w, const QRenderRule &rule2, int pe, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2196 | const QRect &originRect, Qt::LayoutDirection dir) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2197 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2198 | const QStyleSheetPositionData *p = rule2.position(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2199 | PositionMode mode = (p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2200 | Qt::Alignment position = (p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2201 | QRect r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2202 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2203 | if (mode != PositionMode_Absolute
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2204 | QSize sz = defaultSize(w, rule2.size(), originRect, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2205 | sz = sz.expandedTo(rule2.minimumContentsSize()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2206 | r = QStyle::alignedRect(dir, position, sz, originRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2207 | if (p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2208 | int left = p->left
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2209 | int top = p->top
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2210 | r.translate(dir == Qt::LeftToRight ? left : -left, top); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2211 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2212 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2213 | r = p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2214 | dir == Qt::LeftToRight ? -p->right : -p->left, -p->bottom) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2215 | : originRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2216 | if (rule2.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2217 | QSize sz = rule2.size().expandedTo(rule2.minimumContentsSize()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2218 | if (sz.width() == -1
never executed: sz.setWidth(r.width()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2219 | if (sz.height() == -1
never executed: sz.setHeight(r.height()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2220 | r = QStyle::alignedRect(dir, position, sz, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2221 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2222 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2223 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2224 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2225 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2226 | QRect QStyleSheetStyle::positionRect(const QWidget *w, const QRenderRule& rule1, const QRenderRule& rule2, int pe, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2227 | const QRect& rect, Qt::LayoutDirection dir) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2228 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2229 | const QStyleSheetPositionData *p = rule2.position(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2230 | Origin origin = (p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2231 | QRect originRect = rule1.originRect(rect, origin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2232 | return never executed: positionRect(w, rule2, pe, originRect, dir);return positionRect(w, rule2, pe, originRect, dir);never executed: return positionRect(w, rule2, pe, originRect, dir); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2233 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2234 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2236 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2237 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2238 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2239 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2240 | static QWidget *embeddedWidget(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2241 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2242 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2243 | if (QComboBox *cmb = qobject_cast<QComboBox *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2244 | if (cmb->isEditable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2245 | return never executed: cmb->lineEdit();return cmb->lineEdit();never executed: return cmb->lineEdit(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2246 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2247 | return never executed: cmb;return cmb;never executed: return cmb; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2248 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2249 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2250 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2251 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2252 | if (QAbstractSpinBox *sb = qobject_cast<QAbstractSpinBox *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2253 | return never executed: sb->findChild<QLineEdit *>();return sb->findChild<QLineEdit *>();never executed: return sb->findChild<QLineEdit *>(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2254 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2255 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2257 | if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2258 | return never executed: sa->viewport();return sa->viewport();never executed: return sa->viewport(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2259 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2260 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2261 | return never executed: w;return w;never executed: return w; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2262 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2263 | static QWidget *containerWidget(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2264 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2265 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2266 | if (qobject_cast<const QLineEdit *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2267 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2269 | if (qobject_cast<const QComboBox *>(w->parentWidget())
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2270 | return never executed: w->parentWidget();return w->parentWidget();never executed: return w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2272 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2273 | if (qobject_cast<const QAbstractSpinBox *>(w->parentWidget())
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2274 | return never executed: w->parentWidget();return w->parentWidget();never executed: return w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2276 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2277 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2279 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2280 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2281 | if (sa->viewport() == w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2282 | return never executed: w->parentWidget();return w->parentWidget();never executed: return w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2283 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2284 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2285 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2286 | return never executed: const_cast<QWidget *>(w);return const_cast<QWidget *>(w);never executed: return const_cast<QWidget *>(w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2287 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2288 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2290 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2291 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2292 | static bool unstylable(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2293 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2294 | if (w->windowType() == Qt::Desktop
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2295 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2297 | if (!w->styleSheet().isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2298 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2299 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2300 | if (containerWidget(w) != w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2301 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2303 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2304 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2305 | else if (qobject_cast<const QFrame *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2306 | if (0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2307 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2308 | || qobject_cast<const QComboBox *>(w->parentWidget())
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2309 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2310 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2311 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2312 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2313 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2316 | if (w->metaObject() == &QWidget::staticMetaObject
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2317 | && qobject_cast<const QTabBar*>(w->parentWidget())
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2318 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2321 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2322 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2324 | static quint64 extendedPseudoClass(const QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2325 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2326 | quint64 pc = w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2327 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2328 | pc |= ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2329 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2331 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2332 | if (combo->isEditable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2333 | pc |= (combo->isEditable()
never executed: pc |= (combo->isEditable() ? PseudoClass_Editable : PseudoClass_ReadOnly); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2334 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2335 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2336 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2337 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2338 | pc |= (edit->isReadOnly()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2339 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2341 | { } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2342 | return never executed: pc;return pc;never executed: return pc; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2343 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2344 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2346 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2350 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2351 | void QStyleSheetStyle::setGeometry(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2352 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2353 | QRenderRule rule = renderRule(w, PseudoElement_None, PseudoClass_Enabled | extendedPseudoClass(w)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2354 | const QStyleSheetGeometryData *geo = rule.geometry(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2355 | if (w->property("_q_stylesheet_minw").toBool()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2356 | && ((!rule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2357 | w->setMinimumWidth(0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2358 | w->setProperty("_q_stylesheet_minw", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2359 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2360 | if (w->property("_q_stylesheet_minh").toBool()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2361 | && ((!rule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2362 | w->setMinimumHeight(0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2363 | w->setProperty("_q_stylesheet_minh", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2364 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2365 | if (w->property("_q_stylesheet_maxw").toBool()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2366 | && ((!rule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2367 | w->setMaximumWidth(((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2368 | w->setProperty("_q_stylesheet_maxw", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2369 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2370 | if (w->property("_q_stylesheet_maxh").toBool()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2371 | && ((!rule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2372 | w->setMaximumHeight(((1<<24)-1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2373 | w->setProperty("_q_stylesheet_maxh", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2374 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2375 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2376 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2377 | if (rule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2378 | if (geo->minWidth != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2379 | w->setProperty("_q_stylesheet_minw", true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2380 | w->setMinimumWidth(rule.boxSize(QSize(qMax(geo->width, geo->minWidth), 0)).width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2381 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2382 | if (geo->minHeight != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2383 | w->setProperty("_q_stylesheet_minh", true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2384 | w->setMinimumHeight(rule.boxSize(QSize(0, qMax(geo->height, geo->minHeight))).height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2385 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2386 | if (geo->maxWidth != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2387 | w->setProperty("_q_stylesheet_maxw", true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2388 | w->setMaximumWidth(rule.boxSize(QSize(qMin(geo->width == -1 ? ((1<<24)-1) : geo->width, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2389 | geo->maxWidth == -1 ? ((1<<24)-1) : geo->maxWidth), 0)).width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2390 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2391 | if (geo->maxHeight != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2392 | w->setProperty("_q_stylesheet_maxh", true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2393 | w->setMaximumHeight(rule.boxSize(QSize(0, qMin(geo->height == -1 ? ((1<<24)-1) : geo->height, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2394 | geo->maxHeight == -1 ? ((1<<24)-1) : geo->maxHeight))).height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2395 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2396 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2397 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2398 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2399 | void QStyleSheetStyle::setProperties(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2400 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2401 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2404 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2405 | const QVector<Declaration> decls = declarations(styleRules(w), QString()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2406 | QVector<int> finals; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2407 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2408 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2409 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2410 | QSet<const QString> propertySet; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2411 | for (int i = decls.count() - 1; i >= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2412 | const QString property = decls.at(i).d->property; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2413 | if (!property.startsWith(QLatin1String("qproperty-"), Qt::CaseInsensitive)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2414 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2415 | if (!propertySet.contains(property)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2416 | propertySet.insert(property); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2417 | finals.append(i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2418 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2419 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2420 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2421 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2422 | for (int i = finals.count() - 1; i >= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2423 | const Declaration &decl = decls.at(finals[i]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2424 | QString property = decl.d->property; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2425 | property.remove(0, 10); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2427 | const QMetaObject *metaObject = w->metaObject(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2428 | int index = metaObject->indexOfProperty(property.toLatin1()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2429 | if (__builtin_expect(!!(index == -1), false)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2430 | QMessageLogger(__FILE__, 2527, __PRETTY_FUNCTION__).warning() << w << " does not have a property named " << property; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2431 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2432 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2433 | const QMetaProperty metaProperty = metaObject->property(index); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2434 | if (__builtin_expect(!!(!metaProperty.isWritable() || !metaProperty.isDesignable()), false)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2435 | QMessageLogger(__FILE__, 2532, __PRETTY_FUNCTION__).warning() << w << " cannot design property named " << property; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2436 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2437 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2438 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2439 | QVariant v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2440 | const QVariant value = w->property(property.toLatin1()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2441 | switch (value.type()) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2442 | case never executed: QVariant::Icon:case QVariant::Icon:never executed: v = decl.iconValue(); break;case QVariant::Icon:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2443 | case never executed: QVariant::Image:case QVariant::Image:never executed: v = QImage(decl.uriValue()); break;case QVariant::Image:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2444 | case never executed: QVariant::Pixmap:case QVariant::Pixmap:never executed: v = QPixmap(decl.uriValue()); break;case QVariant::Pixmap:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2445 | case never executed: QVariant::Rect:case QVariant::Rect:never executed: v = decl.rectValue(); break;case QVariant::Rect:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2446 | case never executed: QVariant::Size:case QVariant::Size:never executed: v = decl.sizeValue(); break;case QVariant::Size:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2447 | case never executed: QVariant::Color:case QVariant::Color:never executed: v = decl.colorValue(); break;case QVariant::Color:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2448 | case never executed: QVariant::Brush:case QVariant::Brush:never executed: v = decl.brushValue(); break;case QVariant::Brush:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2449 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2450 | case never executed: QVariant::KeySequence:case QVariant::KeySequence:never executed: v = QKeySequence(decl.d->values.at(0).variant.toString()); break;case QVariant::KeySequence:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2451 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2452 | default never executed: :default:never executed: v = decl.d->values.at(0).variant; break;default:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2453 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2454 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2455 | w->setProperty(property.toLatin1(), v); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2456 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2457 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2458 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2459 | void QStyleSheetStyle::setPalette(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2460 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2461 | struct RuleRoleMap { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2462 | int state; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2463 | QPalette::ColorGroup group; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2464 | } map[3] = { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2465 | { int(PseudoClass_Active | PseudoClass_Enabled), QPalette::Active }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2466 | { PseudoClass_Disabled, QPalette::Disabled }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2467 | { PseudoClass_Enabled, QPalette::Inactive } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2468 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2469 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2470 | const bool useStyleSheetPropagationInWidgetStyles = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2471 | QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2472 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2473 | QPalette p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2474 | if (!useStyleSheetPropagationInWidgetStyles
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2475 | p = w->palette(); never executed: p = w->palette(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2476 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2477 | QWidget *ew = embeddedWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2479 | for (int i = 0; i < 3
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2480 | QRenderRule rule = renderRule(w, PseudoElement_None, map[i].state | extendedPseudoClass(w)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2481 | if (i == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2482 | if (!w->property("_q_styleSheetWidgetFont").isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2483 | saveWidgetFont(w, w->font()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2484 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2485 | updateStyleSheetFont(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2486 | if (ew != w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2487 | updateStyleSheetFont(ew); never executed: updateStyleSheetFont(ew); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2488 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2489 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2490 | rule.configurePalette(&p, map[i].group, ew, ew != w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2491 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2492 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2493 | if (!useStyleSheetPropagationInWidgetStyles
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2494 | QPalette wp = w->palette(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2495 | styleSheetCaches->customPaletteWidgets.insert(w, qMakePair(wp, p.resolve())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2497 | if (useStyleSheetPropagationInWidgetStyles
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2498 | p = p.resolve(wp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2499 | p.resolve(p.resolve() | wp.resolve()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2500 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2502 | w->setPalette(p); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2503 | if (ew != w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2504 | ew->setPalette(p); never executed: ew->setPalette(p); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2505 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2506 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2507 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2508 | void QStyleSheetStyle::unsetPalette(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2509 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2510 | const bool useStyleSheetPropagationInWidgetStyles = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2511 | QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2513 | if (styleSheetCaches->customPaletteWidgets.contains(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2514 | QPair<QPalette, uint> p = styleSheetCaches->customPaletteWidgets.value(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2515 | styleSheetCaches->customPaletteWidgets.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2517 | QPalette original = p.first; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2518 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2519 | if (useStyleSheetPropagationInWidgetStyles
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2520 | original.resolve(original.resolve() & p.second); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2522 | QPalette wp = w->palette(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2523 | wp.resolve(wp.resolve() & ~p.second); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2524 | wp.resolve(original); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2525 | wp.resolve(wp.resolve() | original.resolve()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2526 | original = wp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2527 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2529 | w->setPalette(original); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2530 | QWidget *ew = embeddedWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2531 | if (ew != w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2532 | ew->setPalette(original); never executed: ew->setPalette(original); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2533 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2534 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2535 | if (useStyleSheetPropagationInWidgetStyles
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2536 | unsetStyleSheetFont(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2537 | QWidget *ew = embeddedWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2538 | if (ew != w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2539 | unsetStyleSheetFont(ew); never executed: unsetStyleSheetFont(ew); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2540 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2541 | QVariant oldFont = w->property("_q_styleSheetWidgetFont"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2542 | if (oldFont.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2543 | w->setFont(qvariant_cast<QFont>(oldFont)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2544 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2545 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2547 | if (styleSheetCaches->autoFillDisabledWidgets.contains(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2548 | embeddedWidget(w)->setAutoFillBackground(true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2549 | styleSheetCaches->autoFillDisabledWidgets.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2550 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2551 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2553 | void QStyleSheetStyle::unsetStyleSheetFont(QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2554 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2555 | if (styleSheetCaches->customFontWidgets.contains(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2556 | QPair<QFont, uint> f = styleSheetCaches->customFontWidgets.value(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2557 | styleSheetCaches->customFontWidgets.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2558 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2559 | QFont original = f.first; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2560 | original.resolve(original.resolve() & f.second); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2561 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2562 | QFont font = w->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2563 | font.resolve(font.resolve() & ~f.second); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2564 | font.resolve(original); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2565 | font.resolve(font.resolve() | original.resolve()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2567 | w->setFont(font); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2568 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2569 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2570 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2571 | static void updateObjects(const QList<const QObject *>& objects) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2572 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2573 | if (!styleSheetCaches->styleRulesCache.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2574 | for (int i = 0; i < objects.size()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2575 | const QObject *object = objects.at(i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2576 | styleSheetCaches->styleRulesCache.remove(object); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2577 | styleSheetCaches->hasStyleRuleCache.remove(object); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2578 | styleSheetCaches->renderRulesCache.remove(object); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2579 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2580 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2581 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2582 | QWidgetList widgets; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2583 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(objects)>::type> _container_((objects)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QObject *object = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2584 | if (QWidget *w = qobject_cast<QWidget*>(const_cast<QObject*>(object))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2585 | widgets << w; never executed: widgets << w; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2586 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2588 | QEvent event(QEvent::StyleChange); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2589 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(widgets)>::type> _container_((widgets)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QWidget *widget = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2590 | widget->style()->polish(widget); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2591 | QApplication::sendEvent(widget, &event); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2592 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2593 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2594 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2595 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2596 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2597 | int QStyleSheetStyle::numinstances = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2598 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2599 | QStyleSheetStyle::QStyleSheetStyle(QStyle *base) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2600 | : QWindowsStyle(*new QStyleSheetStylePrivate), base(base), refcount(1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2601 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2602 | ++numinstances; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2603 | if (numinstances == 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2604 | styleSheetCaches = new QStyleSheetStyleCaches; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2605 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2606 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2607 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2608 | QStyleSheetStyle::~QStyleSheetStyle() | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2609 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2610 | --numinstances; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2611 | if (numinstances == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2612 | delete styleSheetCaches; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2613 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2614 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2615 | QStyle *QStyleSheetStyle::baseStyle() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2616 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2617 | if (base
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2618 | return never executed: base;return base;never executed: return base; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2619 | if (QStyleSheetStyle *me = qobject_cast<QStyleSheetStyle *>(QApplication::style())
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2620 | return never executed: me->base;return me->base;never executed: return me->base; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2621 | return never executed: QApplication::style();return QApplication::style();never executed: return QApplication::style(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2622 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2624 | void QStyleSheetStyleCaches::objectDestroyed(QObject *o) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2625 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2626 | styleRulesCache.remove(o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2627 | hasStyleRuleCache.remove(o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2628 | renderRulesCache.remove(o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2629 | customPaletteWidgets.remove((const QWidget *)o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2630 | customFontWidgets.remove(static_cast<QWidget *>(o)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2631 | styleSheetCache.remove(o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2632 | autoFillDisabledWidgets.remove((const QWidget *)o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2633 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2635 | void QStyleSheetStyleCaches::styleDestroyed(QObject *o) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2636 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2637 | styleSheetCache.remove(o); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2638 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2639 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2640 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2641 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2644 | bool QStyleSheetStyle::initObject(const QObject *obj) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2645 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2646 | if (!obj
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2647 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2648 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2649 | if (w->testAttribute(Qt::WA_StyleSheet)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2650 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2651 | if (unstylable(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2652 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2653 | const_cast<QWidget *>(w)->setAttribute(Qt::WA_StyleSheet, true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2654 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2655 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2656 | QObject::connect(obj, qFlagLocation("2""destroyed(QObject*)" "\0" __FILE__ ":" "2753"), styleSheetCaches, qFlagLocation("1""objectDestroyed(QObject*)" "\0" __FILE__ ":" "2753"), Qt::UniqueConnection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2657 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2658 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2659 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2660 | void QStyleSheetStyle::polish(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2661 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2662 | baseStyle()->polish(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2663 | if (globalStyleSheetStyle != 0
never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2665 | if (!initObject(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2666 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2668 | if (styleSheetCaches->styleRulesCache.contains(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2669 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2670 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2671 | styleSheetCaches->styleRulesCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2672 | styleSheetCaches->hasStyleRuleCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2673 | styleSheetCaches->renderRulesCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2674 | styleSheetCaches->styleSheetCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2675 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2676 | setGeometry(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2677 | setProperties(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2678 | unsetPalette(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2679 | setPalette(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2680 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2681 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2682 | QVector<StyleRule> rules = styleRules(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2683 | for (int i = 0; i < rules.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2684 | const Selector& selector = rules.at(i).selectors.at(0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2685 | quint64 negated = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2686 | quint64 cssClass = selector.pseudoClass(&negated); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2687 | if ( cssClass & PseudoClass_Hover
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2688 | w->setAttribute(Qt::WA_Hover); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2689 | embeddedWidget(w)->setAttribute(Qt::WA_Hover); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2690 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2691 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2692 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2693 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2694 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2695 | if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2696 | QRenderRule rule = renderRule(sa, PseudoElement_None, PseudoClass_Enabled); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2697 | if ((rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2698 | || (rule.hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2699 | QObject::connect(sa->horizontalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2796"), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2700 | sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2797"), Qt::UniqueConnection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2701 | QObject::connect(sa->verticalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2798"), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2702 | sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2799"), Qt::UniqueConnection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2703 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2704 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2705 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2706 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2707 | QRenderRule rule = renderRule(w, PseudoElement_None, PseudoClass_Any); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2708 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2709 | if (w->metaObject() == &QWidget::staticMetaObject
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2710 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2711 | || qobject_cast<QHeaderView *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2712 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2713 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2714 | || qobject_cast<QTabBar *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2715 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2716 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2717 | || qobject_cast<QFrame *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2719 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2720 | || qobject_cast<QMainWindow *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2721 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2722 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2723 | || qobject_cast<QMdiSubWindow *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2725 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2726 | || qobject_cast<QMenuBar *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2727 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2728 | || qobject_cast<QDialog *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2729 | w->setAttribute(Qt::WA_StyledBackground, true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2730 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2731 | QWidget *ew = embeddedWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2732 | if (ew->autoFillBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2733 | ew->setAutoFillBackground(false); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2734 | styleSheetCaches->autoFillDisabledWidgets.insert(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2735 | if (ew != w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2736 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2737 | ew->setAttribute(Qt::WA_StyledBackground, true); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2738 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2739 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2740 | if (!rule.hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2741 | || (!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2742 | w->setAttribute(Qt::WA_OpaquePaintEvent, false); never executed: w->setAttribute(Qt::WA_OpaquePaintEvent, false); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2743 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2744 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2745 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2746 | void QStyleSheetStyle::polish(QApplication *app) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2747 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2748 | baseStyle()->polish(app); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2749 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2751 | void QStyleSheetStyle::polish(QPalette &pal) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2752 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2753 | baseStyle()->polish(pal); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2754 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2756 | void QStyleSheetStyle::repolish(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2757 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2758 | QList<const QObject *> children = w->findChildren<const QObject *>(QString()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2759 | children.append(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2760 | styleSheetCaches->styleSheetCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2761 | updateObjects(children); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2762 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2763 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2764 | void QStyleSheetStyle::repolish(QApplication *app) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2765 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2766 | (void)app;; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2767 | const QList<const QObject*> allObjects = styleSheetCaches->styleRulesCache.keys(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2768 | styleSheetCaches->styleSheetCache.remove((static_cast<QApplication *>(QCoreApplication::instance()))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2769 | styleSheetCaches->styleRulesCache.clear(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2770 | styleSheetCaches->hasStyleRuleCache.clear(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2771 | styleSheetCaches->renderRulesCache.clear(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2772 | updateObjects(allObjects); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2773 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2774 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2775 | void QStyleSheetStyle::unpolish(QWidget *w) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2776 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2777 | if (!w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2778 | baseStyle()->unpolish(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2779 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2780 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2781 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2782 | styleSheetCaches->styleRulesCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2783 | styleSheetCaches->hasStyleRuleCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2784 | styleSheetCaches->renderRulesCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2785 | styleSheetCaches->styleSheetCache.remove(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2786 | unsetPalette(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2787 | w->setProperty("_q_stylesheet_minw", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2788 | w->setProperty("_q_stylesheet_minh", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2789 | w->setProperty("_q_stylesheet_maxw", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2790 | w->setProperty("_q_stylesheet_maxh", QVariant()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2791 | w->setAttribute(Qt::WA_StyleSheet, false); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2792 | QObject::disconnect(w, 0, this, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2793 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2794 | if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2795 | QObject::disconnect(sa->horizontalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2892"), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2796 | sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2893")); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2797 | QObject::disconnect(sa->verticalScrollBar(), qFlagLocation("2""valueChanged(int)" "\0" __FILE__ ":" "2894"), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2798 | sa, qFlagLocation("1""update()" "\0" __FILE__ ":" "2895")); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2799 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2800 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2801 | baseStyle()->unpolish(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2802 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2803 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2804 | void QStyleSheetStyle::unpolish(QApplication *app) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2805 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2806 | baseStyle()->unpolish(app); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2807 | if (globalStyleSheetStyle != 0
never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2808 | styleSheetCaches->styleRulesCache.clear(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2809 | styleSheetCaches->hasStyleRuleCache.clear(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2810 | styleSheetCaches->renderRulesCache.clear(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2811 | styleSheetCaches->styleSheetCache.remove((static_cast<QApplication *>(QCoreApplication::instance()))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2812 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2813 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2814 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2815 | inline static bool verticalTabs(QTabBar::Shape shape) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2816 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2817 | return never executed: shape == QTabBar::RoundedWestreturn shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast;never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2818 | || shape == QTabBar::RoundedEast never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2819 | || shape == QTabBar::TriangularWest never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2820 | || shape == QTabBar::TriangularEast; never executed: return shape == QTabBar::RoundedWest || shape == QTabBar::RoundedEast || shape == QTabBar::TriangularWest || shape == QTabBar::TriangularEast; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2821 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2822 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2823 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2824 | void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2825 | const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2826 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2827 | if (globalStyleSheetStyle != 0
never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2828 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2829 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2830 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2831 | switch (cc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2832 | case never executed: CC_ComboBox:case CC_ComboBox:never executed: case CC_ComboBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2833 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2834 | QStyleOptionComboBox cmbOpt(*cmb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2835 | cmbOpt.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2836 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2837 | rule.drawBackgroundImage(p, cmbOpt.rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2838 | rule.configurePalette(&cmbOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2839 | bool customDropDown = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2840 | && (hasStyleRule(w, PseudoElement_ComboBoxDropDown)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2841 | if (customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2842 | cmbOpt.subControls &= ~QStyle::SC_ComboBoxArrow; never executed: cmbOpt.subControls &= ~QStyle::SC_ComboBoxArrow; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2843 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2844 | baseStyle()->drawComplexControl(cc, &cmbOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2845 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2846 | QWindowsStyle::drawComplexControl(cc, &cmbOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2847 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2848 | if (!customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2849 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2850 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2851 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2852 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2853 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2854 | if (opt->subControls & QStyle::SC_ComboBoxArrow
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2855 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2856 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2857 | QRect r = subControlRect(CC_ComboBox, opt, SC_ComboBoxArrow, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2858 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2859 | QRenderRule subRule2 = renderRule(w, opt, PseudoElement_ComboBoxArrow); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2860 | r = positionRect(w, subRule, subRule2, PseudoElement_ComboBoxArrow, r, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2861 | subRule2.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2862 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2863 | cmbOpt.subControls = QStyle::SC_ComboBoxArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2864 | QWindowsStyle::drawComplexControl(cc, &cmbOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2865 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2866 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2867 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2868 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2869 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2870 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2871 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2872 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2873 | case never executed: CC_SpinBox:case CC_SpinBox:never executed: case CC_SpinBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2874 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2875 | QStyleOptionSpinBox spinOpt(*spin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2876 | rule.configurePalette(&spinOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2877 | rule.configurePalette(&spinOpt.palette, QPalette::Text, QPalette::Base); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2878 | spinOpt.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2879 | bool customUp = true, customDown = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2880 | QRenderRule upRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2881 | QRenderRule downRule = renderRule(w, opt, PseudoElement_SpinBoxDownButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2882 | bool upRuleMatch = upRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2883 | bool downRuleMatch = downRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2884 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2885 | rule.drawBackgroundImage(p, spinOpt.rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2886 | customUp = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2887 | && (hasStyleRule(w, PseudoElement_SpinBoxUpButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2888 | if (customUp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2889 | spinOpt.subControls &= ~QStyle::SC_SpinBoxUp; never executed: spinOpt.subControls &= ~QStyle::SC_SpinBoxUp; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2890 | customDown = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2891 | && (hasStyleRule(w, PseudoElement_SpinBoxDownButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2892 | if (customDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2893 | spinOpt.subControls &= ~QStyle::SC_SpinBoxDown; never executed: spinOpt.subControls &= ~QStyle::SC_SpinBoxDown; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2894 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2895 | baseStyle()->drawComplexControl(cc, &spinOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2896 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2897 | QWindowsStyle::drawComplexControl(cc, &spinOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2898 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2899 | if (!customUp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2900 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2901 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2902 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2903 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2904 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2905 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2906 | QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2907 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2908 | QRect r = subControlRect(CC_SpinBox, opt, SC_SpinBoxUp, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2909 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2910 | QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SpinBoxUpArrow); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2911 | r = positionRect(w, subRule, subRule2, PseudoElement_SpinBoxUpArrow, r, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2912 | subRule2.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2913 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2914 | spinOpt.subControls = QStyle::SC_SpinBoxUp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2915 | QWindowsStyle::drawComplexControl(cc, &spinOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2916 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2917 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2918 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2919 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2920 | QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxDownButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2921 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2922 | QRect r = subControlRect(CC_SpinBox, opt, SC_SpinBoxDown, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2923 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2924 | QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SpinBoxDownArrow); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2925 | r = positionRect(w, subRule, subRule2, PseudoElement_SpinBoxDownArrow, r, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2926 | subRule2.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2927 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2928 | spinOpt.subControls = QStyle::SC_SpinBoxDown; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2929 | QWindowsStyle::drawComplexControl(cc, &spinOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2930 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2931 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2932 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2933 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2934 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2936 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2937 | case never executed: CC_GroupBox:case CC_GroupBox:never executed: case CC_GroupBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2938 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2939 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2940 | QRect labelRect, checkBoxRect, titleRect, frameRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2941 | bool hasTitle = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2942 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2943 | if (!rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2944 | && !hasStyleRule(w, PseudoElement_Indicator)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2945 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2946 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2947 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2948 | rule.drawBackground(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2949 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2950 | QRenderRule titleRule = renderRule(w, opt, PseudoElement_GroupBoxTitle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2951 | bool clipSet = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2952 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2953 | if (hasTitle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2954 | labelRect = subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2955 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2956 | labelRect.setSize(labelRect.size().expandedTo(ParentStyle::subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, w).size())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2957 | if (gb->subControls & QStyle::SC_GroupBoxCheckBox
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2958 | checkBoxRect = subControlRect(CC_GroupBox, opt, SC_GroupBoxCheckBox, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2959 | titleRect = titleRule.boxRect(checkBoxRect.united(labelRect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2960 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2961 | titleRect = titleRule.boxRect(labelRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2962 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2963 | if (!titleRule.hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2964 | clipSet = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2965 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2966 | p->setClipRegion(QRegion(opt->rect) - titleRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2967 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2968 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2969 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2970 | frameRect = subControlRect(CC_GroupBox, opt, SC_GroupBoxFrame, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2971 | QStyleOptionFrame frame; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2972 | frame.QStyleOption::operator=(*gb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2973 | frame.features = gb->features; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2974 | frame.lineWidth = gb->lineWidth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2975 | frame.midLineWidth = gb->midLineWidth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2976 | frame.rect = frameRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2977 | drawPrimitive(PE_FrameGroupBox, &frame, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2978 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2979 | if (clipSet
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2980 | p->restore(); never executed: p->restore(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2981 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2982 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2983 | if (hasTitle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2984 | titleRule.drawRule(p, titleRect); never executed: titleRule.drawRule(p, titleRect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2985 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2986 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2987 | if (gb->subControls & QStyle::SC_GroupBoxCheckBox
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2988 | QStyleOptionButton box; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2989 | box.QStyleOption::operator=(*gb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2990 | box.rect = checkBoxRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2991 | drawPrimitive(PE_IndicatorCheckBox, &box, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2992 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2994 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2995 | if (!gb->text.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2996 | int alignment = int(Qt::AlignCenter | Qt::TextShowMnemonic); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2997 | if (!styleHint(QStyle::SH_UnderlineShortcut, opt, w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2998 | alignment |= Qt::TextHideMnemonic; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2999 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3000 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3001 | QPalette pal = gb->palette; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3002 | if (gb->textColor.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3003 | pal.setColor(QPalette::WindowText, gb->textColor); never executed: pal.setColor(QPalette::WindowText, gb->textColor); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3004 | titleRule.configurePalette(&pal, QPalette::WindowText, QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3005 | drawItemText(p, labelRect, alignment, pal, gb->state & State_Enabled, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3006 | gb->text, QPalette::WindowText); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3007 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3008 | if (gb->state & State_HasFocus
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3009 | QStyleOptionFocusRect fropt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3010 | fropt.QStyleOption::operator=(*gb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3011 | fropt.rect = labelRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3012 | drawPrimitive(PE_FrameFocusRect, &fropt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3013 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3014 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3015 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3016 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3017 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3018 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3019 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3020 | case never executed: CC_ToolButton:case CC_ToolButton:never executed: case CC_ToolButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3021 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3022 | QStyleOptionToolButton toolOpt(*tool); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3023 | rule.configurePalette(&toolOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3024 | toolOpt.font = rule.font.resolve(toolOpt.font); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3025 | toolOpt.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3026 | bool customArrow = (tool->features & (QStyleOptionToolButton::HasMenu | QStyleOptionToolButton::MenuButtonPopup)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3027 | bool customDropDown = tool->features & QStyleOptionToolButton::MenuButtonPopup; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3028 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3029 | if (tool->subControls & SC_ToolButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3030 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3031 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3032 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3033 | State bflags = tool->state & ~State_Sunken; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3034 | if (bflags & State_AutoRaise
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3035 | bflags &= ~State_Raised; never executed: bflags &= ~State_Raised; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3036 | if (tool->state & State_Sunken
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3037 | bflags |= State_Sunken; never executed: bflags |= State_Sunken; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3038 | if (!(bflags & (State_Sunken | State_On | State_Raised))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3039 | rule.drawBackground(p, toolOpt.rect); never executed: rule.drawBackground(p, toolOpt.rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3040 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3041 | customArrow = customArrow
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3042 | if (customArrow
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3043 | toolOpt.features &= ~QStyleOptionToolButton::HasMenu; never executed: toolOpt.features &= ~QStyleOptionToolButton::HasMenu; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3044 | customDropDown = customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3045 | if (customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3046 | toolOpt.subControls &= ~QStyle::SC_ToolButtonMenu; never executed: toolOpt.subControls &= ~QStyle::SC_ToolButtonMenu; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3047 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3048 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3049 | baseStyle()->drawComplexControl(cc, &toolOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3050 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3051 | QWindowsStyle::drawComplexControl(cc, &toolOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3052 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3053 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3054 | if (!customArrow
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3055 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3056 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3057 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3058 | toolOpt.rect = rule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3059 | if (rule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3060 | toolOpt.font = rule.font; never executed: toolOpt.font = rule.font; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3061 | drawControl(CE_ToolButtonLabel, &toolOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3062 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3063 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3064 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolButtonMenu); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3065 | QRect r = subControlRect(CC_ToolButton, opt, QStyle::SC_ToolButtonMenu, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3066 | if (customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3067 | if (opt->subControls & QStyle::SC_ToolButtonMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3068 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3069 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3070 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3071 | toolOpt.rect = r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3072 | baseStyle()->drawPrimitive(PE_IndicatorButtonDropDown, &toolOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3073 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3074 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3075 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3076 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3077 | if (customArrow
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3078 | QRenderRule subRule2 = customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3079 | : renderRule(w, opt, PseudoElement_ToolButtonDownArrow); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3080 | QRect r2 = customDropDown
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3081 | ? positionRect(w, subRule, subRule2, PseudoElement_ToolButtonMenuArrow, r, opt->direction) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3082 | : positionRect(w, rule, subRule2, PseudoElement_ToolButtonDownArrow, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3083 | if (subRule2.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3084 | subRule2.drawRule(p, r2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3085 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3086 | toolOpt.rect = r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3087 | baseStyle()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &toolOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3088 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3089 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3090 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3091 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3092 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3093 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3094 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3095 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3096 | case never executed: CC_ScrollBar:case CC_ScrollBar:never executed: case CC_ScrollBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3097 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3098 | QStyleOptionSlider sbOpt(*sb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3099 | if (!rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3100 | sbOpt.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3101 | rule.drawBackgroundImage(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3102 | baseStyle()->drawComplexControl(cc, &sbOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3103 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3104 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3105 | QWindowsStyle::drawComplexControl(cc, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3106 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3107 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3108 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3109 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3110 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3111 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3112 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3113 | case never executed: CC_Slider:case CC_Slider:never executed: case CC_Slider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3114 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3115 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3117 | QRenderRule grooveSubRule = renderRule(w, opt, PseudoElement_SliderGroove); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3118 | QRenderRule handleSubRule = renderRule(w, opt, PseudoElement_SliderHandle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3119 | if (!grooveSubRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3120 | QStyleOptionSlider slOpt(*slider); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3121 | bool handleHasRule = handleSubRule.hasDrawable(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3123 | if (handleHasRule
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3124 | slOpt.subControls &= ~SC_SliderHandle; never executed: slOpt.subControls &= ~SC_SliderHandle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3125 | baseStyle()->drawComplexControl(cc, &slOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3126 | if (!handleHasRule
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3127 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3128 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3130 | QRect gr = subControlRect(cc, opt, SC_SliderGroove, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3131 | if (slider->subControls & SC_SliderGroove
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3132 | grooveSubRule.drawRule(p, gr); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3133 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3134 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3135 | if (slider->subControls & SC_SliderHandle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3136 | QRect hr = subControlRect(cc, opt, SC_SliderHandle, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3138 | QRenderRule subRule1 = renderRule(w, opt, PseudoElement_SliderSubPage); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3139 | if (subRule1.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3140 | QRect r(gr.topLeft(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3141 | slider->orientation == Qt::Horizontal | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3142 | ? QPoint(hr.x()+hr.width()/2, gr.y()+gr.height() - 1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3143 | : QPoint(gr.x()+gr.width() - 1, hr.y()+hr.height()/2)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3144 | subRule1.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3145 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3147 | QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SliderAddPage); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3148 | if (subRule2.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3149 | QRect r(slider->orientation == Qt::Horizontal | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3150 | ? QPoint(hr.x()+hr.width()/2+1, gr.y()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3151 | : QPoint(gr.x(), hr.y()+hr.height()/2+1), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3152 | gr.bottomRight()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3153 | subRule2.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3154 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3156 | handleSubRule.drawRule(p, handleSubRule.boxRect(hr, Margin)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3157 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3158 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3159 | if (slider->subControls & SC_SliderTickmarks
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3160 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3161 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3163 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3164 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3165 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3166 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3168 | case never executed: CC_MdiControls:case CC_MdiControls:never executed: case CC_MdiControls: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3169 | if (hasStyleRule(w, PseudoElement_MdiCloseButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3170 | || hasStyleRule(w, PseudoElement_MdiNormalButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3171 | || hasStyleRule(w, PseudoElement_MdiMinButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3172 | QList<QVariant> layout = rule.styleHint(QLatin1String("button-layout")).toList(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3173 | if (layout.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3174 | layout = subControlLayout(QLatin1String("mNX")); never executed: layout = subControlLayout(QLatin1String("mNX")); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3176 | QStyleOptionComplex optCopy(*opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3177 | optCopy.subControls = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3178 | for (int i = 0; i < layout.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3179 | int layoutButton = layout[i].toInt(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3180 | if (layoutButton < PseudoElement_MdiCloseButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3181 | || layoutButton > PseudoElement_MdiNormalButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3182 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3183 | QStyle::SubControl control = knownPseudoElements[layoutButton].subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3184 | if (!(opt->subControls & control)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3185 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3186 | QRenderRule subRule = renderRule(w, opt, layoutButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3187 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3188 | QRect rect = subRule.boxRect(subControlRect(CC_MdiControls, opt, control, w), Margin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3189 | subRule.drawRule(p, rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3190 | QIcon icon = standardIcon(subControlIcon(layoutButton), opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3191 | icon.paint(p, subRule.contentsRect(rect), Qt::AlignCenter); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3192 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3193 | optCopy.subControls |= control; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3194 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3195 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3197 | if (optCopy.subControls
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3198 | baseStyle()->drawComplexControl(CC_MdiControls, &optCopy, p, w); never executed: baseStyle()->drawComplexControl(CC_MdiControls, &optCopy, p, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3199 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3200 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3201 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3202 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3203 | case never executed: CC_TitleBar:case CC_TitleBar:never executed: case CC_TitleBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3204 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3205 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3206 | if (!subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3207 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3208 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3209 | QHash<QStyle::SubControl, QRect> layout = titleBarLayout(w, tb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3211 | QRect ir; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3212 | ir = layout[SC_TitleBarLabel]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3213 | if (ir.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3214 | if (subRule.hasPalette()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3215 | p->setPen(subRule.palette()->foreground.color()); never executed: p->setPen(subRule.palette()->foreground.color()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3216 | p->fillRect(ir, Qt::white); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3217 | p->drawText(ir.x(), ir.y(), ir.width(), ir.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3218 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3219 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3220 | QPixmap pm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3222 | ir = layout[SC_TitleBarSysMenu]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3223 | if (ir.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3224 | QRenderRule subSubRule = renderRule(w, opt, PseudoElement_TitleBarSysMenu); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3225 | subSubRule.drawRule(p, ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3226 | ir = subSubRule.contentsRect(ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3227 | if (!tb->icon.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3228 | tb->icon.paint(p, ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3229 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3230 | int iconSize = pixelMetric(PM_SmallIconSize, tb, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3231 | pm = standardIcon(SP_TitleBarMenuButton, 0, w).pixmap(iconSize, iconSize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3232 | drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3233 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3234 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3236 | ir = layout[SC_TitleBarCloseButton]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3237 | if (ir.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3238 | QRenderRule subSubRule = renderRule(w, opt, PseudoElement_TitleBarCloseButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3239 | subSubRule.drawRule(p, ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3240 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3241 | QSize sz = subSubRule.contentsRect(ir).size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3242 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3243 | pm = standardIcon(SP_DockWidgetCloseButton, 0, w).pixmap(sz); never executed: pm = standardIcon(SP_DockWidgetCloseButton, 0, w).pixmap(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3244 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3245 | pm = standardIcon(SP_TitleBarCloseButton, 0, w).pixmap(sz); never executed: pm = standardIcon(SP_TitleBarCloseButton, 0, w).pixmap(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3246 | drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3247 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3248 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3249 | int pes[] = { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3250 | PseudoElement_TitleBarMaxButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3251 | PseudoElement_TitleBarMinButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3252 | PseudoElement_TitleBarNormalButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3253 | PseudoElement_TitleBarShadeButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3254 | PseudoElement_TitleBarUnshadeButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3255 | PseudoElement_TitleBarContextHelpButton | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3256 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3257 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3258 | for (unsigned int i = 0; i < sizeof(pes)/sizeof(int)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3259 | int pe = pes[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3260 | QStyle::SubControl sc = knownPseudoElements[pe].subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3261 | ir = layout[sc]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3262 | if (!ir.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3263 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3264 | QRenderRule subSubRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3265 | subSubRule.drawRule(p, ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3266 | pm = standardIcon(subControlIcon(pe), 0, w).pixmap(subSubRule.contentsRect(ir).size()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3267 | drawItemPixmap(p, ir, Qt::AlignCenter, pm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3268 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3270 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3271 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3272 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3273 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3275 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3276 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3277 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3279 | baseStyle()->drawComplexControl(cc, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3280 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3282 | void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3283 | const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3284 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3285 | if (globalStyleSheetStyle != 0
never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3286 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3287 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3288 | int pe1 = PseudoElement_None, pe2 = PseudoElement_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3289 | bool fallback = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3290 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3291 | switch (ce) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3292 | case never executed: CE_ToolButtonLabel:case CE_ToolButtonLabel:never executed: case CE_ToolButtonLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3293 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3294 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3295 | QCommonStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3296 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3297 | QStyleOptionToolButton butOpt(*btn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3298 | rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3299 | baseStyle()->drawControl(ce, &butOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3300 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3301 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3302 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3303 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3304 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3305 | case never executed: CE_FocusFrame:case CE_FocusFrame:never executed: case CE_FocusFrame: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3306 | if (!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3307 | rule.drawBorder(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3308 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3309 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3310 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3311 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3312 | case never executed: CE_PushButton:case CE_PushButton:never executed: case CE_PushButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3313 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3314 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3315 | ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3316 | ParentStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3317 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3318 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3319 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3320 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3321 | case never executed: CE_PushButtonBevel:case CE_PushButtonBevel:never executed: case CE_PushButtonBevel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3322 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3323 | QStyleOptionButton btnOpt(*btn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3324 | btnOpt.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3325 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3326 | rule.drawBackgroundImage(p, btnOpt.rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3327 | rule.configurePalette(&btnOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3328 | bool customMenu = (btn->features & QStyleOptionButton::HasMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3329 | && hasStyleRule(w, PseudoElement_PushButtonMenuIndicator)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3330 | if (customMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3331 | btnOpt.features &= ~QStyleOptionButton::HasMenu; never executed: btnOpt.features &= ~QStyleOptionButton::HasMenu; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3332 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3333 | baseStyle()->drawControl(ce, &btnOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3334 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3335 | QWindowsStyle::drawControl(ce, &btnOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3336 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3337 | if (!customMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3338 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3339 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3340 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3341 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3342 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3343 | if (btn->features & QStyleOptionButton::HasMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3344 | QRenderRule subRule = renderRule(w, opt, PseudoElement_PushButtonMenuIndicator); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3345 | QRect ir = positionRect(w, rule, subRule, PseudoElement_PushButtonMenuIndicator, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3346 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3347 | subRule.drawRule(p, ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3348 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3349 | btnOpt.rect = ir; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3350 | baseStyle()->drawPrimitive(PE_IndicatorArrowDown, &btnOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3351 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3352 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3353 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3354 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3355 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3356 | case never executed: CE_PushButtonLabel:case CE_PushButtonLabel:never executed: case CE_PushButtonLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3357 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3358 | QStyleOptionButton butOpt(*button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3359 | rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3361 | const QFont oldFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3362 | if (rule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3363 | p->setFont(rule.font); never executed: p->setFont(rule.font); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3365 | if (rule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3366 | Qt::Alignment textAlignment = rule.position()->textAlignment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3367 | QRect textRect = button->rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3368 | uint tf = Qt::TextShowMnemonic; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3369 | const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3370 | tf |= (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3371 | if (!styleHint(SH_UnderlineShortcut, button, w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3372 | tf |= Qt::TextHideMnemonic; never executed: tf |= Qt::TextHideMnemonic; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3373 | if (!button->icon.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3374 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3375 | QRect iconRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3376 | QIcon::Mode mode = button->state & State_Enabled
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3377 | if (mode == QIcon::Normal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3378 | mode = QIcon::Active; never executed: mode = QIcon::Active; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3379 | QIcon::State state = QIcon::Off; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3380 | if (button->state & State_On
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3381 | state = QIcon::On; never executed: state = QIcon::On; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3382 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3383 | QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3384 | int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3385 | int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3386 | int labelWidth = pixmapWidth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3387 | int labelHeight = pixmapHeight; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3388 | int iconSpacing = 4; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3389 | int textWidth = button->fontMetrics.boundingRect(opt->rect, tf, button->text).width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3390 | if (!button->text.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3391 | labelWidth += (textWidth + iconSpacing); never executed: labelWidth += (textWidth + iconSpacing); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3393 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3394 | if (textAlignment & Qt::AlignLeft
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3395 | iconRect = QRect(textRect.x(), textRect.y() + (textRect.height() - labelHeight) / 2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3396 | pixmapWidth, pixmapHeight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3397 | } never executed: else if (textAlignment & Qt::AlignHCenterend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3398 | iconRect = QRect(textRect.x() + (textRect.width() - labelWidth) / 2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3399 | textRect.y() + (textRect.height() - labelHeight) / 2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3400 | pixmapWidth, pixmapHeight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3401 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3402 | iconRect = QRect(textRect.x() + textRect.width() - labelWidth, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3403 | textRect.y() + (textRect.height() - labelHeight) / 2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3404 | pixmapWidth, pixmapHeight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3405 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3407 | iconRect = visualRect(button->direction, textRect, iconRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3408 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3409 | tf |= Qt::AlignLeft; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3410 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3411 | if (button->direction == Qt::RightToLeft
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3412 | textRect.setRight(iconRect.left() - iconSpacing); never executed: textRect.setRight(iconRect.left() - iconSpacing); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3413 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3414 | textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing); never executed: textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3416 | if (button->state & (State_On | State_Sunken)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3417 | iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), never executed: iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3418 | pixelMetric(PM_ButtonShiftVertical, opt, w)); never executed: iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3419 | p->drawPixmap(iconRect, pixmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3420 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3421 | tf |= textAlignment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3422 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3423 | if (button->state & (State_On | State_Sunken)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3424 | textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), never executed: textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3425 | pixelMetric(PM_ButtonShiftVertical, opt, w)); never executed: textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), pixelMetric(PM_ButtonShiftVertical, opt, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3427 | if (button->features & QStyleOptionButton::HasMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3428 | int indicatorSize = pixelMetric(PM_MenuButtonIndicator, button, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3429 | if (button->direction == Qt::LeftToRight
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3430 | textRect = textRect.adjusted(0, 0, -indicatorSize, 0); never executed: textRect = textRect.adjusted(0, 0, -indicatorSize, 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3431 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3432 | textRect = textRect.adjusted(indicatorSize, 0, 0, 0); never executed: textRect = textRect.adjusted(indicatorSize, 0, 0, 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3433 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3434 | drawItemText(p, textRect, tf, butOpt.palette, (button->state & State_Enabled), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3435 | button->text, QPalette::ButtonText); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3436 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3437 | ParentStyle::drawControl(ce, &butOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3438 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3439 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3440 | if (rule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3441 | p->setFont(oldFont); never executed: p->setFont(oldFont); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3442 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3443 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3444 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3445 | case never executed: CE_RadioButton:case CE_RadioButton:never executed: case CE_RadioButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3446 | case never executed: CE_CheckBox:case CE_CheckBox:never executed: case CE_CheckBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3447 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3448 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3449 | ParentStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3450 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3451 | } else if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3452 | QStyleOptionButton butOpt(*btn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3453 | rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3454 | baseStyle()->drawControl(ce, &butOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3455 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3456 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3457 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3458 | case never executed: CE_RadioButtonLabel:case CE_RadioButtonLabel:never executed: case CE_RadioButtonLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3459 | case never executed: CE_CheckBoxLabel:case CE_CheckBoxLabel:never executed: case CE_CheckBoxLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3460 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3461 | QStyleOptionButton butOpt(*btn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3462 | rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3463 | ParentStyle::drawControl(ce, &butOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3464 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3465 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3466 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3467 | case never executed: CE_Splitter:case CE_Splitter:never executed: case CE_Splitter: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3468 | pe1 = PseudoElement_SplitterHandle; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3469 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3470 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3471 | case never executed: CE_ToolBar:case CE_ToolBar:never executed: case CE_ToolBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3472 | if (rule.hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3473 | rule.drawBackground(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3474 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3475 | if (rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3476 | rule.drawBorder(p, rule.borderRect(opt->rect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3477 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3479 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3480 | QStyleOptionToolBar newTb(*tb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3481 | newTb.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3482 | baseStyle()->drawControl(ce, &newTb, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3483 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3484 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3485 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3486 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3488 | case never executed: CE_MenuEmptyArea:case CE_MenuEmptyArea:never executed: case CE_MenuEmptyArea: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3489 | case never executed: CE_MenuBarEmptyArea:case CE_MenuBarEmptyArea:never executed: case CE_MenuBarEmptyArea: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3490 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3492 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3493 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3494 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3495 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3496 | case never executed: CE_MenuTearoff:case CE_MenuTearoff:never executed: case CE_MenuTearoff: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3497 | case never executed: CE_MenuScroller:case CE_MenuScroller:never executed: case CE_MenuScroller: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3498 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3499 | QStyleOptionMenuItem mi(*m); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3500 | int pe = ce == CE_MenuTearoff
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3501 | QRenderRule subRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3502 | mi.rect = subRule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3503 | rule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3504 | subRule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3505 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3506 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3507 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3508 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3509 | baseStyle()->drawControl(ce, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3510 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3511 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3512 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3514 | case never executed: CE_MenuItem:case CE_MenuItem:never executed: case CE_MenuItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3515 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3516 | QStyleOptionMenuItem mi(*m); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3518 | int pseudo = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3519 | QRenderRule subRule = renderRule(w, opt, pseudo); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3520 | mi.rect = subRule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3521 | rule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3522 | rule.configurePalette(&mi.palette, QPalette::HighlightedText, QPalette::Highlight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3523 | subRule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3524 | subRule.configurePalette(&mi.palette, QPalette::HighlightedText, QPalette::Highlight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3525 | QFont oldFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3526 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3527 | p->setFont(subRule.font.resolve(p->font())); never executed: p->setFont(subRule.font.resolve(p->font())); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3531 | QRenderRule allRules = renderRule(w, PseudoElement_Item, PseudoClass_Any); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3533 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3534 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3535 | } never executed: else if ((end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3536 | && (allRules.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3537 | || (allRules.background()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3538 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3539 | if (subRule.hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3540 | mi.palette.setBrush(QPalette::Highlight, Qt::NoBrush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3541 | mi.palette.setBrush(QPalette::Button, Qt::NoBrush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3542 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3543 | mi.palette.setBrush(QPalette::Highlight, mi.palette.brush(QPalette::Button)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3544 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3545 | mi.palette.setBrush(QPalette::HighlightedText, mi.palette.brush(QPalette::ButtonText)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3547 | bool checkable = mi.checkType != QStyleOptionMenuItem::NotCheckable; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3548 | bool checked = checkable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3549 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3550 | bool dis = !(opt->state & QStyle::State_Enabled), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3551 | act = opt->state & QStyle::State_Selected; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3553 | if (!mi.icon.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3554 | QIcon::Mode mode = dis
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3555 | if (act
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3556 | mode = QIcon::Active; never executed: mode = QIcon::Active; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3557 | QPixmap pixmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3558 | if (checked
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3559 | pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On); never executed: pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3560 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3561 | pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode); never executed: pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3562 | const int pixw = pixmap.width() / pixmap.devicePixelRatio(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3563 | const int pixh = pixmap.height() / pixmap.devicePixelRatio(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3564 | QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3565 | if (!iconRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3566 | iconRule.geo = new QStyleSheetGeometryData(pixw, pixh, pixw, pixh, -1, -1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3567 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3568 | iconRule.geo->width = pixw; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3569 | iconRule.geo->height = pixh; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3570 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3571 | QRect iconRect = positionRect(w, subRule, iconRule, PseudoElement_MenuIcon, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3572 | iconRule.drawRule(p, iconRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3573 | QRect pmr(0, 0, pixw, pixh); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3574 | pmr.moveCenter(iconRect.center()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3575 | p->drawPixmap(pmr.topLeft(), pixmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3576 | } never executed: else if (checkableend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3577 | QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3578 | if (subSubRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3579 | QStyleOptionMenuItem newMi = mi; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3580 | newMi.rect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3581 | drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3582 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3583 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3585 | QRect textRect = subRule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3586 | textRect.setWidth(textRect.width() - mi.tabWidth); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3587 | QStringRef s(&mi.text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3588 | p->setPen(mi.palette.buttonText().color()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3589 | if (!s.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3590 | int text_flags = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3591 | if (!styleHint(SH_UnderlineShortcut, &mi, w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3592 | text_flags |= Qt::TextHideMnemonic; never executed: text_flags |= Qt::TextHideMnemonic; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3593 | int t = s.indexOf(QLatin1Char('\t')); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3594 | if (t >= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3595 | QRect vShortcutRect = visualRect(opt->direction, mi.rect, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3596 | QRect(textRect.topRight(), QPoint(mi.rect.right(), textRect.bottom()))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3597 | p->drawText(vShortcutRect, text_flags, s.mid(t + 1).toString()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3598 | s = s.left(t); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3599 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3600 | p->drawText(textRect, text_flags, s.left(t).toString()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3601 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3602 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3603 | if (mi.menuItemType == QStyleOptionMenuItem::SubMenu
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3604 | PrimitiveElement arrow = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3605 | QRenderRule subRule2 = renderRule(w, opt, PseudoElement_MenuRightArrow); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3606 | mi.rect = positionRect(w, subRule, subRule2, PseudoElement_MenuRightArrow, opt->rect, mi.direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3607 | drawPrimitive(arrow, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3608 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3609 | } never executed: else if (hasStyleRule(w, PseudoElement_MenuCheckMark)end of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3610 | QWindowsStyle::drawControl(ce, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3611 | if (mi.checkType != QStyleOptionMenuItem::NotCheckable
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3612 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3613 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3614 | int checkcol = qMax<int>(mi.maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3615 | QRect vCheckRect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x(), mi.rect.y(), checkcol, mi.rect.height())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3616 | if (mi.state.testFlag(State_Enabled)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3617 | qDrawShadePanel(p, vCheckRect, mi.palette, true, 1, &mi.palette.brush(QPalette::Button)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3618 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3619 | QBrush fill(mi.palette.light().color(), Qt::Dense4Pattern); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3620 | qDrawShadePanel(p, vCheckRect, mi.palette, true, 1, &fill); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3621 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3622 | QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3623 | if (subSubRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3624 | QStyleOptionMenuItem newMi(mi); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3625 | newMi.rect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x() + QWindowsStylePrivate::windowsItemFrame, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3626 | mi.rect.y() + QWindowsStylePrivate::windowsItemFrame, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3627 | checkcol - 2 * QWindowsStylePrivate::windowsItemFrame, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3628 | mi.rect.height() - 2 * QWindowsStylePrivate::windowsItemFrame)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3629 | drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3630 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3631 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3632 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3633 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3634 | mi.palette.setColor(QPalette::Window, Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3635 | mi.palette.setColor(QPalette::Button, Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3636 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3637 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3638 | baseStyle()->drawControl(ce, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3639 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3640 | ParentStyle::drawControl(ce, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3641 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3642 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3644 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3645 | p->setFont(oldFont); never executed: p->setFont(oldFont); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3646 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3647 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3648 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3649 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3651 | case never executed: CE_MenuBarItem:case CE_MenuBarItem:never executed: case CE_MenuBarItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3652 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3653 | QStyleOptionMenuItem mi(*m); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3654 | QRenderRule subRule = renderRule(w, opt, PseudoElement_Item); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3655 | mi.rect = subRule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3656 | rule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3657 | subRule.configurePalette(&mi.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3658 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3659 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3660 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3661 | QCommonStyle::drawControl(ce, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3662 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3663 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3665 | mi.palette.setColor(QPalette::Window, Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3666 | mi.palette.setColor(QPalette::Button, Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3667 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3668 | baseStyle()->drawControl(ce, &mi, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3669 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3670 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3671 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3673 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3674 | case never executed: CE_ComboBoxLabel:case CE_ComboBoxLabel:never executed: case CE_ComboBoxLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3675 | if (!rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3676 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3677 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3678 | QRect editRect = subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3679 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3680 | p->setClipRect(editRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3681 | if (!cb->currentIcon.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3682 | int spacing = rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3683 | if (spacing == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3684 | spacing = 6; never executed: spacing = 6; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3685 | QIcon::Mode mode = cb->state & State_Enabled
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3686 | QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3687 | QRect iconRect(editRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3688 | iconRect.setWidth(cb->iconSize.width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3689 | iconRect = alignedRect(cb->direction, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3690 | Qt::AlignLeft | Qt::AlignVCenter, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3691 | iconRect.size(), editRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3692 | drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3693 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3694 | if (cb->direction == Qt::RightToLeft
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3695 | editRect.translate(-spacing - cb->iconSize.width(), 0); never executed: editRect.translate(-spacing - cb->iconSize.width(), 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3696 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3697 | editRect.translate(cb->iconSize.width() + spacing, 0); never executed: editRect.translate(cb->iconSize.width() + spacing, 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3698 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3699 | if (!cb->currentText.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3700 | QPalette styledPalette(cb->palette); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3701 | rule.configurePalette(&styledPalette, QPalette::Text, QPalette::Base); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3702 | drawItemText(p, editRect.adjusted(0, 0, 0, 0), Qt::AlignLeft | Qt::AlignVCenter, styledPalette, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3703 | cb->state & State_Enabled, cb->currentText, QPalette::Text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3704 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3705 | p->restore(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3706 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3707 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3708 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3709 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3710 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3711 | case never executed: CE_Header:case CE_Header:never executed: case CE_Header: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3712 | if (hasStyleRule(w, PseudoElement_HeaderViewUpArrow)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3713 | || hasStyleRule(w, PseudoElement_HeaderViewDownArrow)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3714 | ParentStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3715 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3716 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3717 | if(hasStyleRule(w, PseudoElement_HeaderViewSection)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3718 | QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3719 | if (!subRule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3720 | || subRule.hasBackground()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3721 | ParentStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3722 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3723 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3724 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3725 | const QFont oldFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3726 | p->setFont(subRule.font.resolve(p->font())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3727 | baseStyle()->drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3728 | p->setFont(oldFont); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3729 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3730 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3731 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3732 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3733 | case never executed: CE_HeaderSection:case CE_HeaderSection:never executed: case CE_HeaderSection: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3734 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3735 | QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3736 | if (subRule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3737 | QStyleOptionHeader hdr(*header); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3738 | subRule.configurePalette(&hdr.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3739 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3740 | if (subRule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3741 | baseStyle()->drawControl(CE_HeaderSection, &hdr, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3742 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3743 | QWindowsStyle::drawControl(CE_HeaderSection, &hdr, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3744 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3745 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3746 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3747 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3748 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3749 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3750 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3751 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3752 | case never executed: CE_HeaderLabel:case CE_HeaderLabel:never executed: case CE_HeaderLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3753 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3754 | QStyleOptionHeader hdr(*header); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3755 | QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3756 | subRule.configurePalette(&hdr.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3757 | QFont oldFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3758 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3759 | p->setFont(subRule.font.resolve(p->font())); never executed: p->setFont(subRule.font.resolve(p->font())); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3760 | baseStyle()->drawControl(ce, &hdr, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3761 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3762 | p->setFont(oldFont); never executed: p->setFont(oldFont); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3763 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3764 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3765 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3766 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3767 | case never executed: CE_HeaderEmptyArea:case CE_HeaderEmptyArea:never executed: case CE_HeaderEmptyArea: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3768 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3769 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3770 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3771 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3773 | case never executed: CE_ProgressBar:case CE_ProgressBar:never executed: case CE_ProgressBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3774 | QWindowsStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3775 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3776 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3777 | case never executed: CE_ProgressBarGroove:case CE_ProgressBarGroove:never executed: case CE_ProgressBarGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3778 | if (!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3779 | rule.drawRule(p, rule.boxRect(opt->rect, Margin)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3780 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3781 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3782 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3783 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3784 | case never executed: CE_ProgressBarContents:case CE_ProgressBarContents:never executed: {case CE_ProgressBarContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3785 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ProgressBarChunk); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3786 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3787 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3788 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3789 | p->setClipRect(pb->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3790 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3791 | qint64 minimum = qint64(pb->minimum); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3792 | qint64 maximum = qint64(pb->maximum); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3793 | qint64 progress = qint64(pb->progress); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3794 | bool vertical = (pb->orientation == Qt::Vertical); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3795 | bool inverted = pb->invertedAppearance; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3796 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3797 | QTransform m; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3798 | QRect rect = pb->rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3799 | if (vertical
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3800 | rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3801 | m.rotate(90); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3802 | m.translate(0, -(rect.height() + rect.y()*2)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3803 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3804 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3805 | bool reverse = ((!vertical
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3806 | if (inverted
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3807 | reverse = !reverse; never executed: reverse = !reverse; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3808 | const bool indeterminate = pb->minimum == pb->maximum; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3809 | qreal fillRatio = indeterminate
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3810 | int fillWidth = int(rect.width() * fillRatio); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3811 | int chunkWidth = fillWidth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3812 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3813 | QSize sz = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3814 | chunkWidth = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3815 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3816 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3817 | QRect r = rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3818 | const QWindowsStylePrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3819 | if (pb->minimum == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3820 | int chunkCount = fillWidth/chunkWidth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3821 | int offset = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3822 | if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3823 | offset = animation->animationStep() * 8 % rect.width(); never executed: offset = animation->animationStep() * 8 % rect.width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3824 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3825 | d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject)); never executed: d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3826 | int x = reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3827 | while (chunkCount > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3828 | r.setRect(x, rect.y(), chunkWidth, rect.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3829 | r = m.mapRect(QRectF(r)).toRect(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3830 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3831 | x += reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3832 | if (reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3833 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3834 | --chunkCount; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3835 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3837 | r = rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3838 | x = reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3839 | : r.left() + (x - r.right() - chunkWidth); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3840 | while (chunkCount > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3841 | r.setRect(x, rect.y(), chunkWidth, rect.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3842 | r = m.mapRect(QRectF(r)).toRect(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3843 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3844 | x += reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3845 | --chunkCount; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3846 | } never executed: ;end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3847 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3848 | int x = reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3849 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3850 | for (int i = 0; i < ((int)(qreal(fillWidth)/chunkWidth) + ((qreal(fillWidth)/chunkWidth) > 0 && (qreal(fillWidth)/chunkWidth) != (int)(qreal(fillWidth)/chunkWidth)))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3851 | r.setRect(x, rect.y(), chunkWidth, rect.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3852 | r = m.mapRect(QRectF(r)).toRect(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3853 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3854 | x += reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3855 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3856 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3857 | d->stopAnimation(opt->styleObject); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3858 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3859 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3860 | p->restore(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3861 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3862 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3863 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3864 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3865 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3866 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3867 | case never executed: CE_ProgressBarLabel:case CE_ProgressBarLabel:never executed: case CE_ProgressBarLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3868 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3869 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3870 | drawItemText(p, pb->rect, pb->textAlignment | Qt::TextSingleLine, pb->palette, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3871 | pb->state & State_Enabled, pb->text, QPalette::Text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3872 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3873 | QStyleOptionProgressBar pbCopy(*pb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3874 | rule.configurePalette(&pbCopy.palette, QPalette::HighlightedText, QPalette::Highlight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3875 | baseStyle()->drawControl(ce, &pbCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3876 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3877 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3878 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3879 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3880 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3881 | case never executed: CE_SizeGrip:case CE_SizeGrip:never executed: case CE_SizeGrip: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3882 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3883 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3884 | rule.drawFrame(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3885 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3886 | switch (sgOpt->corner) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3887 | case never executed: Qt::BottomRightCorner:case Qt::BottomRightCorner:never executed: break;case Qt::BottomRightCorner:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3888 | case never executed: Qt::BottomLeftCorner:case Qt::BottomLeftCorner:never executed: p->rotate(90); break;case Qt::BottomLeftCorner:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3889 | case never executed: Qt::TopLeftCorner:case Qt::TopLeftCorner:never executed: p->rotate(180); break;case Qt::TopLeftCorner:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3890 | case never executed: Qt::TopRightCorner:case Qt::TopRightCorner:never executed: p->rotate(270); break;case Qt::TopRightCorner:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3891 | default never executed: :default:never executed: break;default:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3892 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3893 | rule.drawImage(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3894 | p->restore(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3895 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3896 | QStyleOptionSizeGrip sg(*sgOpt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3897 | sg.rect = rule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3898 | baseStyle()->drawControl(CE_SizeGrip, &sg, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3899 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3900 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3901 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3902 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3903 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3904 | case never executed: CE_ToolBoxTab:case CE_ToolBoxTab:never executed: case CE_ToolBoxTab: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3905 | QWindowsStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3906 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3907 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3908 | case never executed: CE_ToolBoxTabShape:case CE_ToolBoxTabShape:never executed: {case CE_ToolBoxTabShape: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3909 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolBoxTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3910 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3911 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3912 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3913 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3914 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3915 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3916 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3917 | case never executed: CE_ToolBoxTabLabel:case CE_ToolBoxTabLabel:never executed: case CE_ToolBoxTabLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3918 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3919 | QStyleOptionToolBox boxCopy(*box); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3920 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolBoxTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3921 | subRule.configurePalette(&boxCopy.palette, QPalette::ButtonText, QPalette::Button); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3922 | QFont oldFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3923 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3924 | p->setFont(subRule.font); never executed: p->setFont(subRule.font); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3925 | boxCopy.rect = subRule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3926 | QWindowsStyle::drawControl(ce, &boxCopy, p , w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3927 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3928 | p->setFont(oldFont); never executed: p->setFont(oldFont); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3929 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3930 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3931 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3932 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3933 | case never executed: CE_ScrollBarAddPage:case CE_ScrollBarAddPage:never executed: case CE_ScrollBarAddPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3934 | pe1 = PseudoElement_ScrollBarAddPage; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3935 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3936 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3937 | case never executed: CE_ScrollBarSubPage:case CE_ScrollBarSubPage:never executed: case CE_ScrollBarSubPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3938 | pe1 = PseudoElement_ScrollBarSubPage; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3939 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3940 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3941 | case never executed: CE_ScrollBarAddLine:case CE_ScrollBarAddLine:never executed: case CE_ScrollBarAddLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3942 | pe1 = PseudoElement_ScrollBarAddLine; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3943 | pe2 = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3944 | fallback = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3945 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3946 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3947 | case never executed: CE_ScrollBarSubLine:case CE_ScrollBarSubLine:never executed: case CE_ScrollBarSubLine: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3948 | pe1 = PseudoElement_ScrollBarSubLine; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3949 | pe2 = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3950 | fallback = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3951 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3952 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3953 | case never executed: CE_ScrollBarFirst:case CE_ScrollBarFirst:never executed: case CE_ScrollBarFirst: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3954 | pe1 = PseudoElement_ScrollBarFirst; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3955 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3956 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3957 | case never executed: CE_ScrollBarLast:case CE_ScrollBarLast:never executed: case CE_ScrollBarLast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3958 | pe1 = PseudoElement_ScrollBarLast; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3959 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3960 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3961 | case never executed: CE_ScrollBarSlider:case CE_ScrollBarSlider:never executed: case CE_ScrollBarSlider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3962 | pe1 = PseudoElement_ScrollBarSlider; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3963 | fallback = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3964 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3965 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3966 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3967 | case never executed: CE_ItemViewItem:case CE_ItemViewItem:never executed: case CE_ItemViewItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3968 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3969 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3970 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3971 | QStyleOptionViewItem optCopy(*vopt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3972 | subRule.configurePalette(&optCopy.palette, vopt->state & QStyle::State_Selected ? QPalette::HighlightedText : QPalette::Text, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3973 | vopt->state & QStyle::State_Selected ? QPalette::Highlight : QPalette::Base); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3974 | QWindowsStyle::drawControl(ce, &optCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3975 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3976 | QStyleOptionViewItem voptCopy(*vopt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3977 | subRule.configurePalette(&voptCopy.palette, QPalette::Text, QPalette::NoRole); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3978 | baseStyle()->drawControl(ce, &voptCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3979 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3980 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3981 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3982 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3983 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3984 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3985 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3986 | case never executed: CE_TabBarTab:case CE_TabBarTab:never executed: case CE_TabBarTab: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3987 | if (hasStyleRule(w, PseudoElement_TabBarTab)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3988 | QWindowsStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3989 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3990 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3991 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3992 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3993 | case never executed: CE_TabBarTabLabel:case CE_TabBarTabLabel:never executed: case CE_TabBarTabLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3994 | case never executed: CE_TabBarTabShape:case CE_TabBarTabShape:never executed: case CE_TabBarTabShape: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3995 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3996 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3997 | QRect r = positionRect(w, subRule, PseudoElement_TabBarTab, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3998 | if (ce == CE_TabBarTabShape
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3999 | subRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4000 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4001 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4002 | QStyleOptionTab tabCopy(*tab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4003 | subRule.configurePalette(&tabCopy.palette, QPalette::WindowText, QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4004 | QFont oldFont = p->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4005 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4006 | p->setFont(subRule.font); never executed: p->setFont(subRule.font); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4007 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4008 | tabCopy.rect = ce == CE_TabBarTabShape
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4009 | : subRule.contentsRect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4010 | QWindowsStyle::drawControl(ce, &tabCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4011 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4012 | baseStyle()->drawControl(ce, &tabCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4013 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4014 | if (subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4015 | p->setFont(oldFont); never executed: p->setFont(oldFont); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4016 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4017 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4018 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4019 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4020 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4021 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4022 | case never executed: CE_ColumnViewGrip:case CE_ColumnViewGrip:never executed: case CE_ColumnViewGrip: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4023 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4024 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4025 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4026 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4027 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4028 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4029 | case never executed: CE_DockWidgetTitle:case CE_DockWidgetTitle:never executed: case CE_DockWidgetTitle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4030 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4031 | QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetTitle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4032 | if (!subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4033 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4034 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4035 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4036 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4037 | QStyleOptionDockWidget dwCopy(*dwOpt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4038 | dwCopy.title = QString(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4039 | baseStyle()->drawControl(ce, &dwCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4040 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4041 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4042 | if (!dwOpt->title.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4043 | QRect r = subElementRect(SE_DockWidgetTitleBarText, opt, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4044 | if (dwOpt->verticalTitleBar
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4045 | r = r.transposed(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4046 | p->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4047 | p->translate(r.left(), r.top() + r.width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4048 | p->rotate(-90); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4049 | p->translate(-r.left(), -r.top()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4050 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4051 | r = subRule.contentsRect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4052 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4053 | Qt::Alignment alignment = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4054 | if (subRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4055 | alignment = subRule.position()->textAlignment; never executed: alignment = subRule.position()->textAlignment; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4056 | if (alignment == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4057 | alignment = Qt::AlignLeft; never executed: alignment = Qt::AlignLeft; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4058 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4059 | QString titleText = p->fontMetrics().elidedText(dwOpt->title, Qt::ElideRight, r.width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4060 | drawItemText(p, r, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4061 | alignment | Qt::TextShowMnemonic, dwOpt->palette, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4062 | dwOpt->state & State_Enabled, titleText, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4063 | QPalette::WindowText); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4064 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4065 | if (dwOpt->verticalTitleBar
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4066 | p->restore(); never executed: p->restore(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4067 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4068 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4069 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4070 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4071 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4072 | case never executed: CE_ShapedFrame:case CE_ShapedFrame:never executed: case CE_ShapedFrame: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4073 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4074 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4075 | QStyleOptionFrame frmOpt(*frm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4076 | rule.configurePalette(&frmOpt.palette, QPalette::Text, QPalette::Base); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4077 | frmOpt.rect = rule.borderRect(frmOpt.rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4078 | baseStyle()->drawControl(ce, &frmOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4079 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4080 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4081 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4082 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4083 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4084 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4085 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4086 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4087 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4088 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4089 | if (pe1 != PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4090 | QRenderRule subRule = renderRule(w, opt, pe1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4091 | if (subRule.bg != 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4092 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4093 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4094 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4095 | } never executed: else if (fallbackend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4096 | QWindowsStyle::drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4097 | pe2 = PseudoElement_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4098 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4099 | baseStyle()->drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4100 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4101 | if (pe2 != PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4102 | QRenderRule subSubRule = renderRule(w, opt, pe2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4103 | QRect r = positionRect(w, subRule, subSubRule, pe2, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4104 | subSubRule.drawRule(p, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4105 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4106 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4107 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4108 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4109 | baseStyle()->drawControl(ce, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4110 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4111 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4112 | void QStyleSheetStyle::drawItemPixmap(QPainter *p, const QRect &rect, int alignment, const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4113 | QPixmap &pixmap) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4114 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4115 | baseStyle()->drawItemPixmap(p, rect, alignment, pixmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4116 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4118 | void QStyleSheetStyle::drawItemText(QPainter *painter, const QRect& rect, int alignment, const QPalette &pal, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4119 | bool enabled, const QString& text, QPalette::ColorRole textRole) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4120 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4121 | baseStyle()->drawItemText(painter, rect, alignment, pal, enabled, text, textRole); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4122 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4124 | void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4125 | const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4126 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4127 | if (globalStyleSheetStyle != 0
never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4128 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4129 | int pseudoElement = PseudoElement_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4130 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4131 | QRect rect = opt->rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4133 | switch (pe) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4134 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4135 | case never executed: PE_FrameStatusBar:case PE_FrameStatusBar:never executed: {case PE_FrameStatusBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4136 | QRenderRule subRule = renderRule(w ? w->parentWidget() : nullptr, opt, PseudoElement_Item); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4137 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4138 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4139 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4140 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4141 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4142 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4143 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4144 | case never executed: PE_IndicatorArrowDown:case PE_IndicatorArrowDown:never executed: case PE_IndicatorArrowDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4145 | pseudoElement = PseudoElement_DownArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4146 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4148 | case never executed: PE_IndicatorArrowUp:case PE_IndicatorArrowUp:never executed: case PE_IndicatorArrowUp: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4149 | pseudoElement = PseudoElement_UpArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4150 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4152 | case never executed: PE_IndicatorRadioButton:case PE_IndicatorRadioButton:never executed: case PE_IndicatorRadioButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4153 | pseudoElement = PseudoElement_ExclusiveIndicator; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4154 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4156 | case never executed: PE_IndicatorViewItemCheck:case PE_IndicatorViewItemCheck:never executed: case PE_IndicatorViewItemCheck: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4157 | pseudoElement = PseudoElement_ViewItemIndicator; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4158 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4159 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4160 | case never executed: PE_IndicatorCheckBox:case PE_IndicatorCheckBox:never executed: case PE_IndicatorCheckBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4161 | pseudoElement = PseudoElement_Indicator; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4162 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4164 | case never executed: PE_IndicatorHeaderArrow:case PE_IndicatorHeaderArrow:never executed: case PE_IndicatorHeaderArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4165 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4166 | pseudoElement = hdr->sortIndicator == QStyleOptionHeader::SortUp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4167 | ? PseudoElement_HeaderViewUpArrow | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4168 | : PseudoElement_HeaderViewDownArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4169 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4170 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4171 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4172 | case never executed: PE_PanelButtonTool:case PE_PanelButtonTool:never executed: case PE_PanelButtonTool: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4173 | case never executed: PE_PanelButtonCommand:case PE_PanelButtonCommand:never executed: case PE_PanelButtonCommand: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4174 | if (qobject_cast<const QAbstractButton *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4176 | ParentStyle::drawPrimitive(pe, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4177 | if (!rule.background()->pixmap.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4178 | rule.drawRule(p, rule.boxRect(opt->rect, QRenderRule::Margin).adjusted(1,1,-1,-1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4179 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4180 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4181 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4182 | if (!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4183 | rule.drawRule(p, rule.boxRect(opt->rect, QRenderRule::Margin)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4184 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4185 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4186 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4187 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4188 | case never executed: PE_IndicatorButtonDropDown:case PE_IndicatorButtonDropDown:never executed: {case PE_IndicatorButtonDropDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4189 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolButtonMenu); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4190 | if (!subRule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4191 | rule.drawBorder(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4192 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4193 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4194 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4195 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4197 | case never executed: PE_FrameDefaultButton:case PE_FrameDefaultButton:never executed: case PE_FrameDefaultButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4198 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4199 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4200 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4201 | QWindowsStyle::drawPrimitive(pe, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4202 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4203 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4204 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4205 | case never executed: PE_FrameWindow:case PE_FrameWindow:never executed: case PE_FrameWindow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4206 | case never executed: PE_FrameDockWidget:case PE_FrameDockWidget:never executed: case PE_FrameDockWidget: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4207 | case never executed: PE_Frame:case PE_Frame:never executed: case PE_Frame: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4208 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4209 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4210 | QStyleOptionFrame frmOpt(*frm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4211 | rule.configurePalette(&frmOpt.palette, QPalette::Text, QPalette::Base); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4212 | baseStyle()->drawPrimitive(pe, &frmOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4213 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4214 | rule.drawBorder(p, rule.borderRect(opt->rect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4215 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4216 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4217 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4218 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4219 | case never executed: PE_PanelLineEdit:case PE_PanelLineEdit:never executed: case PE_PanelLineEdit: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4220 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4222 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4223 | QRenderRule spinboxRule = renderRule(w->parentWidget(), opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4224 | if (!spinboxRule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4225 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4226 | rule = spinboxRule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4227 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4228 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4229 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4230 | QStyleOptionFrame frmOpt(*frm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4231 | rule.configurePalette(&frmOpt.palette, QPalette::Text, QPalette::Base); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4232 | frmOpt.rect = rule.borderRect(frmOpt.rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4233 | if (rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4234 | rule.drawBackgroundImage(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4235 | baseStyle()->drawPrimitive(pe, &frmOpt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4236 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4237 | rule.drawBackground(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4238 | if (frmOpt.lineWidth > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4239 | baseStyle()->drawPrimitive(PE_FrameLineEdit, &frmOpt, p, w); never executed: baseStyle()->drawPrimitive(PE_FrameLineEdit, &frmOpt, p, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4240 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4241 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4242 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4243 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4244 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4245 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4247 | case never executed: PE_Widget:case PE_Widget:never executed: case PE_Widget: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4248 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4249 | QWidget *container = containerWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4250 | if (styleSheetCaches->autoFillDisabledWidgets.contains(container)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4251 | && (container == w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4252 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4254 | p->fillRect(opt->rect, opt->palette.brush(w->backgroundRole())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4255 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4256 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4257 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4258 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4259 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4260 | const QAbstractScrollAreaPrivate *sap = sa->d_func(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4261 | rule.drawBackground(p, opt->rect, sap->contentsOffset()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4262 | if (rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4263 | QRect brect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4264 | if (styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, opt, w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4265 | QRect r = brect.adjusted(0, 0, sa->verticalScrollBar()->isVisible() ? -sa->verticalScrollBar()->width() : 0, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4266 | sa->horizontalScrollBar()->isVisible() ? -sa->horizontalScrollBar()->height() : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4267 | brect = QStyle::visualRect(opt->direction, brect, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4268 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4269 | rule.drawBorder(p, brect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4270 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4271 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4272 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4273 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4275 | case never executed: PE_PanelMenu:case PE_PanelMenu:never executed: case PE_PanelMenu:code before this statement never executed: case PE_PanelMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4276 | case never executed: PE_PanelStatusBar:case PE_PanelStatusBar:never executed: case PE_PanelStatusBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4277 | if(rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4278 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4279 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4280 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4281 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4283 | case never executed: PE_FrameMenu:case PE_FrameMenu:never executed: case PE_FrameMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4284 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4285 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4286 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4287 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4288 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4290 | case never executed: PE_PanelMenuBar:case PE_PanelMenuBar:never executed: case PE_PanelMenuBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4291 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4293 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4294 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4295 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4297 | case never executed: PE_IndicatorToolBarSeparator:case PE_IndicatorToolBarSeparator:never executed: case PE_IndicatorToolBarSeparator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4298 | case never executed: PE_IndicatorToolBarHandle:case PE_IndicatorToolBarHandle:never executed: {case PE_IndicatorToolBarHandle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4299 | PseudoElement ps = pe == PE_IndicatorToolBarHandle
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4300 | QRenderRule subRule = renderRule(w, opt, ps); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4301 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4302 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4303 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4304 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4305 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4306 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4307 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4308 | case never executed: PE_IndicatorMenuCheckMark:case PE_IndicatorMenuCheckMark:never executed: case PE_IndicatorMenuCheckMark: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4309 | pseudoElement = PseudoElement_MenuCheckMark; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4310 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4311 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4312 | case never executed: PE_IndicatorArrowLeft:case PE_IndicatorArrowLeft:never executed: case PE_IndicatorArrowLeft: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4313 | pseudoElement = PseudoElement_LeftArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4314 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4316 | case never executed: PE_IndicatorArrowRight:case PE_IndicatorArrowRight:never executed: case PE_IndicatorArrowRight: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4317 | pseudoElement = PseudoElement_RightArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4318 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4320 | case never executed: PE_IndicatorColumnViewArrow:case PE_IndicatorColumnViewArrow:never executed: case PE_IndicatorColumnViewArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4321 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4322 | bool reverse = (viewOpt->direction == Qt::RightToLeft); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4323 | pseudoElement = reverse
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4324 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4325 | pseudoElement = PseudoElement_RightArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4326 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4327 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4329 | case never executed: PE_IndicatorBranch:case PE_IndicatorBranch:never executed: case PE_IndicatorBranch: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4330 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4331 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TreeViewBranch); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4332 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4333 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4334 | p->fillRect(vopt->rect, vopt->palette.highlight()); never executed: p->fillRect(vopt->rect, vopt->palette.highlight()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4335 | else if (vopt->features & QStyleOptionViewItem::Alternate
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4336 | p->fillRect(vopt->rect, vopt->palette.alternateBase()); never executed: p->fillRect(vopt->rect, vopt->palette.alternateBase()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4337 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4338 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4339 | baseStyle()->drawPrimitive(pe, vopt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4340 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4341 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4342 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4343 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4344 | case never executed: PE_PanelTipLabel:case PE_PanelTipLabel:never executed: case PE_PanelTipLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4345 | if (!rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4346 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4348 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4349 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4350 | rule.drawBackground(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4351 | QStyleOptionFrame optCopy(*frmOpt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4352 | optCopy.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4353 | optCopy.palette.setBrush(QPalette::Window, Qt::NoBrush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4354 | baseStyle()->drawPrimitive(pe, &optCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4355 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4356 | rule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4357 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4358 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4359 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4361 | case never executed: PE_FrameGroupBox:case PE_FrameGroupBox:never executed: case PE_FrameGroupBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4362 | if (rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4363 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4364 | rule.drawBorder(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4365 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4366 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4367 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4368 | case never executed: PE_FrameTabWidget:case PE_FrameTabWidget:never executed: case PE_FrameTabWidget: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4369 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4370 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TabWidgetPane); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4371 | if (subRule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4372 | subRule.drawBackground(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4373 | QStyleOptionTabWidgetFrame frmCopy(*frm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4374 | subRule.configurePalette(&frmCopy.palette, QPalette::WindowText, QPalette::Window); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4375 | baseStyle()->drawPrimitive(pe, &frmCopy, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4376 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4377 | subRule.drawRule(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4378 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4379 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4380 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4381 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4382 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4383 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4384 | case never executed: PE_IndicatorProgressChunk:case PE_IndicatorProgressChunk:never executed: case PE_IndicatorProgressChunk: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4385 | pseudoElement = PseudoElement_ProgressBarChunk; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4386 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4387 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4388 | case never executed: PE_IndicatorTabTear:case PE_IndicatorTabTear:never executed: case PE_IndicatorTabTear: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4389 | pseudoElement = PseudoElement_TabBarTear; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4390 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4392 | case never executed: PE_FrameFocusRect:case PE_FrameFocusRect:never executed: case PE_FrameFocusRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4393 | if (!rule.hasNativeOutline()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4394 | rule.drawOutline(p, opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4395 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4396 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4397 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4398 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4399 | case never executed: PE_IndicatorDockWidgetResizeHandle:case PE_IndicatorDockWidgetResizeHandle:never executed: case PE_IndicatorDockWidgetResizeHandle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4400 | pseudoElement = PseudoElement_DockWidgetSeparator; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4401 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4403 | case never executed: PE_PanelItemViewItem:case PE_PanelItemViewItem:never executed: case PE_PanelItemViewItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4404 | pseudoElement = PseudoElement_ViewItem; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4405 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4407 | case never executed: PE_PanelScrollAreaCorner:case PE_PanelScrollAreaCorner:never executed: case PE_PanelScrollAreaCorner: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4408 | pseudoElement = PseudoElement_ScrollAreaCorner; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4409 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4410 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4411 | case never executed: PE_IndicatorSpinDown:case PE_IndicatorSpinDown:never executed: case PE_IndicatorSpinDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4412 | case never executed: PE_IndicatorSpinMinus:case PE_IndicatorSpinMinus:never executed: case PE_IndicatorSpinMinus: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4413 | pseudoElement = PseudoElement_SpinBoxDownArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4414 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4416 | case never executed: PE_IndicatorSpinUp:case PE_IndicatorSpinUp:never executed: case PE_IndicatorSpinUp: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4417 | case never executed: PE_IndicatorSpinPlus:case PE_IndicatorSpinPlus:never executed: case PE_IndicatorSpinPlus: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4418 | pseudoElement = PseudoElement_SpinBoxUpArrow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4419 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4421 | case never executed: PE_IndicatorTabClose:case PE_IndicatorTabClose:never executed: case PE_IndicatorTabClose: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4422 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4423 | w = w->parentWidget(); never executed: w = w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4424 | pseudoElement = PseudoElement_TabBarTabCloseButton; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4427 | default never executed: :default:never executed: default:code before this statement never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4428 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4429 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4430 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4431 | if (pseudoElement != PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4432 | QRenderRule subRule = renderRule(w, opt, pseudoElement); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4433 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4434 | subRule.drawRule(p, rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4435 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4436 | baseStyle()->drawPrimitive(pe, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4437 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4438 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4439 | baseStyle()->drawPrimitive(pe, opt, p, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4440 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4441 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4443 | QPixmap QStyleSheetStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4444 | const QStyleOption *option) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4445 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4446 | return never executed: baseStyle()->generatedIconPixmap(iconMode, pixmap, option);return baseStyle()->generatedIconPixmap(iconMode, pixmap, option);never executed: return baseStyle()->generatedIconPixmap(iconMode, pixmap, option); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4447 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4449 | QStyle::SubControl QStyleSheetStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4450 | const QPoint &pt, const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4451 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4452 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->hitTestComplexControl(cc, opt, pt, w);return baseStyle()->hitTestComplexControl(cc, opt, pt, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->hitTestComplexControl(cc, opt, pt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4453 | switch (cc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4454 | case never executed: CC_TitleBar:case CC_TitleBar:never executed: case CC_TitleBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4455 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4456 | QRenderRule rule = renderRule(w, opt, PseudoElement_TitleBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4457 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4458 | QHash<QStyle::SubControl, QRect> layout = titleBarLayout(w, tb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4459 | QRect r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4460 | QStyle::SubControl sc = QStyle::SC_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4461 | uint ctrl = SC_TitleBarSysMenu; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4462 | while (ctrl <= SC_TitleBarLabel
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4463 | r = layout[QStyle::SubControl(ctrl)]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4464 | if (r.isValid()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4465 | sc = QStyle::SubControl(ctrl); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4466 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4467 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4468 | ctrl <<= 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4469 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4470 | return never executed: sc;return sc;never executed: return sc; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4471 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4472 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4473 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4474 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4475 | case never executed: CC_MdiControls:case CC_MdiControls:never executed: case CC_MdiControls: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4476 | if (hasStyleRule(w, PseudoElement_MdiCloseButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4477 | || hasStyleRule(w, PseudoElement_MdiNormalButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4478 | || hasStyleRule(w, PseudoElement_MdiMinButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4479 | return never executed: QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);never executed: return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4480 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4481 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4482 | case never executed: CC_ScrollBar:case CC_ScrollBar:never executed: {case CC_ScrollBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4483 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4484 | if (!rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4485 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4486 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4488 | case never executed: CC_SpinBox:case CC_SpinBox:never executed: case CC_SpinBox:code before this statement never executed: case CC_SpinBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4489 | case never executed: CC_GroupBox:case CC_GroupBox:never executed: case CC_GroupBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4490 | case never executed: CC_ComboBox:case CC_ComboBox:never executed: case CC_ComboBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4491 | case never executed: CC_Slider:case CC_Slider:never executed: case CC_Slider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4492 | case never executed: CC_ToolButton:case CC_ToolButton:never executed: case CC_ToolButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4493 | return never executed: QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w);never executed: return QWindowsStyle::hitTestComplexControl(cc, opt, pt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4494 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4495 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4496 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4497 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4498 | return never executed: baseStyle()->hitTestComplexControl(cc, opt, pt, w);return baseStyle()->hitTestComplexControl(cc, opt, pt, w);never executed: return baseStyle()->hitTestComplexControl(cc, opt, pt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4499 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4500 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4501 | QRect QStyleSheetStyle::itemPixmapRect(const QRect &rect, int alignment, const QPixmap &pixmap) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4502 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4503 | return never executed: baseStyle()->itemPixmapRect(rect, alignment, pixmap);return baseStyle()->itemPixmapRect(rect, alignment, pixmap);never executed: return baseStyle()->itemPixmapRect(rect, alignment, pixmap); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4504 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4505 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4506 | QRect QStyleSheetStyle::itemTextRect(const QFontMetrics &metrics, const QRect& rect, int alignment, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4507 | bool enabled, const QString& text) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4508 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4509 | return never executed: baseStyle()->itemTextRect(metrics, rect, alignment, enabled, text);return baseStyle()->itemTextRect(metrics, rect, alignment, enabled, text);never executed: return baseStyle()->itemTextRect(metrics, rect, alignment, enabled, text); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4510 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4511 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4512 | int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4513 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4514 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->pixelMetric(m, opt, w);return baseStyle()->pixelMetric(m, opt, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->pixelMetric(m, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4516 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4517 | QRenderRule subRule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4518 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4519 | switch (m) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4520 | case never executed: PM_MenuButtonIndicator:case PM_MenuButtonIndicator:never executed: case PM_MenuButtonIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4523 | if (qobject_cast<const QToolButton *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4524 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4525 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4526 | subRule = renderRule(w, opt, PseudoElement_PushButtonMenuIndicator); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4527 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4528 | return never executed: subRule.size().width();return subRule.size().width();never executed: return subRule.size().width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4529 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4531 | case never executed: PM_ButtonShiftHorizontal:case PM_ButtonShiftHorizontal:never executed: case PM_ButtonShiftHorizontal: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4532 | case never executed: PM_ButtonShiftVertical:case PM_ButtonShiftVertical:never executed: case PM_ButtonShiftVertical: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4533 | case never executed: PM_ButtonMargin:case PM_ButtonMargin:never executed: case PM_ButtonMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4534 | case never executed: PM_ButtonDefaultIndicator:case PM_ButtonDefaultIndicator:never executed: case PM_ButtonDefaultIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4535 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4536 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4537 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4538 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4539 | case never executed: PM_DefaultFrameWidth:case PM_DefaultFrameWidth:never executed: case PM_DefaultFrameWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4540 | if (!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4541 | return never executed: rule.border()->borders[LeftEdge];return rule.border()->borders[LeftEdge];never executed: return rule.border()->borders[LeftEdge]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4542 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4544 | case never executed: PM_ExclusiveIndicatorWidth:case PM_ExclusiveIndicatorWidth:never executed: case PM_ExclusiveIndicatorWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4545 | case never executed: PM_IndicatorWidth:case PM_IndicatorWidth:never executed: case PM_IndicatorWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4546 | case never executed: PM_ExclusiveIndicatorHeight:case PM_ExclusiveIndicatorHeight:never executed: case PM_ExclusiveIndicatorHeight: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4547 | case never executed: PM_IndicatorHeight:case PM_IndicatorHeight:never executed: case PM_IndicatorHeight: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4548 | subRule = renderRule(w, opt, PseudoElement_Indicator); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4549 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4550 | return never executed: (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth)return (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth) ? subRule.size().width() : subRule.size().height();never executed: return (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth) ? subRule.size().width() : subRule.size().height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4551 | ? subRule.size().width() : subRule.size().height(); never executed: return (m == PM_ExclusiveIndicatorWidth) || (m == PM_IndicatorWidth) ? subRule.size().width() : subRule.size().height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4552 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4553 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4554 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4555 | case never executed: PM_DockWidgetFrameWidth:case PM_DockWidgetFrameWidth:never executed: case PM_DockWidgetFrameWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4556 | case never executed: PM_ToolTipLabelFrameWidth:case PM_ToolTipLabelFrameWidth:never executed: case PM_ToolTipLabelFrameWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4557 | if (!rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4558 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4559 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4560 | return never executed: (rule.border() ? rule.border()->borders[LeftEdge] : 0)return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0);never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4561 | + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0); never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge] + rule.box()->paddings[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4562 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4563 | case never executed: PM_ToolBarFrameWidth:case PM_ToolBarFrameWidth:never executed: case PM_ToolBarFrameWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4564 | if (rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4565 | return never executed: (rule.border() ? rule.border()->borders[LeftEdge] : 0)return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0);never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4566 | + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0); never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4567 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4568 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4569 | case never executed: PM_MenuPanelWidth:case PM_MenuPanelWidth:never executed: case PM_MenuPanelWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4570 | case never executed: PM_MenuBarPanelWidth:case PM_MenuBarPanelWidth:never executed: case PM_MenuBarPanelWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4571 | if (rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4572 | return never executed: (rule.border() ? rule.border()->borders[LeftEdge] : 0)return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0);never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4573 | + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0); never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->margins[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4574 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4575 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4577 | case never executed: PM_MenuHMargin:case PM_MenuHMargin:never executed: case PM_MenuHMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4578 | case never executed: PM_MenuBarHMargin:case PM_MenuBarHMargin:never executed: case PM_MenuBarHMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4579 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4580 | return never executed: rule.box()->paddings[LeftEdge];return rule.box()->paddings[LeftEdge];never executed: return rule.box()->paddings[LeftEdge]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4581 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4582 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4583 | case never executed: PM_MenuVMargin:case PM_MenuVMargin:never executed: case PM_MenuVMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4584 | case never executed: PM_MenuBarVMargin:case PM_MenuBarVMargin:never executed: case PM_MenuBarVMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4585 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4586 | return never executed: rule.box()->paddings[TopEdge];return rule.box()->paddings[TopEdge];never executed: return rule.box()->paddings[TopEdge]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4587 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4588 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4589 | case never executed: PM_DockWidgetTitleBarButtonMargin:case PM_DockWidgetTitleBarButtonMargin:never executed: case PM_DockWidgetTitleBarButtonMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4590 | case never executed: PM_ToolBarItemMargin:case PM_ToolBarItemMargin:never executed: case PM_ToolBarItemMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4591 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4592 | return never executed: rule.box()->margins[TopEdge];return rule.box()->margins[TopEdge];never executed: return rule.box()->margins[TopEdge]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4593 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4594 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4595 | case never executed: PM_ToolBarItemSpacing:case PM_ToolBarItemSpacing:never executed: case PM_ToolBarItemSpacing: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4596 | case never executed: PM_MenuBarItemSpacing:case PM_MenuBarItemSpacing:never executed: case PM_MenuBarItemSpacing: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4597 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4598 | return never executed: rule.box()->spacing;return rule.box()->spacing;never executed: return rule.box()->spacing; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4599 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4600 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4601 | case never executed: PM_MenuTearoffHeight:case PM_MenuTearoffHeight:never executed: case PM_MenuTearoffHeight: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4602 | case never executed: PM_MenuScrollerHeight:case PM_MenuScrollerHeight:never executed: {case PM_MenuScrollerHeight: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4603 | PseudoElement ps = m == PM_MenuTearoffHeight
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4604 | subRule = renderRule(w, opt, ps); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4605 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4606 | return never executed: subRule.size().height();return subRule.size().height();never executed: return subRule.size().height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4607 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4608 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4609 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4610 | case never executed: PM_ToolBarExtensionExtent:case PM_ToolBarExtensionExtent:never executed: case PM_ToolBarExtensionExtent: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4611 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4612 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4613 | case never executed: PM_SplitterWidth:case PM_SplitterWidth:never executed: case PM_SplitterWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4614 | case never executed: PM_ToolBarSeparatorExtent:case PM_ToolBarSeparatorExtent:never executed: case PM_ToolBarSeparatorExtent: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4615 | case never executed: PM_ToolBarHandleExtent:case PM_ToolBarHandleExtent:never executed: {case PM_ToolBarHandleExtent: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4616 | PseudoElement ps; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4617 | if (m == PM_ToolBarHandleExtent
never executed: ps = PseudoElement_ToolBarHandle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4618 | else if (m == PM_SplitterWidth
never executed: ps = PseudoElement_SplitterHandle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4619 | else ps = PseudoElement_ToolBarSeparator; never executed: ps = PseudoElement_ToolBarSeparator; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4620 | subRule = renderRule(w, opt, ps); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4621 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4622 | QSize sz = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4623 | return never executed: (opt && opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();return (opt && opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();never executed: return (opt && opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4624 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4625 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4626 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4628 | case never executed: PM_RadioButtonLabelSpacing:case PM_RadioButtonLabelSpacing:never executed: case PM_RadioButtonLabelSpacing: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4629 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4630 | return never executed: rule.box()->spacing;return rule.box()->spacing;never executed: return rule.box()->spacing; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4631 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4632 | case never executed: PM_CheckBoxLabelSpacing:case PM_CheckBoxLabelSpacing:never executed: case PM_CheckBoxLabelSpacing: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4633 | if (qobject_cast<const QCheckBox *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4634 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4635 | return never executed: rule.box()->spacing;return rule.box()->spacing;never executed: return rule.box()->spacing; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4636 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4637 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4638 | subRule = renderRule(w, opt, PseudoElement_GroupBoxTitle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4639 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4640 | return never executed: subRule.box()->spacing;return subRule.box()->spacing;never executed: return subRule.box()->spacing; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4641 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4644 | case never executed: PM_ScrollBarExtent:case PM_ScrollBarExtent:never executed: case PM_ScrollBarExtent: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4645 | if (rule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4646 | QSize sz = rule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4647 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4648 | return never executed: sb->orientation == Qt::Horizontal ? sz.height() : sz.width();return sb->orientation == Qt::Horizontal ? sz.height() : sz.width();never executed: return sb->orientation == Qt::Horizontal ? sz.height() : sz.width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4649 | return never executed: sz.width() == -1 ? sz.height() : sz.width();return sz.width() == -1 ? sz.height() : sz.width();never executed: return sz.width() == -1 ? sz.height() : sz.width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4650 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4651 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4653 | case never executed: PM_ScrollBarSliderMin:case PM_ScrollBarSliderMin:never executed: case PM_ScrollBarSliderMin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4654 | if (hasStyleRule(w, PseudoElement_ScrollBarSlider)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4655 | subRule = renderRule(w, opt, PseudoElement_ScrollBarSlider); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4656 | QSize msz = subRule.minimumSize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4657 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4658 | return never executed: sb->orientation == Qt::Horizontal ? msz.width() : msz.height();return sb->orientation == Qt::Horizontal ? msz.width() : msz.height();never executed: return sb->orientation == Qt::Horizontal ? msz.width() : msz.height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4659 | return never executed: msz.width() == -1 ? msz.height() : msz.width();return msz.width() == -1 ? msz.height() : msz.width();never executed: return msz.width() == -1 ? msz.height() : msz.width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4660 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4661 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4662 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4663 | case never executed: PM_ScrollView_ScrollBarSpacing:case PM_ScrollView_ScrollBarSpacing:never executed: case PM_ScrollView_ScrollBarSpacing: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4664 | if(!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4665 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4666 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4668 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4669 | case never executed: PM_ProgressBarChunkWidth:case PM_ProgressBarChunkWidth:never executed: case PM_ProgressBarChunkWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4670 | subRule = renderRule(w, opt, PseudoElement_ProgressBarChunk); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4671 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4672 | QSize sz = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4673 | return never executed: (opt->state & QStyle::State_Horizontal)return (opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height();never executed: return (opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4674 | ? sz.width() : sz.height(); never executed: return (opt->state & QStyle::State_Horizontal) ? sz.width() : sz.height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4675 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4676 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4677 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4679 | case never executed: PM_TabBarTabHSpace:case PM_TabBarTabHSpace:never executed: case PM_TabBarTabHSpace: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4680 | case never executed: PM_TabBarTabVSpace:case PM_TabBarTabVSpace:never executed: case PM_TabBarTabVSpace: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4681 | subRule = renderRule(w, opt, PseudoElement_TabBarTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4682 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4683 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4684 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4685 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4686 | case never executed: PM_TabBarScrollButtonWidth:case PM_TabBarScrollButtonWidth:never executed: {case PM_TabBarScrollButtonWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4687 | subRule = renderRule(w, opt, PseudoElement_TabBarScroller); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4688 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4689 | QSize sz = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4690 | return never executed: sz.width() != -1 ? sz.width() : sz.height();return sz.width() != -1 ? sz.width() : sz.height();never executed: return sz.width() != -1 ? sz.width() : sz.height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4691 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4692 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4693 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4694 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4695 | case never executed: PM_TabBarTabShiftHorizontal:case PM_TabBarTabShiftHorizontal:never executed: case PM_TabBarTabShiftHorizontal: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4696 | case never executed: PM_TabBarTabShiftVertical:case PM_TabBarTabShiftVertical:never executed: case PM_TabBarTabShiftVertical: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4697 | subRule = renderRule(w, opt, PseudoElement_TabBarTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4698 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4699 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4700 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4701 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4702 | case never executed: PM_TabBarBaseOverlap:case PM_TabBarBaseOverlap:never executed: {case PM_TabBarBaseOverlap: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4703 | const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4704 | if (!tabWidget
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4705 | tabWidget = w->parentWidget(); never executed: tabWidget = w->parentWidget(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4706 | if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4707 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4708 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4709 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4710 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4711 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4712 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4713 | case never executed: PM_SliderThickness:case PM_SliderThickness:never executed: case PM_SliderThickness: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4714 | case never executed: PM_SliderLength:case PM_SliderLength:never executed: case PM_SliderLength: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4715 | if (rule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4716 | bool horizontal = opt->state & QStyle::State_Horizontal; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4717 | if (m == PM_SliderThickness
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4718 | QSize sz = rule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4719 | return never executed: horizontal ? sz.height() : sz.width();return horizontal ? sz.height() : sz.width();never executed: return horizontal ? sz.height() : sz.width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4720 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4721 | QSize msz = rule.minimumContentsSize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4722 | return never executed: horizontal ? msz.width() : msz.height();return horizontal ? msz.width() : msz.height();never executed: return horizontal ? msz.width() : msz.height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4723 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4724 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4725 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4726 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4727 | case never executed: PM_SliderControlThickness:case PM_SliderControlThickness:never executed: {case PM_SliderControlThickness: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4728 | QRenderRule subRule = renderRule(w, opt, PseudoElement_SliderHandle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4729 | if (!subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4730 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4731 | QSize size = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4732 | return never executed: (opt->state & QStyle::State_Horizontal) ? size.height() : size.width();return (opt->state & QStyle::State_Horizontal) ? size.height() : size.width();never executed: return (opt->state & QStyle::State_Horizontal) ? size.height() : size.width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4733 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4734 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4735 | case never executed: PM_ToolBarIconSize:case PM_ToolBarIconSize:never executed: case PM_ToolBarIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4736 | case never executed: PM_ListViewIconSize:case PM_ListViewIconSize:never executed: case PM_ListViewIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4737 | case never executed: PM_IconViewIconSize:case PM_IconViewIconSize:never executed: case PM_IconViewIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4738 | case never executed: PM_TabBarIconSize:case PM_TabBarIconSize:never executed: case PM_TabBarIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4739 | case never executed: PM_MessageBoxIconSize:case PM_MessageBoxIconSize:never executed: case PM_MessageBoxIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4740 | case never executed: PM_ButtonIconSize:case PM_ButtonIconSize:never executed: case PM_ButtonIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4741 | case never executed: PM_SmallIconSize:case PM_SmallIconSize:never executed: case PM_SmallIconSize: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4742 | if (rule.hasStyleHint(QLatin1String("icon-size"))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4743 | return never executed: rule.styleHint(QLatin1String("icon-size")).toSize().width();return rule.styleHint(QLatin1String("icon-size")).toSize().width();never executed: return rule.styleHint(QLatin1String("icon-size")).toSize().width(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4744 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4745 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4746 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4747 | case never executed: PM_DockWidgetTitleMargin:case PM_DockWidgetTitleMargin:never executed: {case PM_DockWidgetTitleMargin: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4748 | QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetTitle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4749 | if (!subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4750 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4751 | return never executed: (subRule.border() ? subRule.border()->borders[TopEdge] : 0)return (subRule.border() ? subRule.border()->borders[TopEdge] : 0) + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0);never executed: return (subRule.border() ? subRule.border()->borders[TopEdge] : 0) + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4752 | + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0); never executed: return (subRule.border() ? subRule.border()->borders[TopEdge] : 0) + (subRule.hasBox() ? subRule.box()->margins[TopEdge] + subRule.box()->paddings[TopEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4753 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4754 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4755 | case never executed: PM_DockWidgetSeparatorExtent:case PM_DockWidgetSeparatorExtent:never executed: {case PM_DockWidgetSeparatorExtent: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4756 | QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetSeparator); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4757 | if (!subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4758 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4759 | QSize sz = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4760 | return never executed: qMax(sz.width(), sz.height());return qMax(sz.width(), sz.height());never executed: return qMax(sz.width(), sz.height()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4761 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4762 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4763 | case never executed: PM_TitleBarHeight:case PM_TitleBarHeight:never executed: {case PM_TitleBarHeight: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4764 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4765 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4766 | return never executed: subRule.size().height();return subRule.size().height();never executed: return subRule.size().height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4767 | else if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4768 | QFontMetrics fm = opt
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4769 | return never executed: subRule.size(QSize(0, fm.height())).height();return subRule.size(QSize(0, fm.height())).height();never executed: return subRule.size(QSize(0, fm.height())).height(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4770 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4771 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4772 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4774 | case never executed: PM_MdiSubWindowFrameWidth:case PM_MdiSubWindowFrameWidth:never executed: case PM_MdiSubWindowFrameWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4775 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4776 | return never executed: (rule.border() ? rule.border()->borders[LeftEdge] : 0)return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0);never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4777 | + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0); never executed: return (rule.border() ? rule.border()->borders[LeftEdge] : 0) + (rule.hasBox() ? rule.box()->paddings[LeftEdge]+rule.box()->margins[LeftEdge]: 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4778 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4779 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4780 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4781 | case never executed: PM_MdiSubWindowMinimizedWidth:case PM_MdiSubWindowMinimizedWidth:never executed: {case PM_MdiSubWindowMinimizedWidth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4782 | QRenderRule subRule = renderRule(w, PseudoElement_None, PseudoClass_Minimized); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4783 | int width = subRule.size().width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4784 | if (width != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4785 | return never executed: width;return width;never executed: return width; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4786 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4787 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4788 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4789 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4790 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4791 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4792 | return never executed: baseStyle()->pixelMetric(m, opt, w);return baseStyle()->pixelMetric(m, opt, w);never executed: return baseStyle()->pixelMetric(m, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4793 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4794 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4795 | QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4796 | const QSize &csz, const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4797 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4798 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->sizeFromContents(ct, opt, csz, w);return baseStyle()->sizeFromContents(ct, opt, csz, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->sizeFromContents(ct, opt, csz, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4799 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4800 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4801 | QSize sz = rule.adjustSize(csz); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4802 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4803 | switch (ct) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4804 | case never executed: CT_SpinBox:case CT_SpinBox:never executed: case CT_SpinBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4805 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4806 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4807 | QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4808 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4809 | QRect r = positionRect(w, rule, subRule, PseudoElement_SpinBoxUpButton, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4810 | opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4811 | sz += QSize(r.width(), 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4812 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4813 | QSize defaultUpSize = defaultSize(w, subRule.size(), spinbox->rect, PseudoElement_SpinBoxUpButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4814 | sz += QSize(defaultUpSize.width(), 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4815 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4816 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4817 | sz = rule.boxSize(sz); never executed: sz = rule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4818 | return never executed: sz;return sz;never executed: return sz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4819 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4820 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4821 | case never executed: CT_ToolButton:case CT_ToolButton:never executed: case CT_ToolButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4822 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4823 | sz += QSize(3, 3); never executed: sz += QSize(3, 3); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4824 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4825 | case never executed: CT_ComboBox:case CT_ComboBox:never executed: case CT_ComboBox:code before this statement never executed: case CT_ComboBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4826 | case never executed: CT_PushButton:case CT_PushButton:never executed: case CT_PushButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4827 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4828 | if(ct == CT_ComboBox
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4829 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4830 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4831 | QRect comboRect = positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4832 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4833 | sz += QSize(comboRect.width() + 2, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4834 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4835 | return never executed: rule.boxSize(sz);return rule.boxSize(sz);never executed: return rule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4836 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4837 | sz = rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4838 | : QWindowsStyle::sizeFromContents(ct, opt, sz, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4839 | return never executed: rule.boxSize(sz, Margin);return rule.boxSize(sz, Margin);never executed: return rule.boxSize(sz, Margin); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4841 | case never executed: CT_HeaderSection:case CT_HeaderSection:never executed: {case CT_HeaderSection: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4842 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4843 | QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4844 | if (subRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4845 | sz = subRule.adjustSize(csz); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4846 | if (!subRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4847 | QSize nativeContentsSize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4848 | bool nullIcon = hdr->icon.isNull(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4849 | int iconSize = nullIcon
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4850 | const QSize txt = subRule.hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4851 | : hdr->fontMetrics.size(0, hdr->text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4852 | nativeContentsSize.setHeight(qMax(iconSize, txt.height())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4853 | nativeContentsSize.setWidth(iconSize + txt.width()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4854 | sz = sz.expandedTo(nativeContentsSize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4855 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4856 | return never executed: subRule.size(sz);return subRule.size(sz);never executed: return subRule.size(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4857 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4858 | return never executed: subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w)return subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w) : QWindowsStyle::sizeFromContents(ct, opt, sz, w);never executed: return subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w) : QWindowsStyle::sizeFromContents(ct, opt, sz, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4859 | : QWindowsStyle::sizeFromContents(ct, opt, sz, w); never executed: return subRule.baseStyleCanDraw() ? baseStyle()->sizeFromContents(ct, opt, sz, w) : QWindowsStyle::sizeFromContents(ct, opt, sz, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4860 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4861 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4862 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4863 | case never executed: CT_GroupBox:case CT_GroupBox:never executed: case CT_GroupBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4864 | case never executed: CT_LineEdit:case CT_LineEdit:never executed: case CT_LineEdit: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4865 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4866 | if (qobject_cast<QAbstractSpinBox *>(w ? w->parentWidget() : 0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4867 | return never executed: csz;return csz;never executed: return csz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4868 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4869 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4870 | return never executed: rule.boxSize(sz);return rule.boxSize(sz);never executed: return rule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4871 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4872 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4873 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4874 | case never executed: CT_CheckBox:case CT_CheckBox:never executed: case CT_CheckBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4875 | case never executed: CT_RadioButton:case CT_RadioButton:never executed: case CT_RadioButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4876 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4877 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4878 | bool isRadio = (ct == CT_RadioButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4879 | int iw = pixelMetric(isRadio ? PM_ExclusiveIndicatorWidth | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4880 | : PM_IndicatorWidth, btn, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4881 | int ih = pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4882 | : PM_IndicatorHeight, btn, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4883 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4884 | int spacing = pixelMetric(isRadio ? PM_RadioButtonLabelSpacing | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4885 | : PM_CheckBoxLabelSpacing, btn, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4886 | sz.setWidth(sz.width() + iw + spacing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4887 | sz.setHeight(qMax(sz.height(), ih)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4888 | return never executed: rule.boxSize(sz);return rule.boxSize(sz);never executed: return rule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4889 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4890 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4891 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4892 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4893 | case never executed: CT_Menu:case CT_Menu:never executed: case CT_Menu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4894 | case never executed: CT_MenuBar:case CT_MenuBar:never executed: case CT_MenuBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4895 | case never executed: CT_ScrollBar:case CT_ScrollBar:never executed: case CT_ScrollBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4896 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4897 | return never executed: sz;return sz;never executed: return sz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4898 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4899 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4900 | case never executed: CT_MenuItem:case CT_MenuItem:never executed: case CT_MenuItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4901 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4902 | PseudoElement pe = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4903 | ? PseudoElement_MenuSeparator : PseudoElement_Item; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4904 | QRenderRule subRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4905 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4906 | return never executed: QSize(sz.width(), subRule.size().height());return QSize(sz.width(), subRule.size().height());never executed: return QSize(sz.width(), subRule.size().height()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4907 | } else if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4908 | int width = csz.width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4909 | if (mi->text.contains(QLatin1Char('\t'))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4910 | width += 12; never executed: width += 12; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4911 | return never executed: subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));never executed: return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height()))); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4912 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4913 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4914 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4915 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4916 | case never executed: CT_Splitter:case CT_Splitter:never executed: case CT_Splitter: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4917 | case never executed: CT_MenuBarItem:case CT_MenuBarItem:never executed: {case CT_MenuBarItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4918 | PseudoElement pe = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4919 | QRenderRule subRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4920 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4921 | return never executed: subRule.boxSize(sz);return subRule.boxSize(sz);never executed: return subRule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4922 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4923 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4924 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4925 | case never executed: CT_ProgressBar:case CT_ProgressBar:never executed: case CT_ProgressBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4926 | case never executed: CT_SizeGrip:case CT_SizeGrip:never executed: case CT_SizeGrip: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4927 | return never executed: (rule.hasContentsSize())return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w));never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4928 | ? rule.size(sz) never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4929 | : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w)); never executed: return (rule.hasContentsSize()) ? rule.size(sz) : rule.boxSize(baseStyle()->sizeFromContents(ct, opt, sz, w)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4930 | break; dead code: break; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4931 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4932 | case never executed: CT_Slider:case CT_Slider:never executed: case CT_Slider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4933 | if (rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4934 | return never executed: rule.boxSize(sz);return rule.boxSize(sz);never executed: return rule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4935 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4936 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4937 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4938 | case never executed: CT_TabBarTab:case CT_TabBarTab:never executed: {case CT_TabBarTab: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4939 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4940 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4941 | int spaceForIcon = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4942 | bool vertical = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4943 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4944 | if (!tab->icon.isNull()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4945 | spaceForIcon = 6 + 4 + 2 ; never executed: spaceForIcon = 6 + 4 + 2 ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4946 | vertical = verticalTabs(tab->shape); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4947 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4948 | sz = csz + QSize(vertical ? 0 : spaceForIcon, vertical ? spaceForIcon : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4949 | return never executed: subRule.boxSize(subRule.adjustSize(sz));return subRule.boxSize(subRule.adjustSize(sz));never executed: return subRule.boxSize(subRule.adjustSize(sz)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4950 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4951 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4952 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4953 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4954 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4955 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4956 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4957 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4958 | sz = subRule.adjustSize(csz); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4959 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4960 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4961 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4963 | case never executed: CT_MdiControls:case CT_MdiControls:never executed: case CT_MdiControls: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4964 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4965 | if (!hasStyleRule(w, PseudoElement_MdiCloseButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4966 | && !hasStyleRule(w, PseudoElement_MdiNormalButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4967 | && !hasStyleRule(w, PseudoElement_MdiMinButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4968 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4969 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4970 | QList<QVariant> layout = rule.styleHint(QLatin1String("button-layout")).toList(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4971 | if (layout.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4972 | layout = subControlLayout(QLatin1String("mNX")); never executed: layout = subControlLayout(QLatin1String("mNX")); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4973 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4974 | int width = 0, height = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4975 | for (int i = 0; i < layout.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4976 | int layoutButton = layout[i].toInt(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4977 | if (layoutButton < PseudoElement_MdiCloseButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4978 | || layoutButton > PseudoElement_MdiNormalButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4979 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4980 | QStyle::SubControl sc = knownPseudoElements[layoutButton].subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4981 | if (!(ccOpt->subControls & sc)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4982 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4983 | QRenderRule subRule = renderRule(w, opt, layoutButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4984 | QSize sz = subRule.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4985 | width += sz.width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4986 | height = qMax(height, sz.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4987 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4988 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4989 | return never executed: QSize(width, height);return QSize(width, height);never executed: return QSize(width, height); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4990 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4991 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4992 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4994 | case never executed: CT_ItemViewItem:case CT_ItemViewItem:never executed: {case CT_ItemViewItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4995 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4996 | sz = baseStyle()->sizeFromContents(ct, opt, csz, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4997 | sz = subRule.adjustSize(sz); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4998 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4999 | sz = subRule.boxSize(sz); never executed: sz = subRule.boxSize(sz); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5000 | return never executed: sz;return sz;never executed: return sz; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5001 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5004 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5005 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5006 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5007 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5008 | return never executed: baseStyle()->sizeFromContents(ct, opt, sz, w);return baseStyle()->sizeFromContents(ct, opt, sz, w);never executed: return baseStyle()->sizeFromContents(ct, opt, sz, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5009 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5010 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5011 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5013 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5014 | static QLatin1String propertyNameForStandardPixmap(QStyle::StandardPixmap sp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5015 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5016 | switch (sp) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5017 | case never executed: QStyle::SP_TitleBarMenuButton:case QStyle::SP_TitleBarMenuButton:never executed: returncase QStyle::SP_TitleBarMenuButton:never executed: QLatin1String("titlebar-menu-icon");return QLatin1String("titlebar-menu-icon");never executed: return QLatin1String("titlebar-menu-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5018 | case never executed: QStyle::SP_TitleBarMinButton:case QStyle::SP_TitleBarMinButton:never executed: returncase QStyle::SP_TitleBarMinButton:never executed: QLatin1String("titlebar-minimize-icon");return QLatin1String("titlebar-minimize-icon");never executed: return QLatin1String("titlebar-minimize-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5019 | case never executed: QStyle::SP_TitleBarMaxButton:case QStyle::SP_TitleBarMaxButton:never executed: returncase QStyle::SP_TitleBarMaxButton:never executed: QLatin1String("titlebar-maximize-icon");return QLatin1String("titlebar-maximize-icon");never executed: return QLatin1String("titlebar-maximize-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5020 | case never executed: QStyle::SP_TitleBarCloseButton:case QStyle::SP_TitleBarCloseButton:never executed: returncase QStyle::SP_TitleBarCloseButton:never executed: QLatin1String("titlebar-close-icon");return QLatin1String("titlebar-close-icon");never executed: return QLatin1String("titlebar-close-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5021 | case never executed: QStyle::SP_TitleBarNormalButton:case QStyle::SP_TitleBarNormalButton:never executed: returncase QStyle::SP_TitleBarNormalButton:never executed: QLatin1String("titlebar-normal-icon");return QLatin1String("titlebar-normal-icon");never executed: return QLatin1String("titlebar-normal-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5022 | case never executed: QStyle::SP_TitleBarShadeButton:case QStyle::SP_TitleBarShadeButton:never executed: returncase QStyle::SP_TitleBarShadeButton:never executed: QLatin1String("titlebar-shade-icon");return QLatin1String("titlebar-shade-icon");never executed: return QLatin1String("titlebar-shade-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5023 | case never executed: QStyle::SP_TitleBarUnshadeButton:case QStyle::SP_TitleBarUnshadeButton:never executed: returncase QStyle::SP_TitleBarUnshadeButton:never executed: QLatin1String("titlebar-unshade-icon");return QLatin1String("titlebar-unshade-icon");never executed: return QLatin1String("titlebar-unshade-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5024 | case never executed: QStyle::SP_TitleBarContextHelpButton:case QStyle::SP_TitleBarContextHelpButton:never executed: returncase QStyle::SP_TitleBarContextHelpButton:never executed: QLatin1String("titlebar-contexthelp-icon");return QLatin1String("titlebar-contexthelp-icon");never executed: return QLatin1String("titlebar-contexthelp-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5025 | case never executed: QStyle::SP_DockWidgetCloseButton:case QStyle::SP_DockWidgetCloseButton:never executed: returncase QStyle::SP_DockWidgetCloseButton:never executed: QLatin1String("dockwidget-close-icon");return QLatin1String("dockwidget-close-icon");never executed: return QLatin1String("dockwidget-close-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5026 | case never executed: QStyle::SP_MessageBoxInformation:case QStyle::SP_MessageBoxInformation:never executed: returncase QStyle::SP_MessageBoxInformation:never executed: QLatin1String("messagebox-information-icon");return QLatin1String("messagebox-information-icon");never executed: return QLatin1String("messagebox-information-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5027 | case never executed: QStyle::SP_MessageBoxWarning:case QStyle::SP_MessageBoxWarning:never executed: returncase QStyle::SP_MessageBoxWarning:never executed: QLatin1String("messagebox-warning-icon");return QLatin1String("messagebox-warning-icon");never executed: return QLatin1String("messagebox-warning-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5028 | case never executed: QStyle::SP_MessageBoxCritical:case QStyle::SP_MessageBoxCritical:never executed: returncase QStyle::SP_MessageBoxCritical:never executed: QLatin1String("messagebox-critical-icon");return QLatin1String("messagebox-critical-icon");never executed: return QLatin1String("messagebox-critical-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5029 | case never executed: QStyle::SP_MessageBoxQuestion:case QStyle::SP_MessageBoxQuestion:never executed: returncase QStyle::SP_MessageBoxQuestion:never executed: QLatin1String("messagebox-question-icon");return QLatin1String("messagebox-question-icon");never executed: return QLatin1String("messagebox-question-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5030 | case never executed: QStyle::SP_DesktopIcon:case QStyle::SP_DesktopIcon:never executed: returncase QStyle::SP_DesktopIcon:never executed: QLatin1String("desktop-icon");return QLatin1String("desktop-icon");never executed: return QLatin1String("desktop-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5031 | case never executed: QStyle::SP_TrashIcon:case QStyle::SP_TrashIcon:never executed: returncase QStyle::SP_TrashIcon:never executed: QLatin1String("trash-icon");return QLatin1String("trash-icon");never executed: return QLatin1String("trash-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5032 | case never executed: QStyle::SP_ComputerIcon:case QStyle::SP_ComputerIcon:never executed: returncase QStyle::SP_ComputerIcon:never executed: QLatin1String("computer-icon");return QLatin1String("computer-icon");never executed: return QLatin1String("computer-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5033 | case never executed: QStyle::SP_DriveFDIcon:case QStyle::SP_DriveFDIcon:never executed: returncase QStyle::SP_DriveFDIcon:never executed: QLatin1String("floppy-icon");return QLatin1String("floppy-icon");never executed: return QLatin1String("floppy-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5034 | case never executed: QStyle::SP_DriveHDIcon:case QStyle::SP_DriveHDIcon:never executed: returncase QStyle::SP_DriveHDIcon:never executed: QLatin1String("harddisk-icon");return QLatin1String("harddisk-icon");never executed: return QLatin1String("harddisk-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5035 | case never executed: QStyle::SP_DriveCDIcon:case QStyle::SP_DriveCDIcon:never executed: returncase QStyle::SP_DriveCDIcon:never executed: QLatin1String("cd-icon");return QLatin1String("cd-icon");never executed: return QLatin1String("cd-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5036 | case never executed: QStyle::SP_DriveDVDIcon:case QStyle::SP_DriveDVDIcon:never executed: returncase QStyle::SP_DriveDVDIcon:never executed: QLatin1String("dvd-icon");return QLatin1String("dvd-icon");never executed: return QLatin1String("dvd-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5037 | case never executed: QStyle::SP_DriveNetIcon:case QStyle::SP_DriveNetIcon:never executed: returncase QStyle::SP_DriveNetIcon:never executed: QLatin1String("network-icon");return QLatin1String("network-icon");never executed: return QLatin1String("network-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5038 | case never executed: QStyle::SP_DirOpenIcon:case QStyle::SP_DirOpenIcon:never executed: returncase QStyle::SP_DirOpenIcon:never executed: QLatin1String("directory-open-icon");return QLatin1String("directory-open-icon");never executed: return QLatin1String("directory-open-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5039 | case never executed: QStyle::SP_DirClosedIcon:case QStyle::SP_DirClosedIcon:never executed: returncase QStyle::SP_DirClosedIcon:never executed: QLatin1String("directory-closed-icon");return QLatin1String("directory-closed-icon");never executed: return QLatin1String("directory-closed-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5040 | case never executed: QStyle::SP_DirLinkIcon:case QStyle::SP_DirLinkIcon:never executed: returncase QStyle::SP_DirLinkIcon:never executed: QLatin1String("directory-link-icon");return QLatin1String("directory-link-icon");never executed: return QLatin1String("directory-link-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5041 | case never executed: QStyle::SP_FileIcon:case QStyle::SP_FileIcon:never executed: returncase QStyle::SP_FileIcon:never executed: QLatin1String("file-icon");return QLatin1String("file-icon");never executed: return QLatin1String("file-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5042 | case never executed: QStyle::SP_FileLinkIcon:case QStyle::SP_FileLinkIcon:never executed: returncase QStyle::SP_FileLinkIcon:never executed: QLatin1String("file-link-icon");return QLatin1String("file-link-icon");never executed: return QLatin1String("file-link-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5043 | case never executed: QStyle::SP_FileDialogStart:case QStyle::SP_FileDialogStart:never executed: returncase QStyle::SP_FileDialogStart:never executed: QLatin1String("filedialog-start-icon");return QLatin1String("filedialog-start-icon");never executed: return QLatin1String("filedialog-start-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5044 | case never executed: QStyle::SP_FileDialogEnd:case QStyle::SP_FileDialogEnd:never executed: returncase QStyle::SP_FileDialogEnd:never executed: QLatin1String("filedialog-end-icon");return QLatin1String("filedialog-end-icon");never executed: return QLatin1String("filedialog-end-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5045 | case never executed: QStyle::SP_FileDialogToParent:case QStyle::SP_FileDialogToParent:never executed: returncase QStyle::SP_FileDialogToParent:never executed: QLatin1String("filedialog-parent-directory-icon");return QLatin1String("filedialog-parent-directory-icon");never executed: return QLatin1String("filedialog-parent-directory-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5046 | case never executed: QStyle::SP_FileDialogNewFolder:case QStyle::SP_FileDialogNewFolder:never executed: returncase QStyle::SP_FileDialogNewFolder:never executed: QLatin1String("filedialog-new-directory-icon");return QLatin1String("filedialog-new-directory-icon");never executed: return QLatin1String("filedialog-new-directory-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5047 | case never executed: QStyle::SP_FileDialogDetailedView:case QStyle::SP_FileDialogDetailedView:never executed: returncase QStyle::SP_FileDialogDetailedView:never executed: QLatin1String("filedialog-detailedview-icon");return QLatin1String("filedialog-detailedview-icon");never executed: return QLatin1String("filedialog-detailedview-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5048 | case never executed: QStyle::SP_FileDialogInfoView:case QStyle::SP_FileDialogInfoView:never executed: returncase QStyle::SP_FileDialogInfoView:never executed: QLatin1String("filedialog-infoview-icon");return QLatin1String("filedialog-infoview-icon");never executed: return QLatin1String("filedialog-infoview-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5049 | case never executed: QStyle::SP_FileDialogContentsView:case QStyle::SP_FileDialogContentsView:never executed: returncase QStyle::SP_FileDialogContentsView:never executed: QLatin1String("filedialog-contentsview-icon");return QLatin1String("filedialog-contentsview-icon");never executed: return QLatin1String("filedialog-contentsview-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5050 | case never executed: QStyle::SP_FileDialogListView:case QStyle::SP_FileDialogListView:never executed: returncase QStyle::SP_FileDialogListView:never executed: QLatin1String("filedialog-listview-icon");return QLatin1String("filedialog-listview-icon");never executed: return QLatin1String("filedialog-listview-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5051 | case never executed: QStyle::SP_FileDialogBack:case QStyle::SP_FileDialogBack:never executed: returncase QStyle::SP_FileDialogBack:never executed: QLatin1String("filedialog-backward-icon");return QLatin1String("filedialog-backward-icon");never executed: return QLatin1String("filedialog-backward-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5052 | case never executed: QStyle::SP_DirIcon:case QStyle::SP_DirIcon:never executed: returncase QStyle::SP_DirIcon:never executed: QLatin1String("directory-icon");return QLatin1String("directory-icon");never executed: return QLatin1String("directory-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5053 | case never executed: QStyle::SP_DialogOkButton:case QStyle::SP_DialogOkButton:never executed: returncase QStyle::SP_DialogOkButton:never executed: QLatin1String("dialog-ok-icon");return QLatin1String("dialog-ok-icon");never executed: return QLatin1String("dialog-ok-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5054 | case never executed: QStyle::SP_DialogCancelButton:case QStyle::SP_DialogCancelButton:never executed: returncase QStyle::SP_DialogCancelButton:never executed: QLatin1String("dialog-cancel-icon");return QLatin1String("dialog-cancel-icon");never executed: return QLatin1String("dialog-cancel-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5055 | case never executed: QStyle::SP_DialogHelpButton:case QStyle::SP_DialogHelpButton:never executed: returncase QStyle::SP_DialogHelpButton:never executed: QLatin1String("dialog-help-icon");return QLatin1String("dialog-help-icon");never executed: return QLatin1String("dialog-help-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5056 | case never executed: QStyle::SP_DialogOpenButton:case QStyle::SP_DialogOpenButton:never executed: returncase QStyle::SP_DialogOpenButton:never executed: QLatin1String("dialog-open-icon");return QLatin1String("dialog-open-icon");never executed: return QLatin1String("dialog-open-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5057 | case never executed: QStyle::SP_DialogSaveButton:case QStyle::SP_DialogSaveButton:never executed: returncase QStyle::SP_DialogSaveButton:never executed: QLatin1String("dialog-save-icon");return QLatin1String("dialog-save-icon");never executed: return QLatin1String("dialog-save-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5058 | case never executed: QStyle::SP_DialogCloseButton:case QStyle::SP_DialogCloseButton:never executed: returncase QStyle::SP_DialogCloseButton:never executed: QLatin1String("dialog-close-icon");return QLatin1String("dialog-close-icon");never executed: return QLatin1String("dialog-close-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5059 | case never executed: QStyle::SP_DialogApplyButton:case QStyle::SP_DialogApplyButton:never executed: returncase QStyle::SP_DialogApplyButton:never executed: QLatin1String("dialog-apply-icon");return QLatin1String("dialog-apply-icon");never executed: return QLatin1String("dialog-apply-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5060 | case never executed: QStyle::SP_DialogResetButton:case QStyle::SP_DialogResetButton:never executed: returncase QStyle::SP_DialogResetButton:never executed: QLatin1String("dialog-reset-icon");return QLatin1String("dialog-reset-icon");never executed: return QLatin1String("dialog-reset-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5061 | case never executed: QStyle::SP_DialogDiscardButton:case QStyle::SP_DialogDiscardButton:never executed: returncase QStyle::SP_DialogDiscardButton:never executed: QLatin1String("discard-icon");return QLatin1String("discard-icon");never executed: return QLatin1String("discard-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5062 | case never executed: QStyle::SP_DialogYesButton:case QStyle::SP_DialogYesButton:never executed: returncase QStyle::SP_DialogYesButton:never executed: QLatin1String("dialog-yes-icon");return QLatin1String("dialog-yes-icon");never executed: return QLatin1String("dialog-yes-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5063 | case never executed: QStyle::SP_DialogNoButton:case QStyle::SP_DialogNoButton:never executed: returncase QStyle::SP_DialogNoButton:never executed: QLatin1String("dialog-no-icon");return QLatin1String("dialog-no-icon");never executed: return QLatin1String("dialog-no-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5064 | case never executed: QStyle::SP_ArrowUp:case QStyle::SP_ArrowUp:never executed: returncase QStyle::SP_ArrowUp:never executed: QLatin1String("uparrow-icon");return QLatin1String("uparrow-icon");never executed: return QLatin1String("uparrow-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5065 | case never executed: QStyle::SP_ArrowDown:case QStyle::SP_ArrowDown:never executed: returncase QStyle::SP_ArrowDown:never executed: QLatin1String("downarrow-icon");return QLatin1String("downarrow-icon");never executed: return QLatin1String("downarrow-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5066 | case never executed: QStyle::SP_ArrowLeft:case QStyle::SP_ArrowLeft:never executed: returncase QStyle::SP_ArrowLeft:never executed: QLatin1String("leftarrow-icon");return QLatin1String("leftarrow-icon");never executed: return QLatin1String("leftarrow-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5067 | case never executed: QStyle::SP_ArrowRight:case QStyle::SP_ArrowRight:never executed: returncase QStyle::SP_ArrowRight:never executed: QLatin1String("rightarrow-icon");return QLatin1String("rightarrow-icon");never executed: return QLatin1String("rightarrow-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5068 | case never executed: QStyle::SP_ArrowBack:case QStyle::SP_ArrowBack:never executed: returncase QStyle::SP_ArrowBack:never executed: QLatin1String("backward-icon");return QLatin1String("backward-icon");never executed: return QLatin1String("backward-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5069 | case never executed: QStyle::SP_ArrowForward:case QStyle::SP_ArrowForward:never executed: returncase QStyle::SP_ArrowForward:never executed: QLatin1String("forward-icon");return QLatin1String("forward-icon");never executed: return QLatin1String("forward-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5070 | case never executed: QStyle::SP_DirHomeIcon:case QStyle::SP_DirHomeIcon:never executed: returncase QStyle::SP_DirHomeIcon:never executed: QLatin1String("home-icon");return QLatin1String("home-icon");never executed: return QLatin1String("home-icon"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5071 | default never executed: :default:never executed: returndefault:never executed: QLatin1String("");return QLatin1String("");never executed: return QLatin1String(""); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5072 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5073 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5074 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5075 | QIcon QStyleSheetStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5076 | const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5077 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5078 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->standardIcon(standardIcon, opt, w);return baseStyle()->standardIcon(standardIcon, opt, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->standardIcon(standardIcon, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5079 | QString s = propertyNameForStandardPixmap(standardIcon); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5080 | if (!s.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5081 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5082 | if (rule.hasStyleHint(s)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5083 | return never executed: qvariant_cast<QIcon>(rule.styleHint(s));return qvariant_cast<QIcon>(rule.styleHint(s));never executed: return qvariant_cast<QIcon>(rule.styleHint(s)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5084 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5085 | return never executed: baseStyle()->standardIcon(standardIcon, opt, w);return baseStyle()->standardIcon(standardIcon, opt, w);never executed: return baseStyle()->standardIcon(standardIcon, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5086 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5087 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5088 | QPalette QStyleSheetStyle::standardPalette() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5089 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5090 | return never executed: baseStyle()->standardPalette();return baseStyle()->standardPalette();never executed: return baseStyle()->standardPalette(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5091 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5092 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5093 | QPixmap QStyleSheetStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5094 | const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5095 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5096 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->standardPixmap(standardPixmap, opt, w);return baseStyle()->standardPixmap(standardPixmap, opt, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->standardPixmap(standardPixmap, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5097 | QString s = propertyNameForStandardPixmap(standardPixmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5098 | if (!s.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5099 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5100 | if (rule.hasStyleHint(s)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5101 | QIcon icon = qvariant_cast<QIcon>(rule.styleHint(s)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5102 | return never executed: icon.pixmap(16, 16);return icon.pixmap(16, 16);never executed: return icon.pixmap(16, 16); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5103 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5104 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5105 | return never executed: baseStyle()->standardPixmap(standardPixmap, opt, w);return baseStyle()->standardPixmap(standardPixmap, opt, w);never executed: return baseStyle()->standardPixmap(standardPixmap, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5106 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5107 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5108 | int QStyleSheetStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5109 | Qt::Orientation orientation, const QStyleOption *option, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5110 | const QWidget *widget) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5111 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5112 | return never executed: baseStyle()->layoutSpacing(control1, control2, orientation, option, widget);return baseStyle()->layoutSpacing(control1, control2, orientation, option, widget);never executed: return baseStyle()->layoutSpacing(control1, control2, orientation, option, widget); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5113 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5114 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5115 | int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5116 | QStyleHintReturn *shret) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5117 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5118 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->styleHint(sh, opt, w, shret);return baseStyle()->styleHint(sh, opt, w, shret);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->styleHint(sh, opt, w, shret); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5119 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5121 | if (sh == SH_Widget_ShareActivation
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5122 | return never executed: baseStyle()->styleHint(sh, opt, w, shret);return baseStyle()->styleHint(sh, opt, w, shret);never executed: return baseStyle()->styleHint(sh, opt, w, shret); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5124 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5125 | QString s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5126 | switch (sh) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5127 | case never executed: SH_LineEdit_PasswordCharacter:case SH_LineEdit_PasswordCharacter:never executed: s = QLatin1String("lineedit-password-character"); break;case SH_LineEdit_PasswordCharacter:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5128 | case never executed: SH_LineEdit_PasswordMaskDelay:case SH_LineEdit_PasswordMaskDelay:never executed: s = QLatin1String("lineedit-password-mask-delay"); break;case SH_LineEdit_PasswordMaskDelay:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5129 | case never executed: SH_DitherDisabledText:case SH_DitherDisabledText:never executed: s = QLatin1String("dither-disabled-text"); break;case SH_DitherDisabledText:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5130 | case never executed: SH_EtchDisabledText:case SH_EtchDisabledText:never executed: s = QLatin1String("etch-disabled-text"); break;case SH_EtchDisabledText:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5131 | case never executed: SH_ItemView_ActivateItemOnSingleClick:case SH_ItemView_ActivateItemOnSingleClick:never executed: s = QLatin1String("activate-on-singleclick"); break;case SH_ItemView_ActivateItemOnSingleClick:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5132 | case never executed: SH_ItemView_ShowDecorationSelected:case SH_ItemView_ShowDecorationSelected:never executed: s = QLatin1String("show-decoration-selected"); break;case SH_ItemView_ShowDecorationSelected:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5133 | case never executed: SH_Table_GridLineColor:case SH_Table_GridLineColor:never executed: s = QLatin1String("gridline-color"); break;case SH_Table_GridLineColor:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5134 | case never executed: SH_DialogButtonLayout:case SH_DialogButtonLayout:never executed: s = QLatin1String("button-layout"); break;case SH_DialogButtonLayout:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5135 | case never executed: SH_ToolTipLabel_Opacity:case SH_ToolTipLabel_Opacity:never executed: s = QLatin1String("opacity"); break;case SH_ToolTipLabel_Opacity:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5136 | case never executed: SH_ComboBox_Popup:case SH_ComboBox_Popup:never executed: s = QLatin1String("combobox-popup"); break;case SH_ComboBox_Popup:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5137 | case never executed: SH_ComboBox_ListMouseTracking:case SH_ComboBox_ListMouseTracking:never executed: s = QLatin1String("combobox-list-mousetracking"); break;case SH_ComboBox_ListMouseTracking:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5138 | case never executed: SH_MenuBar_AltKeyNavigation:case SH_MenuBar_AltKeyNavigation:never executed: s = QLatin1String("menubar-altkey-navigation"); break;case SH_MenuBar_AltKeyNavigation:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5139 | case never executed: SH_Menu_Scrollable:case SH_Menu_Scrollable:never executed: s = QLatin1String("menu-scrollable"); break;case SH_Menu_Scrollable:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5140 | case never executed: SH_DrawMenuBarSeparator:case SH_DrawMenuBarSeparator:never executed: s = QLatin1String("menubar-separator"); break;case SH_DrawMenuBarSeparator:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5141 | case never executed: SH_MenuBar_MouseTracking:case SH_MenuBar_MouseTracking:never executed: s = QLatin1String("mouse-tracking"); break;case SH_MenuBar_MouseTracking:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5142 | case never executed: SH_SpinBox_ClickAutoRepeatRate:case SH_SpinBox_ClickAutoRepeatRate:never executed: s = QLatin1String("spinbox-click-autorepeat-rate"); break;case SH_SpinBox_ClickAutoRepeatRate:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5143 | case never executed: SH_SpinControls_DisableOnBounds:case SH_SpinControls_DisableOnBounds:never executed: s = QLatin1String("spincontrol-disable-on-bounds"); break;case SH_SpinControls_DisableOnBounds:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5144 | case never executed: SH_MessageBox_TextInteractionFlags:case SH_MessageBox_TextInteractionFlags:never executed: s = QLatin1String("messagebox-text-interaction-flags"); break;case SH_MessageBox_TextInteractionFlags:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5145 | case never executed: SH_ToolButton_PopupDelay:case SH_ToolButton_PopupDelay:never executed: s = QLatin1String("toolbutton-popup-delay"); break;case SH_ToolButton_PopupDelay:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5146 | case never executed: SH_ToolBox_SelectedPageTitleBold:case SH_ToolBox_SelectedPageTitleBold:never executed: case SH_ToolBox_SelectedPageTitleBold: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5147 | if (renderRule(w, opt, PseudoElement_ToolBoxTab).hasFont
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5148 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5149 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5150 | case never executed: SH_GroupBox_TextLabelColor:case SH_GroupBox_TextLabelColor:never executed: case SH_GroupBox_TextLabelColor: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5151 | if (rule.hasPalette()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5152 | return never executed: rule.palette()->foreground.color().rgba();return rule.palette()->foreground.color().rgba();never executed: return rule.palette()->foreground.color().rgba(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5153 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5154 | case never executed: SH_ScrollView_FrameOnlyAroundContents:case SH_ScrollView_FrameOnlyAroundContents:never executed: s = QLatin1String("scrollview-frame-around-contents"); break;case SH_ScrollView_FrameOnlyAroundContents:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5155 | case never executed: SH_ScrollBar_ContextMenu:case SH_ScrollBar_ContextMenu:never executed: s = QLatin1String("scrollbar-contextmenu"); break;case SH_ScrollBar_ContextMenu:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5156 | case never executed: SH_ScrollBar_LeftClickAbsolutePosition:case SH_ScrollBar_LeftClickAbsolutePosition:never executed: s = QLatin1String("scrollbar-leftclick-absolute-position"); break;case SH_ScrollBar_LeftClickAbsolutePosition:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5157 | case never executed: SH_ScrollBar_MiddleClickAbsolutePosition:case SH_ScrollBar_MiddleClickAbsolutePosition:never executed: s = QLatin1String("scrollbar-middleclick-absolute-position"); break;case SH_ScrollBar_MiddleClickAbsolutePosition:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5158 | case never executed: SH_ScrollBar_RollBetweenButtons:case SH_ScrollBar_RollBetweenButtons:never executed: s = QLatin1String("scrollbar-roll-between-buttons"); break;case SH_ScrollBar_RollBetweenButtons:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5159 | case never executed: SH_ScrollBar_ScrollWhenPointerLeavesControl:case SH_ScrollBar_ScrollWhenPointerLeavesControl:never executed: s = QLatin1String("scrollbar-scroll-when-pointer-leaves-control"); break;case SH_ScrollBar_ScrollWhenPointerLeavesControl:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5160 | case never executed: SH_TabBar_Alignment:case SH_TabBar_Alignment:never executed: case SH_TabBar_Alignment: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5161 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5162 | if (qobject_cast<const QTabWidget *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5163 | rule = renderRule(w, opt, PseudoElement_TabWidgetTabBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5164 | if (rule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5165 | return never executed: rule.position()->position;return rule.position()->position;never executed: return rule.position()->position; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5166 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5168 | s = QLatin1String("alignment"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5169 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5170 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5171 | case never executed: SH_TabBar_CloseButtonPosition:case SH_TabBar_CloseButtonPosition:never executed: case SH_TabBar_CloseButtonPosition: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5172 | rule = renderRule(w, opt, PseudoElement_TabBarTabCloseButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5173 | if (rule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5174 | Qt::Alignment align = rule.position()->position; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5175 | if (align & Qt::AlignLeft
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5176 | return never executed: QTabBar::LeftSide;return QTabBar::LeftSide;never executed: return QTabBar::LeftSide; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5177 | if (align & Qt::AlignRight
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5178 | return never executed: QTabBar::RightSide;return QTabBar::RightSide;never executed: return QTabBar::RightSide; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5179 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5180 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5181 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5182 | case never executed: SH_TabBar_ElideMode:case SH_TabBar_ElideMode:never executed: s = QLatin1String("tabbar-elide-mode"); break;case SH_TabBar_ElideMode:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5183 | case never executed: SH_TabBar_PreferNoArrows:case SH_TabBar_PreferNoArrows:never executed: s = QLatin1String("tabbar-prefer-no-arrows"); break;case SH_TabBar_PreferNoArrows:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5184 | case never executed: SH_ComboBox_PopupFrameStyle:case SH_ComboBox_PopupFrameStyle:never executed: case SH_ComboBox_PopupFrameStyle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5185 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5186 | if (qobject_cast<const QComboBox *>(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5187 | QAbstractItemView *view = w->findChild<QAbstractItemView *>(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5188 | if (view
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5189 | view->ensurePolished(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5190 | QRenderRule subRule = renderRule(view, PseudoElement_None); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5191 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5192 | return never executed: QFrame::NoFrame;return QFrame::NoFrame;never executed: return QFrame::NoFrame; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5193 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5194 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5196 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5197 | case never executed: SH_DialogButtonBox_ButtonsHaveIcons:case SH_DialogButtonBox_ButtonsHaveIcons:never executed: s = QLatin1String("dialogbuttonbox-buttons-have-icons"); break;case SH_DialogButtonBox_ButtonsHaveIcons:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5198 | case never executed: SH_Workspace_FillSpaceOnMaximize:case SH_Workspace_FillSpaceOnMaximize:never executed: s = QLatin1String("mdi-fill-space-on-maximize"); break;case SH_Workspace_FillSpaceOnMaximize:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5199 | case never executed: SH_TitleBar_NoBorder:case SH_TitleBar_NoBorder:never executed: case SH_TitleBar_NoBorder: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5200 | if (rule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5201 | return never executed: !rule.border()->borders[LeftEdge];return !rule.border()->borders[LeftEdge];never executed: return !rule.border()->borders[LeftEdge]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5202 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5203 | case never executed: SH_TitleBar_AutoRaise:case SH_TitleBar_AutoRaise:never executed: {case SH_TitleBar_AutoRaise: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5204 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5205 | if (subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5206 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5207 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5208 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5209 | case never executed: SH_ItemView_ArrowKeysNavigateIntoChildren:case SH_ItemView_ArrowKeysNavigateIntoChildren:never executed: s = QLatin1String("arrow-keys-navigate-into-children"); break;case SH_ItemView_ArrowKeysNavigateIntoChildren:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5210 | case never executed: SH_ItemView_PaintAlternatingRowColorsForEmptyArea:case SH_ItemView_PaintAlternatingRowColorsForEmptyArea:never executed: s = QLatin1String("paint-alternating-row-colors-for-empty-area"); break;case SH_ItemView_PaintAlternatingRowColorsForEmptyArea:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5211 | default never executed: :default:never executed: break;default:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5212 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5213 | if (!s.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5214 | return never executed: rule.styleHint(s).toInt();return rule.styleHint(s).toInt();never executed: return rule.styleHint(s).toInt(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5215 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5217 | return never executed: baseStyle()->styleHint(sh, opt, w, shret);return baseStyle()->styleHint(sh, opt, w, shret);never executed: return baseStyle()->styleHint(sh, opt, w, shret); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5218 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5219 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5220 | QRect QStyleSheetStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5221 | const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5222 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5223 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->subControlRect(cc, opt, sc, w);return baseStyle()->subControlRect(cc, opt, sc, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->subControlRect(cc, opt, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5224 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5225 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5226 | switch (cc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5227 | case never executed: CC_ComboBox:case CC_ComboBox:never executed: case CC_ComboBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5228 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5229 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5230 | switch (sc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5231 | case never executed: SC_ComboBoxFrame:case SC_ComboBoxFrame:never executed: returncase SC_ComboBoxFrame:never executed: rule.borderRect(opt->rect);return rule.borderRect(opt->rect);never executed: return rule.borderRect(opt->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5232 | case never executed: SC_ComboBoxEditField:case SC_ComboBoxEditField:never executed: case SC_ComboBoxEditField: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5233 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5234 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5235 | QRect r = rule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5236 | QRect r2 = positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5237 | opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5238 | if (subRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5239 | return never executed: visualRect(opt->direction, r, r.adjusted(r2.width(),0,0,0));return visualRect(opt->direction, r, r.adjusted(r2.width(),0,0,0));never executed: return visualRect(opt->direction, r, r.adjusted(r2.width(),0,0,0)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5240 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5241 | return never executed: visualRect(opt->direction, r, r.adjusted(0,0,-r2.width(),0));return visualRect(opt->direction, r, r.adjusted(0,0,-r2.width(),0));never executed: return visualRect(opt->direction, r, r.adjusted(0,0,-r2.width(),0)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5242 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5243 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5244 | case never executed: SC_ComboBoxArrow:case SC_ComboBoxArrow:never executed: {case SC_ComboBoxArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5245 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ComboBoxDropDown); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5246 | return never executed: positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction);return positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction);never executed: return positionRect(w, rule, subRule, PseudoElement_ComboBoxDropDown, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5247 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5248 | case never executed: SC_ComboBoxListBoxPopup:case SC_ComboBoxListBoxPopup:never executed: case SC_ComboBoxListBoxPopup: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5249 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5250 | return never executed: baseStyle()->subControlRect(cc, opt, sc, w);return baseStyle()->subControlRect(cc, opt, sc, w);never executed: return baseStyle()->subControlRect(cc, opt, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5251 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5252 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5254 | QStyleOptionComboBox comboBox(*cb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5255 | comboBox.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5256 | return never executed: rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w)return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w) : QWindowsStyle::subControlRect(cc, &comboBox, sc, w);never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w) : QWindowsStyle::subControlRect(cc, &comboBox, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5257 | : QWindowsStyle::subControlRect(cc, &comboBox, sc, w); never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &comboBox, sc, w) : QWindowsStyle::subControlRect(cc, &comboBox, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5258 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5259 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5260 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5261 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5262 | case never executed: CC_SpinBox:case CC_SpinBox:never executed: case CC_SpinBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5263 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5264 | QRenderRule upRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5265 | QRenderRule downRule = renderRule(w, opt, PseudoElement_SpinBoxDownButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5266 | bool ruleMatch = rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5267 | bool upRuleMatch = upRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5268 | bool downRuleMatch = downRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5269 | if (ruleMatch
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5270 | switch (sc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5271 | case never executed: SC_SpinBoxFrame:case SC_SpinBoxFrame:never executed: case SC_SpinBoxFrame: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5272 | return never executed: rule.borderRect(opt->rect);return rule.borderRect(opt->rect);never executed: return rule.borderRect(opt->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5273 | case never executed: SC_SpinBoxEditField:case SC_SpinBoxEditField:never executed: case SC_SpinBoxEditField: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5274 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5275 | QRect r = rule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5276 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5277 | Qt::Alignment upAlign, downAlign; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5279 | upAlign = upRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5280 | : Qt::Alignment(Qt::AlignRight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5281 | upAlign = resolveAlignment(opt->direction, upAlign); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5283 | downAlign = downRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5284 | : Qt::Alignment(Qt::AlignRight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5285 | downAlign = resolveAlignment(opt->direction, downAlign); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5286 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5287 | int upSize = subControlRect(CC_SpinBox, opt, SC_SpinBoxUp, w).width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5288 | int downSize = subControlRect(CC_SpinBox, opt, SC_SpinBoxDown, w).width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5289 | int widestL = qMax((upAlign & Qt::AlignLeft) ? upSize : 0, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5290 | (downAlign & Qt::AlignLeft) ? downSize : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5291 | int widestR = qMax((upAlign & Qt::AlignRight) ? upSize : 0, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5292 | (downAlign & Qt::AlignRight) ? downSize : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5293 | r.setRight(r.right() - widestR); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5294 | r.setLeft(r.left() + widestL); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5295 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5296 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5297 | case never executed: SC_SpinBoxDown:case SC_SpinBoxDown:never executed: case SC_SpinBoxDown: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5298 | if (downRuleMatch
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5299 | return never executed: positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton,return positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton, opt->rect, opt->direction);never executed: return positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5300 | opt->rect, opt->direction); never executed: return positionRect(w, rule, downRule, PseudoElement_SpinBoxDownButton, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5301 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5302 | case never executed: SC_SpinBoxUp:case SC_SpinBoxUp:never executed: case SC_SpinBoxUp: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5303 | if (upRuleMatch
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5304 | return never executed: positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton,return positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton, opt->rect, opt->direction);never executed: return positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5305 | opt->rect, opt->direction); never executed: return positionRect(w, rule, upRule, PseudoElement_SpinBoxUpButton, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5306 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5307 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5308 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5309 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5310 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5311 | return never executed: baseStyle()->subControlRect(cc, opt, sc, w);return baseStyle()->subControlRect(cc, opt, sc, w);never executed: return baseStyle()->subControlRect(cc, opt, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5312 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5313 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5314 | QStyleOptionSpinBox spinBox(*spin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5315 | spinBox.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5316 | return never executed: rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w)return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w) : QWindowsStyle::subControlRect(cc, &spinBox, sc, w);never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w) : QWindowsStyle::subControlRect(cc, &spinBox, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5317 | : QWindowsStyle::subControlRect(cc, &spinBox, sc, w); never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &spinBox, sc, w) : QWindowsStyle::subControlRect(cc, &spinBox, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5318 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5319 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5322 | case never executed: CC_GroupBox:case CC_GroupBox:never executed: case CC_GroupBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5323 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5324 | switch (sc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5325 | case never executed: SC_GroupBoxFrame:case SC_GroupBoxFrame:never executed: case SC_GroupBoxFrame: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5326 | case never executed: SC_GroupBoxContents:case SC_GroupBoxContents:never executed: {case SC_GroupBoxContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5327 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5328 | return never executed: sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect)return sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect) : rule.contentsRect(opt->rect);never executed: return sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect) : rule.contentsRect(opt->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5329 | : rule.contentsRect(opt->rect); never executed: return sc == SC_GroupBoxFrame ? rule.borderRect(opt->rect) : rule.contentsRect(opt->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5330 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5331 | QStyleOptionGroupBox groupBox(*gb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5332 | groupBox.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5333 | return never executed: baseStyle()->subControlRect(cc, &groupBox, sc, w);return baseStyle()->subControlRect(cc, &groupBox, sc, w);never executed: return baseStyle()->subControlRect(cc, &groupBox, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5334 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5335 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5336 | case never executed: SC_GroupBoxLabel:case SC_GroupBoxLabel:never executed: case SC_GroupBoxLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5337 | case never executed: SC_GroupBoxCheckBox:case SC_GroupBoxCheckBox:never executed: {case SC_GroupBoxCheckBox: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5338 | QRenderRule indRule = renderRule(w, opt, PseudoElement_GroupBoxIndicator); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5339 | QRenderRule labelRule = renderRule(w, opt, PseudoElement_GroupBoxTitle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5340 | if (!labelRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5341 | && !labelRule.hasBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5342 | QStyleOptionGroupBox groupBox(*gb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5343 | groupBox.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5344 | return never executed: baseStyle()->subControlRect(cc, &groupBox, sc, w);return baseStyle()->subControlRect(cc, &groupBox, sc, w);never executed: return baseStyle()->subControlRect(cc, &groupBox, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5345 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5346 | int tw = opt->fontMetrics.width(gb->text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5347 | int th = opt->fontMetrics.height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5348 | int spacing = pixelMetric(QStyle::PM_CheckBoxLabelSpacing, opt, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5349 | int iw = pixelMetric(QStyle::PM_IndicatorWidth, opt, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5350 | int ih = pixelMetric(QStyle::PM_IndicatorHeight, opt, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5352 | if (gb->subControls & QStyle::SC_GroupBoxCheckBox
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5353 | tw = tw + iw + spacing; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5354 | th = qMax(th, ih); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5355 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5356 | if (!labelRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5357 | labelRule.geo = new QStyleSheetGeometryData(tw, th, tw, th, -1, -1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5358 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5359 | labelRule.geo->width = tw; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5360 | labelRule.geo->height = th; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5361 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5362 | if (!labelRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5363 | labelRule.p = new QStyleSheetPositionData(0, 0, 0, 0, defaultOrigin(PseudoElement_GroupBoxTitle), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5364 | gb->textAlignment, PositionMode_Static); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5365 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5366 | QRect r = positionRect(w, rule, labelRule, PseudoElement_GroupBoxTitle, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5367 | opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5368 | if (gb->subControls & SC_GroupBoxCheckBox
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5369 | r = labelRule.contentsRect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5370 | if (sc == SC_GroupBoxLabel
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5371 | r.setLeft(r.left() + iw + spacing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5372 | r.setTop(r.center().y() - th/2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5373 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5374 | r = QRect(r.left(), r.center().y() - ih/2, iw, ih); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5375 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5376 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5377 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5378 | return never executed: labelRule.contentsRect(r);return labelRule.contentsRect(r);never executed: return labelRule.contentsRect(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5379 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5380 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5381 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5382 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5383 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5384 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5385 | case never executed: CC_ToolButton:case CC_ToolButton:never executed: case CC_ToolButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5386 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5387 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5388 | switch (sc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5389 | case never executed: SC_ToolButton:case SC_ToolButton:never executed: returncase SC_ToolButton:never executed: rule.borderRect(opt->rect);return rule.borderRect(opt->rect);never executed: return rule.borderRect(opt->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5390 | case never executed: SC_ToolButtonMenu:case SC_ToolButtonMenu:never executed: {case SC_ToolButtonMenu: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5391 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ToolButtonMenu); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5392 | return never executed: positionRect(w, rule, subRule, PseudoElement_ToolButtonMenu, opt->rect, opt->direction);return positionRect(w, rule, subRule, PseudoElement_ToolButtonMenu, opt->rect, opt->direction);never executed: return positionRect(w, rule, subRule, PseudoElement_ToolButtonMenu, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5393 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5394 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5395 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5396 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5397 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5398 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5399 | QStyleOptionToolButton tool(*tb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5400 | tool.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5401 | return never executed: rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w)return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w) : QWindowsStyle::subControlRect(cc, &tool, sc, w);never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w) : QWindowsStyle::subControlRect(cc, &tool, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5402 | : QWindowsStyle::subControlRect(cc, &tool, sc, w); never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &tool, sc, w) : QWindowsStyle::subControlRect(cc, &tool, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5403 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5404 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5407 | case never executed: CC_ScrollBar:case CC_ScrollBar:never executed: case CC_ScrollBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5408 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5409 | QStyleOptionSlider styleOptionSlider(*sb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5410 | styleOptionSlider.rect = rule.borderRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5411 | if (rule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5412 | QRect grooveRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5413 | if (!rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5414 | grooveRect = rule.baseStyleCanDraw()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5415 | : QWindowsStyle::subControlRect(cc, sb, SC_ScrollBarGroove, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5416 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5417 | grooveRect = rule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5418 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5419 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5420 | PseudoElement pe = PseudoElement_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5421 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5422 | switch (sc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5423 | case never executed: SC_ScrollBarGroove:case SC_ScrollBarGroove:never executed: case SC_ScrollBarGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5424 | return never executed: grooveRect;return grooveRect;never executed: return grooveRect; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5425 | case never executed: SC_ScrollBarAddPage:case SC_ScrollBarAddPage:never executed: case SC_ScrollBarAddPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5426 | case never executed: SC_ScrollBarSubPage:case SC_ScrollBarSubPage:never executed: case SC_ScrollBarSubPage: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5427 | case never executed: SC_ScrollBarSlider:case SC_ScrollBarSlider:never executed: {case SC_ScrollBarSlider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5428 | QRect contentRect = grooveRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5429 | if (hasStyleRule(w, PseudoElement_ScrollBarSlider)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5430 | QRenderRule sliderRule = renderRule(w, opt, PseudoElement_ScrollBarSlider); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5431 | Origin origin = sliderRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5432 | contentRect = rule.originRect(opt->rect, origin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5433 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5434 | int maxlen = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5435 | int sliderlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5436 | if (sb->maximum != sb->minimum
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5437 | uint range = sb->maximum - sb->minimum; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5438 | sliderlen = (qint64(sb->pageStep) * maxlen) / (range + sb->pageStep); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5439 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5440 | int slidermin = pixelMetric(PM_ScrollBarSliderMin, sb, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5441 | if (sliderlen < slidermin
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5442 | sliderlen = slidermin; never executed: sliderlen = slidermin; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5443 | if (sliderlen > maxlen
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5444 | sliderlen = maxlen; never executed: sliderlen = maxlen; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5445 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5446 | sliderlen = maxlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5447 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5449 | int sliderstart = (styleOptionSlider.orientation == Qt::Horizontal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5450 | + sliderPositionFromValue(sb->minimum, sb->maximum, sb->sliderPosition, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5451 | maxlen - sliderlen, sb->upsideDown); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5452 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5453 | QRect sr = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5454 | ? QRect(sliderstart, contentRect.top(), sliderlen, contentRect.height()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5455 | : QRect(contentRect.left(), sliderstart, contentRect.width(), sliderlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5456 | if (sc == SC_ScrollBarSlider
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5457 | return never executed: sr;return sr;never executed: return sr; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5458 | } else if (sc == SC_ScrollBarSubPage
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5459 | return never executed: QRect(contentRect.topLeft(), sb->orientation == Qt::Horizontal ? sr.bottomLeft() : sr.topRight());return QRect(contentRect.topLeft(), sb->orientation == Qt::Horizontal ? sr.bottomLeft() : sr.topRight());never executed: return QRect(contentRect.topLeft(), sb->orientation == Qt::Horizontal ? sr.bottomLeft() : sr.topRight()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5460 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5461 | return never executed: QRect(sb->orientation == Qt::Horizontal ? sr.topRight() : sr.bottomLeft(), contentRect.bottomRight());return QRect(sb->orientation == Qt::Horizontal ? sr.topRight() : sr.bottomLeft(), contentRect.bottomRight());never executed: return QRect(sb->orientation == Qt::Horizontal ? sr.topRight() : sr.bottomLeft(), contentRect.bottomRight()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5462 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5463 | break; dead code: break; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5464 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5465 | case never executed: SC_ScrollBarAddLine:case SC_ScrollBarAddLine:never executed: pe = PseudoElement_ScrollBarAddLine; break;case SC_ScrollBarAddLine:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5466 | case never executed: SC_ScrollBarSubLine:case SC_ScrollBarSubLine:never executed: pe = PseudoElement_ScrollBarSubLine; break;case SC_ScrollBarSubLine:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5467 | case never executed: SC_ScrollBarFirst:case SC_ScrollBarFirst:never executed: pe = PseudoElement_ScrollBarFirst; break;case SC_ScrollBarFirst:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5468 | case never executed: SC_ScrollBarLast:case SC_ScrollBarLast:never executed: pe = PseudoElement_ScrollBarLast; break;case SC_ScrollBarLast:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5469 | default never executed: :default:never executed: break;default:never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5470 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5471 | if (hasStyleRule(w,pe)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5472 | QRenderRule subRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5473 | if (subRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5474 | const QStyleSheetPositionData *pos = subRule.position(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5475 | QRect originRect = grooveRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5476 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5477 | Origin origin = (pos
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5478 | originRect = rule.originRect(opt->rect, origin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5479 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5480 | return never executed: positionRect(w, subRule, pe, originRect, styleOptionSlider.direction);return positionRect(w, subRule, pe, originRect, styleOptionSlider.direction);never executed: return positionRect(w, subRule, pe, originRect, styleOptionSlider.direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5481 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5482 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5483 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5484 | return never executed: rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w)return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w) : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w);never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w) : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5485 | : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w); never executed: return rule.baseStyleCanDraw() ? baseStyle()->subControlRect(cc, &styleOptionSlider, sc, w) : QWindowsStyle::subControlRect(cc, &styleOptionSlider, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5486 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5487 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5488 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5489 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5490 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5491 | case never executed: CC_Slider:case CC_Slider:never executed: case CC_Slider: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5492 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5493 | QRenderRule subRule = renderRule(w, opt, PseudoElement_SliderGroove); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5494 | if (!subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5495 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5496 | subRule.img = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5497 | QRect gr = positionRect(w, rule, subRule, PseudoElement_SliderGroove, opt->rect, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5498 | switch (sc) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5499 | case never executed: SC_SliderGroove:case SC_SliderGroove:never executed: case SC_SliderGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5500 | return never executed: gr;return gr;never executed: return gr; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5501 | case never executed: SC_SliderHandle:case SC_SliderHandle:never executed: {case SC_SliderHandle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5502 | bool horizontal = slider->orientation & Qt::Horizontal; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5503 | QRect cr = subRule.contentsRect(gr); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5504 | QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SliderHandle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5505 | int len = horizontal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5506 | subRule2.img = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5507 | subRule2.geo = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5508 | cr = positionRect(w, subRule2, PseudoElement_SliderHandle, cr, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5509 | int thickness = horizontal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5510 | int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderPosition, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5511 | (horizontal ? cr.width() : cr.height()) - len, slider->upsideDown); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5512 | cr = horizontal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5513 | : QRect(cr.x(), cr.y() + sliderPos, thickness, len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5514 | return never executed: subRule2.borderRect(cr);return subRule2.borderRect(cr);never executed: return subRule2.borderRect(cr); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5515 | break; dead code: }break; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5516 | case never executed: SC_SliderTickmarks:case SC_SliderTickmarks:never executed: case SC_SliderTickmarks: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5518 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5519 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5520 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5521 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5522 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5523 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5524 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5525 | case never executed: CC_MdiControls:case CC_MdiControls:never executed: case CC_MdiControls: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5526 | if (hasStyleRule(w, PseudoElement_MdiCloseButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5527 | || hasStyleRule(w, PseudoElement_MdiNormalButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5528 | || hasStyleRule(w, PseudoElement_MdiMinButton)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5529 | QList<QVariant> layout = rule.styleHint(QLatin1String("button-layout")).toList(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5530 | if (layout.isEmpty()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5531 | layout = subControlLayout(QLatin1String("mNX")); never executed: layout = subControlLayout(QLatin1String("mNX")); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5533 | int x = 0, width = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5534 | QRenderRule subRule; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5535 | for (int i = 0; i < layout.count()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5536 | int layoutButton = layout[i].toInt(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5537 | if (layoutButton < PseudoElement_MdiCloseButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5538 | || layoutButton > PseudoElement_MdiNormalButton
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5539 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5540 | QStyle::SubControl control = knownPseudoElements[layoutButton].subControl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5541 | if (!(opt->subControls & control)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5542 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5543 | subRule = renderRule(w, opt, layoutButton); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5544 | width = subRule.size().width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5545 | if (sc == control
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5546 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5547 | x += width; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5548 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5549 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5550 | return never executed: subRule.borderRect(QRect(x, opt->rect.top(), width, opt->rect.height()));return subRule.borderRect(QRect(x, opt->rect.top(), width, opt->rect.height()));never executed: return subRule.borderRect(QRect(x, opt->rect.top(), width, opt->rect.height())); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5551 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5552 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5553 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5554 | case never executed: CC_TitleBar:case CC_TitleBar:never executed: case CC_TitleBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5555 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5556 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TitleBar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5557 | if (!subRule.hasDrawable()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5558 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5559 | QHash<QStyle::SubControl, QRect> layoutRects = titleBarLayout(w, tb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5560 | return never executed: layoutRects.value(sc);return layoutRects.value(sc);never executed: return layoutRects.value(sc); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5561 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5562 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5563 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5564 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5565 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5566 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5567 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5568 | return never executed: baseStyle()->subControlRect(cc, opt, sc, w);return baseStyle()->subControlRect(cc, opt, sc, w);never executed: return baseStyle()->subControlRect(cc, opt, sc, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5569 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5570 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5571 | QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, const QWidget *w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5572 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5573 | if (globalStyleSheetStyle != 0
never executed: baseStyle()->subElementRect(se, opt, w);return baseStyle()->subElementRect(se, opt, w);never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return baseStyle()->subElementRect(se, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5574 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5575 | QRenderRule rule = renderRule(w, opt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5577 | int pe = PseudoElement_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5578 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5579 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5580 | switch (se) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5581 | case never executed: SE_PushButtonContents:case SE_PushButtonContents:never executed: case SE_PushButtonContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5582 | case never executed: SE_PushButtonFocusRect:case SE_PushButtonFocusRect:never executed: case SE_PushButtonFocusRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5583 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5584 | QStyleOptionButton btnOpt(*btn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5585 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5586 | return never executed: visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));never executed: return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5587 | return never executed: rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w)return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w) : QWindowsStyle::subElementRect(se, &btnOpt, w);never executed: return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w) : QWindowsStyle::subElementRect(se, &btnOpt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5588 | : QWindowsStyle::subElementRect(se, &btnOpt, w); never executed: return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w) : QWindowsStyle::subElementRect(se, &btnOpt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5589 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5590 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5591 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5592 | case never executed: SE_LineEditContents:case SE_LineEditContents:never executed: case SE_LineEditContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5593 | case never executed: SE_FrameContents:case SE_FrameContents:never executed: case SE_FrameContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5594 | case never executed: SE_ShapedFrameContents:case SE_ShapedFrameContents:never executed: case SE_ShapedFrameContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5595 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5596 | return never executed: visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));never executed: return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5597 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5598 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5599 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5600 | case never executed: SE_CheckBoxIndicator:case SE_CheckBoxIndicator:never executed: case SE_CheckBoxIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5601 | case never executed: SE_RadioButtonIndicator:case SE_RadioButtonIndicator:never executed: case SE_RadioButtonIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5602 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5603 | PseudoElement pe = se == SE_CheckBoxIndicator
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5604 | QRenderRule subRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5605 | return never executed: positionRect(w, rule, subRule, pe, opt->rect, opt->direction);return positionRect(w, rule, subRule, pe, opt->rect, opt->direction);never executed: return positionRect(w, rule, subRule, pe, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5606 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5607 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5608 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5609 | case never executed: SE_CheckBoxContents:case SE_CheckBoxContents:never executed: case SE_CheckBoxContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5610 | case never executed: SE_RadioButtonContents:case SE_RadioButtonContents:never executed: case SE_RadioButtonContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5611 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5612 | bool isRadio = se == SE_RadioButtonContents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5613 | QRect ir = subElementRect(isRadio ? SE_RadioButtonIndicator : SE_CheckBoxIndicator, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5614 | opt, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5615 | ir = visualRect(opt->direction, opt->rect, ir); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5616 | int spacing = pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, 0, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5617 | QRect cr = rule.contentsRect(opt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5618 | ir.setRect(ir.left() + ir.width() + spacing, cr.y(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5619 | cr.width() - ir.width() - spacing, cr.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5620 | return never executed: visualRect(opt->direction, opt->rect, ir);return visualRect(opt->direction, opt->rect, ir);never executed: return visualRect(opt->direction, opt->rect, ir); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5621 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5622 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5624 | case never executed: SE_ToolBoxTabContents:case SE_ToolBoxTabContents:never executed: case SE_ToolBoxTabContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5625 | if (w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5626 | QRenderRule subRule = renderRule(w->parentWidget(), opt, PseudoElement_ToolBoxTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5627 | return never executed: visualRect(opt->direction, opt->rect, subRule.contentsRect(opt->rect));return visualRect(opt->direction, opt->rect, subRule.contentsRect(opt->rect));never executed: return visualRect(opt->direction, opt->rect, subRule.contentsRect(opt->rect)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5628 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5629 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5630 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5631 | case never executed: SE_RadioButtonFocusRect:case SE_RadioButtonFocusRect:never executed: case SE_RadioButtonFocusRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5632 | case never executed: SE_RadioButtonClickRect:case SE_RadioButtonClickRect:never executed: case SE_RadioButtonClickRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5633 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5634 | return never executed: opt->rect;return opt->rect;never executed: return opt->rect; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5635 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5636 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5637 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5638 | case never executed: SE_CheckBoxFocusRect:case SE_CheckBoxFocusRect:never executed: case SE_CheckBoxFocusRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5639 | case never executed: SE_CheckBoxClickRect:case SE_CheckBoxClickRect:never executed: case SE_CheckBoxClickRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5640 | return never executed: ParentStyle::subElementRect(se, opt, w);return ParentStyle::subElementRect(se, opt, w);never executed: return ParentStyle::subElementRect(se, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5641 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5643 | case never executed: SE_ViewItemCheckIndicator:case SE_ViewItemCheckIndicator:never executed: case SE_ViewItemCheckIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5644 | if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5645 | return never executed: subElementRect(SE_CheckBoxIndicator, opt, w);return subElementRect(SE_CheckBoxIndicator, opt, w);never executed: return subElementRect(SE_CheckBoxIndicator, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5646 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5648 | case never executed: SE_ItemViewItemText:case SE_ItemViewItemText:never executed: case SE_ItemViewItemText:code before this statement never executed: case SE_ItemViewItemText: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5649 | case never executed: SE_ItemViewItemDecoration:case SE_ItemViewItemDecoration:never executed: case SE_ItemViewItemDecoration: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5650 | case never executed: SE_ItemViewItemFocusRect:case SE_ItemViewItemFocusRect:never executed: case SE_ItemViewItemFocusRect: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5651 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5652 | QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5653 | PseudoElement pe = PseudoElement_None; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5654 | if (se == SE_ItemViewItemText
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5655 | pe = PseudoElement_ViewItemText; never executed: pe = PseudoElement_ViewItemText; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5656 | else if (se == SE_ItemViewItemDecoration
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5657 | pe = PseudoElement_ViewItemIcon; never executed: pe = PseudoElement_ViewItemIcon; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5658 | else if (se == SE_ItemViewItemCheckIndicator
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5659 | pe = PseudoElement_ViewItemIndicator; never executed: pe = PseudoElement_ViewItemIndicator; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5660 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5661 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5662 | if (subRule.hasGeometry()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5663 | QRenderRule subRule2 = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5664 | QStyleOptionViewItem optCopy(*vopt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5665 | optCopy.rect = subRule.contentsRect(vopt->rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5666 | QRect rect = ParentStyle::subElementRect(se, &optCopy, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5667 | return never executed: positionRect(w, subRule2, pe, rect, opt->direction);return positionRect(w, subRule2, pe, rect, opt->direction);never executed: return positionRect(w, subRule2, pe, rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5668 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5669 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5670 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5673 | case never executed: SE_HeaderArrow:case SE_HeaderArrow:never executed: {case SE_HeaderArrow: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5674 | QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewUpArrow); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5675 | if (subRule.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5676 | return never executed: positionRect(w, rule, subRule, PseudoElement_HeaderViewUpArrow, opt->rect, opt->direction);return positionRect(w, rule, subRule, PseudoElement_HeaderViewUpArrow, opt->rect, opt->direction);never executed: return positionRect(w, rule, subRule, PseudoElement_HeaderViewUpArrow, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5677 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5678 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5679 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5680 | case never executed: SE_HeaderLabel:case SE_HeaderLabel:never executed: {case SE_HeaderLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5681 | QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5682 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5683 | return never executed: subRule.contentsRect(opt->rect);return subRule.contentsRect(opt->rect);never executed: return subRule.contentsRect(opt->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5684 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5685 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5687 | case never executed: SE_ProgressBarGroove:case SE_ProgressBarGroove:never executed: case SE_ProgressBarGroove: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5688 | case never executed: SE_ProgressBarContents:case SE_ProgressBarContents:never executed: case SE_ProgressBarContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5689 | case never executed: SE_ProgressBarLabel:case SE_ProgressBarLabel:never executed: case SE_ProgressBarLabel: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5690 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5691 | if (rule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5692 | if (se == SE_ProgressBarGroove
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5693 | return never executed: rule.borderRect(pb->rect);return rule.borderRect(pb->rect);never executed: return rule.borderRect(pb->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5694 | else if (se == SE_ProgressBarContents
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5695 | return never executed: rule.contentsRect(pb->rect);return rule.contentsRect(pb->rect);never executed: return rule.contentsRect(pb->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5696 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5697 | QSize sz = pb->fontMetrics.size(0, pb->text); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5698 | return never executed: QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment,return QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment, sz, pb->rect);never executed: return QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment, sz, pb->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5699 | sz, pb->rect); never executed: return QStyle::alignedRect(Qt::LeftToRight, rule.hasPosition() ? rule.position()->textAlignment : pb->textAlignment, sz, pb->rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5700 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5701 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5702 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5703 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5704 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5705 | case never executed: SE_TabWidgetLeftCorner:case SE_TabWidgetLeftCorner:never executed: case SE_TabWidgetLeftCorner: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5706 | pe = PseudoElement_TabWidgetLeftCorner; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5707 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5708 | case never executed: SE_TabWidgetRightCorner:case SE_TabWidgetRightCorner:never executed: case SE_TabWidgetRightCorner:code before this statement never executed: case SE_TabWidgetRightCorner: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5709 | if (pe == PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5710 | pe = PseudoElement_TabWidgetRightCorner; never executed: pe = PseudoElement_TabWidgetRightCorner; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5711 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5712 | case never executed: SE_TabWidgetTabBar:case SE_TabWidgetTabBar:never executed: case SE_TabWidgetTabBar:code before this statement never executed: case SE_TabWidgetTabBar: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5713 | if (pe == PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5714 | pe = PseudoElement_TabWidgetTabBar; never executed: pe = PseudoElement_TabWidgetTabBar; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5715 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5716 | case never executed: SE_TabWidgetTabPane:case SE_TabWidgetTabPane:never executed: case SE_TabWidgetTabPane:code before this statement never executed: case SE_TabWidgetTabPane: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5717 | case never executed: SE_TabWidgetTabContents:case SE_TabWidgetTabContents:never executed: case SE_TabWidgetTabContents: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5718 | if (pe == PseudoElement_None
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5719 | pe = PseudoElement_TabWidgetPane; never executed: pe = PseudoElement_TabWidgetPane; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5720 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5721 | if (hasStyleRule(w, pe)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5722 | QRect r = QWindowsStyle::subElementRect(pe == PseudoElement_TabWidgetPane ? SE_TabWidgetTabPane : se, opt, w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5723 | QRenderRule subRule = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5724 | r = positionRect(w, subRule, pe, r, opt->direction); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5725 | if (pe == PseudoElement_TabWidgetTabBar
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5726 | ((!(opt)) ? qt_assert("opt",__FILE__,5823) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5727 | r = opt->rect.intersected(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5728 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5729 | if (se == SE_TabWidgetTabContents
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5730 | r = subRule.contentsRect(r); never executed: r = subRule.contentsRect(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5731 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5732 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5733 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5734 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5735 | case never executed: SE_TabBarTearIndicator:case SE_TabBarTearIndicator:never executed: {case SE_TabBarTearIndicator: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5736 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTear); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5737 | if (subRule.hasContentsSize()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5738 | QRect r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5739 | if (const
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5740 | switch (tab->shape) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5741 | case never executed: QTabBar::RoundedNorth:case QTabBar::RoundedNorth:never executed: case QTabBar::RoundedNorth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5742 | case never executed: QTabBar::TriangularNorth:case QTabBar::TriangularNorth:never executed: case QTabBar::TriangularNorth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5743 | case never executed: QTabBar::RoundedSouth:case QTabBar::RoundedSouth:never executed: case QTabBar::RoundedSouth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5744 | case never executed: QTabBar::TriangularSouth:case QTabBar::TriangularSouth:never executed: case QTabBar::TriangularSouth: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5745 | r.setRect(tab->rect.left(), tab->rect.top(), subRule.size().width(), opt->rect.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5746 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5747 | case never executed: QTabBar::RoundedWest:case QTabBar::RoundedWest:never executed: case QTabBar::RoundedWest: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5748 | case never executed: QTabBar::TriangularWest:case QTabBar::TriangularWest:never executed: case QTabBar::TriangularWest: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5749 | case never executed: QTabBar::RoundedEast:case QTabBar::RoundedEast:never executed: case QTabBar::RoundedEast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5750 | case never executed: QTabBar::TriangularEast:case QTabBar::TriangularEast:never executed: case QTabBar::TriangularEast: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5751 | r.setRect(tab->rect.left(), tab->rect.top(), opt->rect.width(), subRule.size().height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5752 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5753 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5754 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5755 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5756 | r = visualRect(opt->direction, opt->rect, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5757 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5758 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5759 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5760 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5761 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5762 | case never executed: SE_TabBarTabText:case SE_TabBarTabText:never executed: case SE_TabBarTabText: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5763 | case never executed: SE_TabBarTabLeftButton:case SE_TabBarTabLeftButton:never executed: case SE_TabBarTabLeftButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5764 | case never executed: SE_TabBarTabRightButton:case SE_TabBarTabRightButton:never executed: {case SE_TabBarTabRightButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5765 | QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5766 | if (subRule.hasBox()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5767 | return never executed: ParentStyle::subElementRect(se, opt, w);return ParentStyle::subElementRect(se, opt, w);never executed: return ParentStyle::subElementRect(se, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5768 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5769 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5770 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5771 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5773 | case never executed: SE_DockWidgetCloseButton:case SE_DockWidgetCloseButton:never executed: case SE_DockWidgetCloseButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5774 | case never executed: SE_DockWidgetFloatButton:case SE_DockWidgetFloatButton:never executed: {case SE_DockWidgetFloatButton: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5775 | PseudoElement pe = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5776 | QRenderRule subRule2 = renderRule(w, opt, pe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5777 | if (!subRule2.hasPosition()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5778 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5779 | QRenderRule subRule = renderRule(w, opt, PseudoElement_DockWidgetTitle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5780 | return never executed: positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);never executed: return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5781 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5783 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5784 | case never executed: SE_ToolBarHandle:case SE_ToolBarHandle:never executed: case SE_ToolBarHandle: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5785 | if (hasStyleRule(w, PseudoElement_ToolBarHandle)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5786 | return never executed: ParentStyle::subElementRect(se, opt, w);return ParentStyle::subElementRect(se, opt, w);never executed: return ParentStyle::subElementRect(se, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5787 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5788 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5789 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5790 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5791 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5792 | case never executed: SE_CheckBoxLayoutItem:case SE_CheckBoxLayoutItem:never executed: case SE_CheckBoxLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5793 | case never executed: SE_ComboBoxLayoutItem:case SE_ComboBoxLayoutItem:never executed: case SE_ComboBoxLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5794 | case never executed: SE_DateTimeEditLayoutItem:case SE_DateTimeEditLayoutItem:never executed: case SE_DateTimeEditLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5795 | case never executed: SE_LabelLayoutItem:case SE_LabelLayoutItem:never executed: case SE_LabelLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5796 | case never executed: SE_ProgressBarLayoutItem:case SE_ProgressBarLayoutItem:never executed: case SE_ProgressBarLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5797 | case never executed: SE_PushButtonLayoutItem:case SE_PushButtonLayoutItem:never executed: case SE_PushButtonLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5798 | case never executed: SE_RadioButtonLayoutItem:case SE_RadioButtonLayoutItem:never executed: case SE_RadioButtonLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5799 | case never executed: SE_SliderLayoutItem:case SE_SliderLayoutItem:never executed: case SE_SliderLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5800 | case never executed: SE_SpinBoxLayoutItem:case SE_SpinBoxLayoutItem:never executed: case SE_SpinBoxLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5801 | case never executed: SE_ToolButtonLayoutItem:case SE_ToolButtonLayoutItem:never executed: case SE_ToolButtonLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5802 | case never executed: SE_FrameLayoutItem:case SE_FrameLayoutItem:never executed: case SE_FrameLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5803 | case never executed: SE_GroupBoxLayoutItem:case SE_GroupBoxLayoutItem:never executed: case SE_GroupBoxLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5804 | case never executed: SE_TabWidgetLayoutItem:case SE_TabWidgetLayoutItem:never executed: case SE_TabWidgetLayoutItem: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5805 | if (!rule.hasNativeBorder()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5806 | return never executed: opt->rect;return opt->rect;never executed: return opt->rect; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5807 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5808 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5809 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5810 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5811 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5812 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5813 | return never executed: baseStyle()->subElementRect(se, opt, w);return baseStyle()->subElementRect(se, opt, w);never executed: return baseStyle()->subElementRect(se, opt, w); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5814 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5815 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5816 | bool QStyleSheetStyle::event(QEvent *e) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5817 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5818 | return never executed: (baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e);return (baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e);never executed: return (baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5819 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5820 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5821 | void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5822 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5823 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5824 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5825 | if (w->objectName() == QLatin1String("qt_fontDialog_sampleEdit")
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5826 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5827 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5828 | QWidget *container = containerWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5829 | QRenderRule rule = renderRule(container, PseudoElement_None, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5830 | PseudoClass_Active | PseudoClass_Enabled | extendedPseudoClass(container)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5831 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5832 | const bool useStyleSheetPropagationInWidgetStyles = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5833 | QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5834 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5835 | if (useStyleSheetPropagationInWidgetStyles
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5836 | unsetStyleSheetFont(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5837 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5838 | if (rule.font.resolve()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5839 | QFont wf = w->font(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5840 | styleSheetCaches->customFontWidgets.insert(w, qMakePair(wf, rule.font.resolve())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5841 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5842 | QFont font = rule.font.resolve(wf); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5843 | font.resolve(wf.resolve() | rule.font.resolve()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5844 | w->setFont(font); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5845 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5846 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5847 | QFont font = rule.font.resolve(w->font()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5848 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5849 | if ((!w->isWindow()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5850 | && isNaturalChild(w)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5851 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5852 | font = font.resolve(static_cast<QWidget *>(w->parent())->font()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5853 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5854 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5855 | if (w->data->fnt == font
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5856 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5857 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5858 | w->data->fnt = font; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5859 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5860 | QEvent e(QEvent::FontChange); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5861 | QApplication::sendEvent(w, &e); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5862 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5863 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5864 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5865 | void QStyleSheetStyle::saveWidgetFont(QWidget* w, const QFont& font) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5866 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5867 | w->setProperty("_q_styleSheetWidgetFont", font); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5868 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5869 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5870 | void QStyleSheetStyle::clearWidgetFont(QWidget* w) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5871 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5872 | w->setProperty("_q_styleSheetWidgetFont", QVariant(QVariant::Invalid)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5873 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5874 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5875 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5876 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5877 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5878 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5879 | bool QStyleSheetStyle::styleSheetPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5880 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5881 | if (!w
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5882 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5883 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5884 | if (globalStyleSheetStyle != 0
never executed: false;return false;never executed: } QStyleSheetStyleRecursionGuard recursion_guard(this);return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5885 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5886 | w = containerWidget(w); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5887 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5888 | QRenderRule rule = renderRule(w, PseudoElement_None, pseudoClass(opt->state) | extendedPseudoClass(w)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5889 | if (!rule.hasPalette()
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5890 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5891 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5892 | rule.configurePalette(pal, QPalette::NoRole, QPalette::NoRole); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5893 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5894 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5895 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5896 | Qt::Alignment QStyleSheetStyle::resolveAlignment(Qt::LayoutDirection layDir, Qt::Alignment src) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5897 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5898 | if (layDir == Qt::LeftToRight
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5899 | return never executed: src;return src;never executed: return src; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5900 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5901 | if (src & Qt::AlignLeft
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5902 | src &= ~Qt::AlignLeft; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5903 | src |= Qt::AlignRight; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5904 | } never executed: else if (src & Qt::AlignRightend of block
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5905 | src &= ~Qt::AlignRight; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5906 | src |= Qt::AlignLeft; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5907 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5908 | src |= Qt::AlignAbsolute; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5909 | return never executed: src;return src;never executed: return src; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5910 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5911 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5912 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5913 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5914 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5915 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5916 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5917 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5918 | bool QStyleSheetStyle::isNaturalChild(const QObject *obj) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5919 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5920 | if (obj->objectName().startsWith(QLatin1String("qt_"))
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5921 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5922 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5923 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5924 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5925 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5926 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5927 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |