summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-01-22 10:34:39 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-01-22 10:34:39 (GMT)
commit2f48ff8cbefc70b2eb4de1e08a9e48c917486018 (patch)
tree93846d6ea3d4c757ae0f29a3fca8ce907c1d639a /src/corelib/animation
parente29453ab71c3bf795dbc0cdeb1c88e28e2de1470 (diff)
downloadQt-2f48ff8cbefc70b2eb4de1e08a9e48c917486018.zip
Qt-2f48ff8cbefc70b2eb4de1e08a9e48c917486018.tar.gz
Qt-2f48ff8cbefc70b2eb4de1e08a9e48c917486018.tar.bz2
Adding a warning if the property of an animation is not writable
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 19b493d..37b79ba 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -118,7 +118,9 @@ void QPropertyAnimationPrivate::updateMetaProperty()
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)