| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | using namespace QCss; | - |
| 7 | | - |
| 8 | static QPen qPenFromStyle(const QBrush& b, qreal width, BorderStyle s) | - |
| 9 | { | - |
| 10 | Qt::PenStyle ps = Qt::NoPen; | - |
| 11 | | - |
| 12 | switch (s) { | - |
| 13 | case BorderStyle_Dotted: | - |
| 14 | ps = Qt::DotLine; | - |
| 15 | break; | 0 |
| 16 | case BorderStyle_Dashed: | - |
| 17 | ps = width == 1 ? Qt::DotLine : Qt::DashLine; never evaluated: width == 1 | 0 |
| 18 | break; | 0 |
| 19 | case BorderStyle_DotDash: | - |
| 20 | ps = Qt::DashDotLine; | - |
| 21 | break; | 0 |
| 22 | case BorderStyle_DotDotDash: | - |
| 23 | ps = Qt::DashDotDotLine; | - |
| 24 | break; | 0 |
| 25 | case BorderStyle_Inset: | - |
| 26 | case BorderStyle_Outset: | - |
| 27 | case BorderStyle_Solid: | - |
| 28 | ps = Qt::SolidLine; | - |
| 29 | break; | 0 |
| 30 | default: | - |
| 31 | break; | 0 |
| 32 | } | - |
| 33 | | - |
| 34 | return QPen(b, width, ps, Qt::FlatCap); never executed: return QPen(b, width, ps, Qt::FlatCap); | 0 |
| 35 | } | - |
| 36 | | - |
| 37 | void qDrawRoundedCorners(QPainter *p, qreal x1, qreal y1, qreal x2, qreal y2, | - |
| 38 | const QSizeF& r1, const QSizeF& r2, | - |
| 39 | Edge edge, BorderStyle s, QBrush c) | - |
| 40 | { | - |
| 41 | const qreal pw = (edge == TopEdge || edge == BottomEdge) ? y2-y1 : x2-x1; never evaluated: edge == TopEdge never evaluated: edge == BottomEdge | 0 |
| 42 | if (s == BorderStyle_Double) { never evaluated: s == BorderStyle_Double | 0 |
| 43 | qreal wby3 = pw/3; | - |
| 44 | switch (edge) { | - |
| 45 | case TopEdge: | - |
| 46 | case BottomEdge: | - |
| 47 | qDrawRoundedCorners(p, x1, y1, x2, y1+wby3, r1, r2, edge, BorderStyle_Solid, c); | - |
| 48 | qDrawRoundedCorners(p, x1, y2-wby3, x2, y2, r1, r2, edge, BorderStyle_Solid, c); | - |
| 49 | break; | 0 |
| 50 | case LeftEdge: | - |
| 51 | qDrawRoundedCorners(p, x1, y1+1, x1+wby3, y2, r1, r2, LeftEdge, BorderStyle_Solid, c); | - |
| 52 | qDrawRoundedCorners(p, x2-wby3, y1+1, x2, y2, r1, r2, LeftEdge, BorderStyle_Solid, c); | - |
| 53 | break; | 0 |
| 54 | case RightEdge: | - |
| 55 | qDrawRoundedCorners(p, x1, y1+1, x1+wby3, y2, r1, r2, RightEdge, BorderStyle_Solid, c); | - |
| 56 | qDrawRoundedCorners(p, x2-wby3, y1+1, x2, y2, r1, r2, RightEdge, BorderStyle_Solid, c); | - |
| 57 | break; | 0 |
| 58 | default: | - |
| 59 | break; | 0 |
| 60 | } | - |
| 61 | return; | 0 |
| 62 | } else if (s == BorderStyle_Ridge || s == BorderStyle_Groove) { never evaluated: s == BorderStyle_Ridge never evaluated: s == BorderStyle_Groove | 0 |
| 63 | BorderStyle s1, s2; | - |
| 64 | if (s == BorderStyle_Groove) { never evaluated: s == BorderStyle_Groove | 0 |
| 65 | s1 = BorderStyle_Inset; | - |
| 66 | s2 = BorderStyle_Outset; | - |
| 67 | } else { | 0 |
| 68 | s1 = BorderStyle_Outset; | - |
| 69 | s2 = BorderStyle_Inset; | - |
| 70 | } | 0 |
| 71 | int pwby2 = qRound(pw/2); | - |
| 72 | switch (edge) { | - |
| 73 | case TopEdge: | - |
| 74 | qDrawRoundedCorners(p, x1, y1, x2, y1 + pwby2, r1, r2, TopEdge, s1, c); | - |
| 75 | qDrawRoundedCorners(p, x1, y1 + pwby2, x2, y2, r1, r2, TopEdge, s2, c); | - |
| 76 | break; | 0 |
| 77 | case BottomEdge: | - |
| 78 | qDrawRoundedCorners(p, x1, y1 + pwby2, x2, y2, r1, r2, BottomEdge, s1, c); | - |
| 79 | qDrawRoundedCorners(p, x1, y1, x2, y2-pwby2, r1, r2, BottomEdge, s2, c); | - |
| 80 | break; | 0 |
| 81 | case LeftEdge: | - |
| 82 | qDrawRoundedCorners(p, x1, y1, x1 + pwby2, y2, r1, r2, LeftEdge, s1, c); | - |
| 83 | qDrawRoundedCorners(p, x1 + pwby2, y1, x2, y2, r1, r2, LeftEdge, s2, c); | - |
| 84 | break; | 0 |
| 85 | case RightEdge: | - |
| 86 | qDrawRoundedCorners(p, x1 + pwby2, y1, x2, y2, r1, r2, RightEdge, s1, c); | - |
| 87 | qDrawRoundedCorners(p, x1, y1, x2 - pwby2, y2, r1, r2, RightEdge, s2, c); | - |
| 88 | break; | 0 |
| 89 | default: | - |
| 90 | break; | 0 |
| 91 | } | - |
| 92 | } else if ((s == BorderStyle_Outset && (edge == TopEdge || edge == LeftEdge)) never evaluated: s == BorderStyle_Outset never evaluated: edge == TopEdge never evaluated: edge == LeftEdge | 0 |
| 93 | || (s == BorderStyle_Inset && (edge == BottomEdge || edge == RightEdge))) never evaluated: s == BorderStyle_Inset never evaluated: edge == BottomEdge never evaluated: edge == RightEdge | 0 |
| 94 | c = c.color().lighter(); never executed: c = c.color().lighter(); | 0 |
| 95 | | - |
| 96 | p->save(); | - |
| 97 | qreal pwby2 = pw/2; | - |
| 98 | p->setBrush(Qt::NoBrush); | - |
| 99 | QPen pen = qPenFromStyle(c, pw, s); | - |
| 100 | pen.setCapStyle(Qt::SquareCap); | - |
| 101 | p->setPen(pen); | - |
| 102 | switch (edge) { | - |
| 103 | case TopEdge: | - |
| 104 | if (!r1.isEmpty()) never evaluated: !r1.isEmpty() | 0 |
| 105 | p->drawArc(QRectF(x1 - r1.width() + pwby2, y1 + pwby2, | 0 |
| 106 | 2*r1.width() - pw, 2*r1.height() - pw), 135*16, -45*16); never executed: p->drawArc(QRectF(x1 - r1.width() + pwby2, y1 + pwby2, 2*r1.width() - pw, 2*r1.height() - pw), 135*16, -45*16); | 0 |
| 107 | if (!r2.isEmpty()) never evaluated: !r2.isEmpty() | 0 |
| 108 | p->drawArc(QRectF(x2 - r2.width() + pwby2, y1 + pwby2, | 0 |
| 109 | 2*r2.width() - pw, 2*r2.height() - pw), 45*16, 45*16); never executed: p->drawArc(QRectF(x2 - r2.width() + pwby2, y1 + pwby2, 2*r2.width() - pw, 2*r2.height() - pw), 45*16, 45*16); | 0 |
| 110 | break; | 0 |
| 111 | case BottomEdge: | - |
| 112 | if (!r1.isEmpty()) never evaluated: !r1.isEmpty() | 0 |
| 113 | p->drawArc(QRectF(x1 - r1.width() + pwby2, y2 - 2*r1.height() + pwby2, | 0 |
| 114 | 2*r1.width() - pw, 2*r1.height() - pw), -90 * 16, -45 * 16); never executed: p->drawArc(QRectF(x1 - r1.width() + pwby2, y2 - 2*r1.height() + pwby2, 2*r1.width() - pw, 2*r1.height() - pw), -90 * 16, -45 * 16); | 0 |
| 115 | if (!r2.isEmpty()) never evaluated: !r2.isEmpty() | 0 |
| 116 | p->drawArc(QRectF(x2 - r2.width() + pwby2, y2 - 2*r2.height() + pwby2, | 0 |
| 117 | 2*r2.width() - pw, 2*r2.height() - pw), -90 * 16, 45 * 16); never executed: p->drawArc(QRectF(x2 - r2.width() + pwby2, y2 - 2*r2.height() + pwby2, 2*r2.width() - pw, 2*r2.height() - pw), -90 * 16, 45 * 16); | 0 |
| 118 | break; | 0 |
| 119 | case LeftEdge: | - |
| 120 | if (!r1.isEmpty()) never evaluated: !r1.isEmpty() | 0 |
| 121 | p->drawArc(QRectF(x1 + pwby2, y1 - r1.height() + pwby2, | 0 |
| 122 | 2*r1.width() - pw, 2*r1.height() - pw), 135*16, 45*16); never executed: p->drawArc(QRectF(x1 + pwby2, y1 - r1.height() + pwby2, 2*r1.width() - pw, 2*r1.height() - pw), 135*16, 45*16); | 0 |
| 123 | if (!r2.isEmpty()) never evaluated: !r2.isEmpty() | 0 |
| 124 | p->drawArc(QRectF(x1 + pwby2, y2 - r2.height() + pwby2, | 0 |
| 125 | 2*r2.width() - pw, 2*r2.height() - pw), 180*16, 45*16); never executed: p->drawArc(QRectF(x1 + pwby2, y2 - r2.height() + pwby2, 2*r2.width() - pw, 2*r2.height() - pw), 180*16, 45*16); | 0 |
| 126 | break; | 0 |
| 127 | case RightEdge: | - |
| 128 | if (!r1.isEmpty()) never evaluated: !r1.isEmpty() | 0 |
| 129 | p->drawArc(QRectF(x2 - 2*r1.width() + pwby2, y1 - r1.height() + pwby2, | 0 |
| 130 | 2*r1.width() - pw, 2*r1.height() - pw), 45*16, -45*16); never executed: p->drawArc(QRectF(x2 - 2*r1.width() + pwby2, y1 - r1.height() + pwby2, 2*r1.width() - pw, 2*r1.height() - pw), 45*16, -45*16); | 0 |
| 131 | if (!r2.isEmpty()) never evaluated: !r2.isEmpty() | 0 |
| 132 | p->drawArc(QRectF(x2 - 2*r2.width() + pwby2, y2 - r2.height() + pwby2, | 0 |
| 133 | 2*r2.width() - pw, 2*r2.height() - pw), 315*16, 45*16); never executed: p->drawArc(QRectF(x2 - 2*r2.width() + pwby2, y2 - r2.height() + pwby2, 2*r2.width() - pw, 2*r2.height() - pw), 315*16, 45*16); | 0 |
| 134 | break; | 0 |
| 135 | default: | - |
| 136 | break; | 0 |
| 137 | } | - |
| 138 | p->restore(); | - |
| 139 | } | 0 |
| 140 | | - |
| 141 | | - |
| 142 | void qDrawEdge(QPainter *p, qreal x1, qreal y1, qreal x2, qreal y2, qreal dw1, qreal dw2, | - |
| 143 | QCss::Edge edge, QCss::BorderStyle style, QBrush c) | - |
| 144 | { | - |
| 145 | p->save(); | - |
| 146 | const qreal width = (edge == TopEdge || edge == BottomEdge) ? (y2-y1) : (x2-x1); evaluated: edge == TopEdge| yes Evaluation Count:60 | yes Evaluation Count:180 |
evaluated: edge == BottomEdge| yes Evaluation Count:60 | yes Evaluation Count:120 |
| 60-180 |
| 147 | | - |
| 148 | if (width <= 2 && style == BorderStyle_Double) partially evaluated: width <= 2| yes Evaluation Count:240 | no Evaluation Count:0 |
partially evaluated: style == BorderStyle_Double| no Evaluation Count:0 | yes Evaluation Count:240 |
| 0-240 |
| 149 | style = BorderStyle_Solid; never executed: style = BorderStyle_Solid; | 0 |
| 150 | | - |
| 151 | switch (style) { | - |
| 152 | case BorderStyle_Inset: | - |
| 153 | case BorderStyle_Outset: | - |
| 154 | if ((style == BorderStyle_Outset && (edge == TopEdge || edge == LeftEdge)) evaluated: style == BorderStyle_Outset| yes Evaluation Count:32 | yes Evaluation Count:200 |
evaluated: edge == TopEdge| yes Evaluation Count:8 | yes Evaluation Count:24 |
evaluated: edge == LeftEdge| yes Evaluation Count:8 | yes Evaluation Count:16 |
| 8-200 |
| 155 | || (style == BorderStyle_Inset && (edge == BottomEdge || edge == RightEdge))) evaluated: style == BorderStyle_Inset| yes Evaluation Count:200 | yes Evaluation Count:16 |
evaluated: edge == BottomEdge| yes Evaluation Count:50 | yes Evaluation Count:150 |
evaluated: edge == RightEdge| yes Evaluation Count:50 | yes Evaluation Count:100 |
| 16-200 |
| 156 | c = c.color().lighter(); executed: c = c.color().lighter();Execution Count:116 | 116 |
| 157 | | - |
| 158 | case BorderStyle_Solid: { | - |
| 159 | p->setPen(Qt::NoPen); | - |
| 160 | p->setBrush(c); | - |
| 161 | if (width == 1 || (dw1 == 0 && dw2 == 0)) { partially evaluated: width == 1| yes Evaluation Count:240 | no Evaluation Count:0 |
never evaluated: dw1 == 0 never evaluated: dw2 == 0 | 0-240 |
| 162 | p->drawRect(QRectF(x1, y1, x2-x1, y2-y1)); | - |
| 163 | } else { executed: }Execution Count:240 | 240 |
| 164 | QPolygonF quad; | - |
| 165 | switch (edge) { | - |
| 166 | case TopEdge: | - |
| 167 | quad << QPointF(x1, y1) << QPointF(x1 + dw1, y2) | - |
| 168 | << QPointF(x2 - dw2, y2) << QPointF(x2, y1); | - |
| 169 | break; | 0 |
| 170 | case BottomEdge: | - |
| 171 | quad << QPointF(x1 + dw1, y1) << QPointF(x1, y2) | - |
| 172 | << QPointF(x2, y2) << QPointF(x2 - dw2, y1); | - |
| 173 | break; | 0 |
| 174 | case LeftEdge: | - |
| 175 | quad << QPointF(x1, y1) << QPointF(x1, y2) | - |
| 176 | << QPointF(x2, y2 - dw2) << QPointF(x2, y1 + dw1); | - |
| 177 | break; | 0 |
| 178 | case RightEdge: | - |
| 179 | quad << QPointF(x1, y1 + dw1) << QPointF(x1, y2 - dw2) | - |
| 180 | << QPointF(x2, y2) << QPointF(x2, y1); | - |
| 181 | break; | 0 |
| 182 | default: | - |
| 183 | break; | 0 |
| 184 | } | - |
| 185 | p->drawConvexPolygon(quad); | - |
| 186 | } | 0 |
| 187 | break; executed: break;Execution Count:240 | 240 |
| 188 | } | - |
| 189 | case BorderStyle_Dotted: | - |
| 190 | case BorderStyle_Dashed: | - |
| 191 | case BorderStyle_DotDash: | - |
| 192 | case BorderStyle_DotDotDash: | - |
| 193 | p->setPen(qPenFromStyle(c, width, style)); | - |
| 194 | if (width == 1) never evaluated: width == 1 | 0 |
| 195 | p->drawLine(QLineF(x1, y1, x2 - 1, y2 - 1)); never executed: p->drawLine(QLineF(x1, y1, x2 - 1, y2 - 1)); | 0 |
| 196 | else if (edge == TopEdge || edge == BottomEdge) never evaluated: edge == TopEdge never evaluated: edge == BottomEdge | 0 |
| 197 | p->drawLine(QLineF(x1 + width/2, (y1 + y2)/2, x2 - width/2, (y1 + y2)/2)); never executed: p->drawLine(QLineF(x1 + width/2, (y1 + y2)/2, x2 - width/2, (y1 + y2)/2)); | 0 |
| 198 | else | - |
| 199 | p->drawLine(QLineF((x1+x2)/2, y1 + width/2, (x1+x2)/2, y2 - width/2)); never executed: p->drawLine(QLineF((x1+x2)/2, y1 + width/2, (x1+x2)/2, y2 - width/2)); | 0 |
| 200 | break; | 0 |
| 201 | | - |
| 202 | case BorderStyle_Double: { | - |
| 203 | int wby3 = qRound(width/3); | - |
| 204 | int dw1by3 = qRound(dw1/3); | - |
| 205 | int dw2by3 = qRound(dw2/3); | - |
| 206 | switch (edge) { | - |
| 207 | case TopEdge: | - |
| 208 | qDrawEdge(p, x1, y1, x2, y1 + wby3, dw1by3, dw2by3, TopEdge, BorderStyle_Solid, c); | - |
| 209 | qDrawEdge(p, x1 + dw1 - dw1by3, y2 - wby3, x2 - dw2 + dw1by3, y2, | - |
| 210 | dw1by3, dw2by3, TopEdge, BorderStyle_Solid, c); | - |
| 211 | break; | 0 |
| 212 | case LeftEdge: | - |
| 213 | qDrawEdge(p, x1, y1, x1 + wby3, y2, dw1by3, dw2by3, LeftEdge, BorderStyle_Solid, c); | - |
| 214 | qDrawEdge(p, x2 - wby3, y1 + dw1 - dw1by3, x2, y2 - dw2 + dw2by3, dw1by3, dw2by3, | - |
| 215 | LeftEdge, BorderStyle_Solid, c); | - |
| 216 | break; | 0 |
| 217 | case BottomEdge: | - |
| 218 | qDrawEdge(p, x1 + dw1 - dw1by3, y1, x2 - dw2 + dw2by3, y1 + wby3, dw1by3, dw2by3, | - |
| 219 | BottomEdge, BorderStyle_Solid, c); | - |
| 220 | qDrawEdge(p, x1, y2 - wby3, x2, y2, dw1by3, dw2by3, BottomEdge, BorderStyle_Solid, c); | - |
| 221 | break; | 0 |
| 222 | case RightEdge: | - |
| 223 | qDrawEdge(p, x2 - wby3, y1, x2, y2, dw1by3, dw2by3, RightEdge, BorderStyle_Solid, c); | - |
| 224 | qDrawEdge(p, x1, y1 + dw1 - dw1by3, x1 + wby3, y2 - dw2 + dw2by3, dw1by3, dw2by3, | - |
| 225 | RightEdge, BorderStyle_Solid, c); | - |
| 226 | break; | 0 |
| 227 | default: | - |
| 228 | break; | 0 |
| 229 | } | - |
| 230 | break; | 0 |
| 231 | } | - |
| 232 | case BorderStyle_Ridge: | - |
| 233 | case BorderStyle_Groove: { | - |
| 234 | BorderStyle s1, s2; | - |
| 235 | if (style == BorderStyle_Groove) { never evaluated: style == BorderStyle_Groove | 0 |
| 236 | s1 = BorderStyle_Inset; | - |
| 237 | s2 = BorderStyle_Outset; | - |
| 238 | } else { | 0 |
| 239 | s1 = BorderStyle_Outset; | - |
| 240 | s2 = BorderStyle_Inset; | - |
| 241 | } | 0 |
| 242 | int dw1by2 = qFloor(dw1/2), dw2by2 = qFloor(dw2/2); | - |
| 243 | int wby2 = qRound(width/2); | - |
| 244 | switch (edge) { | - |
| 245 | case TopEdge: | - |
| 246 | qDrawEdge(p, x1, y1, x2, y1 + wby2, dw1by2, dw2by2, TopEdge, s1, c); | - |
| 247 | qDrawEdge(p, x1 + dw1by2, y1 + wby2, x2 - dw2by2, y2, dw1by2, dw2by2, TopEdge, s2, c); | - |
| 248 | break; | 0 |
| 249 | case BottomEdge: | - |
| 250 | qDrawEdge(p, x1, y1 + wby2, x2, y2, dw1by2, dw2by2, BottomEdge, s1, c); | - |
| 251 | qDrawEdge(p, x1 + dw1by2, y1, x2 - dw2by2, y1 + wby2, dw1by2, dw2by2, BottomEdge, s2, c); | - |
| 252 | break; | 0 |
| 253 | case LeftEdge: | - |
| 254 | qDrawEdge(p, x1, y1, x1 + wby2, y2, dw1by2, dw2by2, LeftEdge, s1, c); | - |
| 255 | qDrawEdge(p, x1 + wby2, y1 + dw1by2, x2, y2 - dw2by2, dw1by2, dw2by2, LeftEdge, s2, c); | - |
| 256 | break; | 0 |
| 257 | case RightEdge: | - |
| 258 | qDrawEdge(p, x1 + wby2, y1, x2, y2, dw1by2, dw2by2, RightEdge, s1, c); | - |
| 259 | qDrawEdge(p, x1, y1 + dw1by2, x1 + wby2, y2 - dw2by2, dw1by2, dw2by2, RightEdge, s2, c); | - |
| 260 | break; | 0 |
| 261 | default: | - |
| 262 | break; | 0 |
| 263 | } | - |
| 264 | } | - |
| 265 | default: | - |
| 266 | break; | 0 |
| 267 | } | - |
| 268 | p->restore(); | - |
| 269 | } executed: }Execution Count:240 | 240 |
| 270 | | - |
| 271 | void qNormalizeRadii(const QRect &br, const QSize *radii, | - |
| 272 | QSize *tlr, QSize *trr, QSize *blr, QSize *brr) | - |
| 273 | { | - |
| 274 | *tlr = radii[0].expandedTo(QSize(0, 0)); | - |
| 275 | *trr = radii[1].expandedTo(QSize(0, 0)); | - |
| 276 | *blr = radii[2].expandedTo(QSize(0, 0)); | - |
| 277 | *brr = radii[3].expandedTo(QSize(0, 0)); | - |
| 278 | if (tlr->width() + trr->width() > br.width()) partially evaluated: tlr->width() + trr->width() > br.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 279 | *tlr = *trr = QSize(0, 0); never executed: *tlr = *trr = QSize(0, 0); | 0 |
| 280 | if (blr->width() + brr->width() > br.width()) partially evaluated: blr->width() + brr->width() > br.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 281 | *blr = *brr = QSize(0, 0); never executed: *blr = *brr = QSize(0, 0); | 0 |
| 282 | if (tlr->height() + blr->height() > br.height()) partially evaluated: tlr->height() + blr->height() > br.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 283 | *tlr = *blr = QSize(0, 0); never executed: *tlr = *blr = QSize(0, 0); | 0 |
| 284 | if (trr->height() + brr->height() > br.height()) partially evaluated: trr->height() + brr->height() > br.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 285 | *trr = *brr = QSize(0, 0); never executed: *trr = *brr = QSize(0, 0); | 0 |
| 286 | } executed: }Execution Count:2 | 2 |
| 287 | | - |
| 288 | | - |
| 289 | static bool paintsOver(const QCss::BorderStyle *styles, const QBrush *colors, QCss::Edge e1, QCss::Edge e2) | - |
| 290 | { | - |
| 291 | QCss::BorderStyle s1 = styles[e1]; | - |
| 292 | QCss::BorderStyle s2 = styles[e2]; | - |
| 293 | | - |
| 294 | if (s2 == BorderStyle_None || colors[e2] == Qt::transparent) partially evaluated: s2 == BorderStyle_None| no Evaluation Count:0 | yes Evaluation Count:16 |
partially evaluated: colors[e2] == Qt::transparent| no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
| 295 | return true; never executed: return true; | 0 |
| 296 | | - |
| 297 | if ((s1 == BorderStyle_Solid && s2 == BorderStyle_Solid) && (colors[e1] == colors[e2])) partially evaluated: s1 == BorderStyle_Solid| yes Evaluation Count:16 | no Evaluation Count:0 |
partially evaluated: s2 == BorderStyle_Solid| yes Evaluation Count:16 | no Evaluation Count:0 |
partially evaluated: (colors[e1] == colors[e2])| yes Evaluation Count:16 | no Evaluation Count:0 |
| 0-16 |
| 298 | return true; executed: return true;Execution Count:16 | 16 |
| 299 | | - |
| 300 | return false; never executed: return false; | 0 |
| 301 | } | - |
| 302 | | - |
| 303 | void qDrawBorder(QPainter *p, const QRect &rect, const QCss::BorderStyle *styles, | - |
| 304 | const int *borders, const QBrush *colors, const QSize *radii) | - |
| 305 | { | - |
| 306 | const QRectF br(rect); | - |
| 307 | QSize tlr, trr, blr, brr; | - |
| 308 | qNormalizeRadii(rect, radii, &tlr, &trr, &blr, &brr); | - |
| 309 | | - |
| 310 | | - |
| 311 | if (styles[BottomEdge] != BorderStyle_None && borders[BottomEdge] > 0) { partially evaluated: styles[BottomEdge] != BorderStyle_None| yes Evaluation Count:2 | no Evaluation Count:0 |
partially evaluated: borders[BottomEdge] > 0| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 312 | qreal dw1 = (blr.width() || paintsOver(styles, colors, BottomEdge, LeftEdge)) ? 0 : borders[LeftEdge]; partially evaluated: blr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, BottomEdge, LeftEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 313 | qreal dw2 = (brr.width() || paintsOver(styles, colors, BottomEdge, RightEdge)) ? 0 : borders[RightEdge]; partially evaluated: brr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, BottomEdge, RightEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 314 | qreal x1 = br.x() + blr.width(); | - |
| 315 | qreal y1 = br.y() + br.height() - borders[BottomEdge]; | - |
| 316 | qreal x2 = br.x() + br.width() - brr.width(); | - |
| 317 | qreal y2 = br.y() + br.height() ; | - |
| 318 | | - |
| 319 | qDrawEdge(p, x1, y1, x2, y2, dw1, dw2, BottomEdge, styles[BottomEdge], colors[BottomEdge]); | - |
| 320 | if (blr.width() || brr.width()) partially evaluated: blr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: brr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 321 | qDrawRoundedCorners(p, x1, y1, x2, y2, blr, brr, BottomEdge, styles[BottomEdge], colors[BottomEdge]); never executed: qDrawRoundedCorners(p, x1, y1, x2, y2, blr, brr, BottomEdge, styles[BottomEdge], colors[BottomEdge]); | 0 |
| 322 | } executed: }Execution Count:2 | 2 |
| 323 | if (styles[RightEdge] != BorderStyle_None && borders[RightEdge] > 0) { partially evaluated: styles[RightEdge] != BorderStyle_None| yes Evaluation Count:2 | no Evaluation Count:0 |
partially evaluated: borders[RightEdge] > 0| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 324 | qreal dw1 = (trr.height() || paintsOver(styles, colors, RightEdge, TopEdge)) ? 0 : borders[TopEdge]; partially evaluated: trr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, RightEdge, TopEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 325 | qreal dw2 = (brr.height() || paintsOver(styles, colors, RightEdge, BottomEdge)) ? 0 : borders[BottomEdge]; partially evaluated: brr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, RightEdge, BottomEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 326 | qreal x1 = br.x() + br.width() - borders[RightEdge]; | - |
| 327 | qreal y1 = br.y() + trr.height(); | - |
| 328 | qreal x2 = br.x() + br.width(); | - |
| 329 | qreal y2 = br.y() + br.height() - brr.height(); | - |
| 330 | | - |
| 331 | qDrawEdge(p, x1, y1, x2, y2, dw1, dw2, RightEdge, styles[RightEdge], colors[RightEdge]); | - |
| 332 | if (trr.height() || brr.height()) partially evaluated: trr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: brr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 333 | qDrawRoundedCorners(p, x1, y1, x2, y2, trr, brr, RightEdge, styles[RightEdge], colors[RightEdge]); never executed: qDrawRoundedCorners(p, x1, y1, x2, y2, trr, brr, RightEdge, styles[RightEdge], colors[RightEdge]); | 0 |
| 334 | } executed: }Execution Count:2 | 2 |
| 335 | if (styles[LeftEdge] != BorderStyle_None && borders[LeftEdge] > 0) { partially evaluated: styles[LeftEdge] != BorderStyle_None| yes Evaluation Count:2 | no Evaluation Count:0 |
partially evaluated: borders[LeftEdge] > 0| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 336 | qreal dw1 = (tlr.height() || paintsOver(styles, colors, LeftEdge, TopEdge)) ? 0 : borders[TopEdge]; partially evaluated: tlr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, LeftEdge, TopEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 337 | qreal dw2 = (blr.height() || paintsOver(styles, colors, LeftEdge, BottomEdge)) ? 0 : borders[BottomEdge]; partially evaluated: blr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, LeftEdge, BottomEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 338 | qreal x1 = br.x(); | - |
| 339 | qreal y1 = br.y() + tlr.height(); | - |
| 340 | qreal x2 = br.x() + borders[LeftEdge]; | - |
| 341 | qreal y2 = br.y() + br.height() - blr.height(); | - |
| 342 | | - |
| 343 | qDrawEdge(p, x1, y1, x2, y2, dw1, dw2, LeftEdge, styles[LeftEdge], colors[LeftEdge]); | - |
| 344 | if (tlr.height() || blr.height()) partially evaluated: tlr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: blr.height()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 345 | qDrawRoundedCorners(p, x1, y1, x2, y2, tlr, blr, LeftEdge, styles[LeftEdge], colors[LeftEdge]); never executed: qDrawRoundedCorners(p, x1, y1, x2, y2, tlr, blr, LeftEdge, styles[LeftEdge], colors[LeftEdge]); | 0 |
| 346 | } executed: }Execution Count:2 | 2 |
| 347 | if (styles[TopEdge] != BorderStyle_None && borders[TopEdge] > 0) { partially evaluated: styles[TopEdge] != BorderStyle_None| yes Evaluation Count:2 | no Evaluation Count:0 |
partially evaluated: borders[TopEdge] > 0| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 348 | qreal dw1 = (tlr.width() || paintsOver(styles, colors, TopEdge, LeftEdge)) ? 0 : borders[LeftEdge]; partially evaluated: tlr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, TopEdge, LeftEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 349 | qreal dw2 = (trr.width() || paintsOver(styles, colors, TopEdge, RightEdge)) ? 0 : borders[RightEdge]; partially evaluated: trr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: paintsOver(styles, colors, TopEdge, RightEdge)| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 350 | qreal x1 = br.x() + tlr.width(); | - |
| 351 | qreal y1 = br.y(); | - |
| 352 | qreal x2 = br.left() + br.width() - trr.width(); | - |
| 353 | qreal y2 = br.y() + borders[TopEdge]; | - |
| 354 | | - |
| 355 | qDrawEdge(p, x1, y1, x2, y2, dw1, dw2, TopEdge, styles[TopEdge], colors[TopEdge]); | - |
| 356 | if (tlr.width() || trr.width()) partially evaluated: tlr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
partially evaluated: trr.width()| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 357 | qDrawRoundedCorners(p, x1, y1, x2, y2, tlr, trr, TopEdge, styles[TopEdge], colors[TopEdge]); never executed: qDrawRoundedCorners(p, x1, y1, x2, y2, tlr, trr, TopEdge, styles[TopEdge], colors[TopEdge]); | 0 |
| 358 | } executed: }Execution Count:2 | 2 |
| 359 | } executed: }Execution Count:2 | 2 |
| 360 | | - |
| 361 | | - |
| 362 | | - |
| 363 | | - |
| 364 | | - |
| | |