diff options
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 42d2950..64d46d5 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -438,7 +438,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, bool ok; QPointF point = QDeclarativeStringConverters::pointFFromString(string, &ok); - float data[] = { point.x(), point.y() }; + float data[] = { float(point.x()), float(point.y()) }; int index = output->indexForFloat(data, 2); if (type == QVariant::PointF) instr.type = QDeclarativeInstruction::StorePointF; @@ -453,7 +453,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, { bool ok; QSizeF size = QDeclarativeStringConverters::sizeFFromString(string, &ok); - float data[] = { size.width(), size.height() }; + float data[] = { float(size.width()), float(size.height()) }; int index = output->indexForFloat(data, 2); if (type == QVariant::SizeF) instr.type = QDeclarativeInstruction::StoreSizeF; @@ -468,8 +468,8 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, { bool ok; QRectF rect = QDeclarativeStringConverters::rectFFromString(string, &ok); - float data[] = { rect.x(), rect.y(), - rect.width(), rect.height() }; + float data[] = { float(rect.x()), float(rect.y()), + float(rect.width()), float(rect.height()) }; int index = output->indexForFloat(data, 4); if (type == QVariant::RectF) instr.type = QDeclarativeInstruction::StoreRectF; @@ -492,7 +492,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, bool ok; QVector3D vector = QDeclarativeStringConverters::vector3DFromString(string, &ok); - float data[] = { vector.x(), vector.y(), vector.z() }; + float data[] = { float(vector.x()), float(vector.y()), float(vector.z()) }; int index = output->indexForFloat(data, 3); instr.type = QDeclarativeInstruction::StoreVector3D; instr.storeRealPair.propertyIndex = prop.propertyIndex(); @@ -2094,7 +2094,7 @@ bool QDeclarativeCompiler::buildPropertyOnAssignment(QDeclarativeParser::Propert buildDynamicMeta(baseObj, ForceCreation); v->type = isPropertyValue ? Value::ValueSource : Value::ValueInterceptor; } else { - COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","\"%1\" cannot operate on \"%2\"").arg(v->object->typeName.constData()).arg(prop->name.constData())); + COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","\"%1\" cannot operate on \"%2\"").arg(QLatin1String(v->object->typeName.constData())).arg(QLatin1String(prop->name.constData()))); } return true; |