summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-20 15:26:53 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-20 15:27:55 (GMT)
commit06b9776836a8e16792eb647c33310eb773780f0a (patch)
tree1dff339e39e31e4f5af39ebbef52299877e55f87 /src/declarative/qml
parentb2cfb30175f2d08ecfbe9fa7b8b502aeed4c1fca (diff)
downloadQt-06b9776836a8e16792eb647c33310eb773780f0a.zip
Qt-06b9776836a8e16792eb647c33310eb773780f0a.tar.gz
Qt-06b9776836a8e16792eb647c33310eb773780f0a.tar.bz2
Fix compilation on Linux
Error was: narrowing conversion of 'point.QPointF::x()' from 'qreal' to 'float' inside { }
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 42d2950..7eb469a 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();