| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickvaluetypes.cpp | 
| Source code | Switch to Preprocessed file | 
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | /**************************************************************************** | - | ||||||||||||
| 2 | ** | - | ||||||||||||
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||||||||
| 4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||||||||
| 5 | ** | - | ||||||||||||
| 6 | ** This file is part of the QtQuick module of the Qt Toolkit. | - | ||||||||||||
| 7 | ** | - | ||||||||||||
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||||||||
| 9 | ** Commercial License Usage | - | ||||||||||||
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||
| 11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||||||||
| 15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||||||||
| 16 | ** | - | ||||||||||||
| 17 | ** GNU Lesser General Public License Usage | - | ||||||||||||
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||
| 19 | ** General Public License version 3 as published by the Free Software | - | ||||||||||||
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||||||||
| 21 | ** packaging of this file. Please review the following information to | - | ||||||||||||
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||||||||
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||||||||
| 24 | ** | - | ||||||||||||
| 25 | ** GNU General Public License Usage | - | ||||||||||||
| 26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||||||||
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||||||||
| 28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||||||||
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||||||||
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||||||||
| 31 | ** included in the packaging of this file. Please review the following | - | ||||||||||||
| 32 | ** information to ensure the GNU General Public License requirements will | - | ||||||||||||
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||||||||
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||||||||
| 35 | ** | - | ||||||||||||
| 36 | ** $QT_END_LICENSE$ | - | ||||||||||||
| 37 | ** | - | ||||||||||||
| 38 | ****************************************************************************/ | - | ||||||||||||
| 39 | - | |||||||||||||
| 40 | #include <private/qquickvaluetypes_p.h> | - | ||||||||||||
| 41 | - | |||||||||||||
| 42 | #include <qtquickglobal.h> | - | ||||||||||||
| 43 | #include <private/qqmlvaluetype_p.h> | - | ||||||||||||
| 44 | #include <private/qfont_p.h> | - | ||||||||||||
| 45 | - | |||||||||||||
| 46 | - | |||||||||||||
| 47 | QT_BEGIN_NAMESPACE | - | ||||||||||||
| 48 | - | |||||||||||||
| 49 | namespace QQuickValueTypes { | - | ||||||||||||
| 50 | void registerValueTypes() | - | ||||||||||||
| 51 | { | - | ||||||||||||
| 52 | QQmlValueTypeFactory::registerValueTypes("QtQuick", 2, 0); | - | ||||||||||||
| 53 | qmlRegisterValueTypeEnums<QQuickFontValueType>("QtQuick", 2, 0, "Font"); | - | ||||||||||||
| 54 | } executed 374 times by 132 tests:  end of blockExecuted by: 
 | 374 | ||||||||||||
| 55 | } | - | ||||||||||||
| 56 | - | |||||||||||||
| 57 | QString QQuickColorValueType::toString() const | - | ||||||||||||
| 58 | { | - | ||||||||||||
| 59 | return v.name(v.alpha() != 255 ? QColor::HexArgb : QColor::HexRgb); executed 204 times by 5 tests:  return v.name(v.alpha() != 255 ? QColor::HexArgb : QColor::HexRgb);Executed by: 
 | 204 | ||||||||||||
| 60 | } | - | ||||||||||||
| 61 | - | |||||||||||||
| 62 | qreal QQuickColorValueType::r() const | - | ||||||||||||
| 63 | { | - | ||||||||||||
| 64 | return v.redF(); executed 12 times by 1 test:  return v.redF();Executed by: 
 | 12 | ||||||||||||
| 65 | } | - | ||||||||||||
| 66 | - | |||||||||||||
| 67 | qreal QQuickColorValueType::g() const | - | ||||||||||||
| 68 | { | - | ||||||||||||
| 69 | return v.greenF(); executed 4 times by 1 test:  return v.greenF();Executed by: 
 | 4 | ||||||||||||
| 70 | } | - | ||||||||||||
| 71 | - | |||||||||||||
| 72 | qreal QQuickColorValueType::b() const | - | ||||||||||||
| 73 | { | - | ||||||||||||
| 74 | return v.blueF(); executed 4 times by 1 test:  return v.blueF();Executed by: 
 | 4 | ||||||||||||
| 75 | } | - | ||||||||||||
| 76 | - | |||||||||||||
| 77 | qreal QQuickColorValueType::a() const | - | ||||||||||||
| 78 | { | - | ||||||||||||
| 79 | return v.alphaF(); executed 4 times by 1 test:  return v.alphaF();Executed by: 
 | 4 | ||||||||||||
| 80 | } | - | ||||||||||||
| 81 | - | |||||||||||||
| 82 | qreal QQuickColorValueType::hsvHue() const | - | ||||||||||||
| 83 | { | - | ||||||||||||
| 84 | return v.hsvHueF(); executed 2 times by 1 test:  return v.hsvHueF();Executed by: 
 | 2 | ||||||||||||
| 85 | } | - | ||||||||||||
| 86 | - | |||||||||||||
| 87 | qreal QQuickColorValueType::hsvSaturation() const | - | ||||||||||||
| 88 | { | - | ||||||||||||
| 89 | return v.hsvSaturationF(); executed 2 times by 1 test:  return v.hsvSaturationF();Executed by: 
 | 2 | ||||||||||||
| 90 | } | - | ||||||||||||
| 91 | - | |||||||||||||
| 92 | qreal QQuickColorValueType::hsvValue() const | - | ||||||||||||
| 93 | { | - | ||||||||||||
| 94 | return v.valueF(); executed 2 times by 1 test:  return v.valueF();Executed by: 
 | 2 | ||||||||||||
| 95 | } | - | ||||||||||||
| 96 | - | |||||||||||||
| 97 | qreal QQuickColorValueType::hslHue() const | - | ||||||||||||
| 98 | { | - | ||||||||||||
| 99 | return v.hslHueF(); executed 2 times by 1 test:  return v.hslHueF();Executed by: 
 | 2 | ||||||||||||
| 100 | } | - | ||||||||||||
| 101 | - | |||||||||||||
| 102 | qreal QQuickColorValueType::hslSaturation() const | - | ||||||||||||
| 103 | { | - | ||||||||||||
| 104 | return v.hslSaturationF(); executed 2 times by 1 test:  return v.hslSaturationF();Executed by: 
 | 2 | ||||||||||||
| 105 | } | - | ||||||||||||
| 106 | - | |||||||||||||
| 107 | qreal QQuickColorValueType::hslLightness() const | - | ||||||||||||
| 108 | { | - | ||||||||||||
| 109 | return v.lightnessF(); executed 2 times by 1 test:  return v.lightnessF();Executed by: 
 | 2 | ||||||||||||
| 110 | } | - | ||||||||||||
| 111 | - | |||||||||||||
| 112 | void QQuickColorValueType::setR(qreal r) | - | ||||||||||||
| 113 | { | - | ||||||||||||
| 114 | v.setRedF(r); | - | ||||||||||||
| 115 | } executed 12 times by 2 tests:  end of blockExecuted by: 
 | 12 | ||||||||||||
| 116 | - | |||||||||||||
| 117 | void QQuickColorValueType::setG(qreal g) | - | ||||||||||||
| 118 | { | - | ||||||||||||
| 119 | v.setGreenF(g); | - | ||||||||||||
| 120 | } executed 6 times by 2 tests:  end of blockExecuted by: 
 | 6 | ||||||||||||
| 121 | - | |||||||||||||
| 122 | void QQuickColorValueType::setB(qreal b) | - | ||||||||||||
| 123 | { | - | ||||||||||||
| 124 | v.setBlueF(b); | - | ||||||||||||
| 125 | } executed 6 times by 2 tests:  end of blockExecuted by: 
 | 6 | ||||||||||||
| 126 | - | |||||||||||||
| 127 | void QQuickColorValueType::setA(qreal a) | - | ||||||||||||
| 128 | { | - | ||||||||||||
| 129 | v.setAlphaF(a); | - | ||||||||||||
| 130 | } executed 8 times by 1 test:  end of blockExecuted by: 
 | 8 | ||||||||||||
| 131 | - | |||||||||||||
| 132 | void QQuickColorValueType::setHsvHue(qreal hsvHue) | - | ||||||||||||
| 133 | { | - | ||||||||||||
| 134 | qreal hue, saturation, value, alpha; | - | ||||||||||||
| 135 | v.getHsvF(&hue, &saturation, &value, &alpha); | - | ||||||||||||
| 136 | v.setHsvF(hsvHue, saturation, value, alpha); | - | ||||||||||||
| 137 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 138 | - | |||||||||||||
| 139 | void QQuickColorValueType::setHsvSaturation(qreal hsvSaturation) | - | ||||||||||||
| 140 | { | - | ||||||||||||
| 141 | qreal hue, saturation, value, alpha; | - | ||||||||||||
| 142 | v.getHsvF(&hue, &saturation, &value, &alpha); | - | ||||||||||||
| 143 | v.setHsvF(hue, hsvSaturation, value, alpha); | - | ||||||||||||
| 144 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 145 | - | |||||||||||||
| 146 | void QQuickColorValueType::setHsvValue(qreal hsvValue) | - | ||||||||||||
| 147 | { | - | ||||||||||||
| 148 | qreal hue, saturation, value, alpha; | - | ||||||||||||
| 149 | v.getHsvF(&hue, &saturation, &value, &alpha); | - | ||||||||||||
| 150 | v.setHsvF(hue, saturation, hsvValue, alpha); | - | ||||||||||||
| 151 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 152 | - | |||||||||||||
| 153 | void QQuickColorValueType::setHslHue(qreal hslHue) | - | ||||||||||||
| 154 | { | - | ||||||||||||
| 155 | qreal hue, saturation, lightness, alpha; | - | ||||||||||||
| 156 | v.getHslF(&hue, &saturation, &lightness, &alpha); | - | ||||||||||||
| 157 | v.setHslF(hslHue, saturation, lightness, alpha); | - | ||||||||||||
| 158 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 159 | - | |||||||||||||
| 160 | void QQuickColorValueType::setHslSaturation(qreal hslSaturation) | - | ||||||||||||
| 161 | { | - | ||||||||||||
| 162 | qreal hue, saturation, lightness, alpha; | - | ||||||||||||
| 163 | v.getHslF(&hue, &saturation, &lightness, &alpha); | - | ||||||||||||
| 164 | v.setHslF(hue, hslSaturation, lightness, alpha); | - | ||||||||||||
| 165 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 166 | - | |||||||||||||
| 167 | void QQuickColorValueType::setHslLightness(qreal hslLightness) | - | ||||||||||||
| 168 | { | - | ||||||||||||
| 169 | qreal hue, saturation, lightness, alpha; | - | ||||||||||||
| 170 | v.getHslF(&hue, &saturation, &lightness, &alpha); | - | ||||||||||||
| 171 | v.setHslF(hue, saturation, hslLightness, alpha); | - | ||||||||||||
| 172 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 173 | - | |||||||||||||
| 174 | QString QQuickVector2DValueType::toString() const | - | ||||||||||||
| 175 | { | - | ||||||||||||
| 176 | return QString(QLatin1String("QVector2D(%1, %2)")).arg(v.x()).arg(v.y()); executed 6 times by 2 tests:  return QString(QLatin1String("QVector2D(%1, %2)")).arg(v.x()).arg(v.y());Executed by: 
 | 6 | ||||||||||||
| 177 | } | - | ||||||||||||
| 178 | - | |||||||||||||
| 179 | qreal QQuickVector2DValueType::x() const | - | ||||||||||||
| 180 | { | - | ||||||||||||
| 181 | return v.x(); executed 14 times by 2 tests:  return v.x();Executed by: 
 | 14 | ||||||||||||
| 182 | } | - | ||||||||||||
| 183 | - | |||||||||||||
| 184 | qreal QQuickVector2DValueType::y() const | - | ||||||||||||
| 185 | { | - | ||||||||||||
| 186 | return v.y(); executed 8 times by 2 tests:  return v.y();Executed by: 
 | 8 | ||||||||||||
| 187 | } | - | ||||||||||||
| 188 | - | |||||||||||||
| 189 | void QQuickVector2DValueType::setX(qreal x) | - | ||||||||||||
| 190 | { | - | ||||||||||||
| 191 | v.setX(x); | - | ||||||||||||
| 192 | } executed 14 times by 2 tests:  end of blockExecuted by: 
 | 14 | ||||||||||||
| 193 | - | |||||||||||||
| 194 | void QQuickVector2DValueType::setY(qreal y) | - | ||||||||||||
| 195 | { | - | ||||||||||||
| 196 | v.setY(y); | - | ||||||||||||
| 197 | } executed 4 times by 2 tests:  end of blockExecuted by: 
 | 4 | ||||||||||||
| 198 | - | |||||||||||||
| 199 | qreal QQuickVector2DValueType::dotProduct(const QVector2D &vec) const | - | ||||||||||||
| 200 | { | - | ||||||||||||
| 201 | return QVector2D::dotProduct(v, vec); never executed:  return QVector2D::dotProduct(v, vec); | 0 | ||||||||||||
| 202 | } | - | ||||||||||||
| 203 | - | |||||||||||||
| 204 | QVector2D QQuickVector2DValueType::times(const QVector2D &vec) const | - | ||||||||||||
| 205 | { | - | ||||||||||||
| 206 | return v * vec; executed 2 times by 1 test:  return v * vec;Executed by: 
 | 2 | ||||||||||||
| 207 | } | - | ||||||||||||
| 208 | - | |||||||||||||
| 209 | QVector2D QQuickVector2DValueType::times(qreal scalar) const | - | ||||||||||||
| 210 | { | - | ||||||||||||
| 211 | return v * scalar; executed 2 times by 1 test:  return v * scalar;Executed by: 
 | 2 | ||||||||||||
| 212 | } | - | ||||||||||||
| 213 | - | |||||||||||||
| 214 | QVector2D QQuickVector2DValueType::plus(const QVector2D &vec) const | - | ||||||||||||
| 215 | { | - | ||||||||||||
| 216 | return v + vec; executed 8 times by 1 test:  return v + vec;Executed by: 
 | 8 | ||||||||||||
| 217 | } | - | ||||||||||||
| 218 | - | |||||||||||||
| 219 | QVector2D QQuickVector2DValueType::minus(const QVector2D &vec) const | - | ||||||||||||
| 220 | { | - | ||||||||||||
| 221 | return v - vec; executed 2 times by 1 test:  return v - vec;Executed by: 
 | 2 | ||||||||||||
| 222 | } | - | ||||||||||||
| 223 | - | |||||||||||||
| 224 | QVector2D QQuickVector2DValueType::normalized() const | - | ||||||||||||
| 225 | { | - | ||||||||||||
| 226 | return v.normalized(); executed 2 times by 1 test:  return v.normalized();Executed by: 
 | 2 | ||||||||||||
| 227 | } | - | ||||||||||||
| 228 | - | |||||||||||||
| 229 | qreal QQuickVector2DValueType::length() const | - | ||||||||||||
| 230 | { | - | ||||||||||||
| 231 | return v.length(); executed 8 times by 1 test:  return v.length();Executed by: 
 | 8 | ||||||||||||
| 232 | } | - | ||||||||||||
| 233 | - | |||||||||||||
| 234 | QVector3D QQuickVector2DValueType::toVector3d() const | - | ||||||||||||
| 235 | { | - | ||||||||||||
| 236 | return v.toVector3D(); executed 2 times by 1 test:  return v.toVector3D();Executed by: 
 | 2 | ||||||||||||
| 237 | } | - | ||||||||||||
| 238 | - | |||||||||||||
| 239 | QVector4D QQuickVector2DValueType::toVector4d() const | - | ||||||||||||
| 240 | { | - | ||||||||||||
| 241 | return v.toVector4D(); executed 2 times by 1 test:  return v.toVector4D();Executed by: 
 | 2 | ||||||||||||
| 242 | } | - | ||||||||||||
| 243 | - | |||||||||||||
| 244 | bool QQuickVector2DValueType::fuzzyEquals(const QVector2D &vec, qreal epsilon) const | - | ||||||||||||
| 245 | { | - | ||||||||||||
| 246 | qreal absEps = qAbs(epsilon); | - | ||||||||||||
| 247 | if (qAbs(v.x() - vec.x()) > absEps) 
 | 0-4 | ||||||||||||
| 248 | return false; never executed:  return false; | 0 | ||||||||||||
| 249 | if (qAbs(v.y() - vec.y()) > absEps) 
 | 0-4 | ||||||||||||
| 250 | return false; never executed:  return false; | 0 | ||||||||||||
| 251 | return true; executed 4 times by 1 test:  return true;Executed by: 
 | 4 | ||||||||||||
| 252 | } | - | ||||||||||||
| 253 | - | |||||||||||||
| 254 | bool QQuickVector2DValueType::fuzzyEquals(const QVector2D &vec) const | - | ||||||||||||
| 255 | { | - | ||||||||||||
| 256 | return qFuzzyCompare(v, vec); executed 2 times by 1 test:  return qFuzzyCompare(v, vec);Executed by: 
 | 2 | ||||||||||||
| 257 | } | - | ||||||||||||
| 258 | - | |||||||||||||
| 259 | QString QQuickVector3DValueType::toString() const | - | ||||||||||||
| 260 | { | - | ||||||||||||
| 261 | return QString(QLatin1String("QVector3D(%1, %2, %3)")).arg(v.x()).arg(v.y()).arg(v.z()); executed 6 times by 2 tests:  return QString(QLatin1String("QVector3D(%1, %2, %3)")).arg(v.x()).arg(v.y()).arg(v.z());Executed by: 
 | 6 | ||||||||||||
| 262 | } | - | ||||||||||||
| 263 | - | |||||||||||||
| 264 | qreal QQuickVector3DValueType::x() const | - | ||||||||||||
| 265 | { | - | ||||||||||||
| 266 | return v.x(); executed 18 times by 3 tests:  return v.x();Executed by: 
 | 18 | ||||||||||||
| 267 | } | - | ||||||||||||
| 268 | - | |||||||||||||
| 269 | qreal QQuickVector3DValueType::y() const | - | ||||||||||||
| 270 | { | - | ||||||||||||
| 271 | return v.y(); executed 12 times by 3 tests:  return v.y();Executed by: 
 | 12 | ||||||||||||
| 272 | } | - | ||||||||||||
| 273 | - | |||||||||||||
| 274 | qreal QQuickVector3DValueType::z() const | - | ||||||||||||
| 275 | { | - | ||||||||||||
| 276 | return v.z(); executed 12 times by 3 tests:  return v.z();Executed by: 
 | 12 | ||||||||||||
| 277 | } | - | ||||||||||||
| 278 | - | |||||||||||||
| 279 | void QQuickVector3DValueType::setX(qreal x) | - | ||||||||||||
| 280 | { | - | ||||||||||||
| 281 | v.setX(x); | - | ||||||||||||
| 282 | } executed 868 times by 6 tests:  end of blockExecuted by: 
 | 868 | ||||||||||||
| 283 | - | |||||||||||||
| 284 | void QQuickVector3DValueType::setY(qreal y) | - | ||||||||||||
| 285 | { | - | ||||||||||||
| 286 | v.setY(y); | - | ||||||||||||
| 287 | } executed 1668 times by 5 tests:  end of blockExecuted by: 
 | 1668 | ||||||||||||
| 288 | - | |||||||||||||
| 289 | void QQuickVector3DValueType::setZ(qreal z) | - | ||||||||||||
| 290 | { | - | ||||||||||||
| 291 | v.setZ(z); | - | ||||||||||||
| 292 | } executed 834 times by 5 tests:  end of blockExecuted by: 
 | 834 | ||||||||||||
| 293 | - | |||||||||||||
| 294 | QVector3D QQuickVector3DValueType::crossProduct(const QVector3D &vec) const | - | ||||||||||||
| 295 | { | - | ||||||||||||
| 296 | return QVector3D::crossProduct(v, vec); never executed:  return QVector3D::crossProduct(v, vec); | 0 | ||||||||||||
| 297 | } | - | ||||||||||||
| 298 | - | |||||||||||||
| 299 | qreal QQuickVector3DValueType::dotProduct(const QVector3D &vec) const | - | ||||||||||||
| 300 | { | - | ||||||||||||
| 301 | return QVector3D::dotProduct(v, vec); never executed:  return QVector3D::dotProduct(v, vec); | 0 | ||||||||||||
| 302 | } | - | ||||||||||||
| 303 | - | |||||||||||||
| 304 | QVector3D QQuickVector3DValueType::times(const QMatrix4x4 &m) const | - | ||||||||||||
| 305 | { | - | ||||||||||||
| 306 | return v * m; executed 2 times by 1 test:  return v * m;Executed by: 
 | 2 | ||||||||||||
| 307 | } | - | ||||||||||||
| 308 | - | |||||||||||||
| 309 | QVector3D QQuickVector3DValueType::times(const QVector3D &vec) const | - | ||||||||||||
| 310 | { | - | ||||||||||||
| 311 | return v * vec; executed 2 times by 1 test:  return v * vec;Executed by: 
 | 2 | ||||||||||||
| 312 | } | - | ||||||||||||
| 313 | - | |||||||||||||
| 314 | QVector3D QQuickVector3DValueType::times(qreal scalar) const | - | ||||||||||||
| 315 | { | - | ||||||||||||
| 316 | return v * scalar; executed 2 times by 1 test:  return v * scalar;Executed by: 
 | 2 | ||||||||||||
| 317 | } | - | ||||||||||||
| 318 | - | |||||||||||||
| 319 | QVector3D QQuickVector3DValueType::plus(const QVector3D &vec) const | - | ||||||||||||
| 320 | { | - | ||||||||||||
| 321 | return v + vec; executed 4 times by 1 test:  return v + vec;Executed by: 
 | 4 | ||||||||||||
| 322 | } | - | ||||||||||||
| 323 | - | |||||||||||||
| 324 | QVector3D QQuickVector3DValueType::minus(const QVector3D &vec) const | - | ||||||||||||
| 325 | { | - | ||||||||||||
| 326 | return v - vec; executed 2 times by 1 test:  return v - vec;Executed by: 
 | 2 | ||||||||||||
| 327 | } | - | ||||||||||||
| 328 | - | |||||||||||||
| 329 | QVector3D QQuickVector3DValueType::normalized() const | - | ||||||||||||
| 330 | { | - | ||||||||||||
| 331 | return v.normalized(); executed 2 times by 1 test:  return v.normalized();Executed by: 
 | 2 | ||||||||||||
| 332 | } | - | ||||||||||||
| 333 | - | |||||||||||||
| 334 | qreal QQuickVector3DValueType::length() const | - | ||||||||||||
| 335 | { | - | ||||||||||||
| 336 | return v.length(); executed 8 times by 1 test:  return v.length();Executed by: 
 | 8 | ||||||||||||
| 337 | } | - | ||||||||||||
| 338 | - | |||||||||||||
| 339 | QVector2D QQuickVector3DValueType::toVector2d() const | - | ||||||||||||
| 340 | { | - | ||||||||||||
| 341 | return v.toVector2D(); executed 2 times by 1 test:  return v.toVector2D();Executed by: 
 | 2 | ||||||||||||
| 342 | } | - | ||||||||||||
| 343 | - | |||||||||||||
| 344 | QVector4D QQuickVector3DValueType::toVector4d() const | - | ||||||||||||
| 345 | { | - | ||||||||||||
| 346 | return v.toVector4D(); executed 2 times by 1 test:  return v.toVector4D();Executed by: 
 | 2 | ||||||||||||
| 347 | } | - | ||||||||||||
| 348 | - | |||||||||||||
| 349 | bool QQuickVector3DValueType::fuzzyEquals(const QVector3D &vec, qreal epsilon) const | - | ||||||||||||
| 350 | { | - | ||||||||||||
| 351 | qreal absEps = qAbs(epsilon); | - | ||||||||||||
| 352 | if (qAbs(v.x() - vec.x()) > absEps) 
 | 0-4 | ||||||||||||
| 353 | return false; never executed:  return false; | 0 | ||||||||||||
| 354 | if (qAbs(v.y() - vec.y()) > absEps) 
 | 0-4 | ||||||||||||
| 355 | return false; never executed:  return false; | 0 | ||||||||||||
| 356 | if (qAbs(v.z() - vec.z()) > absEps) 
 | 0-4 | ||||||||||||
| 357 | return false; never executed:  return false; | 0 | ||||||||||||
| 358 | return true; executed 4 times by 1 test:  return true;Executed by: 
 | 4 | ||||||||||||
| 359 | } | - | ||||||||||||
| 360 | - | |||||||||||||
| 361 | bool QQuickVector3DValueType::fuzzyEquals(const QVector3D &vec) const | - | ||||||||||||
| 362 | { | - | ||||||||||||
| 363 | return qFuzzyCompare(v, vec); executed 2 times by 1 test:  return qFuzzyCompare(v, vec);Executed by: 
 | 2 | ||||||||||||
| 364 | } | - | ||||||||||||
| 365 | - | |||||||||||||
| 366 | QString QQuickVector4DValueType::toString() const | - | ||||||||||||
| 367 | { | - | ||||||||||||
| 368 | return QString(QLatin1String("QVector4D(%1, %2, %3, %4)")).arg(v.x()).arg(v.y()).arg(v.z()).arg(v.w()); executed 8 times by 2 tests:  return QString(QLatin1String("QVector4D(%1, %2, %3, %4)")).arg(v.x()).arg(v.y()).arg(v.z()).arg(v.w());Executed by: 
 | 8 | ||||||||||||
| 369 | } | - | ||||||||||||
| 370 | - | |||||||||||||
| 371 | qreal QQuickVector4DValueType::x() const | - | ||||||||||||
| 372 | { | - | ||||||||||||
| 373 | return v.x(); executed 12 times by 2 tests:  return v.x();Executed by: 
 | 12 | ||||||||||||
| 374 | } | - | ||||||||||||
| 375 | - | |||||||||||||
| 376 | qreal QQuickVector4DValueType::y() const | - | ||||||||||||
| 377 | { | - | ||||||||||||
| 378 | return v.y(); executed 6 times by 2 tests:  return v.y();Executed by: 
 | 6 | ||||||||||||
| 379 | } | - | ||||||||||||
| 380 | - | |||||||||||||
| 381 | qreal QQuickVector4DValueType::z() const | - | ||||||||||||
| 382 | { | - | ||||||||||||
| 383 | return v.z(); executed 6 times by 2 tests:  return v.z();Executed by: 
 | 6 | ||||||||||||
| 384 | } | - | ||||||||||||
| 385 | - | |||||||||||||
| 386 | qreal QQuickVector4DValueType::w() const | - | ||||||||||||
| 387 | { | - | ||||||||||||
| 388 | return v.w(); executed 6 times by 2 tests:  return v.w();Executed by: 
 | 6 | ||||||||||||
| 389 | } | - | ||||||||||||
| 390 | - | |||||||||||||
| 391 | void QQuickVector4DValueType::setX(qreal x) | - | ||||||||||||
| 392 | { | - | ||||||||||||
| 393 | v.setX(x); | - | ||||||||||||
| 394 | } executed 8 times by 2 tests:  end of blockExecuted by: 
 | 8 | ||||||||||||
| 395 | - | |||||||||||||
| 396 | void QQuickVector4DValueType::setY(qreal y) | - | ||||||||||||
| 397 | { | - | ||||||||||||
| 398 | v.setY(y); | - | ||||||||||||
| 399 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 400 | - | |||||||||||||
| 401 | void QQuickVector4DValueType::setZ(qreal z) | - | ||||||||||||
| 402 | { | - | ||||||||||||
| 403 | v.setZ(z); | - | ||||||||||||
| 404 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 405 | - | |||||||||||||
| 406 | void QQuickVector4DValueType::setW(qreal w) | - | ||||||||||||
| 407 | { | - | ||||||||||||
| 408 | v.setW(w); | - | ||||||||||||
| 409 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 410 | - | |||||||||||||
| 411 | qreal QQuickVector4DValueType::dotProduct(const QVector4D &vec) const | - | ||||||||||||
| 412 | { | - | ||||||||||||
| 413 | return QVector4D::dotProduct(v, vec); never executed:  return QVector4D::dotProduct(v, vec); | 0 | ||||||||||||
| 414 | } | - | ||||||||||||
| 415 | - | |||||||||||||
| 416 | QVector4D QQuickVector4DValueType::times(const QVector4D &vec) const | - | ||||||||||||
| 417 | { | - | ||||||||||||
| 418 | return v * vec; executed 6 times by 2 tests:  return v * vec;Executed by: 
 | 6 | ||||||||||||
| 419 | } | - | ||||||||||||
| 420 | - | |||||||||||||
| 421 | QVector4D QQuickVector4DValueType::times(const QMatrix4x4 &m) const | - | ||||||||||||
| 422 | { | - | ||||||||||||
| 423 | return v * m; executed 4 times by 2 tests:  return v * m;Executed by: 
 | 4 | ||||||||||||
| 424 | } | - | ||||||||||||
| 425 | - | |||||||||||||
| 426 | QVector4D QQuickVector4DValueType::times(qreal scalar) const | - | ||||||||||||
| 427 | { | - | ||||||||||||
| 428 | return v * scalar; executed 4 times by 2 tests:  return v * scalar;Executed by: 
 | 4 | ||||||||||||
| 429 | } | - | ||||||||||||
| 430 | - | |||||||||||||
| 431 | QVector4D QQuickVector4DValueType::plus(const QVector4D &vec) const | - | ||||||||||||
| 432 | { | - | ||||||||||||
| 433 | return v + vec; executed 4 times by 2 tests:  return v + vec;Executed by: 
 | 4 | ||||||||||||
| 434 | } | - | ||||||||||||
| 435 | - | |||||||||||||
| 436 | QVector4D QQuickVector4DValueType::minus(const QVector4D &vec) const | - | ||||||||||||
| 437 | { | - | ||||||||||||
| 438 | return v - vec; executed 2 times by 1 test:  return v - vec;Executed by: 
 | 2 | ||||||||||||
| 439 | } | - | ||||||||||||
| 440 | - | |||||||||||||
| 441 | QVector4D QQuickVector4DValueType::normalized() const | - | ||||||||||||
| 442 | { | - | ||||||||||||
| 443 | return v.normalized(); executed 2 times by 1 test:  return v.normalized();Executed by: 
 | 2 | ||||||||||||
| 444 | } | - | ||||||||||||
| 445 | - | |||||||||||||
| 446 | qreal QQuickVector4DValueType::length() const | - | ||||||||||||
| 447 | { | - | ||||||||||||
| 448 | return v.length(); executed 8 times by 1 test:  return v.length();Executed by: 
 | 8 | ||||||||||||
| 449 | } | - | ||||||||||||
| 450 | - | |||||||||||||
| 451 | QVector2D QQuickVector4DValueType::toVector2d() const | - | ||||||||||||
| 452 | { | - | ||||||||||||
| 453 | return v.toVector2D(); executed 2 times by 1 test:  return v.toVector2D();Executed by: 
 | 2 | ||||||||||||
| 454 | } | - | ||||||||||||
| 455 | - | |||||||||||||
| 456 | QVector3D QQuickVector4DValueType::toVector3d() const | - | ||||||||||||
| 457 | { | - | ||||||||||||
| 458 | return v.toVector3D(); executed 2 times by 1 test:  return v.toVector3D();Executed by: 
 | 2 | ||||||||||||
| 459 | } | - | ||||||||||||
| 460 | - | |||||||||||||
| 461 | bool QQuickVector4DValueType::fuzzyEquals(const QVector4D &vec, qreal epsilon) const | - | ||||||||||||
| 462 | { | - | ||||||||||||
| 463 | qreal absEps = qAbs(epsilon); | - | ||||||||||||
| 464 | if (qAbs(v.x() - vec.x()) > absEps) 
 | 0-4 | ||||||||||||
| 465 | return false; never executed:  return false; | 0 | ||||||||||||
| 466 | if (qAbs(v.y() - vec.y()) > absEps) 
 | 0-4 | ||||||||||||
| 467 | return false; never executed:  return false; | 0 | ||||||||||||
| 468 | if (qAbs(v.z() - vec.z()) > absEps) 
 | 0-4 | ||||||||||||
| 469 | return false; never executed:  return false; | 0 | ||||||||||||
| 470 | if (qAbs(v.w() - vec.w()) > absEps) 
 | 0-4 | ||||||||||||
| 471 | return false; never executed:  return false; | 0 | ||||||||||||
| 472 | return true; executed 4 times by 1 test:  return true;Executed by: 
 | 4 | ||||||||||||
| 473 | } | - | ||||||||||||
| 474 | - | |||||||||||||
| 475 | bool QQuickVector4DValueType::fuzzyEquals(const QVector4D &vec) const | - | ||||||||||||
| 476 | { | - | ||||||||||||
| 477 | return qFuzzyCompare(v, vec); executed 2 times by 1 test:  return qFuzzyCompare(v, vec);Executed by: 
 | 2 | ||||||||||||
| 478 | } | - | ||||||||||||
| 479 | - | |||||||||||||
| 480 | QString QQuickQuaternionValueType::toString() const | - | ||||||||||||
| 481 | { | - | ||||||||||||
| 482 | return QString(QLatin1String("QQuaternion(%1, %2, %3, %4)")).arg(v.scalar()).arg(v.x()).arg(v.y()).arg(v.z()); executed 6 times by 2 tests:  return QString(QLatin1String("QQuaternion(%1, %2, %3, %4)")).arg(v.scalar()).arg(v.x()).arg(v.y()).arg(v.z());Executed by: 
 | 6 | ||||||||||||
| 483 | } | - | ||||||||||||
| 484 | - | |||||||||||||
| 485 | qreal QQuickQuaternionValueType::scalar() const | - | ||||||||||||
| 486 | { | - | ||||||||||||
| 487 | return v.scalar(); executed 6 times by 2 tests:  return v.scalar();Executed by: 
 | 6 | ||||||||||||
| 488 | } | - | ||||||||||||
| 489 | - | |||||||||||||
| 490 | qreal QQuickQuaternionValueType::x() const | - | ||||||||||||
| 491 | { | - | ||||||||||||
| 492 | return v.x(); executed 6 times by 2 tests:  return v.x();Executed by: 
 | 6 | ||||||||||||
| 493 | } | - | ||||||||||||
| 494 | - | |||||||||||||
| 495 | qreal QQuickQuaternionValueType::y() const | - | ||||||||||||
| 496 | { | - | ||||||||||||
| 497 | return v.y(); executed 6 times by 2 tests:  return v.y();Executed by: 
 | 6 | ||||||||||||
| 498 | } | - | ||||||||||||
| 499 | - | |||||||||||||
| 500 | qreal QQuickQuaternionValueType::z() const | - | ||||||||||||
| 501 | { | - | ||||||||||||
| 502 | return v.z(); executed 6 times by 2 tests:  return v.z();Executed by: 
 | 6 | ||||||||||||
| 503 | } | - | ||||||||||||
| 504 | - | |||||||||||||
| 505 | void QQuickQuaternionValueType::setScalar(qreal scalar) | - | ||||||||||||
| 506 | { | - | ||||||||||||
| 507 | v.setScalar(scalar); | - | ||||||||||||
| 508 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 509 | - | |||||||||||||
| 510 | void QQuickQuaternionValueType::setX(qreal x) | - | ||||||||||||
| 511 | { | - | ||||||||||||
| 512 | v.setX(x); | - | ||||||||||||
| 513 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 514 | - | |||||||||||||
| 515 | void QQuickQuaternionValueType::setY(qreal y) | - | ||||||||||||
| 516 | { | - | ||||||||||||
| 517 | v.setY(y); | - | ||||||||||||
| 518 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 519 | - | |||||||||||||
| 520 | void QQuickQuaternionValueType::setZ(qreal z) | - | ||||||||||||
| 521 | { | - | ||||||||||||
| 522 | v.setZ(z); | - | ||||||||||||
| 523 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 524 | - | |||||||||||||
| 525 | QMatrix4x4 QQuickMatrix4x4ValueType::times(const QMatrix4x4 &m) const | - | ||||||||||||
| 526 | { | - | ||||||||||||
| 527 | return v * m; executed 4 times by 2 tests:  return v * m;Executed by: 
 | 4 | ||||||||||||
| 528 | } | - | ||||||||||||
| 529 | - | |||||||||||||
| 530 | QVector4D QQuickMatrix4x4ValueType::times(const QVector4D &vec) const | - | ||||||||||||
| 531 | { | - | ||||||||||||
| 532 | return v * vec; executed 4 times by 2 tests:  return v * vec;Executed by: 
 | 4 | ||||||||||||
| 533 | } | - | ||||||||||||
| 534 | - | |||||||||||||
| 535 | QVector3D QQuickMatrix4x4ValueType::times(const QVector3D &vec) const | - | ||||||||||||
| 536 | { | - | ||||||||||||
| 537 | return v * vec; executed 2 times by 1 test:  return v * vec;Executed by: 
 | 2 | ||||||||||||
| 538 | } | - | ||||||||||||
| 539 | - | |||||||||||||
| 540 | QMatrix4x4 QQuickMatrix4x4ValueType::times(qreal factor) const | - | ||||||||||||
| 541 | { | - | ||||||||||||
| 542 | return v * factor; executed 2 times by 1 test:  return v * factor;Executed by: 
 | 2 | ||||||||||||
| 543 | } | - | ||||||||||||
| 544 | - | |||||||||||||
| 545 | QMatrix4x4 QQuickMatrix4x4ValueType::plus(const QMatrix4x4 &m) const | - | ||||||||||||
| 546 | { | - | ||||||||||||
| 547 | return v + m; executed 4 times by 2 tests:  return v + m;Executed by: 
 | 4 | ||||||||||||
| 548 | } | - | ||||||||||||
| 549 | - | |||||||||||||
| 550 | QMatrix4x4 QQuickMatrix4x4ValueType::minus(const QMatrix4x4 &m) const | - | ||||||||||||
| 551 | { | - | ||||||||||||
| 552 | return v - m; executed 2 times by 1 test:  return v - m;Executed by: 
 | 2 | ||||||||||||
| 553 | } | - | ||||||||||||
| 554 | - | |||||||||||||
| 555 | QVector4D QQuickMatrix4x4ValueType::row(int n) const | - | ||||||||||||
| 556 | { | - | ||||||||||||
| 557 | return v.row(n); executed 4 times by 2 tests:  return v.row(n);Executed by: 
 | 4 | ||||||||||||
| 558 | } | - | ||||||||||||
| 559 | - | |||||||||||||
| 560 | QVector4D QQuickMatrix4x4ValueType::column(int m) const | - | ||||||||||||
| 561 | { | - | ||||||||||||
| 562 | return v.column(m); executed 4 times by 2 tests:  return v.column(m);Executed by: 
 | 4 | ||||||||||||
| 563 | } | - | ||||||||||||
| 564 | - | |||||||||||||
| 565 | qreal QQuickMatrix4x4ValueType::determinant() const | - | ||||||||||||
| 566 | { | - | ||||||||||||
| 567 | return v.determinant(); executed 4 times by 1 test:  return v.determinant();Executed by: 
 | 4 | ||||||||||||
| 568 | } | - | ||||||||||||
| 569 | - | |||||||||||||
| 570 | QMatrix4x4 QQuickMatrix4x4ValueType::inverted() const | - | ||||||||||||
| 571 | { | - | ||||||||||||
| 572 | return v.inverted(); executed 4 times by 1 test:  return v.inverted();Executed by: 
 | 4 | ||||||||||||
| 573 | } | - | ||||||||||||
| 574 | - | |||||||||||||
| 575 | QMatrix4x4 QQuickMatrix4x4ValueType::transposed() const | - | ||||||||||||
| 576 | { | - | ||||||||||||
| 577 | return v.transposed(); executed 2 times by 1 test:  return v.transposed();Executed by: 
 | 2 | ||||||||||||
| 578 | } | - | ||||||||||||
| 579 | - | |||||||||||||
| 580 | bool QQuickMatrix4x4ValueType::fuzzyEquals(const QMatrix4x4 &m, qreal epsilon) const | - | ||||||||||||
| 581 | { | - | ||||||||||||
| 582 | qreal absEps = qAbs(epsilon); | - | ||||||||||||
| 583 | for (int i = 0; i < 4; ++i) { 
 | 4-16 | ||||||||||||
| 584 | for (int j = 0; j < 4; ++j) { 
 | 16-64 | ||||||||||||
| 585 | if (qAbs(v(i,j) - m(i,j)) > absEps) { 
 | 0-64 | ||||||||||||
| 586 | return false; never executed:  return false; | 0 | ||||||||||||
| 587 | } | - | ||||||||||||
| 588 | } executed 64 times by 1 test:  end of blockExecuted by: 
 | 64 | ||||||||||||
| 589 | } executed 16 times by 1 test:  end of blockExecuted by: 
 | 16 | ||||||||||||
| 590 | return true; executed 4 times by 1 test:  return true;Executed by: 
 | 4 | ||||||||||||
| 591 | } | - | ||||||||||||
| 592 | - | |||||||||||||
| 593 | bool QQuickMatrix4x4ValueType::fuzzyEquals(const QMatrix4x4 &m) const | - | ||||||||||||
| 594 | { | - | ||||||||||||
| 595 | return qFuzzyCompare(v, m); executed 4 times by 1 test:  return qFuzzyCompare(v, m);Executed by: 
 | 4 | ||||||||||||
| 596 | } | - | ||||||||||||
| 597 | - | |||||||||||||
| 598 | QString QQuickFontValueType::toString() const | - | ||||||||||||
| 599 | { | - | ||||||||||||
| 600 | return QString(QLatin1String("QFont(%1)")).arg(v.toString()); executed 4 times by 1 test:  return QString(QLatin1String("QFont(%1)")).arg(v.toString());Executed by: 
 | 4 | ||||||||||||
| 601 | } | - | ||||||||||||
| 602 | - | |||||||||||||
| 603 | QString QQuickFontValueType::family() const | - | ||||||||||||
| 604 | { | - | ||||||||||||
| 605 | return v.family(); executed 22 times by 3 tests:  return v.family();Executed by: 
 | 22 | ||||||||||||
| 606 | } | - | ||||||||||||
| 607 | - | |||||||||||||
| 608 | void QQuickFontValueType::setFamily(const QString &family) | - | ||||||||||||
| 609 | { | - | ||||||||||||
| 610 | v.setFamily(family); | - | ||||||||||||
| 611 | } executed 110 times by 8 tests:  end of blockExecuted by: 
 | 110 | ||||||||||||
| 612 | - | |||||||||||||
| 613 | QString QQuickFontValueType::styleName() const | - | ||||||||||||
| 614 | { | - | ||||||||||||
| 615 | return v.styleName(); never executed:  return v.styleName(); | 0 | ||||||||||||
| 616 | } | - | ||||||||||||
| 617 | - | |||||||||||||
| 618 | void QQuickFontValueType::setStyleName(const QString &style) | - | ||||||||||||
| 619 | { | - | ||||||||||||
| 620 | v.setStyleName(style); | - | ||||||||||||
| 621 | } never executed:  end of block | 0 | ||||||||||||
| 622 | - | |||||||||||||
| 623 | bool QQuickFontValueType::bold() const | - | ||||||||||||
| 624 | { | - | ||||||||||||
| 625 | return v.bold(); executed 24 times by 1 test:  return v.bold();Executed by: 
 | 24 | ||||||||||||
| 626 | } | - | ||||||||||||
| 627 | - | |||||||||||||
| 628 | void QQuickFontValueType::setBold(bool b) | - | ||||||||||||
| 629 | { | - | ||||||||||||
| 630 | v.setBold(b); | - | ||||||||||||
| 631 | } executed 240 times by 10 tests:  end of blockExecuted by: 
 | 240 | ||||||||||||
| 632 | - | |||||||||||||
| 633 | QQuickFontValueType::FontWeight QQuickFontValueType::weight() const | - | ||||||||||||
| 634 | { | - | ||||||||||||
| 635 | return (QQuickFontValueType::FontWeight)v.weight(); executed 28 times by 2 tests:  return (QQuickFontValueType::FontWeight)v.weight();Executed by: 
 | 28 | ||||||||||||
| 636 | } | - | ||||||||||||
| 637 | - | |||||||||||||
| 638 | void QQuickFontValueType::setWeight(QQuickFontValueType::FontWeight w) | - | ||||||||||||
| 639 | { | - | ||||||||||||
| 640 | v.setWeight((QFont::Weight)w); | - | ||||||||||||
| 641 | } executed 14 times by 5 tests:  end of blockExecuted by: 
 | 14 | ||||||||||||
| 642 | - | |||||||||||||
| 643 | bool QQuickFontValueType::italic() const | - | ||||||||||||
| 644 | { | - | ||||||||||||
| 645 | return v.italic(); executed 34 times by 2 tests:  return v.italic();Executed by: 
 | 34 | ||||||||||||
| 646 | } | - | ||||||||||||
| 647 | - | |||||||||||||
| 648 | void QQuickFontValueType::setItalic(bool b) | - | ||||||||||||
| 649 | { | - | ||||||||||||
| 650 | v.setItalic(b); | - | ||||||||||||
| 651 | } executed 46 times by 7 tests:  end of blockExecuted by: 
 | 46 | ||||||||||||
| 652 | - | |||||||||||||
| 653 | bool QQuickFontValueType::underline() const | - | ||||||||||||
| 654 | { | - | ||||||||||||
| 655 | return v.underline(); executed 4 times by 1 test:  return v.underline();Executed by: 
 | 4 | ||||||||||||
| 656 | } | - | ||||||||||||
| 657 | - | |||||||||||||
| 658 | void QQuickFontValueType::setUnderline(bool b) | - | ||||||||||||
| 659 | { | - | ||||||||||||
| 660 | v.setUnderline(b); | - | ||||||||||||
| 661 | } executed 4 times by 2 tests:  end of blockExecuted by: 
 | 4 | ||||||||||||
| 662 | - | |||||||||||||
| 663 | bool QQuickFontValueType::overline() const | - | ||||||||||||
| 664 | { | - | ||||||||||||
| 665 | return v.overline(); executed 4 times by 1 test:  return v.overline();Executed by: 
 | 4 | ||||||||||||
| 666 | } | - | ||||||||||||
| 667 | - | |||||||||||||
| 668 | void QQuickFontValueType::setOverline(bool b) | - | ||||||||||||
| 669 | { | - | ||||||||||||
| 670 | v.setOverline(b); | - | ||||||||||||
| 671 | } executed 4 times by 2 tests:  end of blockExecuted by: 
 | 4 | ||||||||||||
| 672 | - | |||||||||||||
| 673 | bool QQuickFontValueType::strikeout() const | - | ||||||||||||
| 674 | { | - | ||||||||||||
| 675 | return v.strikeOut(); executed 4 times by 1 test:  return v.strikeOut();Executed by: 
 | 4 | ||||||||||||
| 676 | } | - | ||||||||||||
| 677 | - | |||||||||||||
| 678 | void QQuickFontValueType::setStrikeout(bool b) | - | ||||||||||||
| 679 | { | - | ||||||||||||
| 680 | v.setStrikeOut(b); | - | ||||||||||||
| 681 | } executed 4 times by 2 tests:  end of blockExecuted by: 
 | 4 | ||||||||||||
| 682 | - | |||||||||||||
| 683 | qreal QQuickFontValueType::pointSize() const | - | ||||||||||||
| 684 | { | - | ||||||||||||
| 685 | if (v.pointSizeF() == -1) { 
 | 0-34 | ||||||||||||
| 686 | return v.pixelSize() * qreal(72.) / qreal(qt_defaultDpi()); never executed:  return v.pixelSize() * qreal(72.) / qreal(qt_defaultDpi()); | 0 | ||||||||||||
| 687 | } | - | ||||||||||||
| 688 | return v.pointSizeF(); executed 34 times by 3 tests:  return v.pointSizeF();Executed by: 
 | 34 | ||||||||||||
| 689 | } | - | ||||||||||||
| 690 | - | |||||||||||||
| 691 | void QQuickFontValueType::setPointSize(qreal size) | - | ||||||||||||
| 692 | { | - | ||||||||||||
| 693 | if ((v.resolve() & QFont::SizeResolved) && v.pixelSize() != -1) { 
 
 | 12-1245 | ||||||||||||
| 694 | qWarning() << "Both point size and pixel size set. Using pixel size."; | - | ||||||||||||
| 695 | return; executed 12 times by 2 tests:  return;Executed by: 
 | 12 | ||||||||||||
| 696 | } | - | ||||||||||||
| 697 | - | |||||||||||||
| 698 | if (size >= 0.0) { 
 | 0-2363 | ||||||||||||
| 699 | v.setPointSizeF(size); | - | ||||||||||||
| 700 | } executed 2363 times by 13 tests:  end of blockExecuted by: 
 | 2363 | ||||||||||||
| 701 | } executed 2363 times by 13 tests:  end of blockExecuted by: 
 | 2363 | ||||||||||||
| 702 | - | |||||||||||||
| 703 | int QQuickFontValueType::pixelSize() const | - | ||||||||||||
| 704 | { | - | ||||||||||||
| 705 | if (v.pixelSize() == -1) { 
 | 6-14 | ||||||||||||
| 706 | return (v.pointSizeF() * qt_defaultDpi()) / qreal(72.); executed 6 times by 2 tests:  return (v.pointSizeF() * qt_defaultDpi()) / qreal(72.);Executed by: 
 | 6 | ||||||||||||
| 707 | } | - | ||||||||||||
| 708 | return v.pixelSize(); executed 14 times by 3 tests:  return v.pixelSize();Executed by: 
 | 14 | ||||||||||||
| 709 | } | - | ||||||||||||
| 710 | - | |||||||||||||
| 711 | void QQuickFontValueType::setPixelSize(int size) | - | ||||||||||||
| 712 | { | - | ||||||||||||
| 713 | if (size >0) { 
 | 0-36865 | ||||||||||||
| 714 | if ((v.resolve() & QFont::SizeResolved) && v.pointSizeF() != -1) 
 
 | 2-35653 | ||||||||||||
| 715 | qWarning() << "Both point size and pixel size set. Using pixel size."; executed 2 times by 1 test:  QMessageLogger(__FILE__, 715, __PRETTY_FUNCTION__).warning() << "Both point size and pixel size set. Using pixel size.";Executed by: 
 | 2 | ||||||||||||
| 716 | v.setPixelSize(size); | - | ||||||||||||
| 717 | } executed 36865 times by 11 tests:  end of blockExecuted by: 
 | 36865 | ||||||||||||
| 718 | } executed 36865 times by 11 tests:  end of blockExecuted by: 
 | 36865 | ||||||||||||
| 719 | - | |||||||||||||
| 720 | QQuickFontValueType::Capitalization QQuickFontValueType::capitalization() const | - | ||||||||||||
| 721 | { | - | ||||||||||||
| 722 | return (QQuickFontValueType::Capitalization)v.capitalization(); executed 4 times by 1 test:  return (QQuickFontValueType::Capitalization)v.capitalization();Executed by: 
 | 4 | ||||||||||||
| 723 | } | - | ||||||||||||
| 724 | - | |||||||||||||
| 725 | void QQuickFontValueType::setCapitalization(QQuickFontValueType::Capitalization c) | - | ||||||||||||
| 726 | { | - | ||||||||||||
| 727 | v.setCapitalization((QFont::Capitalization)c); | - | ||||||||||||
| 728 | } executed 28 times by 3 tests:  end of blockExecuted by: 
 | 28 | ||||||||||||
| 729 | - | |||||||||||||
| 730 | qreal QQuickFontValueType::letterSpacing() const | - | ||||||||||||
| 731 | { | - | ||||||||||||
| 732 | return v.letterSpacing(); executed 4 times by 1 test:  return v.letterSpacing();Executed by: 
 | 4 | ||||||||||||
| 733 | } | - | ||||||||||||
| 734 | - | |||||||||||||
| 735 | void QQuickFontValueType::setLetterSpacing(qreal size) | - | ||||||||||||
| 736 | { | - | ||||||||||||
| 737 | v.setLetterSpacing(QFont::AbsoluteSpacing, size); | - | ||||||||||||
| 738 | } executed 8 times by 3 tests:  end of blockExecuted by: 
 | 8 | ||||||||||||
| 739 | - | |||||||||||||
| 740 | qreal QQuickFontValueType::wordSpacing() const | - | ||||||||||||
| 741 | { | - | ||||||||||||
| 742 | return v.wordSpacing(); executed 4 times by 1 test:  return v.wordSpacing();Executed by: 
 | 4 | ||||||||||||
| 743 | } | - | ||||||||||||
| 744 | - | |||||||||||||
| 745 | void QQuickFontValueType::setWordSpacing(qreal size) | - | ||||||||||||
| 746 | { | - | ||||||||||||
| 747 | v.setWordSpacing(size); | - | ||||||||||||
| 748 | } executed 6 times by 2 tests:  end of blockExecuted by: 
 | 6 | ||||||||||||
| 749 | - | |||||||||||||
| 750 | QQuickFontValueType::HintingPreference QQuickFontValueType::hintingPreference() const | - | ||||||||||||
| 751 | { | - | ||||||||||||
| 752 | return QQuickFontValueType::HintingPreference(v.hintingPreference()); never executed:  return QQuickFontValueType::HintingPreference(v.hintingPreference()); | 0 | ||||||||||||
| 753 | } | - | ||||||||||||
| 754 | - | |||||||||||||
| 755 | void QQuickFontValueType::setHintingPreference(QQuickFontValueType::HintingPreference hintingPreference) | - | ||||||||||||
| 756 | { | - | ||||||||||||
| 757 | v.setHintingPreference(QFont::HintingPreference(hintingPreference)); | - | ||||||||||||
| 758 | } executed 2 times by 1 test:  end of blockExecuted by: 
 | 2 | ||||||||||||
| 759 | - | |||||||||||||
| 760 | bool QQuickFontValueType::kerning() const | - | ||||||||||||
| 761 | { | - | ||||||||||||
| 762 | return v.kerning(); never executed:  return v.kerning(); | 0 | ||||||||||||
| 763 | } | - | ||||||||||||
| 764 | - | |||||||||||||
| 765 | void QQuickFontValueType::setKerning(bool b) | - | ||||||||||||
| 766 | { | - | ||||||||||||
| 767 | v.setKerning(b); | - | ||||||||||||
| 768 | } never executed:  end of block | 0 | ||||||||||||
| 769 | - | |||||||||||||
| 770 | bool QQuickFontValueType::preferShaping() const | - | ||||||||||||
| 771 | { | - | ||||||||||||
| 772 | return (v.styleStrategy() & QFont::PreferNoShaping) == 0; never executed:  return (v.styleStrategy() & QFont::PreferNoShaping) == 0; | 0 | ||||||||||||
| 773 | } | - | ||||||||||||
| 774 | - | |||||||||||||
| 775 | void QQuickFontValueType::setPreferShaping(bool enable) | - | ||||||||||||
| 776 | { | - | ||||||||||||
| 777 | if (enable) 
 | 0 | ||||||||||||
| 778 | v.setStyleStrategy(static_cast<QFont::StyleStrategy>(v.styleStrategy() & ~QFont::PreferNoShaping)); never executed:  v.setStyleStrategy(static_cast<QFont::StyleStrategy>(v.styleStrategy() & ~QFont::PreferNoShaping)); | 0 | ||||||||||||
| 779 | else | - | ||||||||||||
| 780 | v.setStyleStrategy(static_cast<QFont::StyleStrategy>(v.styleStrategy() | QFont::PreferNoShaping)); never executed:  v.setStyleStrategy(static_cast<QFont::StyleStrategy>(v.styleStrategy() | QFont::PreferNoShaping)); | 0 | ||||||||||||
| 781 | } | - | ||||||||||||
| 782 | - | |||||||||||||
| 783 | QT_END_NAMESPACE | - | ||||||||||||
| 784 | - | |||||||||||||
| 785 | #include "moc_qquickvaluetypes_p.cpp" | - | ||||||||||||
| Source code | Switch to Preprocessed file |