diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-05-15 16:56:40 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-21 00:17:37 +0200 |
commit | a96705e349c51215b6e451147b4c2de49ba5a107 (patch) | |
tree | 67898969e15f92e95ccfc97a3ce8c4458a8887e7 /src/qml/qml/v4 | |
parent | 5821f91abb348ac8d8ad84846b504c5629d2eed8 (diff) |
Allow the existence of a VME metaobject to be asserted
Test for the existence of a VME metaobject. Otherwise, assertion of
a static cast result is not meaningful.
Change-Id: Ic9e9c38e5dce65c41d20e405c33e179334c37b00
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/v4')
-rw-r--r-- | src/qml/qml/v4/qv4bindings.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/v4/qv4bindings.cpp b/src/qml/qml/v4/qv4bindings.cpp index 6ab1e00b5c..f25bfccce4 100644 --- a/src/qml/qml/v4/qv4bindings.cpp +++ b/src/qml/qml/v4/qv4bindings.cpp @@ -1949,7 +1949,8 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks, if (data.gettype() == V8HandleType) { // This property must be a VME var property - QQmlVMEMetaObject *vmemo = static_cast<QQmlVMEMetaObject *>(const_cast<QMetaObject *>(output->metaObject())); + QQmlVMEMetaObject *vmemo = QQmlVMEMetaObject::get(output); + Q_ASSERT(vmemo); vmemo->setVMEProperty(instr->store.index, *data.gethandleptr()); } else { int status = -1; |