diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2012-09-27 16:56:03 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-28 13:26:16 +0200 |
commit | 5bd0e08063fcacba0c2b63528712968c7d74e7f9 (patch) | |
tree | c430c6b783922fd310ec510fef08fc075c891f7f /tests | |
parent | b68fb568d8287e9a0c45a0dc0187398995313969 (diff) |
Fix a crash in QQmlPropertyCache::findProperty
When the top type of a QML component is a C++ type registered with
qmlRegisterExtendedType, its QObjectPrivate::metaObject is already a
QQmlProxyMetaObject that gets chained as the parent of the
QQmlVMEMetaObject of the component.
When QQmlPropertyCache::findProperty iterates over the parents chain
of a child item, our QQmlProxyMetaObject eventually gets static_casted
to QQmlVMEMetaObject and causes a crash.
This patch implements a poor man's dynamic_cast in
QQmlVMEMetaObject::parentVMEMetaObject to fix the crash. Other casts
of parent.asT1() are changed to use parentVMEMetaObject as well even
though in those cases the static_cast is guaranteed by the context.
Task-number: QTBUG-27334
Change-Id: I5982fc273ccf466960ce54974cff5662e6ab605a
Reviewed-by: Matthew Vogt <mattvogt2@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions