summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qpropertybinding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qpropertybinding.cpp')
-rw-r--r--src/corelib/kernel/qpropertybinding.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/kernel/qpropertybinding.cpp b/src/corelib/kernel/qpropertybinding.cpp
index 8602ef957f..e05ef996b6 100644
--- a/src/corelib/kernel/qpropertybinding.cpp
+++ b/src/corelib/kernel/qpropertybinding.cpp
@@ -123,11 +123,10 @@ bool QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged()
QVariant resultVariant(metaType.id(), nullptr);
evalError = evaluationFunction(metaType, resultVariant.data());
if (evalError.type() == QPropertyBindingError::NoError) {
- int compareResult = 0;
bool updateAllowed = true;
if (hasStaticObserver && staticGuardCallback)
updateAllowed = staticGuardCallback(staticObserver, resultVariant.data());
- if (updateAllowed && (!QMetaType::compare(propertyDataPtr, resultVariant.constData(), metaType.id(), &compareResult) || compareResult != 0)) {
+ if (updateAllowed && !metaType.equals(propertyDataPtr, resultVariant.constData())) {
changed = true;
metaType.destruct(propertyDataPtr);
metaType.construct(propertyDataPtr, resultVariant.constData());