diff options
author | David E. Narváez <david.narvaez@computer.org> | 2013-01-30 11:13:00 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 12:53:09 (GMT) |
commit | 5b285845a3c3478a4008b7e3416c3912c69fd20b (patch) | |
tree | 8ce5fae864e9b8be5470d4af94877f23e792394f /src/corelib/animation/qpropertyanimation.cpp | |
parent | 6e7d5fa639d5129151098c5a153e0d2b408bf24c (diff) | |
download | Qt-5b285845a3c3478a4008b7e3416c3912c69fd20b.zip Qt-5b285845a3c3478a4008b7e3416c3912c69fd20b.tar.gz Qt-5b285845a3c3478a4008b7e3416c3912c69fd20b.tar.bz2 |
Fix call to QMetaObject::metaCall from updateProperty
Create an array of arguments in the same way
QMetaObject::write does
cherry-picked from f0221d359499f675115da1f47dd3669a4383653d
Task-Number: QTBUG-29082
Change-Id: Ia2772bce409876861b7004320641b0c4e8996fa8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/animation/qpropertyanimation.cpp')
-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 31b129a..12e1293 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -135,8 +135,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); } |