summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlvme.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-27 01:01:55 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-27 01:01:55 (GMT)
commita488a04e5a5af4255d560d5dfa6423caa48ed5f3 (patch)
tree67250667a40c39da3a343e538bc6960891390195 /src/declarative/qml/qmlvme.cpp
parent1b489edbc2c8897ba6cbca4214e998c7d7873e67 (diff)
downloadQt-a488a04e5a5af4255d560d5dfa6423caa48ed5f3.zip
Qt-a488a04e5a5af4255d560d5dfa6423caa48ed5f3.tar.gz
Qt-a488a04e5a5af4255d560d5dfa6423caa48ed5f3.tar.bz2
Make QmlPropertyValueSource an interface.
1st step in animation class heirarchy redesign.
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r--src/declarative/qml/qmlvme.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index 7455eb4..930e6e4 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -591,13 +591,12 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData
case QmlInstruction::StoreValueSource:
{
- QmlPropertyValueSource *vs =
- static_cast<QmlPropertyValueSource *>(stack.pop());
- QObject *target =
- stack.at(stack.count() - 1 - instr.assignValueSource.owner);
+ QObject *obj = stack.pop();
+ QmlPropertyValueSource *vs = reinterpret_cast<QmlPropertyValueSource *>(reinterpret_cast<char *>(obj) + instr.assignValueSource.castValue);
+ QObject *target = stack.at(stack.count() - 1 - instr.assignValueSource.owner);
QmlMetaProperty prop;
prop.restore(instr.assignValueSource.property, target, ctxt);
- vs->setParent(target);
+ obj->setParent(target);
vs->setTarget(prop);
}
break;