LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File Fix-call-to-QMetaObject.patch of Package libqt4 (Project KDE:Qt)

--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -135,8 +135,11 @@
 
     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);
     }