src/corelib/animation/qpropertyanimation.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/corelib/animation/qpropertyanimation.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/corelib/animation/qpropertyanimation.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -118,7 +118,9 @@
         propertyType = QVariant::Invalid;
         if (!targetValue->dynamicPropertyNames().contains(propertyName))
             qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData());
-    }
+    } else if (!targetValue->metaObject()->property(propertyIndex).isWritable()) {
+        qWarning("QPropertyAnimation: you're trying to animate the non-writable property %s of your QObject", propertyName.constData());
+	}
 }
 
 void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue)
@@ -265,7 +267,9 @@
 
     QPropertyAnimation *animToStop = 0;
     {
+#ifndef QT_NO_THREAD
         QMutexLocker locker(QMutexPool::globalInstanceGet(&staticMetaObject));
+#endif
         typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
         typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
         static QPropertyAnimationHash hash;