diff options
author | David E. Narváez <david.narvaez@computer.org> | 2013-02-03 23:07:07 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-16 21:17:31 +0100 |
commit | f0221d359499f675115da1f47dd3669a4383653d (patch) | |
tree | 71cb799fdb44af1aa4c1531a4b2311bb6a4c0faa /src | |
parent | eaa18f306341818165c2ee4fc22750da04d5e45e (diff) |
Fix call to QMetaObject::metaCall from updateProperty
Create an array of arguments in the same way
QMetaObject::write does
Task-number: QTBUG-29082
Change-Id: I4ea5ab5dcd6b55cf0a127b855b5aac27a9d4a305
Reviewed-by: Davide Pesavento <davidepesa@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
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); } |