| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlstringconverters.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | QVariant QQmlStringConverters::variantFromString(const QString &s) | - | ||||||||||||||||||||||||
| 6 | { | - | ||||||||||||||||||||||||
| 7 | if (s.isEmpty()
| 0-28 | ||||||||||||||||||||||||
| 8 | return never executed: QVariant(s);return QVariant(s);never executed: return QVariant(s); | 0 | ||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||
| 10 | bool ok = false; | - | ||||||||||||||||||||||||
| 11 | QRectF r = rectFFromString(s, &ok); | - | ||||||||||||||||||||||||
| 12 | if (ok
never executed: QVariant(r);return QVariant(r);never executed: return QVariant(r); | 0-28 | ||||||||||||||||||||||||
| 13 | QPointF p = pointFFromString(s, &ok); | - | ||||||||||||||||||||||||
| 14 | if (ok
executed 2 times by 1 test: QVariant(p);return QVariant(p);Executed by:
executed 2 times by 1 test: return QVariant(p);Executed by:
| 2-26 | ||||||||||||||||||||||||
| 15 | QSizeF sz = sizeFFromString(s, &ok); | - | ||||||||||||||||||||||||
| 16 | if (ok
never executed: QVariant(sz);return QVariant(sz);never executed: return QVariant(sz); | 0-26 | ||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||
| 18 | return executed 26 times by 6 tests: QQml_valueTypeProvider()->createVariantFromString(s);return QQml_valueTypeProvider()->createVariantFromString(s);Executed by:
executed 26 times by 6 tests: return QQml_valueTypeProvider()->createVariantFromString(s);Executed by:
| 26 | ||||||||||||||||||||||||
| 19 | } | - | ||||||||||||||||||||||||
| 20 | - | |||||||||||||||||||||||||
| 21 | QVariant QQmlStringConverters::variantFromString(const QString &s, int preferredType, bool *ok) | - | ||||||||||||||||||||||||
| 22 | { | - | ||||||||||||||||||||||||
| 23 | switch (preferredType) { | - | ||||||||||||||||||||||||
| 24 | case executed 12 times by 1 test: QMetaType::Int:case QMetaType::Int:Executed by:
executed 12 times by 1 test: case QMetaType::Int:Executed by:
| 12 | ||||||||||||||||||||||||
| 25 | return executed 12 times by 1 test: QVariant(int(qRound(s.toDouble(ok))));return QVariant(int(qRound(s.toDouble(ok))));Executed by:
executed 12 times by 1 test: return QVariant(int(qRound(s.toDouble(ok))));Executed by:
| 12 | ||||||||||||||||||||||||
| 26 | case executed 4 times by 1 test: QMetaType::UInt:case QMetaType::UInt:Executed by:
executed 4 times by 1 test: case QMetaType::UInt:Executed by:
| 4 | ||||||||||||||||||||||||
| 27 | return executed 4 times by 1 test: QVariant(uint(qRound(s.toDouble(ok))));return QVariant(uint(qRound(s.toDouble(ok))));Executed by:
executed 4 times by 1 test: return QVariant(uint(qRound(s.toDouble(ok))));Executed by:
| 4 | ||||||||||||||||||||||||
| 28 | - | |||||||||||||||||||||||||
| 29 | case executed 8 times by 1 test: QMetaType::QDate:case QMetaType::QDate:Executed by:
executed 8 times by 1 test: case QMetaType::QDate:Executed by:
| 8 | ||||||||||||||||||||||||
| 30 | return executed 8 times by 1 test: QVariant::fromValue(dateFromString(s, ok));return QVariant::fromValue(dateFromString(s, ok));Executed by:
executed 8 times by 1 test: return QVariant::fromValue(dateFromString(s, ok));Executed by:
| 8 | ||||||||||||||||||||||||
| 31 | case executed 4 times by 1 test: QMetaType::QTime:case QMetaType::QTime:Executed by:
executed 4 times by 1 test: case QMetaType::QTime:Executed by:
| 4 | ||||||||||||||||||||||||
| 32 | return executed 4 times by 1 test: QVariant::fromValue(timeFromString(s, ok));return QVariant::fromValue(timeFromString(s, ok));Executed by:
executed 4 times by 1 test: return QVariant::fromValue(timeFromString(s, ok));Executed by:
| 4 | ||||||||||||||||||||||||
| 33 | case executed 12 times by 1 test: QMetaType::QDateTime:case QMetaType::QDateTime:Executed by:
executed 12 times by 1 test: case QMetaType::QDateTime:Executed by:
| 12 | ||||||||||||||||||||||||
| 34 | return executed 12 times by 1 test: QVariant::fromValue(dateTimeFromString(s, ok));return QVariant::fromValue(dateTimeFromString(s, ok));Executed by:
executed 12 times by 1 test: return QVariant::fromValue(dateTimeFromString(s, ok));Executed by:
| 12 | ||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||
| 36 | case executed 4 times by 1 test: QMetaType::QPointF:case QMetaType::QPointF:Executed by:
executed 4 times by 1 test: case QMetaType::QPointF:Executed by:
| 4 | ||||||||||||||||||||||||
| 37 | return executed 4 times by 1 test: QVariant::fromValue(pointFFromString(s, ok));return QVariant::fromValue(pointFFromString(s, ok));Executed by:
executed 4 times by 1 test: return QVariant::fromValue(pointFFromString(s, ok));Executed by:
| 4 | ||||||||||||||||||||||||
| 38 | case executed 4 times by 1 test: QMetaType::QPoint:case QMetaType::QPoint:Executed by:
executed 4 times by 1 test: case QMetaType::QPoint:Executed by:
| 4 | ||||||||||||||||||||||||
| 39 | return executed 4 times by 1 test: QVariant::fromValue(pointFFromString(s, ok).toPoint());return QVariant::fromValue(pointFFromString(s, ok).toPoint());Executed by:
executed 4 times by 1 test: return QVariant::fromValue(pointFFromString(s, ok).toPoint());Executed by:
| 4 | ||||||||||||||||||||||||
| 40 | case executed 4 times by 1 test: QMetaType::QSizeF:case QMetaType::QSizeF:Executed by:
executed 4 times by 1 test: case QMetaType::QSizeF:Executed by:
| 4 | ||||||||||||||||||||||||
| 41 | return executed 4 times by 1 test: QVariant::fromValue(sizeFFromString(s, ok));return QVariant::fromValue(sizeFFromString(s, ok));Executed by:
executed 4 times by 1 test: return QVariant::fromValue(sizeFFromString(s, ok));Executed by:
| 4 | ||||||||||||||||||||||||
| 42 | case executed 4 times by 1 test: QMetaType::QSize:case QMetaType::QSize:Executed by:
executed 4 times by 1 test: case QMetaType::QSize:Executed by:
| 4 | ||||||||||||||||||||||||
| 43 | return executed 4 times by 1 test: QVariant::fromValue(sizeFFromString(s, ok).toSize());return QVariant::fromValue(sizeFFromString(s, ok).toSize());Executed by:
executed 4 times by 1 test: return QVariant::fromValue(sizeFFromString(s, ok).toSize());Executed by:
| 4 | ||||||||||||||||||||||||
| 44 | case executed 4 times by 1 test: QMetaType::QRectF:case QMetaType::QRectF:Executed by:
executed 4 times by 1 test: case QMetaType::QRectF:Executed by:
| 4 | ||||||||||||||||||||||||
| 45 | return executed 4 times by 1 test: QVariant::fromValue(rectFFromString(s, ok));return QVariant::fromValue(rectFFromString(s, ok));Executed by:
executed 4 times by 1 test: return QVariant::fromValue(rectFFromString(s, ok));Executed by:
| 4 | ||||||||||||||||||||||||
| 46 | case executed 4 times by 1 test: QMetaType::QRect:case QMetaType::QRect:Executed by:
executed 4 times by 1 test: case QMetaType::QRect:Executed by:
| 4 | ||||||||||||||||||||||||
| 47 | return executed 4 times by 1 test: QVariant::fromValue(rectFFromString(s, ok).toRect());return QVariant::fromValue(rectFFromString(s, ok).toRect());Executed by:
executed 4 times by 1 test: return QVariant::fromValue(rectFFromString(s, ok).toRect());Executed by:
| 4 | ||||||||||||||||||||||||
| 48 | default executed 80806 times by 33 tests: :default:Executed by:
executed 80806 times by 33 tests: default:Executed by:
| 80806 | ||||||||||||||||||||||||
| 49 | return executed 80806 times by 33 tests: QQml_valueTypeProvider()->createVariantFromString(preferredType, s, ok);return QQml_valueTypeProvider()->createVariantFromString(preferredType, s, ok);Executed by:
executed 80806 times by 33 tests: return QQml_valueTypeProvider()->createVariantFromString(preferredType, s, ok);Executed by:
| 80806 | ||||||||||||||||||||||||
| 50 | } | - | ||||||||||||||||||||||||
| 51 | } | - | ||||||||||||||||||||||||
| 52 | - | |||||||||||||||||||||||||
| 53 | QVariant QQmlStringConverters::colorFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 54 | { | - | ||||||||||||||||||||||||
| 55 | return executed 154 times by 2 tests: QQml_colorProvider()->colorFromString(s, ok);return QQml_colorProvider()->colorFromString(s, ok);Executed by:
executed 154 times by 2 tests: return QQml_colorProvider()->colorFromString(s, ok);Executed by:
| 154 | ||||||||||||||||||||||||
| 56 | } | - | ||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||
| 58 | unsigned QQmlStringConverters::rgbaFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 59 | { | - | ||||||||||||||||||||||||
| 60 | return executed 36659 times by 83 tests: QQml_colorProvider()->rgbaFromString(s, ok);return QQml_colorProvider()->rgbaFromString(s, ok);Executed by:
executed 36659 times by 83 tests: return QQml_colorProvider()->rgbaFromString(s, ok);Executed by:
| 36659 | ||||||||||||||||||||||||
| 61 | } | - | ||||||||||||||||||||||||
| 62 | - | |||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||
| 64 | QDate QQmlStringConverters::dateFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 65 | { | - | ||||||||||||||||||||||||
| 66 | QDate d = QDate::fromString(s, Qt::ISODate); | - | ||||||||||||||||||||||||
| 67 | if (ok
executed 8 times by 1 test: ok = d.isValid();*ok = d.isValid();Executed by:
executed 8 times by 1 test: *ok = d.isValid();Executed by:
| 0-8 | ||||||||||||||||||||||||
| 68 | return executed 8 times by 1 test: d;return d;Executed by:
executed 8 times by 1 test: return d;Executed by:
| 8 | ||||||||||||||||||||||||
| 69 | } | - | ||||||||||||||||||||||||
| 70 | - | |||||||||||||||||||||||||
| 71 | QTime QQmlStringConverters::timeFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 72 | { | - | ||||||||||||||||||||||||
| 73 | QTime t = QTime::fromString(s, Qt::ISODate); | - | ||||||||||||||||||||||||
| 74 | if (ok
executed 4 times by 1 test: ok = t.isValid();*ok = t.isValid();Executed by:
executed 4 times by 1 test: *ok = t.isValid();Executed by:
| 0-4 | ||||||||||||||||||||||||
| 75 | return executed 4 times by 1 test: t;return t;Executed by:
executed 4 times by 1 test: return t;Executed by:
| 4 | ||||||||||||||||||||||||
| 76 | } | - | ||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||
| 78 | QDateTime QQmlStringConverters::dateTimeFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 79 | { | - | ||||||||||||||||||||||||
| 80 | QDateTime d = QDateTime::fromString(s, Qt::ISODate); | - | ||||||||||||||||||||||||
| 81 | if (ok
executed 104 times by 5 tests: ok = d.isValid();*ok = d.isValid();Executed by:
executed 104 times by 5 tests: *ok = d.isValid();Executed by:
| 0-104 | ||||||||||||||||||||||||
| 82 | - | |||||||||||||||||||||||||
| 83 | if (d.timeSpec() == Qt::LocalTime
| 8-96 | ||||||||||||||||||||||||
| 84 | d.setTimeSpec(Qt::UTC); executed 96 times by 5 tests: d.setTimeSpec(Qt::UTC);Executed by:
| 96 | ||||||||||||||||||||||||
| 85 | return executed 104 times by 5 tests: d;return d;Executed by:
executed 104 times by 5 tests: return d;Executed by:
| 104 | ||||||||||||||||||||||||
| 86 | } | - | ||||||||||||||||||||||||
| 87 | - | |||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||
| 90 | QPointF QQmlStringConverters::pointFFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 91 | { | - | ||||||||||||||||||||||||
| 92 | if (s.count(QLatin1Char(',')) != 1
| 10-26 | ||||||||||||||||||||||||
| 93 | if (ok
| 0-26 | ||||||||||||||||||||||||
| 94 | * executed 26 times by 6 tests: ok = false;*ok = false;Executed by:
executed 26 times by 6 tests: *ok = false;Executed by:
| 26 | ||||||||||||||||||||||||
| 95 | return executed 26 times by 6 tests: QPointF();return QPointF();Executed by:
executed 26 times by 6 tests: return QPointF();Executed by:
| 26 | ||||||||||||||||||||||||
| 96 | } | - | ||||||||||||||||||||||||
| 97 | - | |||||||||||||||||||||||||
| 98 | bool xGood, yGood; | - | ||||||||||||||||||||||||
| 99 | int index = s.indexOf(QLatin1Char(',')); | - | ||||||||||||||||||||||||
| 100 | qreal xCoord = s.leftRef(index).toDouble(&xGood); | - | ||||||||||||||||||||||||
| 101 | qreal yCoord = s.midRef(index+1).toDouble(&yGood); | - | ||||||||||||||||||||||||
| 102 | if (!xGood
| 0-10 | ||||||||||||||||||||||||
| 103 | if (ok
| 0 | ||||||||||||||||||||||||
| 104 | * never executed: ok = false;*ok = false;never executed: *ok = false; | 0 | ||||||||||||||||||||||||
| 105 | return never executed: QPointF();return QPointF();never executed: return QPointF(); | 0 | ||||||||||||||||||||||||
| 106 | } | - | ||||||||||||||||||||||||
| 107 | - | |||||||||||||||||||||||||
| 108 | if (ok
| 0-10 | ||||||||||||||||||||||||
| 109 | * executed 10 times by 2 tests: ok = true;*ok = true;Executed by:
executed 10 times by 2 tests: *ok = true;Executed by:
| 10 | ||||||||||||||||||||||||
| 110 | return executed 10 times by 2 tests: QPointF(xCoord, yCoord);return QPointF(xCoord, yCoord);Executed by:
executed 10 times by 2 tests: return QPointF(xCoord, yCoord);Executed by:
| 10 | ||||||||||||||||||||||||
| 111 | } | - | ||||||||||||||||||||||||
| 112 | - | |||||||||||||||||||||||||
| 113 | - | |||||||||||||||||||||||||
| 114 | QSizeF QQmlStringConverters::sizeFFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 115 | { | - | ||||||||||||||||||||||||
| 116 | if (s.count(QLatin1Char('x')) != 1
| 24-26 | ||||||||||||||||||||||||
| 117 | if (ok
| 0-26 | ||||||||||||||||||||||||
| 118 | * executed 26 times by 6 tests: ok = false;*ok = false;Executed by:
executed 26 times by 6 tests: *ok = false;Executed by:
| 26 | ||||||||||||||||||||||||
| 119 | return executed 26 times by 6 tests: QSizeF();return QSizeF();Executed by:
executed 26 times by 6 tests: return QSizeF();Executed by:
| 26 | ||||||||||||||||||||||||
| 120 | } | - | ||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||
| 122 | bool wGood, hGood; | - | ||||||||||||||||||||||||
| 123 | int index = s.indexOf(QLatin1Char('x')); | - | ||||||||||||||||||||||||
| 124 | qreal width = s.leftRef(index).toDouble(&wGood); | - | ||||||||||||||||||||||||
| 125 | qreal height = s.midRef(index+1).toDouble(&hGood); | - | ||||||||||||||||||||||||
| 126 | if (!wGood
| 0-24 | ||||||||||||||||||||||||
| 127 | if (ok
| 0 | ||||||||||||||||||||||||
| 128 | * never executed: ok = false;*ok = false;never executed: *ok = false; | 0 | ||||||||||||||||||||||||
| 129 | return never executed: QSizeF();return QSizeF();never executed: return QSizeF(); | 0 | ||||||||||||||||||||||||
| 130 | } | - | ||||||||||||||||||||||||
| 131 | - | |||||||||||||||||||||||||
| 132 | if (ok
| 0-24 | ||||||||||||||||||||||||
| 133 | * executed 24 times by 2 tests: ok = true;*ok = true;Executed by:
executed 24 times by 2 tests: *ok = true;Executed by:
| 24 | ||||||||||||||||||||||||
| 134 | return executed 24 times by 2 tests: QSizeF(width, height);return QSizeF(width, height);Executed by:
executed 24 times by 2 tests: return QSizeF(width, height);Executed by:
| 24 | ||||||||||||||||||||||||
| 135 | } | - | ||||||||||||||||||||||||
| 136 | - | |||||||||||||||||||||||||
| 137 | - | |||||||||||||||||||||||||
| 138 | QRectF QQmlStringConverters::rectFFromString(const QString &s, bool *ok) | - | ||||||||||||||||||||||||
| 139 | { | - | ||||||||||||||||||||||||
| 140 | if (s.count(QLatin1Char(',')) != 2
| 0-28 | ||||||||||||||||||||||||
| 141 | if (ok
| 0-28 | ||||||||||||||||||||||||
| 142 | * executed 28 times by 7 tests: ok = false;*ok = false;Executed by:
executed 28 times by 7 tests: *ok = false;Executed by:
| 28 | ||||||||||||||||||||||||
| 143 | return executed 28 times by 7 tests: QRectF();return QRectF();Executed by:
executed 28 times by 7 tests: return QRectF();Executed by:
| 28 | ||||||||||||||||||||||||
| 144 | } | - | ||||||||||||||||||||||||
| 145 | - | |||||||||||||||||||||||||
| 146 | bool xGood, yGood, wGood, hGood; | - | ||||||||||||||||||||||||
| 147 | int index = s.indexOf(QLatin1Char(',')); | - | ||||||||||||||||||||||||
| 148 | qreal x = s.leftRef(index).toDouble(&xGood); | - | ||||||||||||||||||||||||
| 149 | int index2 = s.indexOf(QLatin1Char(','), index+1); | - | ||||||||||||||||||||||||
| 150 | qreal y = s.midRef(index+1, index2-index-1).toDouble(&yGood); | - | ||||||||||||||||||||||||
| 151 | index = s.indexOf(QLatin1Char('x'), index2+1); | - | ||||||||||||||||||||||||
| 152 | qreal width = s.midRef(index2+1, index-index2-1).toDouble(&wGood); | - | ||||||||||||||||||||||||
| 153 | qreal height = s.midRef(index+1).toDouble(&hGood); | - | ||||||||||||||||||||||||
| 154 | if (!xGood
| 0-8 | ||||||||||||||||||||||||
| 155 | if (ok
| 0 | ||||||||||||||||||||||||
| 156 | * never executed: ok = false;*ok = false;never executed: *ok = false; | 0 | ||||||||||||||||||||||||
| 157 | return never executed: QRectF();return QRectF();never executed: return QRectF(); | 0 | ||||||||||||||||||||||||
| 158 | } | - | ||||||||||||||||||||||||
| 159 | - | |||||||||||||||||||||||||
| 160 | if (ok
| 0-8 | ||||||||||||||||||||||||
| 161 | * executed 8 times by 1 test: ok = true;*ok = true;Executed by:
executed 8 times by 1 test: *ok = true;Executed by:
| 8 | ||||||||||||||||||||||||
| 162 | return executed 8 times by 1 test: QRectF(x, y, width, height);return QRectF(x, y, width, height);Executed by:
executed 8 times by 1 test: return QRectF(x, y, width, height);Executed by:
| 8 | ||||||||||||||||||||||||
| 163 | } | - | ||||||||||||||||||||||||
| 164 | - | |||||||||||||||||||||||||
| 165 | bool QQmlStringConverters::createFromString(int type, const QString &s, void *data, size_t n) | - | ||||||||||||||||||||||||
| 166 | { | - | ||||||||||||||||||||||||
| 167 | ((data) ? static_cast<void>(0) : qt_assert("data", __FILE__, 213)); | - | ||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||
| 169 | bool ok = false; | - | ||||||||||||||||||||||||
| 170 | - | |||||||||||||||||||||||||
| 171 | switch (type) { | - | ||||||||||||||||||||||||
| 172 | case never executed: QMetaType::Int:case QMetaType::Int:never executed: case QMetaType::Int: | 0 | ||||||||||||||||||||||||
| 173 | { | - | ||||||||||||||||||||||||
| 174 | ((n >= sizeof(int)) ? static_cast<void>(0) : qt_assert("n >= sizeof(int)", __FILE__, 220)); | - | ||||||||||||||||||||||||
| 175 | int *p = reinterpret_cast<int *>(data); | - | ||||||||||||||||||||||||
| 176 | *p = int(qRound(s.toDouble(&ok))); | - | ||||||||||||||||||||||||
| 177 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 178 | } | - | ||||||||||||||||||||||||
| 179 | case never executed: QMetaType::UInt:case QMetaType::UInt:never executed: case QMetaType::UInt: | 0 | ||||||||||||||||||||||||
| 180 | { | - | ||||||||||||||||||||||||
| 181 | ((n >= sizeof(uint)) ? static_cast<void>(0) : qt_assert("n >= sizeof(uint)", __FILE__, 227)); | - | ||||||||||||||||||||||||
| 182 | uint *p = reinterpret_cast<uint *>(data); | - | ||||||||||||||||||||||||
| 183 | *p = uint(qRound(s.toDouble(&ok))); | - | ||||||||||||||||||||||||
| 184 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 185 | } | - | ||||||||||||||||||||||||
| 186 | - | |||||||||||||||||||||||||
| 187 | case never executed: QMetaType::QDate:case QMetaType::QDate:never executed: case QMetaType::QDate: | 0 | ||||||||||||||||||||||||
| 188 | { | - | ||||||||||||||||||||||||
| 189 | ((n >= sizeof(QDate)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QDate)", __FILE__, 235)); | - | ||||||||||||||||||||||||
| 190 | QDate *p = reinterpret_cast<QDate *>(data); | - | ||||||||||||||||||||||||
| 191 | *p = dateFromString(s, &ok); | - | ||||||||||||||||||||||||
| 192 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 193 | } | - | ||||||||||||||||||||||||
| 194 | case never executed: QMetaType::QTime:case QMetaType::QTime:never executed: case QMetaType::QTime: | 0 | ||||||||||||||||||||||||
| 195 | { | - | ||||||||||||||||||||||||
| 196 | ((n >= sizeof(QTime)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QTime)", __FILE__, 242)); | - | ||||||||||||||||||||||||
| 197 | QTime *p = reinterpret_cast<QTime *>(data); | - | ||||||||||||||||||||||||
| 198 | *p = timeFromString(s, &ok); | - | ||||||||||||||||||||||||
| 199 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 200 | } | - | ||||||||||||||||||||||||
| 201 | case never executed: QMetaType::QDateTime:case QMetaType::QDateTime:never executed: case QMetaType::QDateTime: | 0 | ||||||||||||||||||||||||
| 202 | { | - | ||||||||||||||||||||||||
| 203 | ((n >= sizeof(QDateTime)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QDateTime)", __FILE__, 249)); | - | ||||||||||||||||||||||||
| 204 | QDateTime *p = reinterpret_cast<QDateTime *>(data); | - | ||||||||||||||||||||||||
| 205 | *p = dateTimeFromString(s, &ok); | - | ||||||||||||||||||||||||
| 206 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 207 | } | - | ||||||||||||||||||||||||
| 208 | - | |||||||||||||||||||||||||
| 209 | case never executed: QMetaType::QPointF:case QMetaType::QPointF:never executed: case QMetaType::QPointF: | 0 | ||||||||||||||||||||||||
| 210 | { | - | ||||||||||||||||||||||||
| 211 | ((n >= sizeof(QPointF)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QPointF)", __FILE__, 257)); | - | ||||||||||||||||||||||||
| 212 | QPointF *p = reinterpret_cast<QPointF *>(data); | - | ||||||||||||||||||||||||
| 213 | *p = pointFFromString(s, &ok); | - | ||||||||||||||||||||||||
| 214 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 215 | } | - | ||||||||||||||||||||||||
| 216 | case never executed: QMetaType::QPoint:case QMetaType::QPoint:never executed: case QMetaType::QPoint: | 0 | ||||||||||||||||||||||||
| 217 | { | - | ||||||||||||||||||||||||
| 218 | ((n >= sizeof(QPoint)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QPoint)", __FILE__, 264)); | - | ||||||||||||||||||||||||
| 219 | QPoint *p = reinterpret_cast<QPoint *>(data); | - | ||||||||||||||||||||||||
| 220 | *p = pointFFromString(s, &ok).toPoint(); | - | ||||||||||||||||||||||||
| 221 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 222 | } | - | ||||||||||||||||||||||||
| 223 | case never executed: QMetaType::QSizeF:case QMetaType::QSizeF:never executed: case QMetaType::QSizeF: | 0 | ||||||||||||||||||||||||
| 224 | { | - | ||||||||||||||||||||||||
| 225 | ((n >= sizeof(QSizeF)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QSizeF)", __FILE__, 271)); | - | ||||||||||||||||||||||||
| 226 | QSizeF *p = reinterpret_cast<QSizeF *>(data); | - | ||||||||||||||||||||||||
| 227 | *p = sizeFFromString(s, &ok); | - | ||||||||||||||||||||||||
| 228 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 229 | } | - | ||||||||||||||||||||||||
| 230 | case never executed: QMetaType::QSize:case QMetaType::QSize:never executed: case QMetaType::QSize: | 0 | ||||||||||||||||||||||||
| 231 | { | - | ||||||||||||||||||||||||
| 232 | ((n >= sizeof(QSize)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QSize)", __FILE__, 278)); | - | ||||||||||||||||||||||||
| 233 | QSize *p = reinterpret_cast<QSize *>(data); | - | ||||||||||||||||||||||||
| 234 | *p = sizeFFromString(s, &ok).toSize(); | - | ||||||||||||||||||||||||
| 235 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 236 | } | - | ||||||||||||||||||||||||
| 237 | case never executed: QMetaType::QRectF:case QMetaType::QRectF:never executed: case QMetaType::QRectF: | 0 | ||||||||||||||||||||||||
| 238 | { | - | ||||||||||||||||||||||||
| 239 | ((n >= sizeof(QRectF)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QRectF)", __FILE__, 285)); | - | ||||||||||||||||||||||||
| 240 | QRectF *p = reinterpret_cast<QRectF *>(data); | - | ||||||||||||||||||||||||
| 241 | *p = rectFFromString(s, &ok); | - | ||||||||||||||||||||||||
| 242 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 243 | } | - | ||||||||||||||||||||||||
| 244 | case never executed: QMetaType::QRect:case QMetaType::QRect:never executed: case QMetaType::QRect: | 0 | ||||||||||||||||||||||||
| 245 | { | - | ||||||||||||||||||||||||
| 246 | ((n >= sizeof(QRect)) ? static_cast<void>(0) : qt_assert("n >= sizeof(QRect)", __FILE__, 292)); | - | ||||||||||||||||||||||||
| 247 | QRect *p = reinterpret_cast<QRect *>(data); | - | ||||||||||||||||||||||||
| 248 | *p = rectFFromString(s, &ok).toRect(); | - | ||||||||||||||||||||||||
| 249 | return never executed: ok;return ok;never executed: return ok; | 0 | ||||||||||||||||||||||||
| 250 | } | - | ||||||||||||||||||||||||
| 251 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||
| 252 | return never executed: QQml_valueTypeProvider()->createValueFromString(type, s, data, n);return QQml_valueTypeProvider()->createValueFromString(type, s, data, n);never executed: return QQml_valueTypeProvider()->createValueFromString(type, s, data, n); | 0 | ||||||||||||||||||||||||
| 253 | } | - | ||||||||||||||||||||||||
| 254 | } | - | ||||||||||||||||||||||||
| 255 | - | |||||||||||||||||||||||||
| 256 | - | |||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |