aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-23 13:38:43 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-02 16:32:40 +0000
commit97165444ac6954766d53c3eb62eb1614644c7264 (patch)
treec06039fcbb91384a9dbeb28271efdcc36dc83472 /src/qml
parenta6633e41e7c6795bbbc016ce36e4ff91ec5248ad (diff)
Simplify logic
Task-number: QTBUG-61536 Change-Id: Ibdb10dfb8d9fbd15fddc27a2802b756381755ee7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qqmlpropertyvalidator.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp
index 383c20239f..da652e8f5d 100644
--- a/src/qml/compiler/qqmlpropertyvalidator.cpp
+++ b/src/qml/compiler/qqmlpropertyvalidator.cpp
@@ -628,19 +628,17 @@ QQmlCompileError QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *
bool isValueSource = false;
bool isPropertyInterceptor = false;
- QQmlType *qmlType = 0;
const QV4::CompiledData::Object *targetObject = qmlUnit->objectAt(binding->value.objectIndex);
if (auto *typeRef = resolvedTypes.value(targetObject->inheritedTypeNameIndex)) {
QQmlPropertyCache *cache = typeRef->createPropertyCache(QQmlEnginePrivate::get(enginePrivate));
const QMetaObject *mo = cache->firstCppMetaObject();
+ QQmlType *qmlType = 0;
while (mo && !qmlType) {
qmlType = QQmlMetaType::qmlType(mo);
mo = mo->superClass();
}
Q_ASSERT(qmlType);
- }
- if (qmlType) {
isValueSource = qmlType->propertyValueSourceCast() != -1;
isPropertyInterceptor = qmlType->propertyValueInterceptorCast() != -1;
}