diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/animation/qpropertyanimation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index dcf779a5f1..9869d7e500 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -136,8 +136,11 @@ void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) if (newValue.userType() == propertyType) { //no conversion is needed, we directly call the QMetaObject::metacall - void *data = const_cast<void*>(newValue.constData()); - QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, &data); + //check QMetaProperty::write for an explanation of these + int status = -1; + int flags = 0; + void *argv[] = { const_cast<void *>(newValue.constData()), const_cast<QVariant *>(&newValue), &status, &flags }; + QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, argv); } else { targetValue->setProperty(propertyName.constData(), newValue); } |