diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-06-09 01:16:41 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-06-09 01:16:41 (GMT) |
commit | 991b41aa407b5a8740e6899a3efdc724276dcb95 (patch) | |
tree | 09704bd06a87731269f9571abd9943e010923853 /src/declarative/qml/qmlvme.cpp | |
parent | ef4378dd282ed51098d1366792e46e9cfbde727a (diff) | |
download | Qt-991b41aa407b5a8740e6899a3efdc724276dcb95.zip Qt-991b41aa407b5a8740e6899a3efdc724276dcb95.tar.gz Qt-991b41aa407b5a8740e6899a3efdc724276dcb95.tar.bz2 |
Fix handling of qreal properties.
This is to bring us in line with the fix made to moc's handling of qreal
properties.
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r-- | src/declarative/qml/qmlvme.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index 3c13b38..f00d282 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -337,17 +337,31 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in } break; - case QmlInstruction::StoreReal: + case QmlInstruction::StoreFloat: { #ifdef Q_ENABLE_PERFORMANCE_LOG QFxCompilerTimer<QFxCompiler::InstrStoreReal> cc; #endif QObject *target = stack.top(); - qreal r = instr.storeReal.value; + float f = instr.storeFloat.value; void *a[1]; - a[0] = &r; - QMetaObject::metacall(target, QMetaObject::WriteProperty, - instr.storeReal.propertyIndex, a); + a[0] = &f; + QMetaObject::metacall(target, QMetaObject::WriteProperty, + instr.storeFloat.propertyIndex, a); + } + break; + +case QmlInstruction::StoreDouble: + { +#ifdef Q_ENABLE_PERFORMANCE_LOG + QFxCompilerTimer<QFxCompiler::InstrStoreReal> cc; +#endif + QObject *target = stack.top(); + double d = instr.storeDouble.value; + void *a[1]; + a[0] = &d; + QMetaObject::metacall(target, QMetaObject::WriteProperty, + instr.storeDouble.propertyIndex, a); } break; @@ -373,7 +387,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in void *a[1]; a[0] = (void *)&instr.storeInteger.value; QMetaObject::metacall(target, QMetaObject::WriteProperty, - instr.storeReal.propertyIndex, a); + instr.storeInteger.propertyIndex, a); } break; |