rebase to latest QTBUG-29082 patch
This commit is contained in:
parent
9249484c37
commit
6ee236bc94
|
@ -1,33 +1,31 @@
|
|||
Parent: a1bc10b7 (Make sure QGraphicsItem notifies changes to focusScopeItem.)
|
||||
Parent: e17dddfd (Make hierarchy of actions in menubars more consistent.)
|
||||
Author: David E. Narváez <david.narvaez@computer.org>
|
||||
AuthorDate: 2013-01-30 06:13:00 -0500
|
||||
AuthorDate: 2013-02-03 23:07:07 -0500
|
||||
Commit: David E. Narváez <david.narvaez@computer.org>
|
||||
CommitDate: 2013-01-30 06:13:00 -0500
|
||||
CommitDate: 2013-02-09 16:30:41 -0500
|
||||
|
||||
Avoid calling metacall directly from the property animation code
|
||||
Fix call to QMetaObject::metaCall from updateProperty
|
||||
|
||||
Calling metacall directly will cause an invalid read when the
|
||||
object in question is a QDeclarativeVMEMetaObject. See a full
|
||||
explanation at the bug report.
|
||||
Create an array of arguments in the same way
|
||||
QMetaObject::write does
|
||||
|
||||
Task-Number: QTBUG-29082
|
||||
Change-Id: Ia2772bce409876861b7004320641b0c4e8996fa8
|
||||
Task-number: QTBUG-29082
|
||||
Change-Id: I4ea5ab5dcd6b55cf0a127b855b5aac27a9d4a305
|
||||
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
|
||||
index 31b129a..bcf82bf 100644
|
||||
index dcf779a..9869d7e 100644
|
||||
--- a/src/corelib/animation/qpropertyanimation.cpp
|
||||
+++ b/src/corelib/animation/qpropertyanimation.cpp
|
||||
@@ -133,13 +133,7 @@
|
||||
return;
|
||||
}
|
||||
@@ -136,8 +136,11 @@
|
||||
|
||||
- if (newValue.userType() == propertyType) {
|
||||
- //no conversion is needed, we directly call the QMetaObject::metacall
|
||||
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);
|
||||
- } else {
|
||||
- targetValue->setProperty(propertyName.constData(), newValue);
|
||||
- }
|
||||
+ targetValue->setProperty(propertyName.constData(), newValue);
|
||||
}
|
||||
|
||||
/*!
|
||||
+ //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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue