summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qproperty.h')
-rw-r--r--src/corelib/kernel/qproperty.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index 5d26c1c0f4..c2949c3022 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -155,8 +155,10 @@ class QPropertyBinding : public QUntypedPropertyBinding
{
PropertyType *propertyPtr = static_cast<PropertyType *>(dataPtr);
PropertyType newValue = impl();
- if (newValue == *propertyPtr)
- return false;
+ if constexpr (QTypeTraits::has_operator_equal_v<PropertyType>) {
+ if (newValue == *propertyPtr)
+ return false;
+ }
*propertyPtr = std::move(newValue);
return true;
}