diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-04-28 01:32:24 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-04-28 01:32:24 (GMT) |
commit | 4927fb460e12ee8b4dada1025ad042d2b6b9b6f4 (patch) | |
tree | 512d035357c8b56859c01ca7d211b86ec986787d /src/declarative/qml/qmlvme.cpp | |
parent | eae3489b3f2fba9d733ca50eb89dc92a6e96e6f8 (diff) | |
download | Qt-4927fb460e12ee8b4dada1025ad042d2b6b9b6f4.zip Qt-4927fb460e12ee8b4dada1025ad042d2b6b9b6f4.tar.gz Qt-4927fb460e12ee8b4dada1025ad042d2b6b9b6f4.tar.bz2 |
Use QObject declarative data to store attached properties.
An element's qmlAttachedProperties() function will now only ever get called once
per object.
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r-- | src/declarative/qml/qmlvme.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index b6d9173..62a0864 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -860,14 +860,10 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in #endif QObject *target = stack.top(); - QmlAttachedPropertiesFunc attachFunc = - QmlMetaType::attachedPropertiesFunc(datas.at(instr.fetchAttached.idx)); - if(!attachFunc) - VME_EXCEPTION("No such attached object" << primitives.at(instr.fetchAttached.idx)); + QObject *qmlObject = qmlAttachedPropertiesObjectById(instr.fetchAttached.id, target); - QObject *qmlObject = attachFunc(target); if(!qmlObject) - VME_EXCEPTION("Internal error - unable to create attached object" << primitives.at(instr.fetchAttached.idx)); + VME_EXCEPTION("Unable to create attached object"); stack.push(qmlObject); } |