diff options
author | Christopher Ham <christopher.ham@nokia.com> | 2011-01-27 08:04:38 (GMT) |
---|---|---|
committer | Christopher Ham <christopher.ham@nokia.com> | 2011-01-27 08:04:38 (GMT) |
commit | 44c2b8bc246640a011010fc30ebfdc90988ef626 (patch) | |
tree | 16af8e7cf9f2eb355814a781414b7cf7dcab0fe8 /src/declarative | |
parent | ed742d3c46eca7584b6fcb20c2de941852613fb2 (diff) | |
download | Qt-44c2b8bc246640a011010fc30ebfdc90988ef626.zip Qt-44c2b8bc246640a011010fc30ebfdc90988ef626.tar.gz Qt-44c2b8bc246640a011010fc30ebfdc90988ef626.tar.bz2 |
Fix object check in createObject
The 'if' check for the value map was inverted. Spelling in warning
was fixed.
Task-number: QTBUG-13087
Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index bd6e2d8..b634a7a 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -665,8 +665,8 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent, const QScriptV { Q_D(QDeclarativeComponent); - if (valuemap.isObject() && !valuemap.isArray()) { - qmlInfo(this) << tr("creatObject: value is not an object"); + if (!valuemap.isObject() || valuemap.isArray()) { + qmlInfo(this) << tr("createObject: value is not an object"); return QScriptValue(QScriptValue::NullValue); } return d->createObject(parent, valuemap); |