diff options
Diffstat (limited to 'src/corelib/kernel/qpropertybinding.cpp')
-rw-r--r-- | src/corelib/kernel/qpropertybinding.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/corelib/kernel/qpropertybinding.cpp b/src/corelib/kernel/qpropertybinding.cpp index e05ef996b6..85dc59902a 100644 --- a/src/corelib/kernel/qpropertybinding.cpp +++ b/src/corelib/kernel/qpropertybinding.cpp @@ -103,14 +103,12 @@ bool QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged() BindingEvaluationState evaluationFrame(this); - QPropertyBindingError evalError; - QUntypedPropertyBinding::BindingEvaluationResult result; bool changed = false; if (metaType.id() == QMetaType::Bool) { auto propertyPtr = reinterpret_cast<QPropertyBase *>(propertyDataPtr); bool newValue = false; - evalError = evaluationFunction(metaType, &newValue); - if (evalError.type() == QPropertyBindingError::NoError) { + evaluationFunction(metaType, &newValue); + if (!error.hasError()) { bool updateAllowed = true; if (hasStaticObserver && staticGuardCallback) updateAllowed = staticGuardCallback(staticObserver, &newValue); @@ -121,8 +119,8 @@ bool QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged() } } else { QVariant resultVariant(metaType.id(), nullptr); - evalError = evaluationFunction(metaType, resultVariant.data()); - if (evalError.type() == QPropertyBindingError::NoError) { + evaluationFunction(metaType, resultVariant.data()); + if (!error.hasError()) { bool updateAllowed = true; if (hasStaticObserver && staticGuardCallback) updateAllowed = staticGuardCallback(staticObserver, resultVariant.data()); @@ -134,9 +132,6 @@ bool QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged() } } - if (evalError.type() != QPropertyBindingError::NoError) - error = evalError; - dirty = false; return changed; } |