summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlvme.cpp3
-rw-r--r--src/tools/moc/generator.cpp6
2 files changed, 1 insertions, 8 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index c85524f..3c13b38 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -343,8 +343,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
QFxCompilerTimer<QFxCompiler::InstrStoreReal> cc;
#endif
QObject *target = stack.top();
- //### moc treats qreal properties as having type double
- double r = static_cast<double>(instr.storeReal.value);
+ qreal r = instr.storeReal.value;
void *a[1];
a[0] = &r;
QMetaObject::metacall(target, QMetaObject::WriteProperty,
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index b6bd1ad..ca1311b 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -758,9 +758,6 @@ void Generator::generateMetacall()
else if (cdef->enumDeclarations.value(p.type, false))
fprintf(out, " case %d: *reinterpret_cast<int*>(_v) = QFlag(%s()); break;\n",
propindex, p.read.constData());
- else if (p.type == "qreal")
- fprintf(out, " case %d: *reinterpret_cast< double*>(_v) = %s(); break;\n",
- propindex, p.read.constData());
else
fprintf(out, " case %d: *reinterpret_cast< %s*>(_v) = %s(); break;\n",
propindex, p.type.constData(), p.read.constData());
@@ -785,9 +782,6 @@ void Generator::generateMetacall()
if (cdef->enumDeclarations.value(p.type, false)) {
fprintf(out, " case %d: %s(QFlag(*reinterpret_cast<int*>(_v))); break;\n",
propindex, p.write.constData());
- } else if(p.type == "qreal") {
- fprintf(out, " case %d: %s(*reinterpret_cast< double*>(_v)); break;\n",
- propindex, p.write.constData());
} else {
fprintf(out, " case %d: %s(*reinterpret_cast< %s*>(_v)); break;\n",
propindex, p.write.constData(), p.type.constData());