QQmlPropertyCache: check methods before properties
authorAlberto Mardegan <alberto.mardegan@canonical.com>
Wed, 29 May 2013 08:29:52 +0000 (11:29 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 31 May 2013 20:33:21 +0000 (22:33 +0200)
commit843e222b17970c211dfab82215cf41adc4547ab5
treedb2343cbf86e6e4361385d52fa71f9a297c41177
parent84627464eb11ca1149d46946b12e3c82eb54a8bf
QQmlPropertyCache: check methods before properties

When creating the QQmlPropertyData, search within the methods list
before searching for properties. The reason is that if the meta object
is dynamic, looking up a property will always return a result (if the
property doesn't exist, it will be created) and therefore all methods
will be obscured.
By swapping the search order, we eliminate this risk (methods are not
dynamically added).

Task-number: QTBUG-29836
Change-Id: Ie367f757c37ef4bc834a6c1c009f27bcf344fe76
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
src/qml/qml/qqmlpropertycache.cpp
tests/auto/qml/qqmlpropertymap/tst_qqmlpropertymap.cpp