From f0221d359499f675115da1f47dd3669a4383653d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= Date: Sun, 3 Feb 2013 23:07:07 -0500 Subject: Fix call to QMetaObject::metaCall from updateProperty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create an array of arguments in the same way QMetaObject::write does Task-number: QTBUG-29082 Change-Id: I4ea5ab5dcd6b55cf0a127b855b5aac27a9d4a305 Reviewed-by: Davide Pesavento Reviewed-by: Jędrzej Nowacki Reviewed-by: Olivier Goffart --- src/corelib/animation/qpropertyanimation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/corelib/animation') 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(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(newValue.constData()), const_cast(&newValue), &status, &flags }; + QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, argv); } else { targetValue->setProperty(propertyName.constData(), newValue); } -- cgit v1.2.3