From 9410eb0630e0f3b80ffd335002efbd7ce532e826 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 9 Jun 2009 09:24:14 +1000 Subject: Revert "Naively fix handling of qreal properties for ARM." This reverts commit 2575eac4c26ad92dde95959a82f576edc3e76e1d. Conflicts: src/declarative/qml/qmlvme.cpp --- src/declarative/qml/qmlvme.cpp | 3 +-- src/tools/moc/generator.cpp | 6 ------ 2 files changed, 1 insertion(+), 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 cc; #endif QObject *target = stack.top(); - //### moc treats qreal properties as having type double - double r = static_cast(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(_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(_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()); -- cgit v0.12