equal
deleted
inserted
replaced
116 if (propertyIndex == -1) { |
116 if (propertyIndex == -1) { |
117 //there is no Q_PROPERTY on the object |
117 //there is no Q_PROPERTY on the object |
118 propertyType = QVariant::Invalid; |
118 propertyType = QVariant::Invalid; |
119 if (!targetValue->dynamicPropertyNames().contains(propertyName)) |
119 if (!targetValue->dynamicPropertyNames().contains(propertyName)) |
120 qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData()); |
120 qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData()); |
121 } |
121 } else if (!targetValue->metaObject()->property(propertyIndex).isWritable()) { |
|
122 qWarning("QPropertyAnimation: you're trying to animate the non-writable property %s of your QObject", propertyName.constData()); |
|
123 } |
122 } |
124 } |
123 |
125 |
124 void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) |
126 void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) |
125 { |
127 { |
126 if (state == QAbstractAnimation::Stopped) |
128 if (state == QAbstractAnimation::Stopped) |
263 |
265 |
264 QVariantAnimation::updateState(newState, oldState); |
266 QVariantAnimation::updateState(newState, oldState); |
265 |
267 |
266 QPropertyAnimation *animToStop = 0; |
268 QPropertyAnimation *animToStop = 0; |
267 { |
269 { |
|
270 #ifndef QT_NO_THREAD |
268 QMutexLocker locker(QMutexPool::globalInstanceGet(&staticMetaObject)); |
271 QMutexLocker locker(QMutexPool::globalInstanceGet(&staticMetaObject)); |
|
272 #endif |
269 typedef QPair<QObject *, QByteArray> QPropertyAnimationPair; |
273 typedef QPair<QObject *, QByteArray> QPropertyAnimationPair; |
270 typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash; |
274 typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash; |
271 static QPropertyAnimationHash hash; |
275 static QPropertyAnimationHash hash; |
272 //here we need to use value because we need to know to which pointer |
276 //here we need to use value because we need to know to which pointer |
273 //the animation was referring in case stopped because the target was destroyed |
277 //the animation was referring in case stopped because the target was destroyed |