summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativebinding.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-22 19:20:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-22 19:20:19 (GMT)
commit74c6d263bebd0a3d74d0ca751985589c556c6c9b (patch)
tree2ab0c98c4e970c5c5988ce19d4cfb178d414a916 /src/declarative/qml/qdeclarativebinding.cpp
parent4894e6dd57c31e0196c6fdae4d1b2fb16b9f1b16 (diff)
parent0b6fd8966972616232054c5194243c52ca360bf8 (diff)
downloadQt-74c6d263bebd0a3d74d0ca751985589c556c6c9b.zip
Qt-74c6d263bebd0a3d74d0ca751985589c556c6c9b.tar.gz
Qt-74c6d263bebd0a3d74d0ca751985589c556c6c9b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (135 commits) Do not treat images in qml examples differently. Replace Flickable overshoot property with boundsBehavior Autotests and doc Give error on attempt to import types from too-early version number. Remove (undocumented) QML bindings for effects. De-straighten them lines. Doc: fix QStringList model doc (really). Doc: fix QStringList model docs Change return type to match value(). Add duration and easing properties to AnchorAnimation. Autotest Remove dead code Compile on Windows (export decl fix). Fix versioning of Qt Declarative's in-built types Fixed declarative/parserstress autotest. Fix parsing of regular expression literals. Fill out QGraphicsLayout bindings Update test files to new syntax Compile without Qt3 support. Ensure workerscript.qml works (autotested). ...
Diffstat (limited to 'src/declarative/qml/qdeclarativebinding.cpp')
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index 25492ac..d44e7fb 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -156,6 +156,9 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
QScriptValue scriptValue = d->scriptValue(0, &isUndefined);
if (data->property.propertyTypeCategory() == QDeclarativeProperty::List) {
value = ep->scriptValueToVariant(scriptValue, qMetaTypeId<QList<QObject *> >());
+ } else if (scriptValue.isNull() &&
+ data->property.propertyTypeCategory() == QDeclarativeProperty::Object) {
+ value = QVariant::fromValue((QObject *)0);
} else {
value = ep->scriptValueToVariant(scriptValue, data->property.propertyType());
if (value.userType() == QMetaType::QObjectStar && !qvariant_cast<QObject*>(value)) {
@@ -168,6 +171,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
}
}
+
if (data->error.isValid()) {
} else if (isUndefined && data->property.isResettable()) {
@@ -210,8 +214,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
}
if (data->error.isValid()) {
- if (!data->addError(ep))
- qWarning().nospace() << qPrintable(this->error().toString());
+ if (!data->addError(ep)) ep->warning(this->error());
} else {
data->removeError();
}
@@ -358,8 +361,10 @@ void QDeclarativeAbstractBinding::removeFromObject()
void QDeclarativeAbstractBinding::clear()
{
- if (m_mePtr)
+ if (m_mePtr) {
*m_mePtr = 0;
+ m_mePtr = 0;
+ }
}
QString QDeclarativeAbstractBinding::expression() const