diff options
Diffstat (limited to 'dev-qt/qtcore/files/fix-call-to-QMetaObject-metaCall-from-updateProperty.patch')
-rw-r--r-- | dev-qt/qtcore/files/fix-call-to-QMetaObject-metaCall-from-updateProperty.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-qt/qtcore/files/fix-call-to-QMetaObject-metaCall-from-updateProperty.patch b/dev-qt/qtcore/files/fix-call-to-QMetaObject-metaCall-from-updateProperty.patch new file mode 100644 index 0000000..d59ac49 --- /dev/null +++ b/dev-qt/qtcore/files/fix-call-to-QMetaObject-metaCall-from-updateProperty.patch @@ -0,0 +1,35 @@ +From 03e96961b0f4fc2c290271c6e50a11aa334a40ff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= <david.narvaez@computer.org> +Date: Sun, 3 Feb 2013 23:07:07 -0500 +Subject: [PATCH] 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 +--- + src/corelib/animation/qpropertyanimation.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp +index dcf779a..9869d7e 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); + } +-- +1.8.1.2 + |